Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
linuxdvb: add Tune Before DiseqC option, fixes #2629
  • Loading branch information
perexg committed Jan 21, 2015
1 parent 8174eb9 commit 1377fad
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 10 deletions.
5 changes: 5 additions & 0 deletions docs/html/config_tvadapters.html
Expand Up @@ -63,6 +63,11 @@ <h3>The adapters and tuners are listed / edited in a tree</h3>
<dl>
<dt><b>Power Save</b></dt>
<dd>If enabled, allows the tuner to go to sleep when idle.</dd>
<p>
<dt><b>Tune Before DiseqC</b></dt>
<dd>If set, one tune request (setup) is proceed before the DiseqC
sequence (voltage, tone settings). Some linux drivers require this
procedure.</dd>
<p>
<dt><b>Tune Repeats</b></dt>
<dd>If set, the tune requests are repeated using this number. Zero means
Expand Down
5 changes: 5 additions & 0 deletions src/input/mpegts/linuxdvb/linuxdvb_private.h
Expand Up @@ -136,6 +136,11 @@ struct linuxdvb_satconf
mpegts_input_t *ls_frontend; ///< Frontend we're proxying for
mpegts_mux_instance_t *ls_mmi; ///< Used within delay diseqc handler

/*
* Tuning
*/
int ls_early_tune;

/*
* Diseqc handling
*/
Expand Down
20 changes: 10 additions & 10 deletions src/input/mpegts/linuxdvb/linuxdvb_satconf.c
Expand Up @@ -215,6 +215,13 @@ const idclass_t linuxdvb_satconf_class =
.ic_get_title = linuxdvb_satconf_class_get_title,
.ic_save = linuxdvb_satconf_class_save,
.ic_properties = (const property_t[]) {
{
.type = PT_BOOL,
.id = "early_tune",
.name = "Tune Before DiseqC",
.off = offsetof(linuxdvb_satconf_t, ls_early_tune),
.opts = PO_ADVANCED,
},
{
.type = PT_INT,
.id = "diseqc_repeats",
Expand Down Expand Up @@ -831,23 +838,15 @@ linuxdvb_satconf_start_mux
f = lse->lse_lnb->lnb_freq(lse->lse_lnb, lm);
if (f == (uint32_t)-1)
return SM_CODE_TUNING_FAILED;
#if 0
// Note: unfortunately, this test also "delays" the valid
// tune request, so it's disabled now until we create
// own parameter validator
if (!lse->lse_en50494) {

if (ls->ls_early_tune && !lse->lse_en50494) {
r = linuxdvb_frontend_tune0(lfe, mmi, f);
if (r) return r;
} else {
/* Clear the frontend settings, open frontend fd */
r = linuxdvb_frontend_clear(lfe);
if (r) return r;
}
#else
/* Clear the frontend settings, open frontend fd */
r = linuxdvb_frontend_clear(lfe);
if (r) return r;
#endif

/* Diseqc */
ls->ls_mmi = mmi;
Expand Down Expand Up @@ -890,6 +889,7 @@ linuxdvb_satconf_create
ls->ls_type = lst->type;
TAILQ_INIT(&ls->ls_elements);

ls->ls_early_tune = 1;
ls->ls_max_rotor_move = 120;

/* Create node */
Expand Down

0 comments on commit 1377fad

Please sign in to comment.