]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Added compatibility mode for SAT-IP tuners that mess up tuner numbers, for example...
authorFlole <flole@flole.de>
Mon, 11 Feb 2019 13:59:40 +0000 (14:59 +0100)
committerJaroslav Kysela <perex@perex.cz>
Thu, 14 Feb 2019 16:03:40 +0000 (17:03 +0100)
src/input/mpegts/satip/satip.c
src/input/mpegts/satip/satip_frontend.c
src/input/mpegts/satip/satip_private.h

index 9733565c7bd9116008f755da8dbebf9dd09c902e..f4170a71aa1d2eb07c24486f7b70fddedc7212f4 100644 (file)
@@ -372,6 +372,16 @@ const idclass_t satip_device_class =
       .opts     = PO_ADVANCED,
       .off      = offsetof(satip_device_t, sd_disable_workarounds),
     },
+    {
+      .type     = PT_BOOL,
+      .id       = "sigtunerno",
+      .name     = N_("Check tuner-number in signal-status messages"),
+      .desc     = N_("This is a workaround for some tuners that mess up "
+                     "the numbers of tuners. Turn this off when you are not "
+                     "seeing signal strength on all tuners but only on some."),
+      .opts     = PO_ADVANCED,
+      .off      = offsetof(satip_device_t, sd_sig_tunerno),
+    },
     {
       .type     = PT_STR,
       .id       = "addr",
@@ -620,6 +630,7 @@ satip_device_create( satip_device_info_t *info )
   sd->sd_pids_deladd = 1;
   sd->sd_fe          = 1;
   sd->sd_sig_scale   = 240;
+  sd->sd_sig_tunerno = 1;
   sd->sd_dbus_allow  = 1;
 
   if (!tvh_hardware_create0((tvh_hardware_t*)sd, &satip_device_class,
index 7c2aa856149d482205a2d0b7f6a9e9cb9300e404..dd2ff67f95c1bc34613ab0f48fb0c740c3f5465f 100644 (file)
@@ -962,6 +962,7 @@ satip_frontend_decode_rtcp( satip_frontend_t *lfe, const char *name,
                             mpegts_mux_instance_t *mmi,
                             uint8_t *rtcp, size_t len )
 {
+  const satip_device_t *device = lfe->sf_device;
   signal_state_t status;
   uint16_t l, sl;
   char *s;
@@ -1034,10 +1035,10 @@ satip_frontend_decode_rtcp( satip_frontend_t *lfe, const char *name,
 __ver12:
           if (n < 4)
             goto fail;
-          if (atoi(argv[0]) != lfe->sf_number)
+          if (atoi(argv[0]) != lfe->sf_number && device->sd_sig_tunerno)
             goto fail;
           mmi->tii_stats.signal =
-            atoi(argv[1]) * 0xffff / lfe->sf_device->sd_sig_scale;
+            atoi(argv[1]) * 0xffff / device->sd_sig_scale;
           mmi->tii_stats.signal_scale =
             SIGNAL_STATUS_SCALE_RELATIVE;
           if (atoi(argv[2]) > 0)
@@ -1059,10 +1060,10 @@ __ver12:
           n = http_tokenize(s, argv, ARRAY_SIZE(argv), ',');
           if (n < 4)
             goto fail;
-          if (atoi(argv[0]) != lfe->sf_number)
+          if (atoi(argv[0]) != lfe->sf_number && device->sd_sig_tunerno)
             goto fail;
           mmi->tii_stats.signal =
-            atoi(argv[1]) * 0xffff / lfe->sf_device->sd_sig_scale;
+            atoi(argv[1]) * 0xffff / device->sd_sig_scale;
           mmi->tii_stats.signal_scale =
             SIGNAL_STATUS_SCALE_RELATIVE;
           if (atoi(argv[2]) > 0)
@@ -1075,10 +1076,10 @@ __ver12:
           n = http_tokenize(s + 14, argv, 4, ',');
           if (n < 4)
             goto fail;
-          if (atoi(argv[0]) != lfe->sf_number)
+          if (atoi(argv[0]) != lfe->sf_number && device->sd_sig_tunerno)
             goto fail;
           mmi->tii_stats.signal =
-            atoi(argv[1]) * 0xffff / lfe->sf_device->sd_sig_scale;
+            atoi(argv[1]) * 0xffff / device->sd_sig_scale;
           mmi->tii_stats.signal_scale =
             SIGNAL_STATUS_SCALE_RELATIVE;
           if (atoi(argv[2]) > 0)
index 175004a07c61cdc2be9a7ef325dc9451164e4094..2ab9068652a415edd828e55b78c74eb325b92758 100644 (file)
@@ -88,6 +88,7 @@ struct satip_device
   int                        sd_pids_deladd;
   int                        sd_fe;
   int                        sd_sig_scale;
+  int                        sd_sig_tunerno;
   char                      *sd_tunercfg;
   int                        sd_pids21;
   int                        sd_pilot_on;