From: Jaroslav Kysela Date: Wed, 21 Jan 2015 16:21:29 +0000 (+0100) Subject: linuxdvb: add Tune Before DiseqC option, fixes #2629 X-Git-Tag: v4.1~442 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1377fad8a03eaa73638dbc6c1d7788f75252a4df;p=thirdparty%2Ftvheadend.git linuxdvb: add Tune Before DiseqC option, fixes #2629 --- diff --git a/docs/html/config_tvadapters.html b/docs/html/config_tvadapters.html index 96de929a7..69c1b1320 100644 --- a/docs/html/config_tvadapters.html +++ b/docs/html/config_tvadapters.html @@ -63,6 +63,11 @@ The rows have the following functions
Power Save
If enabled, allows the tuner to go to sleep when idle.
+

+

Tune Before DiseqC
+
If set, one tune request (setup) is proceed before the DiseqC + sequence (voltage, tone settings). Some linux drivers require this + procedure.

Tune Repeats
If set, the tune requests are repeated using this number. Zero means diff --git a/src/input/mpegts/linuxdvb/linuxdvb_private.h b/src/input/mpegts/linuxdvb/linuxdvb_private.h index cac9e5b6c..8115dc163 100644 --- a/src/input/mpegts/linuxdvb/linuxdvb_private.h +++ b/src/input/mpegts/linuxdvb/linuxdvb_private.h @@ -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 */ diff --git a/src/input/mpegts/linuxdvb/linuxdvb_satconf.c b/src/input/mpegts/linuxdvb/linuxdvb_satconf.c index 9f8dc5568..c6ece0213 100644 --- a/src/input/mpegts/linuxdvb/linuxdvb_satconf.c +++ b/src/input/mpegts/linuxdvb/linuxdvb_satconf.c @@ -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", @@ -831,11 +838,8 @@ 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 { @@ -843,11 +847,6 @@ linuxdvb_satconf_start_mux 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; @@ -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 */