]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
linuxdvb: add Tune Before DiseqC option, fixes #2629
authorJaroslav Kysela <perex@perex.cz>
Wed, 21 Jan 2015 16:21:29 +0000 (17:21 +0100)
committerJaroslav Kysela <perex@perex.cz>
Wed, 21 Jan 2015 16:21:29 +0000 (17:21 +0100)
docs/html/config_tvadapters.html
src/input/mpegts/linuxdvb/linuxdvb_private.h
src/input/mpegts/linuxdvb/linuxdvb_satconf.c

index 96de929a795047ff1d4be218e75baba69fafa33a..69c1b13201a4fc7f2e96ee2529e93c0ba0b5950b 100644 (file)
@@ -63,6 +63,11 @@ The rows have the following functions
 <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
index cac9e5b6c885112b1060f6d4b20e2fecb50bb6ab..8115dc163c188f18373bd74023c7066029094278 100644 (file)
@@ -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
    */
index 9f8dc556885526b0b9a2659d6b7cf36ae8c9fe9e..c6ece0213ef89455e4600ca2864154a6df4b34ec 100644 (file)
@@ -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 */