From 13fef9335f4fe2a73e1733f8807e69711736faef Mon Sep 17 00:00:00 2001 From: Andrew de Quincey Date: Tue, 8 Aug 2006 09:10:08 -0300 Subject: V4L/DVB (4383): Convert SEC drivers to new frontend API Convert SEC drivers to new frontend API Signed-off-by: Andrew de Quincey Acked-by: Michael Krufky Acked-by: Trent Piepho Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb/ttpci/av7110.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/media/dvb/ttpci/av7110.c') diff --git a/drivers/media/dvb/ttpci/av7110.c b/drivers/media/dvb/ttpci/av7110.c index 4506165c5de..fa0bed6779b 100644 --- a/drivers/media/dvb/ttpci/av7110.c +++ b/drivers/media/dvb/ttpci/av7110.c @@ -2219,7 +2219,7 @@ static int frontend_init(struct av7110 *av7110) av7110->fe->ops.tuner_ops.set_params = alps_bsbe1_tuner_set_params; av7110->fe->tuner_priv = &av7110->i2c_adap; - if (lnbp21_attach(av7110->fe, &av7110->i2c_adap, 0, 0)) { + if (lnbp21_attach(av7110->fe, &av7110->i2c_adap, 0, 0) == NULL) { printk("dvb-ttpci: LNBP21 not found!\n"); if (av7110->fe->ops.release) av7110->fe->ops.release(av7110->fe); -- cgit v1.2.3 From 2bfe031df6bd5e3b8e503eba8e3b6461d7c2c27e Mon Sep 17 00:00:00 2001 From: Andrew de Quincey Date: Tue, 8 Aug 2006 09:10:08 -0300 Subject: V4L/DVB (4386): Convert DVB devices to use dvb_attach() Only devices using > 1 frontend were ported; ones which did not are left using static binding. Signed-off-by: Andrew de Quincey Acked-by: Michael Krufky Acked-by: Trent Piepho Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb/ttpci/av7110.c | 39 ++++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 17 deletions(-) (limited to 'drivers/media/dvb/ttpci/av7110.c') diff --git a/drivers/media/dvb/ttpci/av7110.c b/drivers/media/dvb/ttpci/av7110.c index fa0bed6779b..d195cf59108 100644 --- a/drivers/media/dvb/ttpci/av7110.c +++ b/drivers/media/dvb/ttpci/av7110.c @@ -1383,8 +1383,12 @@ static void dvb_unregister(struct av7110 *av7110) dvb_dmxdev_release(&av7110->dmxdev); dvb_dmx_release(&av7110->demux); - if (av7110->fe != NULL) + if (av7110->fe != NULL) { dvb_unregister_frontend(av7110->fe); + dvb_detach(av7110->fe->ops.release_sec, av7110->fe); + dvb_detach(av7110->fe->ops.tuner_ops.release, av7110->fe); + dvb_detach(av7110->fe->ops.release, av7110->fe); + } dvb_unregister_device(av7110->osd_dev); av7110_av_unregister(av7110); av7110_ca_unregister(av7110); @@ -2077,7 +2081,7 @@ static int frontend_init(struct av7110 *av7110) if (av7110->dev->pci->subsystem_vendor == 0x110a) { switch(av7110->dev->pci->subsystem_device) { case 0x0000: // Fujitsu/Siemens DVB-Cable (ves1820/Philips CD1516(??)) - av7110->fe = ves1820_attach(&philips_cd1516_config, + av7110->fe = dvb_attach(ves1820_attach, &philips_cd1516_config, &av7110->i2c_adap, read_pwm(av7110)); if (av7110->fe) { av7110->fe->ops.tuner_ops.set_params = philips_cd1516_tuner_set_params; @@ -2092,7 +2096,7 @@ static int frontend_init(struct av7110 *av7110) case 0x1002: // Hauppauge/TT WinTV DVB-S rev1.3SE // try the ALPS BSRV2 first of all - av7110->fe = ves1x93_attach(&alps_bsrv2_config, &av7110->i2c_adap); + av7110->fe = dvb_attach(ves1x93_attach, &alps_bsrv2_config, &av7110->i2c_adap); if (av7110->fe) { av7110->fe->ops.tuner_ops.set_params = alps_bsrv2_tuner_set_params; av7110->fe->ops.diseqc_send_master_cmd = av7110_diseqc_send_master_cmd; @@ -2103,7 +2107,7 @@ static int frontend_init(struct av7110 *av7110) } // try the ALPS BSRU6 now - av7110->fe = stv0299_attach(&alps_bsru6_config, &av7110->i2c_adap); + av7110->fe = dvb_attach(stv0299_attach, &alps_bsru6_config, &av7110->i2c_adap); if (av7110->fe) { av7110->fe->ops.tuner_ops.set_params = alps_bsru6_tuner_set_params; av7110->fe->tuner_priv = &av7110->i2c_adap; @@ -2116,7 +2120,7 @@ static int frontend_init(struct av7110 *av7110) } // Try the grundig 29504-451 - av7110->fe = tda8083_attach(&grundig_29504_451_config, &av7110->i2c_adap); + av7110->fe = dvb_attach(tda8083_attach, &grundig_29504_451_config, &av7110->i2c_adap); if (av7110->fe) { av7110->fe->ops.tuner_ops.set_params = grundig_29504_451_tuner_set_params; av7110->fe->ops.diseqc_send_master_cmd = av7110_diseqc_send_master_cmd; @@ -2130,7 +2134,7 @@ static int frontend_init(struct av7110 *av7110) switch(av7110->dev->pci->subsystem_device) { case 0x0000: /* Siemens DVB-C (full-length card) VES1820/Philips CD1516 */ - av7110->fe = ves1820_attach(&philips_cd1516_config, &av7110->i2c_adap, + av7110->fe = dvb_attach(ves1820_attach, &philips_cd1516_config, &av7110->i2c_adap, read_pwm(av7110)); if (av7110->fe) { av7110->fe->ops.tuner_ops.set_params = philips_cd1516_tuner_set_params; @@ -2138,7 +2142,7 @@ static int frontend_init(struct av7110 *av7110) break; case 0x0003: /* Hauppauge DVB-C 2.1 VES1820/ALPS TDBE2 */ - av7110->fe = ves1820_attach(&alps_tdbe2_config, &av7110->i2c_adap, + av7110->fe = dvb_attach(ves1820_attach, &alps_tdbe2_config, &av7110->i2c_adap, read_pwm(av7110)); if (av7110->fe) { av7110->fe->ops.tuner_ops.set_params = alps_tdbe2_tuner_set_params; @@ -2150,7 +2154,7 @@ static int frontend_init(struct av7110 *av7110) case 0x0001: // Hauppauge/TT Nexus-T premium rev1.X // ALPS TDLB7 - av7110->fe = sp8870_attach(&alps_tdlb7_config, &av7110->i2c_adap); + av7110->fe = dvb_attach(sp8870_attach, &alps_tdlb7_config, &av7110->i2c_adap); if (av7110->fe) { av7110->fe->ops.tuner_ops.set_params = alps_tdlb7_tuner_set_params; } @@ -2158,7 +2162,7 @@ static int frontend_init(struct av7110 *av7110) case 0x0002: // Hauppauge/TT DVB-C premium rev2.X - av7110->fe = ves1820_attach(&alps_tdbe2_config, &av7110->i2c_adap, read_pwm(av7110)); + av7110->fe = dvb_attach(ves1820_attach, &alps_tdbe2_config, &av7110->i2c_adap, read_pwm(av7110)); if (av7110->fe) { av7110->fe->ops.tuner_ops.set_params = alps_tdbe2_tuner_set_params; } @@ -2166,7 +2170,7 @@ static int frontend_init(struct av7110 *av7110) case 0x0004: // Galaxis DVB-S rev1.3 /* ALPS BSRV2 */ - av7110->fe = ves1x93_attach(&alps_bsrv2_config, &av7110->i2c_adap); + av7110->fe = dvb_attach(ves1x93_attach, &alps_bsrv2_config, &av7110->i2c_adap); if (av7110->fe) { av7110->fe->ops.tuner_ops.set_params = alps_bsrv2_tuner_set_params; av7110->fe->ops.diseqc_send_master_cmd = av7110_diseqc_send_master_cmd; @@ -2178,7 +2182,7 @@ static int frontend_init(struct av7110 *av7110) case 0x0006: /* Fujitsu-Siemens DVB-S rev 1.6 */ /* Grundig 29504-451 */ - av7110->fe = tda8083_attach(&grundig_29504_451_config, &av7110->i2c_adap); + av7110->fe = dvb_attach(tda8083_attach, &grundig_29504_451_config, &av7110->i2c_adap); if (av7110->fe) { av7110->fe->ops.tuner_ops.set_params = grundig_29504_451_tuner_set_params; av7110->fe->ops.diseqc_send_master_cmd = av7110_diseqc_send_master_cmd; @@ -2190,7 +2194,7 @@ static int frontend_init(struct av7110 *av7110) case 0x0008: // Hauppauge/TT DVB-T - av7110->fe = l64781_attach(&grundig_29504_401_config, &av7110->i2c_adap); + av7110->fe = dvb_attach(l64781_attach, &grundig_29504_401_config, &av7110->i2c_adap); if (av7110->fe) { av7110->fe->ops.tuner_ops.set_params = grundig_29504_401_tuner_set_params; } @@ -2198,7 +2202,7 @@ static int frontend_init(struct av7110 *av7110) case 0x000A: // Hauppauge/TT Nexus-CA rev1.X - av7110->fe = stv0297_attach(&nexusca_stv0297_config, &av7110->i2c_adap); + av7110->fe = dvb_attach(stv0297_attach, &nexusca_stv0297_config, &av7110->i2c_adap); if (av7110->fe) { av7110->fe->ops.tuner_ops.set_params = nexusca_stv0297_tuner_set_params; @@ -2214,12 +2218,12 @@ static int frontend_init(struct av7110 *av7110) case 0x000E: /* Hauppauge/TT Nexus-S rev 2.3 */ /* ALPS BSBE1 */ - av7110->fe = stv0299_attach(&alps_bsbe1_config, &av7110->i2c_adap); + av7110->fe = dvb_attach(stv0299_attach, &alps_bsbe1_config, &av7110->i2c_adap); if (av7110->fe) { av7110->fe->ops.tuner_ops.set_params = alps_bsbe1_tuner_set_params; av7110->fe->tuner_priv = &av7110->i2c_adap; - if (lnbp21_attach(av7110->fe, &av7110->i2c_adap, 0, 0) == NULL) { + if (dvb_attach(lnbp21_attach, av7110->fe, &av7110->i2c_adap, 0, 0) == NULL) { printk("dvb-ttpci: LNBP21 not found!\n"); if (av7110->fe->ops.release) av7110->fe->ops.release(av7110->fe); @@ -2255,8 +2259,9 @@ static int frontend_init(struct av7110 *av7110) ret = dvb_register_frontend(&av7110->dvb_adapter, av7110->fe); if (ret < 0) { printk("av7110: Frontend registration failed!\n"); - if (av7110->fe->ops.release) - av7110->fe->ops.release(av7110->fe); + dvb_detach(av7110->fe->ops.release_sec, av7110->fe); + dvb_detach(av7110->fe->ops.tuner_ops.release, av7110->fe); + dvb_detach(av7110->fe->ops.release, av7110->fe); av7110->fe = NULL; } } -- cgit v1.2.3 From f52a838b74be70b4054ab27e435e9acb92d8c50a Mon Sep 17 00:00:00 2001 From: Andrew de Quincey Date: Tue, 8 Aug 2006 09:10:09 -0300 Subject: V4L/DVB (4391): Refactor dvb_detach calls into a single dvb_frontend_detach function. Remove buggy dvb_detach() macro and replace with unified dvb_frontend_detach() call. Signed-off-by: Andrew de Quincey Acked-by: Trent Piepho Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb/ttpci/av7110.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'drivers/media/dvb/ttpci/av7110.c') diff --git a/drivers/media/dvb/ttpci/av7110.c b/drivers/media/dvb/ttpci/av7110.c index d195cf59108..5742154d884 100644 --- a/drivers/media/dvb/ttpci/av7110.c +++ b/drivers/media/dvb/ttpci/av7110.c @@ -1385,9 +1385,7 @@ static void dvb_unregister(struct av7110 *av7110) if (av7110->fe != NULL) { dvb_unregister_frontend(av7110->fe); - dvb_detach(av7110->fe->ops.release_sec, av7110->fe); - dvb_detach(av7110->fe->ops.tuner_ops.release, av7110->fe); - dvb_detach(av7110->fe->ops.release, av7110->fe); + dvb_frontend_detach(av7110->fe); } dvb_unregister_device(av7110->osd_dev); av7110_av_unregister(av7110); @@ -2259,9 +2257,7 @@ static int frontend_init(struct av7110 *av7110) ret = dvb_register_frontend(&av7110->dvb_adapter, av7110->fe); if (ret < 0) { printk("av7110: Frontend registration failed!\n"); - dvb_detach(av7110->fe->ops.release_sec, av7110->fe); - dvb_detach(av7110->fe->ops.tuner_ops.release, av7110->fe); - dvb_detach(av7110->fe->ops.release, av7110->fe); + dvb_frontend_detach(av7110->fe); av7110->fe = NULL; } } -- cgit v1.2.3 From 8d90ee5e0e57b67e6e5c01cb14495fb69edccbbf Mon Sep 17 00:00:00 2001 From: Oliver Endriss Date: Mon, 7 Aug 2006 02:04:26 -0300 Subject: V4L/DVB (4478): [av7110] Support Grundig DVB-T tuner for sub-system 13c2:0001 Some DVB-T cards with Grundig 29504-401 tuner use subsystem id 13c2:0001 (reported by Stuart Butterfield). Signed-off-by: Oliver Endriss Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb/ttpci/av7110.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'drivers/media/dvb/ttpci/av7110.c') diff --git a/drivers/media/dvb/ttpci/av7110.c b/drivers/media/dvb/ttpci/av7110.c index 5742154d884..ff6ad04132f 100644 --- a/drivers/media/dvb/ttpci/av7110.c +++ b/drivers/media/dvb/ttpci/av7110.c @@ -2150,12 +2150,19 @@ static int frontend_init(struct av7110 *av7110) break; case 0x0001: // Hauppauge/TT Nexus-T premium rev1.X - - // ALPS TDLB7 + // try ALPS TDLB7 first, then Grundig 29504-401 av7110->fe = dvb_attach(sp8870_attach, &alps_tdlb7_config, &av7110->i2c_adap); if (av7110->fe) { av7110->fe->ops.tuner_ops.set_params = alps_tdlb7_tuner_set_params; + break; } + /* fall-thru */ + + case 0x0008: // Hauppauge/TT DVB-T + // Grundig 29504-401 + av7110->fe = dvb_attach(l64781_attach, &grundig_29504_401_config, &av7110->i2c_adap); + if (av7110->fe) + av7110->fe->ops.tuner_ops.set_params = grundig_29504_401_tuner_set_params; break; case 0x0002: // Hauppauge/TT DVB-C premium rev2.X @@ -2190,14 +2197,6 @@ static int frontend_init(struct av7110 *av7110) } break; - case 0x0008: // Hauppauge/TT DVB-T - - av7110->fe = dvb_attach(l64781_attach, &grundig_29504_401_config, &av7110->i2c_adap); - if (av7110->fe) { - av7110->fe->ops.tuner_ops.set_params = grundig_29504_401_tuner_set_params; - } - break; - case 0x000A: // Hauppauge/TT Nexus-CA rev1.X av7110->fe = dvb_attach(stv0297_attach, &nexusca_stv0297_config, &av7110->i2c_adap); -- cgit v1.2.3 From 0e367a15ed08710098e2ff59aa25cec723c0a9d4 Mon Sep 17 00:00:00 2001 From: Dave Jones Date: Mon, 7 Aug 2006 13:18:56 -0300 Subject: V4L/DVB (4480): Remove null chars from dvb names DVB null terminates its device names, which seems odd, and should be unnecessary. Acked-by: Alan Cox Signed-off-by: Dave Jones Signed-off-by: Andrew Morton Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb/ttpci/av7110.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/media/dvb/ttpci/av7110.c') diff --git a/drivers/media/dvb/ttpci/av7110.c b/drivers/media/dvb/ttpci/av7110.c index ff6ad04132f..57a10141430 100644 --- a/drivers/media/dvb/ttpci/av7110.c +++ b/drivers/media/dvb/ttpci/av7110.c @@ -2823,7 +2823,7 @@ MODULE_DEVICE_TABLE(pci, pci_tbl); static struct saa7146_extension av7110_extension = { - .name = "dvb\0", + .name = "dvb", .flags = SAA7146_I2C_SHORT_DELAY, .module = THIS_MODULE, -- cgit v1.2.3 From d98821e21ecbadb8c4dbf608d25454a8835c0667 Mon Sep 17 00:00:00 2001 From: Oliver Endriss Date: Thu, 14 Sep 2006 00:15:13 -0300 Subject: V4L/DVB (4630): Av7110: FW_LOADER depemdency fixed Do not select FW_LOADER unless it is really required. Signed-off-by: Oliver Endriss Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb/ttpci/av7110.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers/media/dvb/ttpci/av7110.c') diff --git a/drivers/media/dvb/ttpci/av7110.c b/drivers/media/dvb/ttpci/av7110.c index 57a10141430..bba23bcd1b1 100644 --- a/drivers/media/dvb/ttpci/av7110.c +++ b/drivers/media/dvb/ttpci/av7110.c @@ -1701,9 +1701,13 @@ static int alps_tdlb7_tuner_set_params(struct dvb_frontend* fe, struct dvb_front static int alps_tdlb7_request_firmware(struct dvb_frontend* fe, const struct firmware **fw, char* name) { +#if defined(CONFIG_DVB_SP8870) || defined(CONFIG_DVB_SP8870_MODULE) struct av7110* av7110 = (struct av7110*) fe->dvb->priv; return request_firmware(fw, name, &av7110->dev->pci->dev); +#else + return -EINVAL; +#endif } static struct sp8870_config alps_tdlb7_config = { -- cgit v1.2.3