diff options
author | Marc Koschewski <marc@osknowledge.org> | 2006-01-09 15:21:36 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-01-09 15:21:36 -0500 |
commit | 1157020d542684e273242663d0befb58e284ade7 (patch) | |
tree | ae05b2ce05f678999f245dd2c1dc0e3fd75f30c2 /drivers/media/dvb/dvb-usb/dibusb-mb.c | |
parent | 00e34579feb563ca663be82d977c90241824503e (diff) |
V4L/DVB (3323): Add Kconfig option for wrongly programmed devices
- A new Kconfig option makes the user able to select if the dibusb-mb driver shall claim faulty programmed USB devices which are coming with default Cypress USB IDs.
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Diffstat (limited to 'drivers/media/dvb/dvb-usb/dibusb-mb.c')
-rw-r--r-- | drivers/media/dvb/dvb-usb/dibusb-mb.c | 46 |
1 files changed, 28 insertions, 18 deletions
diff --git a/drivers/media/dvb/dvb-usb/dibusb-mb.c b/drivers/media/dvb/dvb-usb/dibusb-mb.c index 52ac3e5adf5d..dd5a13195886 100644 --- a/drivers/media/dvb/dvb-usb/dibusb-mb.c +++ b/drivers/media/dvb/dvb-usb/dibusb-mb.c | |||
@@ -65,11 +65,11 @@ static int dibusb_tuner_probe_and_attach(struct dvb_usb_device *d) | |||
65 | d->tuner_pass_ctrl(d->fe,0,msg[0].addr); | 65 | d->tuner_pass_ctrl(d->fe,0,msg[0].addr); |
66 | 66 | ||
67 | if (b2[0] == 0xfe) { | 67 | if (b2[0] == 0xfe) { |
68 | info("this device has the Thomson Cable onboard. Which is default."); | 68 | info("This device has the Thomson Cable onboard. Which is default."); |
69 | dibusb_thomson_tuner_attach(d); | 69 | dibusb_thomson_tuner_attach(d); |
70 | } else { | 70 | } else { |
71 | u8 bpll[4] = { 0x0b, 0xf5, 0x85, 0xab }; | 71 | u8 bpll[4] = { 0x0b, 0xf5, 0x85, 0xab }; |
72 | info("this device has the Panasonic ENV77H11D5 onboard."); | 72 | info("This device has the Panasonic ENV77H11D5 onboard."); |
73 | d->pll_addr = 0x60; | 73 | d->pll_addr = 0x60; |
74 | memcpy(d->pll_init,bpll,4); | 74 | memcpy(d->pll_init,bpll,4); |
75 | d->pll_desc = &dvb_pll_tda665x; | 75 | d->pll_desc = &dvb_pll_tda665x; |
@@ -98,15 +98,15 @@ static int dibusb_probe(struct usb_interface *intf, | |||
98 | 98 | ||
99 | /* do not change the order of the ID table */ | 99 | /* do not change the order of the ID table */ |
100 | static struct usb_device_id dibusb_dib3000mb_table [] = { | 100 | static struct usb_device_id dibusb_dib3000mb_table [] = { |
101 | /* 00 */ { USB_DEVICE(USB_VID_WIDEVIEW, USB_PID_AVERMEDIA_DVBT_USB_COLD)}, | 101 | /* 00 */ { USB_DEVICE(USB_VID_WIDEVIEW, USB_PID_AVERMEDIA_DVBT_USB_COLD) }, |
102 | /* 01 */ { USB_DEVICE(USB_VID_WIDEVIEW, USB_PID_AVERMEDIA_DVBT_USB_WARM)}, | 102 | /* 01 */ { USB_DEVICE(USB_VID_WIDEVIEW, USB_PID_AVERMEDIA_DVBT_USB_WARM) }, |
103 | /* 02 */ { USB_DEVICE(USB_VID_COMPRO, USB_PID_COMPRO_DVBU2000_COLD) }, | 103 | /* 02 */ { USB_DEVICE(USB_VID_COMPRO, USB_PID_COMPRO_DVBU2000_COLD) }, |
104 | /* 03 */ { USB_DEVICE(USB_VID_COMPRO, USB_PID_COMPRO_DVBU2000_WARM) }, | 104 | /* 03 */ { USB_DEVICE(USB_VID_COMPRO, USB_PID_COMPRO_DVBU2000_WARM) }, |
105 | /* 04 */ { USB_DEVICE(USB_VID_COMPRO_UNK, USB_PID_COMPRO_DVBU2000_UNK_COLD) }, | 105 | /* 04 */ { USB_DEVICE(USB_VID_COMPRO_UNK, USB_PID_COMPRO_DVBU2000_UNK_COLD) }, |
106 | /* 05 */ { USB_DEVICE(USB_VID_DIBCOM, USB_PID_DIBCOM_MOD3000_COLD) }, | 106 | /* 05 */ { USB_DEVICE(USB_VID_DIBCOM, USB_PID_DIBCOM_MOD3000_COLD) }, |
107 | /* 06 */ { USB_DEVICE(USB_VID_DIBCOM, USB_PID_DIBCOM_MOD3000_WARM) }, | 107 | /* 06 */ { USB_DEVICE(USB_VID_DIBCOM, USB_PID_DIBCOM_MOD3000_WARM) }, |
108 | /* 07 */ { USB_DEVICE(USB_VID_EMPIA, USB_PID_KWORLD_VSTREAM_COLD) }, | 108 | /* 07 */ { USB_DEVICE(USB_VID_EMPIA, USB_PID_KWORLD_VSTREAM_COLD) }, |
109 | /* 08 */ { USB_DEVICE(USB_VID_EMPIA, USB_PID_KWORLD_VSTREAM_WARM) }, | 109 | /* 08 */ { USB_DEVICE(USB_VID_EMPIA, USB_PID_KWORLD_VSTREAM_WARM) }, |
110 | /* 09 */ { USB_DEVICE(USB_VID_GRANDTEC, USB_PID_GRANDTEC_DVBT_USB_COLD) }, | 110 | /* 09 */ { USB_DEVICE(USB_VID_GRANDTEC, USB_PID_GRANDTEC_DVBT_USB_COLD) }, |
111 | /* 10 */ { USB_DEVICE(USB_VID_GRANDTEC, USB_PID_GRANDTEC_DVBT_USB_WARM) }, | 111 | /* 10 */ { USB_DEVICE(USB_VID_GRANDTEC, USB_PID_GRANDTEC_DVBT_USB_WARM) }, |
112 | /* 11 */ { USB_DEVICE(USB_VID_GRANDTEC, USB_PID_DIBCOM_MOD3000_COLD) }, | 112 | /* 11 */ { USB_DEVICE(USB_VID_GRANDTEC, USB_PID_DIBCOM_MOD3000_COLD) }, |
@@ -117,27 +117,34 @@ static struct usb_device_id dibusb_dib3000mb_table [] = { | |||
117 | /* 16 */ { USB_DEVICE(USB_VID_VISIONPLUS, USB_PID_TWINHAN_VP7041_WARM) }, | 117 | /* 16 */ { USB_DEVICE(USB_VID_VISIONPLUS, USB_PID_TWINHAN_VP7041_WARM) }, |
118 | /* 17 */ { USB_DEVICE(USB_VID_TWINHAN, USB_PID_TWINHAN_VP7041_COLD) }, | 118 | /* 17 */ { USB_DEVICE(USB_VID_TWINHAN, USB_PID_TWINHAN_VP7041_COLD) }, |
119 | /* 18 */ { USB_DEVICE(USB_VID_TWINHAN, USB_PID_TWINHAN_VP7041_WARM) }, | 119 | /* 18 */ { USB_DEVICE(USB_VID_TWINHAN, USB_PID_TWINHAN_VP7041_WARM) }, |
120 | /* 19 */ { USB_DEVICE(USB_VID_ULTIMA_ELECTRONIC, USB_PID_ULTIMA_TVBOX_COLD) }, | 120 | /* 19 */ { USB_DEVICE(USB_VID_ULTIMA_ELECTRONIC, USB_PID_ULTIMA_TVBOX_COLD) }, |
121 | /* 20 */ { USB_DEVICE(USB_VID_ULTIMA_ELECTRONIC, USB_PID_ULTIMA_TVBOX_WARM) }, | 121 | /* 20 */ { USB_DEVICE(USB_VID_ULTIMA_ELECTRONIC, USB_PID_ULTIMA_TVBOX_WARM) }, |
122 | /* 21 */ { USB_DEVICE(USB_VID_ULTIMA_ELECTRONIC, USB_PID_ULTIMA_TVBOX_AN2235_COLD) }, | 122 | /* 21 */ { USB_DEVICE(USB_VID_ULTIMA_ELECTRONIC, USB_PID_ULTIMA_TVBOX_AN2235_COLD) }, |
123 | /* 22 */ { USB_DEVICE(USB_VID_ULTIMA_ELECTRONIC, USB_PID_ULTIMA_TVBOX_AN2235_WARM) }, | 123 | /* 22 */ { USB_DEVICE(USB_VID_ULTIMA_ELECTRONIC, USB_PID_ULTIMA_TVBOX_AN2235_WARM) }, |
124 | /* 23 */ { USB_DEVICE(USB_VID_ADSTECH, USB_PID_ADSTECH_USB2_COLD) }, | 124 | /* 23 */ { USB_DEVICE(USB_VID_ADSTECH, USB_PID_ADSTECH_USB2_COLD) }, |
125 | 125 | ||
126 | /* device ID with default DIBUSB2_0-firmware and with the hacked firmware */ | 126 | /* device ID with default DIBUSB2_0-firmware and with the hacked firmware */ |
127 | /* 24 */ { USB_DEVICE(USB_VID_ADSTECH, USB_PID_ADSTECH_USB2_WARM) }, | 127 | /* 24 */ { USB_DEVICE(USB_VID_ADSTECH, USB_PID_ADSTECH_USB2_WARM) }, |
128 | /* 25 */ { USB_DEVICE(USB_VID_KYE, USB_PID_KYE_DVB_T_COLD) }, | 128 | /* 25 */ { USB_DEVICE(USB_VID_KYE, USB_PID_KYE_DVB_T_COLD) }, |
129 | /* 26 */ { USB_DEVICE(USB_VID_KYE, USB_PID_KYE_DVB_T_WARM) }, | 129 | /* 26 */ { USB_DEVICE(USB_VID_KYE, USB_PID_KYE_DVB_T_WARM) }, |
130 | 130 | ||
131 | /* 27 */ { USB_DEVICE(USB_VID_KWORLD, USB_PID_KWORLD_VSTREAM_COLD) }, | 131 | /* 27 */ { USB_DEVICE(USB_VID_KWORLD, USB_PID_KWORLD_VSTREAM_COLD) }, |
132 | 132 | ||
133 | /* 28 */ { USB_DEVICE(USB_VID_ULTIMA_ELECTRONIC, USB_PID_ULTIMA_TVBOX_USB2_COLD) }, | 133 | /* 28 */ { USB_DEVICE(USB_VID_ULTIMA_ELECTRONIC, USB_PID_ULTIMA_TVBOX_USB2_COLD) }, |
134 | /* 29 */ { USB_DEVICE(USB_VID_ULTIMA_ELECTRONIC, USB_PID_ULTIMA_TVBOX_USB2_WARM) }, | 134 | /* 29 */ { USB_DEVICE(USB_VID_ULTIMA_ELECTRONIC, USB_PID_ULTIMA_TVBOX_USB2_WARM) }, |
135 | 135 | ||
136 | // #define DVB_USB_DIBUSB_MB_FAULTY_USB_IDs | 136 | /* |
137 | * XXX: As Artec just 'forgot' to program the EEPROM on some Artec T1 devices | ||
138 | * we don't catch these faulty IDs (namely 'Cypress FX1 USB controller') that | ||
139 | * have been left on the device. If you don't have such a device but an Artec | ||
140 | * device that's supposed to work with this driver but is not detected by it, | ||
141 | * free to enable CONFIG_DVB_USB_DIBUSB_MB_FAULTY via your kernel config. | ||
142 | */ | ||
137 | 143 | ||
138 | #ifdef DVB_USB_DIBUSB_MB_FAULTY_USB_IDs | 144 | #ifdef CONFIG_DVB_USB_DIBUSB_MB_FAULTY |
139 | /* 30 */ { USB_DEVICE(USB_VID_ANCHOR, USB_PID_ULTIMA_TVBOX_ANCHOR_COLD) }, | 145 | /* 30 */ { USB_DEVICE(USB_VID_ANCHOR, USB_PID_ULTIMA_TVBOX_ANCHOR_COLD) }, |
140 | #endif | 146 | #endif |
147 | |||
141 | { } /* Terminating entry */ | 148 | { } /* Terminating entry */ |
142 | }; | 149 | }; |
143 | MODULE_DEVICE_TABLE (usb, dibusb_dib3000mb_table); | 150 | MODULE_DEVICE_TABLE (usb, dibusb_dib3000mb_table); |
@@ -257,7 +264,7 @@ static struct dvb_usb_properties dibusb1_1_an2235_properties = { | |||
257 | } | 264 | } |
258 | }, | 265 | }, |
259 | 266 | ||
260 | #ifdef DVB_USB_DIBUSB_MB_FAULTY_USB_IDs | 267 | #ifdef CONFIG_DVB_USB_DIBUSB_MB_FAULTY |
261 | .num_device_descs = 2, | 268 | .num_device_descs = 2, |
262 | #else | 269 | #else |
263 | .num_device_descs = 1, | 270 | .num_device_descs = 1, |
@@ -267,11 +274,12 @@ static struct dvb_usb_properties dibusb1_1_an2235_properties = { | |||
267 | { &dibusb_dib3000mb_table[20], NULL }, | 274 | { &dibusb_dib3000mb_table[20], NULL }, |
268 | { &dibusb_dib3000mb_table[21], NULL }, | 275 | { &dibusb_dib3000mb_table[21], NULL }, |
269 | }, | 276 | }, |
270 | #ifdef DVB_USB_DIBUSB_MB_FAULTY_USB_IDs | 277 | #ifdef CONFIG_DVB_USB_DIBUSB_MB_FAULTY |
271 | { "Artec T1 USB1.1 TVBOX with AN2235 (faulty USB IDs)", | 278 | { "Artec T1 USB1.1 TVBOX with AN2235 (faulty USB IDs)", |
272 | { &dibusb_dib3000mb_table[30], NULL }, | 279 | { &dibusb_dib3000mb_table[30], NULL }, |
273 | { NULL }, | 280 | { NULL }, |
274 | }, | 281 | }, |
282 | { NULL }, | ||
275 | #endif | 283 | #endif |
276 | } | 284 | } |
277 | }; | 285 | }; |
@@ -323,6 +331,7 @@ static struct dvb_usb_properties dibusb2_0b_properties = { | |||
323 | { &dibusb_dib3000mb_table[27], NULL }, | 331 | { &dibusb_dib3000mb_table[27], NULL }, |
324 | { NULL } | 332 | { NULL } |
325 | }, | 333 | }, |
334 | { NULL }, | ||
326 | } | 335 | } |
327 | }; | 336 | }; |
328 | 337 | ||
@@ -369,6 +378,7 @@ static struct dvb_usb_properties artec_t1_usb2_properties = { | |||
369 | { &dibusb_dib3000mb_table[28], NULL }, | 378 | { &dibusb_dib3000mb_table[28], NULL }, |
370 | { &dibusb_dib3000mb_table[29], NULL }, | 379 | { &dibusb_dib3000mb_table[29], NULL }, |
371 | }, | 380 | }, |
381 | { NULL }, | ||
372 | } | 382 | } |
373 | }; | 383 | }; |
374 | 384 | ||