diff options
Diffstat (limited to 'drivers/media/dvb/ttpci')
-rw-r--r-- | drivers/media/dvb/ttpci/Kconfig | 57 | ||||
-rw-r--r-- | drivers/media/dvb/ttpci/av7110.c | 58 | ||||
-rw-r--r-- | drivers/media/dvb/ttpci/av7110_av.c | 1 | ||||
-rw-r--r-- | drivers/media/dvb/ttpci/av7110_ca.c | 1 | ||||
-rw-r--r-- | drivers/media/dvb/ttpci/av7110_hw.c | 1 | ||||
-rw-r--r-- | drivers/media/dvb/ttpci/av7110_v4l.c | 3 | ||||
-rw-r--r-- | drivers/media/dvb/ttpci/budget-av.c | 184 | ||||
-rw-r--r-- | drivers/media/dvb/ttpci/budget-ci.c | 32 | ||||
-rw-r--r-- | drivers/media/dvb/ttpci/budget-patch.c | 17 | ||||
-rw-r--r-- | drivers/media/dvb/ttpci/budget.c | 53 |
10 files changed, 148 insertions, 259 deletions
diff --git a/drivers/media/dvb/ttpci/Kconfig b/drivers/media/dvb/ttpci/Kconfig index 5fb097595cfb..95531a624991 100644 --- a/drivers/media/dvb/ttpci/Kconfig +++ b/drivers/media/dvb/ttpci/Kconfig | |||
@@ -1,17 +1,17 @@ | |||
1 | config DVB_AV7110 | 1 | config DVB_AV7110 |
2 | tristate "AV7110 cards" | 2 | tristate "AV7110 cards" |
3 | depends on DVB_CORE && PCI && I2C && VIDEO_V4L1 | 3 | depends on DVB_CORE && PCI && I2C && VIDEO_V4L1 |
4 | select FW_LOADER | 4 | select FW_LOADER if !DVB_AV7110_FIRMWARE |
5 | select VIDEO_SAA7146_VV | 5 | select VIDEO_SAA7146_VV |
6 | select DVB_PLL | 6 | select DVB_PLL |
7 | select DVB_VES1820 | 7 | select DVB_VES1820 if !DVB_FE_CUSTOMISE |
8 | select DVB_VES1X93 | 8 | select DVB_VES1X93 if !DVB_FE_CUSTOMISE |
9 | select DVB_STV0299 | 9 | select DVB_STV0299 if !DVB_FE_CUSTOMISE |
10 | select DVB_TDA8083 | 10 | select DVB_TDA8083 if !DVB_FE_CUSTOMISE |
11 | select DVB_SP8870 | 11 | select DVB_SP8870 if !DVB_FE_CUSTOMISE |
12 | select DVB_STV0297 | 12 | select DVB_STV0297 if !DVB_FE_CUSTOMISE |
13 | select DVB_L64781 | 13 | select DVB_L64781 if !DVB_FE_CUSTOMISE |
14 | select DVB_LNBP21 | 14 | select DVB_LNBP21 if !DVB_FE_CUSTOMISE |
15 | help | 15 | help |
16 | Support for SAA7146 and AV7110 based DVB cards as produced | 16 | Support for SAA7146 and AV7110 based DVB cards as produced |
17 | by Fujitsu-Siemens, Technotrend, Hauppauge and others. | 17 | by Fujitsu-Siemens, Technotrend, Hauppauge and others. |
@@ -63,14 +63,16 @@ config DVB_BUDGET | |||
63 | depends on DVB_CORE && PCI && I2C && VIDEO_V4L1 | 63 | depends on DVB_CORE && PCI && I2C && VIDEO_V4L1 |
64 | select VIDEO_SAA7146 | 64 | select VIDEO_SAA7146 |
65 | select DVB_PLL | 65 | select DVB_PLL |
66 | select DVB_STV0299 | 66 | select DVB_STV0299 if !DVB_FE_CUSTOMISE |
67 | select DVB_VES1X93 | 67 | select DVB_VES1X93 if !DVB_FE_CUSTOMISE |
68 | select DVB_VES1820 | 68 | select DVB_VES1820 if !DVB_FE_CUSTOMISE |
69 | select DVB_L64781 | 69 | select DVB_L64781 if !DVB_FE_CUSTOMISE |
70 | select DVB_TDA8083 | 70 | select DVB_TDA8083 if !DVB_FE_CUSTOMISE |
71 | select DVB_TDA10021 | 71 | select DVB_TDA10021 if !DVB_FE_CUSTOMISE |
72 | select DVB_S5H1420 | 72 | select DVB_S5H1420 if !DVB_FE_CUSTOMISE |
73 | select DVB_LNBP21 | 73 | select DVB_TDA10086 if !DVB_FE_CUSTOMISE |
74 | select DVB_TDA826X if !DVB_FE_CUSTOMISE | ||
75 | select DVB_LNBP21 if !DVB_FE_CUSTOMISE | ||
74 | help | 76 | help |
75 | Support for simple SAA7146 based DVB cards | 77 | Support for simple SAA7146 based DVB cards |
76 | (so called Budget- or Nova-PCI cards) without onboard | 78 | (so called Budget- or Nova-PCI cards) without onboard |
@@ -86,10 +88,10 @@ config DVB_BUDGET_CI | |||
86 | depends on DVB_CORE && PCI && I2C && VIDEO_V4L1 | 88 | depends on DVB_CORE && PCI && I2C && VIDEO_V4L1 |
87 | select VIDEO_SAA7146 | 89 | select VIDEO_SAA7146 |
88 | select DVB_PLL | 90 | select DVB_PLL |
89 | select DVB_STV0297 | 91 | select DVB_STV0297 if !DVB_FE_CUSTOMISE |
90 | select DVB_STV0299 | 92 | select DVB_STV0299 if !DVB_FE_CUSTOMISE |
91 | select DVB_TDA1004X | 93 | select DVB_TDA1004X if !DVB_FE_CUSTOMISE |
92 | select DVB_LNBP21 | 94 | select DVB_LNBP21 if !DVB_FE_CUSTOMISE |
93 | help | 95 | help |
94 | Support for simple SAA7146 based DVB cards | 96 | Support for simple SAA7146 based DVB cards |
95 | (so called Budget- or Nova-PCI cards) without onboard | 97 | (so called Budget- or Nova-PCI cards) without onboard |
@@ -108,9 +110,10 @@ config DVB_BUDGET_AV | |||
108 | depends on DVB_CORE && PCI && I2C && VIDEO_V4L1 | 110 | depends on DVB_CORE && PCI && I2C && VIDEO_V4L1 |
109 | select VIDEO_SAA7146_VV | 111 | select VIDEO_SAA7146_VV |
110 | select DVB_PLL | 112 | select DVB_PLL |
111 | select DVB_STV0299 | 113 | select DVB_STV0299 if !DVB_FE_CUSTOMISE |
112 | select DVB_TDA1004X | 114 | select DVB_TDA1004X if !DVB_FE_CUSTOMISE |
113 | select DVB_TDA10021 | 115 | select DVB_TDA10021 if !DVB_FE_CUSTOMISE |
116 | select DVB_TUA6100 if !DVB_FE_CUSTOMISE | ||
114 | select FW_LOADER | 117 | select FW_LOADER |
115 | help | 118 | help |
116 | Support for simple SAA7146 based DVB cards | 119 | Support for simple SAA7146 based DVB cards |
@@ -127,9 +130,9 @@ config DVB_BUDGET_PATCH | |||
127 | depends on DVB_CORE && DVB_BUDGET && VIDEO_V4L1 | 130 | depends on DVB_CORE && DVB_BUDGET && VIDEO_V4L1 |
128 | select DVB_AV7110 | 131 | select DVB_AV7110 |
129 | select DVB_PLL | 132 | select DVB_PLL |
130 | select DVB_STV0299 | 133 | select DVB_STV0299 if !DVB_FE_CUSTOMISE |
131 | select DVB_VES1X93 | 134 | select DVB_VES1X93 if !DVB_FE_CUSTOMISE |
132 | select DVB_TDA8083 | 135 | select DVB_TDA8083 if !DVB_FE_CUSTOMISE |
133 | help | 136 | help |
134 | Support for Budget Patch (full TS) modification on | 137 | Support for Budget Patch (full TS) modification on |
135 | SAA7146+AV7110 based cards (DVB-S cards). This | 138 | SAA7146+AV7110 based cards (DVB-S cards). This |
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, |
diff --git a/drivers/media/dvb/ttpci/av7110_av.c b/drivers/media/dvb/ttpci/av7110_av.c index 0f3a044aeb17..8c577cf30fb3 100644 --- a/drivers/media/dvb/ttpci/av7110_av.c +++ b/drivers/media/dvb/ttpci/av7110_av.c | |||
@@ -33,7 +33,6 @@ | |||
33 | #include <linux/string.h> | 33 | #include <linux/string.h> |
34 | #include <linux/sched.h> | 34 | #include <linux/sched.h> |
35 | #include <linux/delay.h> | 35 | #include <linux/delay.h> |
36 | #include <linux/byteorder/swabb.h> | ||
37 | #include <linux/smp_lock.h> | 36 | #include <linux/smp_lock.h> |
38 | #include <linux/fs.h> | 37 | #include <linux/fs.h> |
39 | 38 | ||
diff --git a/drivers/media/dvb/ttpci/av7110_ca.c b/drivers/media/dvb/ttpci/av7110_ca.c index 6079e8865d5b..dd9aee314e0a 100644 --- a/drivers/media/dvb/ttpci/av7110_ca.c +++ b/drivers/media/dvb/ttpci/av7110_ca.c | |||
@@ -35,7 +35,6 @@ | |||
35 | #include <linux/fs.h> | 35 | #include <linux/fs.h> |
36 | #include <linux/timer.h> | 36 | #include <linux/timer.h> |
37 | #include <linux/poll.h> | 37 | #include <linux/poll.h> |
38 | #include <linux/byteorder/swabb.h> | ||
39 | #include <linux/smp_lock.h> | 38 | #include <linux/smp_lock.h> |
40 | 39 | ||
41 | #include "av7110.h" | 40 | #include "av7110.h" |
diff --git a/drivers/media/dvb/ttpci/av7110_hw.c b/drivers/media/dvb/ttpci/av7110_hw.c index 75736f2fe838..37de2e88a273 100644 --- a/drivers/media/dvb/ttpci/av7110_hw.c +++ b/drivers/media/dvb/ttpci/av7110_hw.c | |||
@@ -34,7 +34,6 @@ | |||
34 | #include <linux/string.h> | 34 | #include <linux/string.h> |
35 | #include <linux/sched.h> | 35 | #include <linux/sched.h> |
36 | #include <linux/delay.h> | 36 | #include <linux/delay.h> |
37 | #include <linux/byteorder/swabb.h> | ||
38 | #include <linux/smp_lock.h> | 37 | #include <linux/smp_lock.h> |
39 | #include <linux/fs.h> | 38 | #include <linux/fs.h> |
40 | 39 | ||
diff --git a/drivers/media/dvb/ttpci/av7110_v4l.c b/drivers/media/dvb/ttpci/av7110_v4l.c index 6ffe53fdcf57..10cfe3131e72 100644 --- a/drivers/media/dvb/ttpci/av7110_v4l.c +++ b/drivers/media/dvb/ttpci/av7110_v4l.c | |||
@@ -32,7 +32,6 @@ | |||
32 | #include <linux/fs.h> | 32 | #include <linux/fs.h> |
33 | #include <linux/timer.h> | 33 | #include <linux/timer.h> |
34 | #include <linux/poll.h> | 34 | #include <linux/poll.h> |
35 | #include <linux/byteorder/swabb.h> | ||
36 | #include <linux/smp_lock.h> | 35 | #include <linux/smp_lock.h> |
37 | 36 | ||
38 | #include "av7110.h" | 37 | #include "av7110.h" |
@@ -922,7 +921,7 @@ static struct saa7146_ext_vv av7110_vv_data_st = { | |||
922 | static struct saa7146_ext_vv av7110_vv_data_c = { | 921 | static struct saa7146_ext_vv av7110_vv_data_c = { |
923 | .inputs = 1, | 922 | .inputs = 1, |
924 | .audios = 1, | 923 | .audios = 1, |
925 | .capabilities = V4L2_CAP_TUNER | V4L2_CAP_VBI_CAPTURE | V4L2_CAP_SLICED_VBI_OUTPUT, | 924 | .capabilities = V4L2_CAP_TUNER | V4L2_CAP_SLICED_VBI_OUTPUT, |
926 | .flags = SAA7146_USE_PORT_B_FOR_VBI, | 925 | .flags = SAA7146_USE_PORT_B_FOR_VBI, |
927 | 926 | ||
928 | .stds = &standard[0], | 927 | .stds = &standard[0], |
diff --git a/drivers/media/dvb/ttpci/budget-av.c b/drivers/media/dvb/ttpci/budget-av.c index 2d21fec23b4d..2235ff8b8a1d 100644 --- a/drivers/media/dvb/ttpci/budget-av.c +++ b/drivers/media/dvb/ttpci/budget-av.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include "stv0299.h" | 37 | #include "stv0299.h" |
38 | #include "tda10021.h" | 38 | #include "tda10021.h" |
39 | #include "tda1004x.h" | 39 | #include "tda1004x.h" |
40 | #include "tua6100.h" | ||
40 | #include "dvb-pll.h" | 41 | #include "dvb-pll.h" |
41 | #include <media/saa7146_vv.h> | 42 | #include <media/saa7146_vv.h> |
42 | #include <linux/module.h> | 43 | #include <linux/module.h> |
@@ -235,7 +236,7 @@ static int ciintf_slot_reset(struct dvb_ca_en50221 *ca, int slot) | |||
235 | 236 | ||
236 | /* set tda10021 back to original clock configuration on reset */ | 237 | /* set tda10021 back to original clock configuration on reset */ |
237 | if (budget_av->tda10021_poclkp) { | 238 | if (budget_av->tda10021_poclkp) { |
238 | tda10021_write_byte(budget_av->budget.dvb_frontend, 0x12, 0xa0); | 239 | tda10021_writereg(budget_av->budget.dvb_frontend, 0x12, 0xa0); |
239 | budget_av->tda10021_ts_enabled = 0; | 240 | budget_av->tda10021_ts_enabled = 0; |
240 | } | 241 | } |
241 | 242 | ||
@@ -257,7 +258,7 @@ static int ciintf_slot_shutdown(struct dvb_ca_en50221 *ca, int slot) | |||
257 | 258 | ||
258 | /* set tda10021 back to original clock configuration when cam removed */ | 259 | /* set tda10021 back to original clock configuration when cam removed */ |
259 | if (budget_av->tda10021_poclkp) { | 260 | if (budget_av->tda10021_poclkp) { |
260 | tda10021_write_byte(budget_av->budget.dvb_frontend, 0x12, 0xa0); | 261 | tda10021_writereg(budget_av->budget.dvb_frontend, 0x12, 0xa0); |
261 | budget_av->tda10021_ts_enabled = 0; | 262 | budget_av->tda10021_ts_enabled = 0; |
262 | } | 263 | } |
263 | return 0; | 264 | return 0; |
@@ -277,7 +278,7 @@ static int ciintf_slot_ts_enable(struct dvb_ca_en50221 *ca, int slot) | |||
277 | 278 | ||
278 | /* tda10021 seems to need a different TS clock config when data is routed to the CAM */ | 279 | /* tda10021 seems to need a different TS clock config when data is routed to the CAM */ |
279 | if (budget_av->tda10021_poclkp) { | 280 | if (budget_av->tda10021_poclkp) { |
280 | tda10021_write_byte(budget_av->budget.dvb_frontend, 0x12, 0xa1); | 281 | tda10021_writereg(budget_av->budget.dvb_frontend, 0x12, 0xa1); |
281 | budget_av->tda10021_ts_enabled = 1; | 282 | budget_av->tda10021_ts_enabled = 1; |
282 | } | 283 | } |
283 | 284 | ||
@@ -548,144 +549,6 @@ static int philips_su1278_ty_ci_tuner_set_params(struct dvb_frontend *fe, | |||
548 | return 0; | 549 | return 0; |
549 | } | 550 | } |
550 | 551 | ||
551 | #define MIN2(a,b) ((a) < (b) ? (a) : (b)) | ||
552 | #define MIN3(a,b,c) MIN2(MIN2(a,b),c) | ||
553 | |||
554 | static int philips_su1278sh2_tua6100_tuner_set_params(struct dvb_frontend *fe, | ||
555 | struct dvb_frontend_parameters *params) | ||
556 | { | ||
557 | u8 reg0 [2] = { 0x00, 0x00 }; | ||
558 | u8 reg1 [4] = { 0x01, 0x00, 0x00, 0x00 }; | ||
559 | u8 reg2 [3] = { 0x02, 0x00, 0x00 }; | ||
560 | int _fband; | ||
561 | int first_ZF; | ||
562 | int R, A, N, P, M; | ||
563 | struct i2c_msg msg = {.addr = 0x60,.flags = 0,.buf = NULL,.len = 0 }; | ||
564 | int freq = params->frequency; | ||
565 | struct budget *budget = (struct budget *) fe->dvb->priv; | ||
566 | |||
567 | first_ZF = (freq) / 1000; | ||
568 | |||
569 | if (abs(MIN2(abs(first_ZF-1190),abs(first_ZF-1790))) < | ||
570 | abs(MIN3(abs(first_ZF-1202),abs(first_ZF-1542),abs(first_ZF-1890)))) | ||
571 | _fband = 2; | ||
572 | else | ||
573 | _fband = 3; | ||
574 | |||
575 | if (_fband == 2) { | ||
576 | if (((first_ZF >= 950) && (first_ZF < 1350)) || | ||
577 | ((first_ZF >= 1430) && (first_ZF < 1950))) | ||
578 | reg0[1] = 0x07; | ||
579 | else if (((first_ZF >= 1350) && (first_ZF < 1430)) || | ||
580 | ((first_ZF >= 1950) && (first_ZF < 2150))) | ||
581 | reg0[1] = 0x0B; | ||
582 | } | ||
583 | |||
584 | if(_fband == 3) { | ||
585 | if (((first_ZF >= 950) && (first_ZF < 1350)) || | ||
586 | ((first_ZF >= 1455) && (first_ZF < 1950))) | ||
587 | reg0[1] = 0x07; | ||
588 | else if (((first_ZF >= 1350) && (first_ZF < 1420)) || | ||
589 | ((first_ZF >= 1950) && (first_ZF < 2150))) | ||
590 | reg0[1] = 0x0B; | ||
591 | else if ((first_ZF >= 1420) && (first_ZF < 1455)) | ||
592 | reg0[1] = 0x0F; | ||
593 | } | ||
594 | |||
595 | if (first_ZF > 1525) | ||
596 | reg1[1] |= 0x80; | ||
597 | else | ||
598 | reg1[1] &= 0x7F; | ||
599 | |||
600 | if (_fband == 2) { | ||
601 | if (first_ZF > 1430) { /* 1430MHZ */ | ||
602 | reg1[1] &= 0xCF; /* N2 */ | ||
603 | reg2[1] &= 0xCF; /* R2 */ | ||
604 | reg2[1] |= 0x10; | ||
605 | } else { | ||
606 | reg1[1] &= 0xCF; /* N2 */ | ||
607 | reg1[1] |= 0x20; | ||
608 | reg2[1] &= 0xCF; /* R2 */ | ||
609 | reg2[1] |= 0x10; | ||
610 | } | ||
611 | } | ||
612 | |||
613 | if (_fband == 3) { | ||
614 | if ((first_ZF >= 1455) && | ||
615 | (first_ZF < 1630)) { | ||
616 | reg1[1] &= 0xCF; /* N2 */ | ||
617 | reg1[1] |= 0x20; | ||
618 | reg2[1] &= 0xCF; /* R2 */ | ||
619 | } else { | ||
620 | if (first_ZF < 1455) { | ||
621 | reg1[1] &= 0xCF; /* N2 */ | ||
622 | reg1[1] |= 0x20; | ||
623 | reg2[1] &= 0xCF; /* R2 */ | ||
624 | reg2[1] |= 0x10; | ||
625 | } else { | ||
626 | if (first_ZF >= 1630) { | ||
627 | reg1[1] &= 0xCF; /* N2 */ | ||
628 | reg2[1] &= 0xCF; /* R2 */ | ||
629 | reg2[1] |= 0x10; | ||
630 | } | ||
631 | } | ||
632 | } | ||
633 | } | ||
634 | |||
635 | /* set ports, enable P0 for symbol rates > 4Ms/s */ | ||
636 | if (params->u.qpsk.symbol_rate >= 4000000) | ||
637 | reg1[1] |= 0x0c; | ||
638 | else | ||
639 | reg1[1] |= 0x04; | ||
640 | |||
641 | reg2[1] |= 0x0c; | ||
642 | |||
643 | R = 64; | ||
644 | A = 64; | ||
645 | P = 64; //32 | ||
646 | |||
647 | M = (freq * R) / 4; /* in Mhz */ | ||
648 | N = (M - A * 1000) / (P * 1000); | ||
649 | |||
650 | reg1[1] |= (N >> 9) & 0x03; | ||
651 | reg1[2] = (N >> 1) & 0xff; | ||
652 | reg1[3] = (N << 7) & 0x80; | ||
653 | |||
654 | reg2[1] |= (R >> 8) & 0x03; | ||
655 | reg2[2] = R & 0xFF; /* R */ | ||
656 | |||
657 | reg1[3] |= A & 0x7f; /* A */ | ||
658 | |||
659 | if (P == 64) | ||
660 | reg1[1] |= 0x40; /* Prescaler 64/65 */ | ||
661 | |||
662 | reg0[1] |= 0x03; | ||
663 | |||
664 | /* already enabled - do not reenable i2c repeater or TX fails */ | ||
665 | if (fe->ops.i2c_gate_ctrl) | ||
666 | fe->ops.i2c_gate_ctrl(fe, 1); | ||
667 | msg.buf = reg0; | ||
668 | msg.len = sizeof(reg0); | ||
669 | if (i2c_transfer(&budget->i2c_adap, &msg, 1) != 1) | ||
670 | return -EIO; | ||
671 | |||
672 | if (fe->ops.i2c_gate_ctrl) | ||
673 | fe->ops.i2c_gate_ctrl(fe, 1); | ||
674 | msg.buf = reg1; | ||
675 | msg.len = sizeof(reg1); | ||
676 | if (i2c_transfer(&budget->i2c_adap, &msg, 1) != 1) | ||
677 | return -EIO; | ||
678 | |||
679 | if (fe->ops.i2c_gate_ctrl) | ||
680 | fe->ops.i2c_gate_ctrl(fe, 1); | ||
681 | msg.buf = reg2; | ||
682 | msg.len = sizeof(reg2); | ||
683 | if (i2c_transfer(&budget->i2c_adap, &msg, 1) != 1) | ||
684 | return -EIO; | ||
685 | |||
686 | return 0; | ||
687 | } | ||
688 | |||
689 | static u8 typhoon_cinergy1200s_inittab[] = { | 552 | static u8 typhoon_cinergy1200s_inittab[] = { |
690 | 0x01, 0x15, | 553 | 0x01, 0x15, |
691 | 0x02, 0x30, | 554 | 0x02, 0x30, |
@@ -1068,9 +931,9 @@ static int tda10021_set_frontend(struct dvb_frontend *fe, | |||
1068 | 931 | ||
1069 | result = budget_av->tda10021_set_frontend(fe, p); | 932 | result = budget_av->tda10021_set_frontend(fe, p); |
1070 | if (budget_av->tda10021_ts_enabled) { | 933 | if (budget_av->tda10021_ts_enabled) { |
1071 | tda10021_write_byte(budget_av->budget.dvb_frontend, 0x12, 0xa1); | 934 | tda10021_writereg(budget_av->budget.dvb_frontend, 0x12, 0xa1); |
1072 | } else { | 935 | } else { |
1073 | tda10021_write_byte(budget_av->budget.dvb_frontend, 0x12, 0xa0); | 936 | tda10021_writereg(budget_av->budget.dvb_frontend, 0x12, 0xa0); |
1074 | } | 937 | } |
1075 | 938 | ||
1076 | return result; | 939 | return result; |
@@ -1096,15 +959,16 @@ static void frontend_init(struct budget_av *budget_av) | |||
1096 | switch (saa->pci->subsystem_device) { | 959 | switch (saa->pci->subsystem_device) { |
1097 | 960 | ||
1098 | case SUBID_DVBS_KNC1: | 961 | case SUBID_DVBS_KNC1: |
962 | case SUBID_DVBS_KNC1_PLUS: | ||
1099 | case SUBID_DVBS_EASYWATCH_1: | 963 | case SUBID_DVBS_EASYWATCH_1: |
1100 | if (saa->pci->subsystem_vendor == 0x1894) { | 964 | if (saa->pci->subsystem_vendor == 0x1894) { |
1101 | fe = stv0299_attach(&cinergy_1200s_1894_0010_config, | 965 | fe = dvb_attach(stv0299_attach, &cinergy_1200s_1894_0010_config, |
1102 | &budget_av->budget.i2c_adap); | 966 | &budget_av->budget.i2c_adap); |
1103 | if (fe) { | 967 | if (fe) { |
1104 | fe->ops.tuner_ops.set_params = philips_su1278sh2_tua6100_tuner_set_params; | 968 | dvb_attach(tua6100_attach, fe, 0x60, &budget_av->budget.i2c_adap); |
1105 | } | 969 | } |
1106 | } else { | 970 | } else { |
1107 | fe = stv0299_attach(&typhoon_config, | 971 | fe = dvb_attach(stv0299_attach, &typhoon_config, |
1108 | &budget_av->budget.i2c_adap); | 972 | &budget_av->budget.i2c_adap); |
1109 | if (fe) { | 973 | if (fe) { |
1110 | fe->ops.tuner_ops.set_params = philips_su1278_ty_ci_tuner_set_params; | 974 | fe->ops.tuner_ops.set_params = philips_su1278_ty_ci_tuner_set_params; |
@@ -1116,16 +980,15 @@ static void frontend_init(struct budget_av *budget_av) | |||
1116 | case SUBID_DVBS_TV_STAR_CI: | 980 | case SUBID_DVBS_TV_STAR_CI: |
1117 | case SUBID_DVBS_CYNERGY1200N: | 981 | case SUBID_DVBS_CYNERGY1200N: |
1118 | case SUBID_DVBS_EASYWATCH: | 982 | case SUBID_DVBS_EASYWATCH: |
1119 | fe = stv0299_attach(&philips_sd1878_config, | 983 | fe = dvb_attach(stv0299_attach, &philips_sd1878_config, |
1120 | &budget_av->budget.i2c_adap); | 984 | &budget_av->budget.i2c_adap); |
1121 | if (fe) { | 985 | if (fe) { |
1122 | fe->ops.tuner_ops.set_params = philips_sd1878_tda8261_tuner_set_params; | 986 | fe->ops.tuner_ops.set_params = philips_sd1878_tda8261_tuner_set_params; |
1123 | } | 987 | } |
1124 | break; | 988 | break; |
1125 | 989 | ||
1126 | case SUBID_DVBS_KNC1_PLUS: | ||
1127 | case SUBID_DVBS_TYPHOON: | 990 | case SUBID_DVBS_TYPHOON: |
1128 | fe = stv0299_attach(&typhoon_config, | 991 | fe = dvb_attach(stv0299_attach, &typhoon_config, |
1129 | &budget_av->budget.i2c_adap); | 992 | &budget_av->budget.i2c_adap); |
1130 | if (fe) { | 993 | if (fe) { |
1131 | fe->ops.tuner_ops.set_params = philips_su1278_ty_ci_tuner_set_params; | 994 | fe->ops.tuner_ops.set_params = philips_su1278_ty_ci_tuner_set_params; |
@@ -1133,7 +996,7 @@ static void frontend_init(struct budget_av *budget_av) | |||
1133 | break; | 996 | break; |
1134 | 997 | ||
1135 | case SUBID_DVBS_CINERGY1200: | 998 | case SUBID_DVBS_CINERGY1200: |
1136 | fe = stv0299_attach(&cinergy_1200s_config, | 999 | fe = dvb_attach(stv0299_attach, &cinergy_1200s_config, |
1137 | &budget_av->budget.i2c_adap); | 1000 | &budget_av->budget.i2c_adap); |
1138 | if (fe) { | 1001 | if (fe) { |
1139 | fe->ops.tuner_ops.set_params = philips_su1278_ty_ci_tuner_set_params; | 1002 | fe->ops.tuner_ops.set_params = philips_su1278_ty_ci_tuner_set_params; |
@@ -1141,19 +1004,10 @@ static void frontend_init(struct budget_av *budget_av) | |||
1141 | break; | 1004 | break; |
1142 | 1005 | ||
1143 | case SUBID_DVBC_KNC1: | 1006 | case SUBID_DVBC_KNC1: |
1144 | budget_av->reinitialise_demod = 1; | ||
1145 | fe = tda10021_attach(&philips_cu1216_config, | ||
1146 | &budget_av->budget.i2c_adap, | ||
1147 | read_pwm(budget_av)); | ||
1148 | if (fe) { | ||
1149 | fe->ops.tuner_ops.set_params = philips_cu1216_tuner_set_params; | ||
1150 | } | ||
1151 | break; | ||
1152 | |||
1153 | case SUBID_DVBC_KNC1_PLUS: | 1007 | case SUBID_DVBC_KNC1_PLUS: |
1154 | case SUBID_DVBC_CINERGY1200: | 1008 | case SUBID_DVBC_CINERGY1200: |
1155 | budget_av->reinitialise_demod = 1; | 1009 | budget_av->reinitialise_demod = 1; |
1156 | fe = tda10021_attach(&philips_cu1216_config, | 1010 | fe = dvb_attach(tda10021_attach, &philips_cu1216_config, |
1157 | &budget_av->budget.i2c_adap, | 1011 | &budget_av->budget.i2c_adap, |
1158 | read_pwm(budget_av)); | 1012 | read_pwm(budget_av)); |
1159 | if (fe) { | 1013 | if (fe) { |
@@ -1168,7 +1022,7 @@ static void frontend_init(struct budget_av *budget_av) | |||
1168 | case SUBID_DVBT_KNC1_PLUS: | 1022 | case SUBID_DVBT_KNC1_PLUS: |
1169 | case SUBID_DVBT_CINERGY1200: | 1023 | case SUBID_DVBT_CINERGY1200: |
1170 | budget_av->reinitialise_demod = 1; | 1024 | budget_av->reinitialise_demod = 1; |
1171 | fe = tda10046_attach(&philips_tu1216_config, | 1025 | fe = dvb_attach(tda10046_attach, &philips_tu1216_config, |
1172 | &budget_av->budget.i2c_adap); | 1026 | &budget_av->budget.i2c_adap); |
1173 | if (fe) { | 1027 | if (fe) { |
1174 | fe->ops.tuner_ops.init = philips_tu1216_tuner_init; | 1028 | fe->ops.tuner_ops.init = philips_tu1216_tuner_init; |
@@ -1192,8 +1046,7 @@ static void frontend_init(struct budget_av *budget_av) | |||
1192 | if (dvb_register_frontend(&budget_av->budget.dvb_adapter, | 1046 | if (dvb_register_frontend(&budget_av->budget.dvb_adapter, |
1193 | budget_av->budget.dvb_frontend)) { | 1047 | budget_av->budget.dvb_frontend)) { |
1194 | printk(KERN_ERR "budget-av: Frontend registration failed!\n"); | 1048 | printk(KERN_ERR "budget-av: Frontend registration failed!\n"); |
1195 | if (budget_av->budget.dvb_frontend->ops.release) | 1049 | dvb_frontend_detach(budget_av->budget.dvb_frontend); |
1196 | budget_av->budget.dvb_frontend->ops.release(budget_av->budget.dvb_frontend); | ||
1197 | budget_av->budget.dvb_frontend = NULL; | 1050 | budget_av->budget.dvb_frontend = NULL; |
1198 | } | 1051 | } |
1199 | } | 1052 | } |
@@ -1227,8 +1080,10 @@ static int budget_av_detach(struct saa7146_dev *dev) | |||
1227 | if (budget_av->budget.ci_present) | 1080 | if (budget_av->budget.ci_present) |
1228 | ciintf_deinit(budget_av); | 1081 | ciintf_deinit(budget_av); |
1229 | 1082 | ||
1230 | if (budget_av->budget.dvb_frontend != NULL) | 1083 | if (budget_av->budget.dvb_frontend != NULL) { |
1231 | dvb_unregister_frontend(budget_av->budget.dvb_frontend); | 1084 | dvb_unregister_frontend(budget_av->budget.dvb_frontend); |
1085 | dvb_frontend_detach(budget_av->budget.dvb_frontend); | ||
1086 | } | ||
1232 | err = ttpci_budget_deinit(&budget_av->budget); | 1087 | err = ttpci_budget_deinit(&budget_av->budget); |
1233 | 1088 | ||
1234 | kfree(budget_av); | 1089 | kfree(budget_av); |
@@ -1400,6 +1255,7 @@ static struct pci_device_id pci_tbl[] = { | |||
1400 | MAKE_EXTENSION_PCI(knc1s, 0x1131, 0x0010), | 1255 | MAKE_EXTENSION_PCI(knc1s, 0x1131, 0x0010), |
1401 | MAKE_EXTENSION_PCI(knc1s, 0x1894, 0x0010), | 1256 | MAKE_EXTENSION_PCI(knc1s, 0x1894, 0x0010), |
1402 | MAKE_EXTENSION_PCI(knc1sp, 0x1131, 0x0011), | 1257 | MAKE_EXTENSION_PCI(knc1sp, 0x1131, 0x0011), |
1258 | MAKE_EXTENSION_PCI(knc1sp, 0x1894, 0x0011), | ||
1403 | MAKE_EXTENSION_PCI(kncxs, 0x1894, 0x0014), | 1259 | MAKE_EXTENSION_PCI(kncxs, 0x1894, 0x0014), |
1404 | MAKE_EXTENSION_PCI(kncxs, 0x1894, 0x0016), | 1260 | MAKE_EXTENSION_PCI(kncxs, 0x1894, 0x0016), |
1405 | MAKE_EXTENSION_PCI(satewpls, 0x1894, 0x001e), | 1261 | MAKE_EXTENSION_PCI(satewpls, 0x1894, 0x001e), |
diff --git a/drivers/media/dvb/ttpci/budget-ci.c b/drivers/media/dvb/ttpci/budget-ci.c index ffbbb3e34be4..2a2e9b400613 100644 --- a/drivers/media/dvb/ttpci/budget-ci.c +++ b/drivers/media/dvb/ttpci/budget-ci.c | |||
@@ -749,17 +749,17 @@ static int philips_tdm1316l_tuner_set_params(struct dvb_frontend *fe, struct dvb | |||
749 | // setup PLL filter and TDA9889 | 749 | // setup PLL filter and TDA9889 |
750 | switch (params->u.ofdm.bandwidth) { | 750 | switch (params->u.ofdm.bandwidth) { |
751 | case BANDWIDTH_6_MHZ: | 751 | case BANDWIDTH_6_MHZ: |
752 | tda1004x_write_byte(fe, 0x0C, 0x14); | 752 | tda1004x_writereg(fe, 0x0C, 0x14); |
753 | filter = 0; | 753 | filter = 0; |
754 | break; | 754 | break; |
755 | 755 | ||
756 | case BANDWIDTH_7_MHZ: | 756 | case BANDWIDTH_7_MHZ: |
757 | tda1004x_write_byte(fe, 0x0C, 0x80); | 757 | tda1004x_writereg(fe, 0x0C, 0x80); |
758 | filter = 0; | 758 | filter = 0; |
759 | break; | 759 | break; |
760 | 760 | ||
761 | case BANDWIDTH_8_MHZ: | 761 | case BANDWIDTH_8_MHZ: |
762 | tda1004x_write_byte(fe, 0x0C, 0x14); | 762 | tda1004x_writereg(fe, 0x0C, 0x14); |
763 | filter = 1; | 763 | filter = 1; |
764 | break; | 764 | break; |
765 | 765 | ||
@@ -988,7 +988,7 @@ static void frontend_init(struct budget_ci *budget_ci) | |||
988 | switch (budget_ci->budget.dev->pci->subsystem_device) { | 988 | switch (budget_ci->budget.dev->pci->subsystem_device) { |
989 | case 0x100c: // Hauppauge/TT Nova-CI budget (stv0299/ALPS BSRU6(tsa5059)) | 989 | case 0x100c: // Hauppauge/TT Nova-CI budget (stv0299/ALPS BSRU6(tsa5059)) |
990 | budget_ci->budget.dvb_frontend = | 990 | budget_ci->budget.dvb_frontend = |
991 | stv0299_attach(&alps_bsru6_config, &budget_ci->budget.i2c_adap); | 991 | dvb_attach(stv0299_attach, &alps_bsru6_config, &budget_ci->budget.i2c_adap); |
992 | if (budget_ci->budget.dvb_frontend) { | 992 | if (budget_ci->budget.dvb_frontend) { |
993 | budget_ci->budget.dvb_frontend->ops.tuner_ops.set_params = alps_bsru6_tuner_set_params; | 993 | budget_ci->budget.dvb_frontend->ops.tuner_ops.set_params = alps_bsru6_tuner_set_params; |
994 | budget_ci->budget.dvb_frontend->tuner_priv = &budget_ci->budget.i2c_adap; | 994 | budget_ci->budget.dvb_frontend->tuner_priv = &budget_ci->budget.i2c_adap; |
@@ -998,7 +998,7 @@ static void frontend_init(struct budget_ci *budget_ci) | |||
998 | 998 | ||
999 | case 0x100f: // Hauppauge/TT Nova-CI budget (stv0299b/Philips su1278(tsa5059)) | 999 | case 0x100f: // Hauppauge/TT Nova-CI budget (stv0299b/Philips su1278(tsa5059)) |
1000 | budget_ci->budget.dvb_frontend = | 1000 | budget_ci->budget.dvb_frontend = |
1001 | stv0299_attach(&philips_su1278_tt_config, &budget_ci->budget.i2c_adap); | 1001 | dvb_attach(stv0299_attach, &philips_su1278_tt_config, &budget_ci->budget.i2c_adap); |
1002 | if (budget_ci->budget.dvb_frontend) { | 1002 | if (budget_ci->budget.dvb_frontend) { |
1003 | budget_ci->budget.dvb_frontend->ops.tuner_ops.set_params = philips_su1278_tt_tuner_set_params; | 1003 | budget_ci->budget.dvb_frontend->ops.tuner_ops.set_params = philips_su1278_tt_tuner_set_params; |
1004 | break; | 1004 | break; |
@@ -1008,7 +1008,7 @@ static void frontend_init(struct budget_ci *budget_ci) | |||
1008 | case 0x1010: // TT DVB-C CI budget (stv0297/Philips tdm1316l(tda6651tt)) | 1008 | case 0x1010: // TT DVB-C CI budget (stv0297/Philips tdm1316l(tda6651tt)) |
1009 | budget_ci->tuner_pll_address = 0x61; | 1009 | budget_ci->tuner_pll_address = 0x61; |
1010 | budget_ci->budget.dvb_frontend = | 1010 | budget_ci->budget.dvb_frontend = |
1011 | stv0297_attach(&dvbc_philips_tdm1316l_config, &budget_ci->budget.i2c_adap); | 1011 | dvb_attach(stv0297_attach, &dvbc_philips_tdm1316l_config, &budget_ci->budget.i2c_adap); |
1012 | if (budget_ci->budget.dvb_frontend) { | 1012 | if (budget_ci->budget.dvb_frontend) { |
1013 | budget_ci->budget.dvb_frontend->ops.tuner_ops.set_params = dvbc_philips_tdm1316l_tuner_set_params; | 1013 | budget_ci->budget.dvb_frontend->ops.tuner_ops.set_params = dvbc_philips_tdm1316l_tuner_set_params; |
1014 | break; | 1014 | break; |
@@ -1018,7 +1018,7 @@ static void frontend_init(struct budget_ci *budget_ci) | |||
1018 | case 0x1011: // Hauppauge/TT Nova-T budget (tda10045/Philips tdm1316l(tda6651tt) + TDA9889) | 1018 | case 0x1011: // Hauppauge/TT Nova-T budget (tda10045/Philips tdm1316l(tda6651tt) + TDA9889) |
1019 | budget_ci->tuner_pll_address = 0x63; | 1019 | budget_ci->tuner_pll_address = 0x63; |
1020 | budget_ci->budget.dvb_frontend = | 1020 | budget_ci->budget.dvb_frontend = |
1021 | tda10045_attach(&philips_tdm1316l_config, &budget_ci->budget.i2c_adap); | 1021 | dvb_attach(tda10045_attach, &philips_tdm1316l_config, &budget_ci->budget.i2c_adap); |
1022 | if (budget_ci->budget.dvb_frontend) { | 1022 | if (budget_ci->budget.dvb_frontend) { |
1023 | budget_ci->budget.dvb_frontend->ops.tuner_ops.init = philips_tdm1316l_tuner_init; | 1023 | budget_ci->budget.dvb_frontend->ops.tuner_ops.init = philips_tdm1316l_tuner_init; |
1024 | budget_ci->budget.dvb_frontend->ops.tuner_ops.set_params = philips_tdm1316l_tuner_set_params; | 1024 | budget_ci->budget.dvb_frontend->ops.tuner_ops.set_params = philips_tdm1316l_tuner_set_params; |
@@ -1029,7 +1029,7 @@ static void frontend_init(struct budget_ci *budget_ci) | |||
1029 | case 0x1012: // TT DVB-T CI budget (tda10046/Philips tdm1316l(tda6651tt)) | 1029 | case 0x1012: // TT DVB-T CI budget (tda10046/Philips tdm1316l(tda6651tt)) |
1030 | budget_ci->tuner_pll_address = 0x60; | 1030 | budget_ci->tuner_pll_address = 0x60; |
1031 | budget_ci->budget.dvb_frontend = | 1031 | budget_ci->budget.dvb_frontend = |
1032 | tda10046_attach(&philips_tdm1316l_config, &budget_ci->budget.i2c_adap); | 1032 | dvb_attach(tda10046_attach, &philips_tdm1316l_config, &budget_ci->budget.i2c_adap); |
1033 | if (budget_ci->budget.dvb_frontend) { | 1033 | if (budget_ci->budget.dvb_frontend) { |
1034 | budget_ci->budget.dvb_frontend->ops.tuner_ops.init = philips_tdm1316l_tuner_init; | 1034 | budget_ci->budget.dvb_frontend->ops.tuner_ops.init = philips_tdm1316l_tuner_init; |
1035 | budget_ci->budget.dvb_frontend->ops.tuner_ops.set_params = philips_tdm1316l_tuner_set_params; | 1035 | budget_ci->budget.dvb_frontend->ops.tuner_ops.set_params = philips_tdm1316l_tuner_set_params; |
@@ -1038,16 +1038,15 @@ static void frontend_init(struct budget_ci *budget_ci) | |||
1038 | break; | 1038 | break; |
1039 | 1039 | ||
1040 | case 0x1017: // TT S-1500 PCI | 1040 | case 0x1017: // TT S-1500 PCI |
1041 | budget_ci->budget.dvb_frontend = stv0299_attach(&alps_bsbe1_config, &budget_ci->budget.i2c_adap); | 1041 | budget_ci->budget.dvb_frontend = dvb_attach(stv0299_attach, &alps_bsbe1_config, &budget_ci->budget.i2c_adap); |
1042 | if (budget_ci->budget.dvb_frontend) { | 1042 | if (budget_ci->budget.dvb_frontend) { |
1043 | budget_ci->budget.dvb_frontend->ops.tuner_ops.set_params = alps_bsbe1_tuner_set_params; | 1043 | budget_ci->budget.dvb_frontend->ops.tuner_ops.set_params = alps_bsbe1_tuner_set_params; |
1044 | budget_ci->budget.dvb_frontend->tuner_priv = &budget_ci->budget.i2c_adap; | 1044 | budget_ci->budget.dvb_frontend->tuner_priv = &budget_ci->budget.i2c_adap; |
1045 | 1045 | ||
1046 | budget_ci->budget.dvb_frontend->ops.dishnetwork_send_legacy_command = NULL; | 1046 | budget_ci->budget.dvb_frontend->ops.dishnetwork_send_legacy_command = NULL; |
1047 | if (lnbp21_attach(budget_ci->budget.dvb_frontend, &budget_ci->budget.i2c_adap, LNBP21_LLC, 0)) { | 1047 | if (dvb_attach(lnbp21_attach, budget_ci->budget.dvb_frontend, &budget_ci->budget.i2c_adap, LNBP21_LLC, 0) == NULL) { |
1048 | printk("%s: No LNBP21 found!\n", __FUNCTION__); | 1048 | printk("%s: No LNBP21 found!\n", __FUNCTION__); |
1049 | if (budget_ci->budget.dvb_frontend->ops.release) | 1049 | dvb_frontend_detach(budget_ci->budget.dvb_frontend); |
1050 | budget_ci->budget.dvb_frontend->ops.release(budget_ci->budget.dvb_frontend); | ||
1051 | budget_ci->budget.dvb_frontend = NULL; | 1050 | budget_ci->budget.dvb_frontend = NULL; |
1052 | } | 1051 | } |
1053 | } | 1052 | } |
@@ -1065,8 +1064,7 @@ static void frontend_init(struct budget_ci *budget_ci) | |||
1065 | if (dvb_register_frontend | 1064 | if (dvb_register_frontend |
1066 | (&budget_ci->budget.dvb_adapter, budget_ci->budget.dvb_frontend)) { | 1065 | (&budget_ci->budget.dvb_adapter, budget_ci->budget.dvb_frontend)) { |
1067 | printk("budget-ci: Frontend registration failed!\n"); | 1066 | printk("budget-ci: Frontend registration failed!\n"); |
1068 | if (budget_ci->budget.dvb_frontend->ops.release) | 1067 | dvb_frontend_detach(budget_ci->budget.dvb_frontend); |
1069 | budget_ci->budget.dvb_frontend->ops.release(budget_ci->budget.dvb_frontend); | ||
1070 | budget_ci->budget.dvb_frontend = NULL; | 1068 | budget_ci->budget.dvb_frontend = NULL; |
1071 | } | 1069 | } |
1072 | } | 1070 | } |
@@ -1114,8 +1112,10 @@ static int budget_ci_detach(struct saa7146_dev *dev) | |||
1114 | 1112 | ||
1115 | if (budget_ci->budget.ci_present) | 1113 | if (budget_ci->budget.ci_present) |
1116 | ciintf_deinit(budget_ci); | 1114 | ciintf_deinit(budget_ci); |
1117 | if (budget_ci->budget.dvb_frontend) | 1115 | if (budget_ci->budget.dvb_frontend) { |
1118 | dvb_unregister_frontend(budget_ci->budget.dvb_frontend); | 1116 | dvb_unregister_frontend(budget_ci->budget.dvb_frontend); |
1117 | dvb_frontend_detach(budget_ci->budget.dvb_frontend); | ||
1118 | } | ||
1119 | err = ttpci_budget_deinit(&budget_ci->budget); | 1119 | err = ttpci_budget_deinit(&budget_ci->budget); |
1120 | 1120 | ||
1121 | tasklet_kill(&budget_ci->msp430_irq_tasklet); | 1121 | tasklet_kill(&budget_ci->msp430_irq_tasklet); |
@@ -1153,7 +1153,7 @@ static struct pci_device_id pci_tbl[] = { | |||
1153 | MODULE_DEVICE_TABLE(pci, pci_tbl); | 1153 | MODULE_DEVICE_TABLE(pci, pci_tbl); |
1154 | 1154 | ||
1155 | static struct saa7146_extension budget_extension = { | 1155 | static struct saa7146_extension budget_extension = { |
1156 | .name = "budget_ci dvb\0", | 1156 | .name = "budget_ci dvb", |
1157 | .flags = SAA7146_I2C_SHORT_DELAY, | 1157 | .flags = SAA7146_I2C_SHORT_DELAY, |
1158 | 1158 | ||
1159 | .module = THIS_MODULE, | 1159 | .module = THIS_MODULE, |
diff --git a/drivers/media/dvb/ttpci/budget-patch.c b/drivers/media/dvb/ttpci/budget-patch.c index 57227441891e..fc1267b8c892 100644 --- a/drivers/media/dvb/ttpci/budget-patch.c +++ b/drivers/media/dvb/ttpci/budget-patch.c | |||
@@ -325,7 +325,7 @@ static void frontend_init(struct budget_patch* budget) | |||
325 | case 0x1013: // SATELCO Multimedia PCI | 325 | case 0x1013: // SATELCO Multimedia PCI |
326 | 326 | ||
327 | // try the ALPS BSRV2 first of all | 327 | // try the ALPS BSRV2 first of all |
328 | budget->dvb_frontend = ves1x93_attach(&alps_bsrv2_config, &budget->i2c_adap); | 328 | budget->dvb_frontend = dvb_attach(ves1x93_attach, &alps_bsrv2_config, &budget->i2c_adap); |
329 | if (budget->dvb_frontend) { | 329 | if (budget->dvb_frontend) { |
330 | budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsrv2_tuner_set_params; | 330 | budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsrv2_tuner_set_params; |
331 | budget->dvb_frontend->ops.diseqc_send_master_cmd = budget_patch_diseqc_send_master_cmd; | 331 | budget->dvb_frontend->ops.diseqc_send_master_cmd = budget_patch_diseqc_send_master_cmd; |
@@ -335,7 +335,7 @@ static void frontend_init(struct budget_patch* budget) | |||
335 | } | 335 | } |
336 | 336 | ||
337 | // try the ALPS BSRU6 now | 337 | // try the ALPS BSRU6 now |
338 | budget->dvb_frontend = stv0299_attach(&alps_bsru6_config, &budget->i2c_adap); | 338 | budget->dvb_frontend = dvb_attach(stv0299_attach, &alps_bsru6_config, &budget->i2c_adap); |
339 | if (budget->dvb_frontend) { | 339 | if (budget->dvb_frontend) { |
340 | budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsru6_tuner_set_params; | 340 | budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsru6_tuner_set_params; |
341 | budget->dvb_frontend->tuner_priv = &budget->i2c_adap; | 341 | budget->dvb_frontend->tuner_priv = &budget->i2c_adap; |
@@ -347,7 +347,7 @@ static void frontend_init(struct budget_patch* budget) | |||
347 | } | 347 | } |
348 | 348 | ||
349 | // Try the grundig 29504-451 | 349 | // Try the grundig 29504-451 |
350 | budget->dvb_frontend = tda8083_attach(&grundig_29504_451_config, &budget->i2c_adap); | 350 | budget->dvb_frontend = dvb_attach(tda8083_attach, &grundig_29504_451_config, &budget->i2c_adap); |
351 | if (budget->dvb_frontend) { | 351 | if (budget->dvb_frontend) { |
352 | budget->dvb_frontend->ops.tuner_ops.set_params = grundig_29504_451_tuner_set_params; | 352 | budget->dvb_frontend->ops.tuner_ops.set_params = grundig_29504_451_tuner_set_params; |
353 | budget->dvb_frontend->ops.diseqc_send_master_cmd = budget_diseqc_send_master_cmd; | 353 | budget->dvb_frontend->ops.diseqc_send_master_cmd = budget_diseqc_send_master_cmd; |
@@ -367,8 +367,7 @@ static void frontend_init(struct budget_patch* budget) | |||
367 | } else { | 367 | } else { |
368 | if (dvb_register_frontend(&budget->dvb_adapter, budget->dvb_frontend)) { | 368 | if (dvb_register_frontend(&budget->dvb_adapter, budget->dvb_frontend)) { |
369 | printk("budget-av: Frontend registration failed!\n"); | 369 | printk("budget-av: Frontend registration failed!\n"); |
370 | if (budget->dvb_frontend->ops.release) | 370 | dvb_frontend_detach(budget->dvb_frontend); |
371 | budget->dvb_frontend->ops.release(budget->dvb_frontend); | ||
372 | budget->dvb_frontend = NULL; | 371 | budget->dvb_frontend = NULL; |
373 | } | 372 | } |
374 | } | 373 | } |
@@ -627,8 +626,10 @@ static int budget_patch_detach (struct saa7146_dev* dev) | |||
627 | struct budget_patch *budget = (struct budget_patch*) dev->ext_priv; | 626 | struct budget_patch *budget = (struct budget_patch*) dev->ext_priv; |
628 | int err; | 627 | int err; |
629 | 628 | ||
630 | if (budget->dvb_frontend) dvb_unregister_frontend(budget->dvb_frontend); | 629 | if (budget->dvb_frontend) { |
631 | 630 | dvb_unregister_frontend(budget->dvb_frontend); | |
631 | dvb_frontend_detach(budget->dvb_frontend); | ||
632 | } | ||
632 | err = ttpci_budget_deinit (budget); | 633 | err = ttpci_budget_deinit (budget); |
633 | 634 | ||
634 | kfree (budget); | 635 | kfree (budget); |
@@ -647,7 +648,7 @@ static void __exit budget_patch_exit(void) | |||
647 | } | 648 | } |
648 | 649 | ||
649 | static struct saa7146_extension budget_extension = { | 650 | static struct saa7146_extension budget_extension = { |
650 | .name = "budget_patch dvb\0", | 651 | .name = "budget_patch dvb", |
651 | .flags = 0, | 652 | .flags = 0, |
652 | 653 | ||
653 | .module = THIS_MODULE, | 654 | .module = THIS_MODULE, |
diff --git a/drivers/media/dvb/ttpci/budget.c b/drivers/media/dvb/ttpci/budget.c index 863dffb4ed8e..e58f0391e9d1 100644 --- a/drivers/media/dvb/ttpci/budget.c +++ b/drivers/media/dvb/ttpci/budget.c | |||
@@ -41,6 +41,8 @@ | |||
41 | #include "l64781.h" | 41 | #include "l64781.h" |
42 | #include "tda8083.h" | 42 | #include "tda8083.h" |
43 | #include "s5h1420.h" | 43 | #include "s5h1420.h" |
44 | #include "tda10086.h" | ||
45 | #include "tda826x.h" | ||
44 | #include "lnbp21.h" | 46 | #include "lnbp21.h" |
45 | #include "bsru6.h" | 47 | #include "bsru6.h" |
46 | 48 | ||
@@ -342,6 +344,11 @@ static struct s5h1420_config s5h1420_config = { | |||
342 | .invert = 1, | 344 | .invert = 1, |
343 | }; | 345 | }; |
344 | 346 | ||
347 | static struct tda10086_config tda10086_config = { | ||
348 | .demod_address = 0x0e, | ||
349 | .invert = 0, | ||
350 | }; | ||
351 | |||
345 | static u8 read_pwm(struct budget* budget) | 352 | static u8 read_pwm(struct budget* budget) |
346 | { | 353 | { |
347 | u8 b = 0xff; | 354 | u8 b = 0xff; |
@@ -361,7 +368,7 @@ static void frontend_init(struct budget *budget) | |||
361 | case 0x1003: // Hauppauge/TT Nova budget (stv0299/ALPS BSRU6(tsa5059) OR ves1893/ALPS BSRV2(sp5659)) | 368 | case 0x1003: // Hauppauge/TT Nova budget (stv0299/ALPS BSRU6(tsa5059) OR ves1893/ALPS BSRV2(sp5659)) |
362 | case 0x1013: | 369 | case 0x1013: |
363 | // try the ALPS BSRV2 first of all | 370 | // try the ALPS BSRV2 first of all |
364 | budget->dvb_frontend = ves1x93_attach(&alps_bsrv2_config, &budget->i2c_adap); | 371 | budget->dvb_frontend = dvb_attach(ves1x93_attach, &alps_bsrv2_config, &budget->i2c_adap); |
365 | if (budget->dvb_frontend) { | 372 | if (budget->dvb_frontend) { |
366 | budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsrv2_tuner_set_params; | 373 | budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsrv2_tuner_set_params; |
367 | budget->dvb_frontend->ops.diseqc_send_master_cmd = budget_diseqc_send_master_cmd; | 374 | budget->dvb_frontend->ops.diseqc_send_master_cmd = budget_diseqc_send_master_cmd; |
@@ -371,7 +378,7 @@ static void frontend_init(struct budget *budget) | |||
371 | } | 378 | } |
372 | 379 | ||
373 | // try the ALPS BSRU6 now | 380 | // try the ALPS BSRU6 now |
374 | budget->dvb_frontend = stv0299_attach(&alps_bsru6_config, &budget->i2c_adap); | 381 | budget->dvb_frontend = dvb_attach(stv0299_attach, &alps_bsru6_config, &budget->i2c_adap); |
375 | if (budget->dvb_frontend) { | 382 | if (budget->dvb_frontend) { |
376 | budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsru6_tuner_set_params; | 383 | budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsru6_tuner_set_params; |
377 | budget->dvb_frontend->tuner_priv = &budget->i2c_adap; | 384 | budget->dvb_frontend->tuner_priv = &budget->i2c_adap; |
@@ -381,7 +388,7 @@ static void frontend_init(struct budget *budget) | |||
381 | 388 | ||
382 | case 0x1004: // Hauppauge/TT DVB-C budget (ves1820/ALPS TDBE2(sp5659)) | 389 | case 0x1004: // Hauppauge/TT DVB-C budget (ves1820/ALPS TDBE2(sp5659)) |
383 | 390 | ||
384 | budget->dvb_frontend = ves1820_attach(&alps_tdbe2_config, &budget->i2c_adap, read_pwm(budget)); | 391 | budget->dvb_frontend = dvb_attach(ves1820_attach, &alps_tdbe2_config, &budget->i2c_adap, read_pwm(budget)); |
385 | if (budget->dvb_frontend) { | 392 | if (budget->dvb_frontend) { |
386 | budget->dvb_frontend->ops.tuner_ops.set_params = alps_tdbe2_tuner_set_params; | 393 | budget->dvb_frontend->ops.tuner_ops.set_params = alps_tdbe2_tuner_set_params; |
387 | break; | 394 | break; |
@@ -390,7 +397,7 @@ static void frontend_init(struct budget *budget) | |||
390 | 397 | ||
391 | case 0x1005: // Hauppauge/TT Nova-T budget (L64781/Grundig 29504-401(tsa5060)) | 398 | case 0x1005: // Hauppauge/TT Nova-T budget (L64781/Grundig 29504-401(tsa5060)) |
392 | 399 | ||
393 | budget->dvb_frontend = l64781_attach(&grundig_29504_401_config, &budget->i2c_adap); | 400 | budget->dvb_frontend = dvb_attach(l64781_attach, &grundig_29504_401_config, &budget->i2c_adap); |
394 | if (budget->dvb_frontend) { | 401 | if (budget->dvb_frontend) { |
395 | budget->dvb_frontend->ops.tuner_ops.set_params = grundig_29504_401_tuner_set_params; | 402 | budget->dvb_frontend->ops.tuner_ops.set_params = grundig_29504_401_tuner_set_params; |
396 | break; | 403 | break; |
@@ -398,7 +405,7 @@ static void frontend_init(struct budget *budget) | |||
398 | break; | 405 | break; |
399 | 406 | ||
400 | case 0x4f60: // Fujitsu Siemens Activy Budget-S PCI rev AL (stv0299/ALPS BSRU6(tsa5059)) | 407 | case 0x4f60: // Fujitsu Siemens Activy Budget-S PCI rev AL (stv0299/ALPS BSRU6(tsa5059)) |
401 | budget->dvb_frontend = stv0299_attach(&alps_bsru6_config, &budget->i2c_adap); | 408 | budget->dvb_frontend = dvb_attach(stv0299_attach, &alps_bsru6_config, &budget->i2c_adap); |
402 | if (budget->dvb_frontend) { | 409 | if (budget->dvb_frontend) { |
403 | budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsru6_tuner_set_params; | 410 | budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsru6_tuner_set_params; |
404 | budget->dvb_frontend->tuner_priv = &budget->i2c_adap; | 411 | budget->dvb_frontend->tuner_priv = &budget->i2c_adap; |
@@ -408,7 +415,7 @@ static void frontend_init(struct budget *budget) | |||
408 | break; | 415 | break; |
409 | 416 | ||
410 | case 0x4f61: // Fujitsu Siemens Activy Budget-S PCI rev GR (tda8083/Grundig 29504-451(tsa5522)) | 417 | case 0x4f61: // Fujitsu Siemens Activy Budget-S PCI rev GR (tda8083/Grundig 29504-451(tsa5522)) |
411 | budget->dvb_frontend = tda8083_attach(&grundig_29504_451_config, &budget->i2c_adap); | 418 | budget->dvb_frontend = dvb_attach(tda8083_attach, &grundig_29504_451_config, &budget->i2c_adap); |
412 | if (budget->dvb_frontend) { | 419 | if (budget->dvb_frontend) { |
413 | budget->dvb_frontend->ops.tuner_ops.set_params = grundig_29504_451_tuner_set_params; | 420 | budget->dvb_frontend->ops.tuner_ops.set_params = grundig_29504_451_tuner_set_params; |
414 | budget->dvb_frontend->ops.set_voltage = siemens_budget_set_voltage; | 421 | budget->dvb_frontend->ops.set_voltage = siemens_budget_set_voltage; |
@@ -417,10 +424,28 @@ static void frontend_init(struct budget *budget) | |||
417 | break; | 424 | break; |
418 | 425 | ||
419 | case 0x1016: // Hauppauge/TT Nova-S SE (samsung s5h1420/????(tda8260)) | 426 | case 0x1016: // Hauppauge/TT Nova-S SE (samsung s5h1420/????(tda8260)) |
420 | budget->dvb_frontend = s5h1420_attach(&s5h1420_config, &budget->i2c_adap); | 427 | budget->dvb_frontend = dvb_attach(s5h1420_attach, &s5h1420_config, &budget->i2c_adap); |
421 | if (budget->dvb_frontend) { | 428 | if (budget->dvb_frontend) { |
422 | budget->dvb_frontend->ops.tuner_ops.set_params = s5h1420_tuner_set_params; | 429 | budget->dvb_frontend->ops.tuner_ops.set_params = s5h1420_tuner_set_params; |
423 | if (lnbp21_attach(budget->dvb_frontend, &budget->i2c_adap, 0, 0)) { | 430 | if (dvb_attach(lnbp21_attach, budget->dvb_frontend, &budget->i2c_adap, 0, 0) == NULL) { |
431 | printk("%s: No LNBP21 found!\n", __FUNCTION__); | ||
432 | goto error_out; | ||
433 | } | ||
434 | break; | ||
435 | } | ||
436 | |||
437 | case 0x1018: // TT Budget-S-1401 (philips tda10086/philips tda8262) | ||
438 | // gpio2 is connected to CLB - reset it + leave it high | ||
439 | saa7146_setgpio(budget->dev, 2, SAA7146_GPIO_OUTLO); | ||
440 | msleep(1); | ||
441 | saa7146_setgpio(budget->dev, 2, SAA7146_GPIO_OUTHI); | ||
442 | msleep(1); | ||
443 | |||
444 | budget->dvb_frontend = dvb_attach(tda10086_attach, &tda10086_config, &budget->i2c_adap); | ||
445 | if (budget->dvb_frontend) { | ||
446 | if (dvb_attach(tda826x_attach, budget->dvb_frontend, 0x60, &budget->i2c_adap, 0) == NULL) | ||
447 | printk("%s: No tda826x found!\n", __FUNCTION__); | ||
448 | if (dvb_attach(lnbp21_attach, budget->dvb_frontend, &budget->i2c_adap, 0, 0) == NULL) { | ||
424 | printk("%s: No LNBP21 found!\n", __FUNCTION__); | 449 | printk("%s: No LNBP21 found!\n", __FUNCTION__); |
425 | goto error_out; | 450 | goto error_out; |
426 | } | 451 | } |
@@ -442,8 +467,7 @@ static void frontend_init(struct budget *budget) | |||
442 | 467 | ||
443 | error_out: | 468 | error_out: |
444 | printk("budget: Frontend registration failed!\n"); | 469 | printk("budget: Frontend registration failed!\n"); |
445 | if (budget->dvb_frontend->ops.release) | 470 | dvb_frontend_detach(budget->dvb_frontend); |
446 | budget->dvb_frontend->ops.release(budget->dvb_frontend); | ||
447 | budget->dvb_frontend = NULL; | 471 | budget->dvb_frontend = NULL; |
448 | return; | 472 | return; |
449 | } | 473 | } |
@@ -481,7 +505,10 @@ static int budget_detach (struct saa7146_dev* dev) | |||
481 | struct budget *budget = (struct budget*) dev->ext_priv; | 505 | struct budget *budget = (struct budget*) dev->ext_priv; |
482 | int err; | 506 | int err; |
483 | 507 | ||
484 | if (budget->dvb_frontend) dvb_unregister_frontend(budget->dvb_frontend); | 508 | if (budget->dvb_frontend) { |
509 | dvb_unregister_frontend(budget->dvb_frontend); | ||
510 | dvb_frontend_detach(budget->dvb_frontend); | ||
511 | } | ||
485 | 512 | ||
486 | err = ttpci_budget_deinit (budget); | 513 | err = ttpci_budget_deinit (budget); |
487 | 514 | ||
@@ -497,6 +524,7 @@ MAKE_BUDGET_INFO(ttbs, "TT-Budget/WinTV-NOVA-S PCI", BUDGET_TT); | |||
497 | MAKE_BUDGET_INFO(ttbc, "TT-Budget/WinTV-NOVA-C PCI", BUDGET_TT); | 524 | MAKE_BUDGET_INFO(ttbc, "TT-Budget/WinTV-NOVA-C PCI", BUDGET_TT); |
498 | MAKE_BUDGET_INFO(ttbt, "TT-Budget/WinTV-NOVA-T PCI", BUDGET_TT); | 525 | MAKE_BUDGET_INFO(ttbt, "TT-Budget/WinTV-NOVA-T PCI", BUDGET_TT); |
499 | MAKE_BUDGET_INFO(satel, "SATELCO Multimedia PCI", BUDGET_TT_HW_DISEQC); | 526 | MAKE_BUDGET_INFO(satel, "SATELCO Multimedia PCI", BUDGET_TT_HW_DISEQC); |
527 | MAKE_BUDGET_INFO(ttbs1401, "TT-Budget-S-1401 PCI", BUDGET_TT); | ||
500 | MAKE_BUDGET_INFO(fsacs0, "Fujitsu Siemens Activy Budget-S PCI (rev GR/grundig frontend)", BUDGET_FS_ACTIVY); | 528 | MAKE_BUDGET_INFO(fsacs0, "Fujitsu Siemens Activy Budget-S PCI (rev GR/grundig frontend)", BUDGET_FS_ACTIVY); |
501 | MAKE_BUDGET_INFO(fsacs1, "Fujitsu Siemens Activy Budget-S PCI (rev AL/alps frontend)", BUDGET_FS_ACTIVY); | 529 | MAKE_BUDGET_INFO(fsacs1, "Fujitsu Siemens Activy Budget-S PCI (rev AL/alps frontend)", BUDGET_FS_ACTIVY); |
502 | 530 | ||
@@ -506,6 +534,7 @@ static struct pci_device_id pci_tbl[] = { | |||
506 | MAKE_EXTENSION_PCI(ttbt, 0x13c2, 0x1005), | 534 | MAKE_EXTENSION_PCI(ttbt, 0x13c2, 0x1005), |
507 | MAKE_EXTENSION_PCI(satel, 0x13c2, 0x1013), | 535 | MAKE_EXTENSION_PCI(satel, 0x13c2, 0x1013), |
508 | MAKE_EXTENSION_PCI(ttbs, 0x13c2, 0x1016), | 536 | MAKE_EXTENSION_PCI(ttbs, 0x13c2, 0x1016), |
537 | MAKE_EXTENSION_PCI(ttbs1401, 0x13c2, 0x1018), | ||
509 | MAKE_EXTENSION_PCI(fsacs1,0x1131, 0x4f60), | 538 | MAKE_EXTENSION_PCI(fsacs1,0x1131, 0x4f60), |
510 | MAKE_EXTENSION_PCI(fsacs0,0x1131, 0x4f61), | 539 | MAKE_EXTENSION_PCI(fsacs0,0x1131, 0x4f61), |
511 | { | 540 | { |
@@ -516,7 +545,7 @@ static struct pci_device_id pci_tbl[] = { | |||
516 | MODULE_DEVICE_TABLE(pci, pci_tbl); | 545 | MODULE_DEVICE_TABLE(pci, pci_tbl); |
517 | 546 | ||
518 | static struct saa7146_extension budget_extension = { | 547 | static struct saa7146_extension budget_extension = { |
519 | .name = "budget dvb\0", | 548 | .name = "budget dvb", |
520 | .flags = SAA7146_I2C_SHORT_DELAY, | 549 | .flags = SAA7146_I2C_SHORT_DELAY, |
521 | 550 | ||
522 | .module = THIS_MODULE, | 551 | .module = THIS_MODULE, |