Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Make FRITZ!-workaround optional, not forced
  • Loading branch information
WereCatf authored and perexg committed May 5, 2015
1 parent 10012aa commit 885d68f
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 7 deletions.
4 changes: 4 additions & 0 deletions docs/html/config_tvadapters.html
Expand Up @@ -193,6 +193,10 @@ <h3>The adapters and tuners are listed / edited in a tree</h3>
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
Expand Down
29 changes: 22 additions & 7 deletions src/input/mpegts/satip/satip.c
Expand Up @@ -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",
Expand Down Expand Up @@ -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;
}
}

Expand All @@ -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;
Expand All @@ -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 */
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 885d68f

Please sign in to comment.