media: si2168: add parameter to disable DVB-T support
Subsystems (2)
PATCH 1/1 media: si2168: add parameter to disable DVB-T support
Some DVB clients are broken and only recognize the DVB-T/T2 support in the frontend. Thus they are unable to use the frontend in DVB-C mode. One example is the incomplete DVBv5 API support added in mythtv 0.30:
https://code.mythtv.org/trac/ticket/12638
The boolean module parameter "disable_dvb_t" removes DVB-T and DVB-T2 from the delsys list in dvb_frontend_ops and thus forces the client to recognize a DVB-C frontend.
--- drivers/media/dvb-frontends/si2168.c | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/media/dvb-frontends/si2168.c +9 -0
@@ -14,10 +14,15 @@* GNU General Public License for more details. */ +#include <linux/module.h> #include <linux/delay.h> #include "si2168_priv.h" +static bool disable_dvb_t; +module_param (disable_dvb_t, bool,0644 ); +MODULE_PARM_DESC (disable_dvb_t,"Disable DVB-T/T2 support (default: enabled)" ); +static const struct dvb_frontend_ops si2168_ops;/* execute firmware command */
@@ -800,6 +805,10 @@ static int si2168_probe(struct i2c_client *client,/* create dvb_frontend */ memcpy (&dev->fe.ops, &si2168_ops,sizeof (struct dvb_frontend_ops )); +if (disable_dvb_t) { +memset (dev->fe.ops.delsys,0 ,sizeof (dev->fe.ops.delsys)); + dev->fe.ops.delsys[0 ] =SYS_DVBC_ANNEX_A ; + } dev->fe.demodulator_priv = client; *config->i2c_adapter = dev->muxc->adapter[0 ]; *config->fe = &dev->fe;
Signature · 1 line
2.20.1
Sean Young
NAKQuoted 9 lines · Stefan Becker
Some DVB clients are broken and only recognize the DVB-T/T2 support in the frontend. Thus they are unable to use the frontend in DVB-C mode. One example is the incomplete DVBv5 API support added in mythtv 0.30:
https://code.mythtv.org/trac/ticket/12638The boolean module parameter "
disable_dvb_t" removes DVB-T and DVB-T2 from the delsys list indvb_frontend_opsand thus forces the client to recognize a DVB-C frontend.
This is wrong in a few ways. DVBv5 has been around for sometime and clients really should be updated by now. If if there were an option to disable DVB-T and DVB-T2 then that would not exist in a specific frontend.
NAK
Sean
Quoted 39 lines
Signed-off-by Stefan Becker <[email protected]>--- drivers/media/dvb-frontends/si2168.c | 9 +++++++++ 1 file changed, 9 insertions(+)drivers/media/dvb-frontends/si2168.c +9
-0@@ -14,10 +14,15 @@* GNU General Public License for more details. */ +#include <linux/module.h> #include <linux/delay.h> #include "si2168_priv.h" +static bool disable_dvb_t; +module_param (disable_dvb_t, bool,0644 ); +MODULE_PARM_DESC (disable_dvb_t,"Disable DVB-T/T2 support (default: enabled)" ); +static const struct dvb_frontend_ops si2168_ops;/* execute firmware command */ @@ -800,6 +805,10 @@ static int si2168_probe(struct i2c_client *client,/* create dvb_frontend */ memcpy (&dev->fe.ops, &si2168_ops,sizeof (struct dvb_frontend_ops )); +if (disable_dvb_t) { +memset (dev->fe.ops.delsys,0 ,sizeof (dev->fe.ops.delsys)); + dev->fe.ops.delsys[0 ] =SYS_DVBC_ANNEX_A ; + } dev->fe.demodulator_priv = client; *config->i2c_adapter = dev->muxc->adapter[0 ]; *config->fe = &dev->fe;Signature · 1 line
2.20.1