diff options
Diffstat (limited to 'drivers/media/dvb/dvb-usb/dibusb-mb.c')
-rw-r--r-- | drivers/media/dvb/dvb-usb/dibusb-mb.c | 62 |
1 files changed, 48 insertions, 14 deletions
diff --git a/drivers/media/dvb/dvb-usb/dibusb-mb.c b/drivers/media/dvb/dvb-usb/dibusb-mb.c index a0ffbb59fa14..828b5182e16c 100644 --- a/drivers/media/dvb/dvb-usb/dibusb-mb.c +++ b/drivers/media/dvb/dvb-usb/dibusb-mb.c | |||
@@ -31,10 +31,17 @@ static int dibusb_dib3000mb_frontend_attach(struct dvb_usb_device *d) | |||
31 | return 0; | 31 | return 0; |
32 | } | 32 | } |
33 | 33 | ||
34 | /* some of the dibusb 1.1 device aren't equipped with the default tuner | 34 | static int dibusb_thomson_tuner_attach(struct dvb_usb_device *d) |
35 | { | ||
36 | d->pll_addr = 0x61; | ||
37 | d->pll_desc = &dvb_pll_tua6010xs; | ||
38 | return 0; | ||
39 | } | ||
40 | |||
41 | /* Some of the Artec 1.1 device aren't equipped with the default tuner | ||
35 | * (Thomson Cable), but with a Panasonic ENV77H11D5. This function figures | 42 | * (Thomson Cable), but with a Panasonic ENV77H11D5. This function figures |
36 | * this out. */ | 43 | * this out. */ |
37 | static int dibusb_dib3000mb_tuner_attach (struct dvb_usb_device *d) | 44 | static int dibusb_tuner_probe_and_attach(struct dvb_usb_device *d) |
38 | { | 45 | { |
39 | u8 b[2] = { 0,0 }, b2[1]; | 46 | u8 b[2] = { 0,0 }, b2[1]; |
40 | int ret = 0; | 47 | int ret = 0; |
@@ -59,8 +66,7 @@ static int dibusb_dib3000mb_tuner_attach (struct dvb_usb_device *d) | |||
59 | 66 | ||
60 | if (b2[0] == 0xfe) { | 67 | if (b2[0] == 0xfe) { |
61 | info("this device has the Thomson Cable onboard. Which is default."); | 68 | info("this device has the Thomson Cable onboard. Which is default."); |
62 | d->pll_addr = 0x61; | 69 | dibusb_thomson_tuner_attach(d); |
63 | d->pll_desc = &dvb_pll_tua6010xs; | ||
64 | } else { | 70 | } else { |
65 | u8 bpll[4] = { 0x0b, 0xf5, 0x85, 0xab }; | 71 | u8 bpll[4] = { 0x0b, 0xf5, 0x85, 0xab }; |
66 | info("this device has the Panasonic ENV77H11D5 onboard."); | 72 | info("this device has the Panasonic ENV77H11D5 onboard."); |
@@ -90,8 +96,8 @@ static int dibusb_probe(struct usb_interface *intf, | |||
90 | 96 | ||
91 | /* do not change the order of the ID table */ | 97 | /* do not change the order of the ID table */ |
92 | static struct usb_device_id dibusb_dib3000mb_table [] = { | 98 | static struct usb_device_id dibusb_dib3000mb_table [] = { |
93 | /* 00 */ { USB_DEVICE(USB_VID_AVERMEDIA_UNK, USB_PID_AVERMEDIA_DVBT_USB_COLD)}, | 99 | /* 00 */ { USB_DEVICE(USB_VID_WIDEVIEW, USB_PID_AVERMEDIA_DVBT_USB_COLD)}, |
94 | /* 01 */ { USB_DEVICE(USB_VID_AVERMEDIA_UNK, USB_PID_AVERMEDIA_DVBT_USB_WARM)}, | 100 | /* 01 */ { USB_DEVICE(USB_VID_WIDEVIEW, USB_PID_AVERMEDIA_DVBT_USB_WARM)}, |
95 | /* 02 */ { USB_DEVICE(USB_VID_COMPRO, USB_PID_COMPRO_DVBU2000_COLD) }, | 101 | /* 02 */ { USB_DEVICE(USB_VID_COMPRO, USB_PID_COMPRO_DVBU2000_COLD) }, |
96 | /* 03 */ { USB_DEVICE(USB_VID_COMPRO, USB_PID_COMPRO_DVBU2000_WARM) }, | 102 | /* 03 */ { USB_DEVICE(USB_VID_COMPRO, USB_PID_COMPRO_DVBU2000_WARM) }, |
97 | /* 04 */ { USB_DEVICE(USB_VID_COMPRO_UNK, USB_PID_COMPRO_DVBU2000_UNK_COLD) }, | 103 | /* 04 */ { USB_DEVICE(USB_VID_COMPRO_UNK, USB_PID_COMPRO_DVBU2000_UNK_COLD) }, |
@@ -114,7 +120,17 @@ static struct usb_device_id dibusb_dib3000mb_table [] = { | |||
114 | /* 21 */ { USB_DEVICE(USB_VID_ULTIMA_ELECTRONIC, USB_PID_ULTIMA_TVBOX_AN2235_COLD) }, | 120 | /* 21 */ { USB_DEVICE(USB_VID_ULTIMA_ELECTRONIC, USB_PID_ULTIMA_TVBOX_AN2235_COLD) }, |
115 | /* 22 */ { USB_DEVICE(USB_VID_ULTIMA_ELECTRONIC, USB_PID_ULTIMA_TVBOX_AN2235_WARM) }, | 121 | /* 22 */ { USB_DEVICE(USB_VID_ULTIMA_ELECTRONIC, USB_PID_ULTIMA_TVBOX_AN2235_WARM) }, |
116 | /* 23 */ { USB_DEVICE(USB_VID_ADSTECH, USB_PID_ADSTECH_USB2_COLD) }, | 122 | /* 23 */ { USB_DEVICE(USB_VID_ADSTECH, USB_PID_ADSTECH_USB2_COLD) }, |
123 | |||
124 | /* device ID with default DIBUSB2_0-firmware and with the hacked firmware */ | ||
117 | /* 24 */ { USB_DEVICE(USB_VID_ADSTECH, USB_PID_ADSTECH_USB2_WARM) }, | 125 | /* 24 */ { USB_DEVICE(USB_VID_ADSTECH, USB_PID_ADSTECH_USB2_WARM) }, |
126 | /* 25 */ { USB_DEVICE(USB_VID_KYE, USB_PID_KYE_DVB_T_COLD) }, | ||
127 | /* 26 */ { USB_DEVICE(USB_VID_KYE, USB_PID_KYE_DVB_T_WARM) }, | ||
128 | |||
129 | // #define DVB_USB_DIBUSB_MB_FAULTY_USB_IDs | ||
130 | |||
131 | #ifdef DVB_USB_DIBUSB_MB_FAULTY_USB_IDs | ||
132 | /* 27 */ { USB_DEVICE(USB_VID_ANCHOR, USB_PID_ULTIMA_TVBOX_ANCHOR_COLD) }, | ||
133 | #endif | ||
118 | { } /* Terminating entry */ | 134 | { } /* Terminating entry */ |
119 | }; | 135 | }; |
120 | MODULE_DEVICE_TABLE (usb, dibusb_dib3000mb_table); | 136 | MODULE_DEVICE_TABLE (usb, dibusb_dib3000mb_table); |
@@ -134,7 +150,7 @@ static struct dvb_usb_properties dibusb1_1_properties = { | |||
134 | .pid_filter_ctrl = dibusb_pid_filter_ctrl, | 150 | .pid_filter_ctrl = dibusb_pid_filter_ctrl, |
135 | .power_ctrl = dibusb_power_ctrl, | 151 | .power_ctrl = dibusb_power_ctrl, |
136 | .frontend_attach = dibusb_dib3000mb_frontend_attach, | 152 | .frontend_attach = dibusb_dib3000mb_frontend_attach, |
137 | .tuner_attach = dibusb_dib3000mb_tuner_attach, | 153 | .tuner_attach = dibusb_tuner_probe_and_attach, |
138 | 154 | ||
139 | .rc_interval = DEFAULT_RC_INTERVAL, | 155 | .rc_interval = DEFAULT_RC_INTERVAL, |
140 | .rc_key_map = dibusb_rc_keys, | 156 | .rc_key_map = dibusb_rc_keys, |
@@ -156,7 +172,7 @@ static struct dvb_usb_properties dibusb1_1_properties = { | |||
156 | } | 172 | } |
157 | }, | 173 | }, |
158 | 174 | ||
159 | .num_device_descs = 8, | 175 | .num_device_descs = 9, |
160 | .devices = { | 176 | .devices = { |
161 | { "AVerMedia AverTV DVBT USB1.1", | 177 | { "AVerMedia AverTV DVBT USB1.1", |
162 | { &dibusb_dib3000mb_table[0], NULL }, | 178 | { &dibusb_dib3000mb_table[0], NULL }, |
@@ -190,11 +206,17 @@ static struct dvb_usb_properties dibusb1_1_properties = { | |||
190 | { &dibusb_dib3000mb_table[19], NULL }, | 206 | { &dibusb_dib3000mb_table[19], NULL }, |
191 | { &dibusb_dib3000mb_table[20], NULL }, | 207 | { &dibusb_dib3000mb_table[20], NULL }, |
192 | }, | 208 | }, |
209 | { "VideoWalker DVB-T USB", | ||
210 | { &dibusb_dib3000mb_table[25], NULL }, | ||
211 | { &dibusb_dib3000mb_table[26], NULL }, | ||
212 | }, | ||
193 | } | 213 | } |
194 | }; | 214 | }; |
195 | 215 | ||
196 | static struct dvb_usb_properties dibusb1_1_an2235_properties = { | 216 | static struct dvb_usb_properties dibusb1_1_an2235_properties = { |
197 | .caps = DVB_USB_HAS_PID_FILTER | DVB_USB_PID_FILTER_CAN_BE_TURNED_OFF | DVB_USB_IS_AN_I2C_ADAPTER, | 217 | .caps = DVB_USB_HAS_PID_FILTER | DVB_USB_PID_FILTER_CAN_BE_TURNED_OFF | DVB_USB_IS_AN_I2C_ADAPTER, |
218 | .pid_filter_count = 16, | ||
219 | |||
198 | .usb_ctrl = CYPRESS_AN2235, | 220 | .usb_ctrl = CYPRESS_AN2235, |
199 | 221 | ||
200 | .firmware = "dvb-usb-dibusb-an2235-01.fw", | 222 | .firmware = "dvb-usb-dibusb-an2235-01.fw", |
@@ -206,7 +228,7 @@ static struct dvb_usb_properties dibusb1_1_an2235_properties = { | |||
206 | .pid_filter_ctrl = dibusb_pid_filter_ctrl, | 228 | .pid_filter_ctrl = dibusb_pid_filter_ctrl, |
207 | .power_ctrl = dibusb_power_ctrl, | 229 | .power_ctrl = dibusb_power_ctrl, |
208 | .frontend_attach = dibusb_dib3000mb_frontend_attach, | 230 | .frontend_attach = dibusb_dib3000mb_frontend_attach, |
209 | .tuner_attach = dibusb_dib3000mb_tuner_attach, | 231 | .tuner_attach = dibusb_tuner_probe_and_attach, |
210 | 232 | ||
211 | .rc_interval = DEFAULT_RC_INTERVAL, | 233 | .rc_interval = DEFAULT_RC_INTERVAL, |
212 | .rc_key_map = dibusb_rc_keys, | 234 | .rc_key_map = dibusb_rc_keys, |
@@ -228,20 +250,32 @@ static struct dvb_usb_properties dibusb1_1_an2235_properties = { | |||
228 | } | 250 | } |
229 | }, | 251 | }, |
230 | 252 | ||
253 | #ifdef DVB_USB_DIBUSB_MB_FAULTY_USB_IDs | ||
254 | .num_device_descs = 2, | ||
255 | #else | ||
231 | .num_device_descs = 1, | 256 | .num_device_descs = 1, |
257 | #endif | ||
232 | .devices = { | 258 | .devices = { |
233 | { "Artec T1 USB1.1 TVBOX with AN2235", | 259 | { "Artec T1 USB1.1 TVBOX with AN2235", |
234 | { &dibusb_dib3000mb_table[20], NULL }, | 260 | { &dibusb_dib3000mb_table[20], NULL }, |
235 | { &dibusb_dib3000mb_table[21], NULL }, | 261 | { &dibusb_dib3000mb_table[21], NULL }, |
236 | }, | 262 | }, |
263 | #ifdef DVB_USB_DIBUSB_MB_FAULTY_USB_IDs | ||
264 | { "Artec T1 USB1.1 TVBOX with AN2235 (faulty USB IDs)", | ||
265 | { &dibusb_dib3000mb_table[27], NULL }, | ||
266 | { NULL }, | ||
267 | }, | ||
268 | #endif | ||
237 | } | 269 | } |
238 | }; | 270 | }; |
239 | 271 | ||
240 | static struct dvb_usb_properties dibusb2_0b_properties = { | 272 | static struct dvb_usb_properties dibusb2_0b_properties = { |
241 | .caps = DVB_USB_HAS_PID_FILTER | DVB_USB_PID_FILTER_CAN_BE_TURNED_OFF | DVB_USB_IS_AN_I2C_ADAPTER, | 273 | .caps = DVB_USB_HAS_PID_FILTER | DVB_USB_PID_FILTER_CAN_BE_TURNED_OFF | DVB_USB_IS_AN_I2C_ADAPTER, |
274 | .pid_filter_count = 32, | ||
275 | |||
242 | .usb_ctrl = CYPRESS_FX2, | 276 | .usb_ctrl = CYPRESS_FX2, |
243 | 277 | ||
244 | .firmware = "dvb-usb-adstech-usb2-01.fw", | 278 | .firmware = "dvb-usb-adstech-usb2-02.fw", |
245 | 279 | ||
246 | .size_of_priv = sizeof(struct dibusb_state), | 280 | .size_of_priv = sizeof(struct dibusb_state), |
247 | 281 | ||
@@ -250,7 +284,7 @@ static struct dvb_usb_properties dibusb2_0b_properties = { | |||
250 | .pid_filter_ctrl = dibusb_pid_filter_ctrl, | 284 | .pid_filter_ctrl = dibusb_pid_filter_ctrl, |
251 | .power_ctrl = dibusb2_0_power_ctrl, | 285 | .power_ctrl = dibusb2_0_power_ctrl, |
252 | .frontend_attach = dibusb_dib3000mb_frontend_attach, | 286 | .frontend_attach = dibusb_dib3000mb_frontend_attach, |
253 | .tuner_attach = dibusb_dib3000mb_tuner_attach, | 287 | .tuner_attach = dibusb_thomson_tuner_attach, |
254 | 288 | ||
255 | .rc_interval = DEFAULT_RC_INTERVAL, | 289 | .rc_interval = DEFAULT_RC_INTERVAL, |
256 | .rc_key_map = dibusb_rc_keys, | 290 | .rc_key_map = dibusb_rc_keys, |
@@ -272,18 +306,18 @@ static struct dvb_usb_properties dibusb2_0b_properties = { | |||
272 | } | 306 | } |
273 | }, | 307 | }, |
274 | 308 | ||
275 | .num_device_descs = 2, | 309 | .num_device_descs = 1, |
276 | .devices = { | 310 | .devices = { |
277 | { "KWorld/ADSTech Instant DVB-T USB 2.0", | 311 | { "KWorld/ADSTech Instant DVB-T USB 2.0", |
278 | { &dibusb_dib3000mb_table[23], NULL }, | 312 | { &dibusb_dib3000mb_table[23], NULL }, |
279 | { &dibusb_dib3000mb_table[24], NULL }, /* device ID with default DIBUSB2_0-firmware */ | 313 | { &dibusb_dib3000mb_table[24], NULL }, |
280 | }, | 314 | }, |
281 | } | 315 | } |
282 | }; | 316 | }; |
283 | 317 | ||
284 | static struct usb_driver dibusb_driver = { | 318 | static struct usb_driver dibusb_driver = { |
285 | .owner = THIS_MODULE, | 319 | .owner = THIS_MODULE, |
286 | .name = "DiBcom based USB DVB-T devices (DiB3000M-B based)", | 320 | .name = "dvb_usb_dibusb_mb", |
287 | .probe = dibusb_probe, | 321 | .probe = dibusb_probe, |
288 | .disconnect = dvb_usb_device_exit, | 322 | .disconnect = dvb_usb_device_exit, |
289 | .id_table = dibusb_dib3000mb_table, | 323 | .id_table = dibusb_dib3000mb_table, |