linuxdvb: implement 'Full DiseqC', fixes #2547

This commit is contained in:
Jaroslav Kysela 2014-12-14 11:28:37 +01:00
parent c4ce18c47d
commit 5ba47ff711
3 changed files with 16 additions and 0 deletions

View file

@ -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;
/*
@ -157,6 +158,7 @@ struct linuxdvb_satconf
* Satconf elements
*/
linuxdvb_satconf_ele_list_t ls_elements;
linuxdvb_satconf_ele_t *ls_last_switch;
};
/*

View file

@ -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",

View file

@ -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;
@ -201,6 +206,8 @@ linuxdvb_switch_tune
}
}
sc->lse_parent->ls_last_switch = sc;
return 0;
}