]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
linuxdvb: implement 'Full DiseqC', fixes #2547
authorJaroslav Kysela <perex@perex.cz>
Sun, 14 Dec 2014 10:28:37 +0000 (11:28 +0100)
committerJaroslav Kysela <perex@perex.cz>
Sun, 14 Dec 2014 10:28:37 +0000 (11:28 +0100)
src/input/mpegts/linuxdvb/linuxdvb_private.h
src/input/mpegts/linuxdvb/linuxdvb_satconf.c
src/input/mpegts/linuxdvb/linuxdvb_switch.c

index 0826f000ff5a7bf0f0f096cb7fb392df8a84a7e1..aec6b0c5608e4f658588dc4b7d9caa55e6f4a912 100644 (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;
 };
 
 /*
index 90d49a4bd90046cd13b14946d947bd96734052a7..86552a3f320ca81cbf343fe393890496a5cd3ebc 100644 (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",
index 2044c74d74286dc65d44daec743cbb040d58cbbd..6dffe8c2a02716dfda93d8b19eeb065022b83db3 100644 (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;
 }