Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
linuxdvb: implement 'Full DiseqC', fixes #2547
  • Loading branch information
perexg committed Dec 14, 2014
1 parent c4ce18c commit 5ba47ff
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/input/mpegts/linuxdvb/linuxdvb_private.h
Expand Up @@ -136,6 +136,7 @@ struct linuxdvb_satconf
gtimer_t ls_diseqc_timer;
int ls_diseqc_idx;
int ls_diseqc_repeats;
int ls_diseqc_full;
int ls_switch_rotor;

/*
Expand All @@ -157,6 +158,7 @@ struct linuxdvb_satconf
* Satconf elements
*/
linuxdvb_satconf_ele_list_t ls_elements;
linuxdvb_satconf_ele_t *ls_last_switch;
};

/*
Expand Down
7 changes: 7 additions & 0 deletions src/input/mpegts/linuxdvb/linuxdvb_satconf.c
Expand Up @@ -223,6 +223,13 @@ const idclass_t linuxdvb_satconf_class =
.opts = PO_ADVANCED,
.def.i = 0
},
{
.type = PT_BOOL,
.id = "diseqc_full",
.name = "Full DiseqC",
.off = offsetof(linuxdvb_satconf_t, ls_diseqc_full),
.opts = PO_ADVANCED,
},
{
.type = PT_BOOL,
.id = "lnb_poweroff",
Expand Down
7 changes: 7 additions & 0 deletions src/input/mpegts/linuxdvb/linuxdvb_switch.c
Expand Up @@ -150,6 +150,11 @@ linuxdvb_switch_tune
int pol, band;
linuxdvb_switch_t *ls = (linuxdvb_switch_t*)ld;

if (!sc->lse_parent->ls_diseqc_full && sc->lse_parent->ls_last_switch == sc)
return 0;

sc->lse_parent->ls_last_switch = NULL;

/* LNB settings */
pol = (sc->lse_lnb) ? sc->lse_lnb->lnb_pol (sc->lse_lnb, lm) & 0x1 : 0;
band = (sc->lse_lnb) ? sc->lse_lnb->lnb_band(sc->lse_lnb, lm) & 0x1 : 0;
Expand Down Expand Up @@ -201,6 +206,8 @@ linuxdvb_switch_tune
}
}

sc->lse_parent->ls_last_switch = sc;

return 0;
}

Expand Down

0 comments on commit 5ba47ff

Please sign in to comment.