diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-30 12:39:15 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-30 12:39:15 -0400 |
commit | 5ffd1a6aaacc25be8cd0770a51ec6d46add3a276 (patch) | |
tree | 5b076c44f8b7ff88dba9a554d7748c6f083c9071 /drivers/media/dvb/ttpci/av7110.c | |
parent | 0cd43f83d381c4246a08cd775834833d6fd64805 (diff) | |
parent | 8dd86eebc5315910ebfd9f30f1674254308be4b3 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb
* master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb: (180 commits)
V4L/DVB (4641): Trivial: use lowercase letters in hex subsystem ids
V4L/DVB (4639): Cx88: add autodetection for alternate revision of Leadtek PVR
V4L/DVB (4638): Basic DVB-T and analog TV support for the HVR1300.
V4L/DVB (4637): Add a default method for VIDIOC_G_PARM
V4L/DVB (4635): Extend bttv and saa7134 to check for both AGP and PCI PCI failure case
V4L/DVB (4634): Zr36120: implement pcipci checks
V4L/DVB (4632): Zoran: Implement pcipci failure check
V4L/DVB (4631): Av7110: remove V4L2_CAP_VBI_CAPTURE flag
V4L/DVB (4630): Av7110: FW_LOADER depemdency fixed
V4L/DVB (4629): Saa7134: add card support for Proteus Pro 2309
V4L/DVB (4628): Fix VIDIOC_ENUMSTD ioctl in videodev.c
V4L/DVB (4627): Vivi crashes with mplayer
V4L/DVB (4626): On saa7111/7113, LUMA_CTRL need a different value
V4L/DVB (4624): Tvaudio: Replaced kernel_thread() with kthread_run()
V4L/DVB (4622): Copy-paste bug in videodev.c
V4L/DVB (4620): Fix AGC configuration for MOD3000P-based boards
V4L/DVB (4619): Fixes some I2C dependencies on V4L devices
V4L/DVB (4617): Problem with dibusb-mb.c USB IDs
V4L/DVB (4616): [PATCH] Nebula DigiTV USB RC support
V4L/DVB (4614): Export symbol saa7134_tvaudio_setmute from saa7134 for saa7134-alsa
...
Diffstat (limited to 'drivers/media/dvb/ttpci/av7110.c')
-rw-r--r-- | drivers/media/dvb/ttpci/av7110.c | 58 |
1 files changed, 31 insertions, 27 deletions
diff --git a/drivers/media/dvb/ttpci/av7110.c b/drivers/media/dvb/ttpci/av7110.c index 4506165c5de2..bba23bcd1b11 100644 --- a/drivers/media/dvb/ttpci/av7110.c +++ b/drivers/media/dvb/ttpci/av7110.c | |||
@@ -1383,8 +1383,10 @@ static void dvb_unregister(struct av7110 *av7110) | |||
1383 | dvb_dmxdev_release(&av7110->dmxdev); | 1383 | dvb_dmxdev_release(&av7110->dmxdev); |
1384 | dvb_dmx_release(&av7110->demux); | 1384 | dvb_dmx_release(&av7110->demux); |
1385 | 1385 | ||
1386 | if (av7110->fe != NULL) | 1386 | if (av7110->fe != NULL) { |
1387 | dvb_unregister_frontend(av7110->fe); | 1387 | dvb_unregister_frontend(av7110->fe); |
1388 | dvb_frontend_detach(av7110->fe); | ||
1389 | } | ||
1388 | dvb_unregister_device(av7110->osd_dev); | 1390 | dvb_unregister_device(av7110->osd_dev); |
1389 | av7110_av_unregister(av7110); | 1391 | av7110_av_unregister(av7110); |
1390 | av7110_ca_unregister(av7110); | 1392 | av7110_ca_unregister(av7110); |
@@ -1699,9 +1701,13 @@ static int alps_tdlb7_tuner_set_params(struct dvb_frontend* fe, struct dvb_front | |||
1699 | 1701 | ||
1700 | static int alps_tdlb7_request_firmware(struct dvb_frontend* fe, const struct firmware **fw, char* name) | 1702 | static int alps_tdlb7_request_firmware(struct dvb_frontend* fe, const struct firmware **fw, char* name) |
1701 | { | 1703 | { |
1704 | #if defined(CONFIG_DVB_SP8870) || defined(CONFIG_DVB_SP8870_MODULE) | ||
1702 | struct av7110* av7110 = (struct av7110*) fe->dvb->priv; | 1705 | struct av7110* av7110 = (struct av7110*) fe->dvb->priv; |
1703 | 1706 | ||
1704 | return request_firmware(fw, name, &av7110->dev->pci->dev); | 1707 | return request_firmware(fw, name, &av7110->dev->pci->dev); |
1708 | #else | ||
1709 | return -EINVAL; | ||
1710 | #endif | ||
1705 | } | 1711 | } |
1706 | 1712 | ||
1707 | static struct sp8870_config alps_tdlb7_config = { | 1713 | static struct sp8870_config alps_tdlb7_config = { |
@@ -2077,7 +2083,7 @@ static int frontend_init(struct av7110 *av7110) | |||
2077 | if (av7110->dev->pci->subsystem_vendor == 0x110a) { | 2083 | if (av7110->dev->pci->subsystem_vendor == 0x110a) { |
2078 | switch(av7110->dev->pci->subsystem_device) { | 2084 | switch(av7110->dev->pci->subsystem_device) { |
2079 | case 0x0000: // Fujitsu/Siemens DVB-Cable (ves1820/Philips CD1516(??)) | 2085 | case 0x0000: // Fujitsu/Siemens DVB-Cable (ves1820/Philips CD1516(??)) |
2080 | av7110->fe = ves1820_attach(&philips_cd1516_config, | 2086 | av7110->fe = dvb_attach(ves1820_attach, &philips_cd1516_config, |
2081 | &av7110->i2c_adap, read_pwm(av7110)); | 2087 | &av7110->i2c_adap, read_pwm(av7110)); |
2082 | if (av7110->fe) { | 2088 | if (av7110->fe) { |
2083 | av7110->fe->ops.tuner_ops.set_params = philips_cd1516_tuner_set_params; | 2089 | av7110->fe->ops.tuner_ops.set_params = philips_cd1516_tuner_set_params; |
@@ -2092,7 +2098,7 @@ static int frontend_init(struct av7110 *av7110) | |||
2092 | case 0x1002: // Hauppauge/TT WinTV DVB-S rev1.3SE | 2098 | case 0x1002: // Hauppauge/TT WinTV DVB-S rev1.3SE |
2093 | 2099 | ||
2094 | // try the ALPS BSRV2 first of all | 2100 | // try the ALPS BSRV2 first of all |
2095 | av7110->fe = ves1x93_attach(&alps_bsrv2_config, &av7110->i2c_adap); | 2101 | av7110->fe = dvb_attach(ves1x93_attach, &alps_bsrv2_config, &av7110->i2c_adap); |
2096 | if (av7110->fe) { | 2102 | if (av7110->fe) { |
2097 | av7110->fe->ops.tuner_ops.set_params = alps_bsrv2_tuner_set_params; | 2103 | av7110->fe->ops.tuner_ops.set_params = alps_bsrv2_tuner_set_params; |
2098 | av7110->fe->ops.diseqc_send_master_cmd = av7110_diseqc_send_master_cmd; | 2104 | av7110->fe->ops.diseqc_send_master_cmd = av7110_diseqc_send_master_cmd; |
@@ -2103,7 +2109,7 @@ static int frontend_init(struct av7110 *av7110) | |||
2103 | } | 2109 | } |
2104 | 2110 | ||
2105 | // try the ALPS BSRU6 now | 2111 | // try the ALPS BSRU6 now |
2106 | av7110->fe = stv0299_attach(&alps_bsru6_config, &av7110->i2c_adap); | 2112 | av7110->fe = dvb_attach(stv0299_attach, &alps_bsru6_config, &av7110->i2c_adap); |
2107 | if (av7110->fe) { | 2113 | if (av7110->fe) { |
2108 | av7110->fe->ops.tuner_ops.set_params = alps_bsru6_tuner_set_params; | 2114 | av7110->fe->ops.tuner_ops.set_params = alps_bsru6_tuner_set_params; |
2109 | av7110->fe->tuner_priv = &av7110->i2c_adap; | 2115 | av7110->fe->tuner_priv = &av7110->i2c_adap; |
@@ -2116,7 +2122,7 @@ static int frontend_init(struct av7110 *av7110) | |||
2116 | } | 2122 | } |
2117 | 2123 | ||
2118 | // Try the grundig 29504-451 | 2124 | // Try the grundig 29504-451 |
2119 | av7110->fe = tda8083_attach(&grundig_29504_451_config, &av7110->i2c_adap); | 2125 | av7110->fe = dvb_attach(tda8083_attach, &grundig_29504_451_config, &av7110->i2c_adap); |
2120 | if (av7110->fe) { | 2126 | if (av7110->fe) { |
2121 | av7110->fe->ops.tuner_ops.set_params = grundig_29504_451_tuner_set_params; | 2127 | av7110->fe->ops.tuner_ops.set_params = grundig_29504_451_tuner_set_params; |
2122 | av7110->fe->ops.diseqc_send_master_cmd = av7110_diseqc_send_master_cmd; | 2128 | av7110->fe->ops.diseqc_send_master_cmd = av7110_diseqc_send_master_cmd; |
@@ -2130,7 +2136,7 @@ static int frontend_init(struct av7110 *av7110) | |||
2130 | switch(av7110->dev->pci->subsystem_device) { | 2136 | switch(av7110->dev->pci->subsystem_device) { |
2131 | case 0x0000: | 2137 | case 0x0000: |
2132 | /* Siemens DVB-C (full-length card) VES1820/Philips CD1516 */ | 2138 | /* Siemens DVB-C (full-length card) VES1820/Philips CD1516 */ |
2133 | av7110->fe = ves1820_attach(&philips_cd1516_config, &av7110->i2c_adap, | 2139 | av7110->fe = dvb_attach(ves1820_attach, &philips_cd1516_config, &av7110->i2c_adap, |
2134 | read_pwm(av7110)); | 2140 | read_pwm(av7110)); |
2135 | if (av7110->fe) { | 2141 | if (av7110->fe) { |
2136 | av7110->fe->ops.tuner_ops.set_params = philips_cd1516_tuner_set_params; | 2142 | av7110->fe->ops.tuner_ops.set_params = philips_cd1516_tuner_set_params; |
@@ -2138,7 +2144,7 @@ static int frontend_init(struct av7110 *av7110) | |||
2138 | break; | 2144 | break; |
2139 | case 0x0003: | 2145 | case 0x0003: |
2140 | /* Hauppauge DVB-C 2.1 VES1820/ALPS TDBE2 */ | 2146 | /* Hauppauge DVB-C 2.1 VES1820/ALPS TDBE2 */ |
2141 | av7110->fe = ves1820_attach(&alps_tdbe2_config, &av7110->i2c_adap, | 2147 | av7110->fe = dvb_attach(ves1820_attach, &alps_tdbe2_config, &av7110->i2c_adap, |
2142 | read_pwm(av7110)); | 2148 | read_pwm(av7110)); |
2143 | if (av7110->fe) { | 2149 | if (av7110->fe) { |
2144 | av7110->fe->ops.tuner_ops.set_params = alps_tdbe2_tuner_set_params; | 2150 | av7110->fe->ops.tuner_ops.set_params = alps_tdbe2_tuner_set_params; |
@@ -2148,17 +2154,24 @@ static int frontend_init(struct av7110 *av7110) | |||
2148 | break; | 2154 | break; |
2149 | 2155 | ||
2150 | case 0x0001: // Hauppauge/TT Nexus-T premium rev1.X | 2156 | case 0x0001: // Hauppauge/TT Nexus-T premium rev1.X |
2151 | 2157 | // try ALPS TDLB7 first, then Grundig 29504-401 | |
2152 | // ALPS TDLB7 | 2158 | av7110->fe = dvb_attach(sp8870_attach, &alps_tdlb7_config, &av7110->i2c_adap); |
2153 | av7110->fe = sp8870_attach(&alps_tdlb7_config, &av7110->i2c_adap); | ||
2154 | if (av7110->fe) { | 2159 | if (av7110->fe) { |
2155 | av7110->fe->ops.tuner_ops.set_params = alps_tdlb7_tuner_set_params; | 2160 | av7110->fe->ops.tuner_ops.set_params = alps_tdlb7_tuner_set_params; |
2161 | break; | ||
2156 | } | 2162 | } |
2163 | /* fall-thru */ | ||
2164 | |||
2165 | case 0x0008: // Hauppauge/TT DVB-T | ||
2166 | // Grundig 29504-401 | ||
2167 | av7110->fe = dvb_attach(l64781_attach, &grundig_29504_401_config, &av7110->i2c_adap); | ||
2168 | if (av7110->fe) | ||
2169 | av7110->fe->ops.tuner_ops.set_params = grundig_29504_401_tuner_set_params; | ||
2157 | break; | 2170 | break; |
2158 | 2171 | ||
2159 | case 0x0002: // Hauppauge/TT DVB-C premium rev2.X | 2172 | case 0x0002: // Hauppauge/TT DVB-C premium rev2.X |
2160 | 2173 | ||
2161 | av7110->fe = ves1820_attach(&alps_tdbe2_config, &av7110->i2c_adap, read_pwm(av7110)); | 2174 | av7110->fe = dvb_attach(ves1820_attach, &alps_tdbe2_config, &av7110->i2c_adap, read_pwm(av7110)); |
2162 | if (av7110->fe) { | 2175 | if (av7110->fe) { |
2163 | av7110->fe->ops.tuner_ops.set_params = alps_tdbe2_tuner_set_params; | 2176 | av7110->fe->ops.tuner_ops.set_params = alps_tdbe2_tuner_set_params; |
2164 | } | 2177 | } |
@@ -2166,7 +2179,7 @@ static int frontend_init(struct av7110 *av7110) | |||
2166 | 2179 | ||
2167 | case 0x0004: // Galaxis DVB-S rev1.3 | 2180 | case 0x0004: // Galaxis DVB-S rev1.3 |
2168 | /* ALPS BSRV2 */ | 2181 | /* ALPS BSRV2 */ |
2169 | av7110->fe = ves1x93_attach(&alps_bsrv2_config, &av7110->i2c_adap); | 2182 | av7110->fe = dvb_attach(ves1x93_attach, &alps_bsrv2_config, &av7110->i2c_adap); |
2170 | if (av7110->fe) { | 2183 | if (av7110->fe) { |
2171 | av7110->fe->ops.tuner_ops.set_params = alps_bsrv2_tuner_set_params; | 2184 | av7110->fe->ops.tuner_ops.set_params = alps_bsrv2_tuner_set_params; |
2172 | av7110->fe->ops.diseqc_send_master_cmd = av7110_diseqc_send_master_cmd; | 2185 | av7110->fe->ops.diseqc_send_master_cmd = av7110_diseqc_send_master_cmd; |
@@ -2178,7 +2191,7 @@ static int frontend_init(struct av7110 *av7110) | |||
2178 | 2191 | ||
2179 | case 0x0006: /* Fujitsu-Siemens DVB-S rev 1.6 */ | 2192 | case 0x0006: /* Fujitsu-Siemens DVB-S rev 1.6 */ |
2180 | /* Grundig 29504-451 */ | 2193 | /* Grundig 29504-451 */ |
2181 | av7110->fe = tda8083_attach(&grundig_29504_451_config, &av7110->i2c_adap); | 2194 | av7110->fe = dvb_attach(tda8083_attach, &grundig_29504_451_config, &av7110->i2c_adap); |
2182 | if (av7110->fe) { | 2195 | if (av7110->fe) { |
2183 | av7110->fe->ops.tuner_ops.set_params = grundig_29504_451_tuner_set_params; | 2196 | av7110->fe->ops.tuner_ops.set_params = grundig_29504_451_tuner_set_params; |
2184 | av7110->fe->ops.diseqc_send_master_cmd = av7110_diseqc_send_master_cmd; | 2197 | av7110->fe->ops.diseqc_send_master_cmd = av7110_diseqc_send_master_cmd; |
@@ -2188,17 +2201,9 @@ static int frontend_init(struct av7110 *av7110) | |||
2188 | } | 2201 | } |
2189 | break; | 2202 | break; |
2190 | 2203 | ||
2191 | case 0x0008: // Hauppauge/TT DVB-T | ||
2192 | |||
2193 | av7110->fe = l64781_attach(&grundig_29504_401_config, &av7110->i2c_adap); | ||
2194 | if (av7110->fe) { | ||
2195 | av7110->fe->ops.tuner_ops.set_params = grundig_29504_401_tuner_set_params; | ||
2196 | } | ||
2197 | break; | ||
2198 | |||
2199 | case 0x000A: // Hauppauge/TT Nexus-CA rev1.X | 2204 | case 0x000A: // Hauppauge/TT Nexus-CA rev1.X |
2200 | 2205 | ||
2201 | av7110->fe = stv0297_attach(&nexusca_stv0297_config, &av7110->i2c_adap); | 2206 | av7110->fe = dvb_attach(stv0297_attach, &nexusca_stv0297_config, &av7110->i2c_adap); |
2202 | if (av7110->fe) { | 2207 | if (av7110->fe) { |
2203 | av7110->fe->ops.tuner_ops.set_params = nexusca_stv0297_tuner_set_params; | 2208 | av7110->fe->ops.tuner_ops.set_params = nexusca_stv0297_tuner_set_params; |
2204 | 2209 | ||
@@ -2214,12 +2219,12 @@ static int frontend_init(struct av7110 *av7110) | |||
2214 | 2219 | ||
2215 | case 0x000E: /* Hauppauge/TT Nexus-S rev 2.3 */ | 2220 | case 0x000E: /* Hauppauge/TT Nexus-S rev 2.3 */ |
2216 | /* ALPS BSBE1 */ | 2221 | /* ALPS BSBE1 */ |
2217 | av7110->fe = stv0299_attach(&alps_bsbe1_config, &av7110->i2c_adap); | 2222 | av7110->fe = dvb_attach(stv0299_attach, &alps_bsbe1_config, &av7110->i2c_adap); |
2218 | if (av7110->fe) { | 2223 | if (av7110->fe) { |
2219 | av7110->fe->ops.tuner_ops.set_params = alps_bsbe1_tuner_set_params; | 2224 | av7110->fe->ops.tuner_ops.set_params = alps_bsbe1_tuner_set_params; |
2220 | av7110->fe->tuner_priv = &av7110->i2c_adap; | 2225 | av7110->fe->tuner_priv = &av7110->i2c_adap; |
2221 | 2226 | ||
2222 | if (lnbp21_attach(av7110->fe, &av7110->i2c_adap, 0, 0)) { | 2227 | if (dvb_attach(lnbp21_attach, av7110->fe, &av7110->i2c_adap, 0, 0) == NULL) { |
2223 | printk("dvb-ttpci: LNBP21 not found!\n"); | 2228 | printk("dvb-ttpci: LNBP21 not found!\n"); |
2224 | if (av7110->fe->ops.release) | 2229 | if (av7110->fe->ops.release) |
2225 | av7110->fe->ops.release(av7110->fe); | 2230 | av7110->fe->ops.release(av7110->fe); |
@@ -2255,8 +2260,7 @@ static int frontend_init(struct av7110 *av7110) | |||
2255 | ret = dvb_register_frontend(&av7110->dvb_adapter, av7110->fe); | 2260 | ret = dvb_register_frontend(&av7110->dvb_adapter, av7110->fe); |
2256 | if (ret < 0) { | 2261 | if (ret < 0) { |
2257 | printk("av7110: Frontend registration failed!\n"); | 2262 | printk("av7110: Frontend registration failed!\n"); |
2258 | if (av7110->fe->ops.release) | 2263 | dvb_frontend_detach(av7110->fe); |
2259 | av7110->fe->ops.release(av7110->fe); | ||
2260 | av7110->fe = NULL; | 2264 | av7110->fe = NULL; |
2261 | } | 2265 | } |
2262 | } | 2266 | } |
@@ -2823,7 +2827,7 @@ MODULE_DEVICE_TABLE(pci, pci_tbl); | |||
2823 | 2827 | ||
2824 | 2828 | ||
2825 | static struct saa7146_extension av7110_extension = { | 2829 | static struct saa7146_extension av7110_extension = { |
2826 | .name = "dvb\0", | 2830 | .name = "dvb", |
2827 | .flags = SAA7146_I2C_SHORT_DELAY, | 2831 | .flags = SAA7146_I2C_SHORT_DELAY, |
2828 | 2832 | ||
2829 | .module = THIS_MODULE, | 2833 | .module = THIS_MODULE, |