]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Make FRITZ!-workaround optional, not forced
authorWereCatf <werecatf@gmail.com>
Tue, 5 May 2015 17:09:16 +0000 (20:09 +0300)
committerJaroslav Kysela <perex@perex.cz>
Tue, 5 May 2015 21:16:35 +0000 (23:16 +0200)
docs/html/config_tvadapters.html
src/input/mpegts/satip/satip.c

index 01631ebab375f7e0f91c61d705ed758ca20c9773..15d8a9bab613ed72d203221dd58893189d7f832c 100644 (file)
@@ -193,6 +193,10 @@ setting this to 100.</dd>
       AVM's FRITZ!Box Cable 6490, report wrong number of tuners and this setting
       allows you to override that. Any value below 1 or above 32 is ignored.
       For now this setting requires a restart of tvheadend.</dd>
+<p>
+  <dt><b>Enable FRITZ!Box-workarounds</b><dt>
+  <dd>Turns off full mux - and addpids/delpids - support, turns on PIDs in setup,
+      and enables one specific workaround for buggy FRITZ!-devices.</dd>
 <p>
   <dt><b>Force teardown delay</b><dt>
   <dd>Force the delay between RTSP TEARDOWN and RTSP SETUP command (value
index 91c2dec344cbf3b1b84ba3051e0cd891f1c495f6..f44e49afbf43c88936ebf98683dd5be44a262a31 100644 (file)
@@ -202,6 +202,13 @@ const idclass_t satip_device_class =
       .opts     = PO_ADVANCED,
       .off      = offsetof(satip_device_t, sd_pilot_on),
     },
+    {
+      .type     = PT_BOOL,
+      .id       = "fritzquirks",
+      .name     = "Enable FRITZ!Box-workarounds",
+      .opts     = PO_ADVANCED,
+      .off      = offsetof(satip_device_t, sd_fritz_quirk),
+    },
     {
       .type     = PT_INT,
       .id       = "tunercfgoverride",
@@ -391,12 +398,6 @@ satip_device_hack( satip_device_t *sd )
     sd->sd_pids_max    = 128;
     sd->sd_pids_len    = 2048;
     sd->sd_no_univ_lnb = 1;
-  } else if (strstr(sd->sd_info.manufacturer, "AVM Berlin") &&
-             strstr(sd->sd_info.modelname, "FRITZ!")) {
-    sd->sd_fullmux_ok  = 0;
-    sd->sd_pids_deladd = 0;
-    sd->sd_pids0       = 1;
-    sd->sd_fritz_quirk = 1;
   }
 }
 
@@ -414,7 +415,6 @@ satip_device_create( satip_device_info_t *info )
   satip_device_calc_uuid(&uuid, info->uuid);
 
   conf = hts_settings_load("input/satip/adapters/%s", uuid.hex);
-
   /* some sane defaults */
   sd->sd_fullmux_ok  = 1;
   sd->sd_pids_len    = 127;
@@ -423,6 +423,15 @@ satip_device_create( satip_device_info_t *info )
   sd->sd_sig_scale   = 240;
   sd->sd_dbus_allow  = 1;
 
+  /* safe defaults for FRITZ!-devices */
+  if (strstr(info->manufacturer, "AVM Berlin") &&
+             strstr(info->modelname, "FRITZ!")) {
+    sd->sd_fullmux_ok  = 0;
+    sd->sd_pids_deladd = 0;
+    sd->sd_pids0       = 1;
+    sd->sd_fritz_quirk = 1;
+  }
+
   if (!tvh_hardware_create0((tvh_hardware_t*)sd, &satip_device_class,
                             uuid.hex, conf)) {
     /* Note: sd is freed in above fcn */
@@ -516,6 +525,12 @@ satip_device_create( satip_device_info_t *info )
     }
   }
 
+  if (sd->sd_fritz_quirk == 1) {
+    sd->sd_fullmux_ok  = 0;
+    sd->sd_pids_deladd = 0;
+    sd->sd_pids0       = 1;
+  }
+
   if (save)
     satip_device_save(sd);