2 em28xx-cards.c - driver for Empia EM2800/EM2820/2840 USB
5 Copyright (C) 2005 Ludovico Cavedon <cavedon@sssup.it>
6 Markus Rechberger <mrechberger@gmail.com>
7 Mauro Carvalho Chehab <mchehab@infradead.org>
8 Sascha Sommer <saschasommer@freenet.de>
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2 of the License, or
13 (at your option) any later version.
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 #include <linux/init.h>
26 #include <linux/module.h>
27 #include <linux/delay.h>
28 #include <linux/i2c.h>
29 #include <linux/usb.h>
30 #include <media/tuner.h>
31 #include <media/msp3400.h>
32 #include <media/saa7115.h>
33 #include <media/tvp5150.h>
34 #include <media/tveeprom.h>
35 #include <media/v4l2-common.h>
36 #include <media/v4l2-chip-ident.h>
40 static int tuner
= -1;
41 module_param(tuner
, int, 0444);
42 MODULE_PARM_DESC(tuner
, "tuner type");
44 static unsigned int disable_ir
;
45 module_param(disable_ir
, int, 0444);
46 MODULE_PARM_DESC(disable_ir
, "disable infrared remote support");
48 struct em28xx_hash_table
{
54 struct em28xx_board em28xx_boards
[] = {
55 [EM2750_BOARD_UNKNOWN
] = {
56 .name
= "Unknown EM2750/EM2751 webcam grabber",
59 .type
= EM28XX_VMUX_COMPOSITE1
,
61 .amux
= EM28XX_AMUX_VIDEO
,
64 [EM2800_BOARD_UNKNOWN
] = {
65 .name
= "Unknown EM2800 video grabber",
68 .tda9887_conf
= TDA9887_PRESENT
,
69 .decoder
= EM28XX_SAA7113
,
71 .type
= EM28XX_VMUX_COMPOSITE1
,
72 .vmux
= SAA7115_COMPOSITE0
,
73 .amux
= EM28XX_AMUX_LINE_IN
,
75 .type
= EM28XX_VMUX_SVIDEO
,
76 .vmux
= SAA7115_SVIDEO3
,
77 .amux
= EM28XX_AMUX_LINE_IN
,
80 [EM2820_BOARD_UNKNOWN
] = {
81 .name
= "Unknown EM2750/28xx video grabber",
83 .tuner_type
= TUNER_ABSENT
,
85 [EM2750_BOARD_DLCW_130
] = {
86 /* Beijing Huaqi Information Digital Technology Co., Ltd */
87 .name
= "Huaqi DLCW-130",
88 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
91 .type
= EM28XX_VMUX_COMPOSITE1
,
93 .amux
= EM28XX_AMUX_VIDEO
,
96 [EM2820_BOARD_KWORLD_PVRTV2800RF
] = {
97 .name
= "Kworld PVR TV 2800 RF",
100 .tuner_type
= TUNER_TEMIC_PAL
,
101 .tda9887_conf
= TDA9887_PRESENT
,
102 .decoder
= EM28XX_SAA7113
,
104 .type
= EM28XX_VMUX_COMPOSITE1
,
105 .vmux
= SAA7115_COMPOSITE0
,
106 .amux
= EM28XX_AMUX_LINE_IN
,
108 .type
= EM28XX_VMUX_SVIDEO
,
109 .vmux
= SAA7115_SVIDEO3
,
110 .amux
= EM28XX_AMUX_LINE_IN
,
113 [EM2820_BOARD_TERRATEC_CINERGY_250
] = {
114 .name
= "Terratec Cinergy 250 USB",
116 .tuner_type
= TUNER_LG_PAL_NEW_TAPC
,
117 .tda9887_conf
= TDA9887_PRESENT
,
118 .decoder
= EM28XX_SAA7113
,
120 .type
= EM28XX_VMUX_TELEVISION
,
121 .vmux
= SAA7115_COMPOSITE2
,
122 .amux
= EM28XX_AMUX_LINE_IN
,
124 .type
= EM28XX_VMUX_COMPOSITE1
,
125 .vmux
= SAA7115_COMPOSITE0
,
126 .amux
= EM28XX_AMUX_LINE_IN
,
128 .type
= EM28XX_VMUX_SVIDEO
,
129 .vmux
= SAA7115_SVIDEO3
,
130 .amux
= EM28XX_AMUX_LINE_IN
,
133 [EM2820_BOARD_PINNACLE_USB_2
] = {
134 .name
= "Pinnacle PCTV USB 2",
136 .tuner_type
= TUNER_LG_PAL_NEW_TAPC
,
137 .tda9887_conf
= TDA9887_PRESENT
,
138 .decoder
= EM28XX_SAA7113
,
140 .type
= EM28XX_VMUX_TELEVISION
,
141 .vmux
= SAA7115_COMPOSITE2
,
142 .amux
= EM28XX_AMUX_VIDEO
,
144 .type
= EM28XX_VMUX_COMPOSITE1
,
145 .vmux
= SAA7115_COMPOSITE0
,
146 .amux
= EM28XX_AMUX_LINE_IN
,
148 .type
= EM28XX_VMUX_SVIDEO
,
149 .vmux
= SAA7115_SVIDEO3
,
150 .amux
= EM28XX_AMUX_LINE_IN
,
153 [EM2820_BOARD_HAUPPAUGE_WINTV_USB_2
] = {
154 .name
= "Hauppauge WinTV USB 2",
156 .tuner_type
= TUNER_PHILIPS_FM1236_MK3
,
157 .tda9887_conf
= TDA9887_PRESENT
|
158 TDA9887_PORT1_ACTIVE
|
159 TDA9887_PORT2_ACTIVE
,
160 .decoder
= EM28XX_TVP5150
,
162 /*FIXME: S-Video not tested */
164 .type
= EM28XX_VMUX_TELEVISION
,
165 .vmux
= TVP5150_COMPOSITE0
,
166 .amux
= MSP_INPUT_DEFAULT
,
168 .type
= EM28XX_VMUX_SVIDEO
,
169 .vmux
= TVP5150_SVIDEO
,
170 .amux
= MSP_INPUT(MSP_IN_SCART1
, MSP_IN_TUNER1
,
171 MSP_DSP_IN_SCART
, MSP_DSP_IN_SCART
),
174 [EM2820_BOARD_DLINK_USB_TV
] = {
175 .name
= "D-Link DUB-T210 TV Tuner",
176 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
179 .tuner_type
= TUNER_LG_PAL_NEW_TAPC
,
180 .tda9887_conf
= TDA9887_PRESENT
,
181 .decoder
= EM28XX_SAA7113
,
183 .type
= EM28XX_VMUX_TELEVISION
,
184 .vmux
= SAA7115_COMPOSITE2
,
185 .amux
= EM28XX_AMUX_LINE_IN
,
187 .type
= EM28XX_VMUX_COMPOSITE1
,
188 .vmux
= SAA7115_COMPOSITE0
,
189 .amux
= EM28XX_AMUX_LINE_IN
,
191 .type
= EM28XX_VMUX_SVIDEO
,
192 .vmux
= SAA7115_SVIDEO3
,
193 .amux
= EM28XX_AMUX_LINE_IN
,
196 [EM2820_BOARD_HERCULES_SMART_TV_USB2
] = {
197 .name
= "Hercules Smart TV USB 2.0",
198 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
200 .tuner_type
= TUNER_LG_PAL_NEW_TAPC
,
201 .tda9887_conf
= TDA9887_PRESENT
,
202 .decoder
= EM28XX_SAA7113
,
204 .type
= EM28XX_VMUX_TELEVISION
,
205 .vmux
= SAA7115_COMPOSITE2
,
206 .amux
= EM28XX_AMUX_LINE_IN
,
208 .type
= EM28XX_VMUX_COMPOSITE1
,
209 .vmux
= SAA7115_COMPOSITE0
,
210 .amux
= EM28XX_AMUX_LINE_IN
,
212 .type
= EM28XX_VMUX_SVIDEO
,
213 .vmux
= SAA7115_SVIDEO3
,
214 .amux
= EM28XX_AMUX_LINE_IN
,
217 [EM2820_BOARD_PINNACLE_USB_2_FM1216ME
] = {
218 .name
= "Pinnacle PCTV USB 2 (Philips FM1216ME)",
219 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
222 .tuner_type
= TUNER_PHILIPS_FM1216ME_MK3
,
223 .tda9887_conf
= TDA9887_PRESENT
,
224 .decoder
= EM28XX_SAA7113
,
226 .type
= EM28XX_VMUX_TELEVISION
,
227 .vmux
= SAA7115_COMPOSITE2
,
228 .amux
= EM28XX_AMUX_VIDEO
,
230 .type
= EM28XX_VMUX_COMPOSITE1
,
231 .vmux
= SAA7115_COMPOSITE0
,
232 .amux
= EM28XX_AMUX_LINE_IN
,
234 .type
= EM28XX_VMUX_SVIDEO
,
235 .vmux
= SAA7115_SVIDEO3
,
236 .amux
= EM28XX_AMUX_LINE_IN
,
239 [EM2820_BOARD_GADMEI_UTV310
] = {
240 .name
= "Gadmei UTV310",
241 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
243 .tuner_type
= TUNER_TNF_5335MF
,
244 .tda9887_conf
= TDA9887_PRESENT
,
245 .decoder
= EM28XX_SAA7113
,
247 .type
= EM28XX_VMUX_TELEVISION
,
248 .vmux
= SAA7115_COMPOSITE1
,
249 .amux
= EM28XX_AMUX_LINE_IN
,
251 .type
= EM28XX_VMUX_COMPOSITE1
,
252 .vmux
= SAA7115_COMPOSITE0
,
253 .amux
= EM28XX_AMUX_LINE_IN
,
255 .type
= EM28XX_VMUX_SVIDEO
,
256 .vmux
= SAA7115_SVIDEO3
,
257 .amux
= EM28XX_AMUX_LINE_IN
,
260 [EM2820_BOARD_LEADTEK_WINFAST_USBII_DELUXE
] = {
261 .name
= "Leadtek Winfast USB II Deluxe",
262 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
264 .tuner_type
= TUNER_PHILIPS_FM1216ME_MK3
,
265 .tda9887_conf
= TDA9887_PRESENT
,
266 .decoder
= EM28XX_SAA7114
,
268 .type
= EM28XX_VMUX_TELEVISION
,
270 .amux
= EM28XX_AMUX_VIDEO
,
272 .type
= EM28XX_VMUX_COMPOSITE1
,
274 .amux
= EM28XX_AMUX_LINE_IN
,
276 .type
= EM28XX_VMUX_SVIDEO
,
278 .amux
= EM28XX_AMUX_LINE_IN
,
281 [EM2820_BOARD_PINNACLE_DVC_100
] = {
282 .name
= "Pinnacle Dazzle DVC 100",
283 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
285 .decoder
= EM28XX_SAA7113
,
287 .type
= EM28XX_VMUX_COMPOSITE1
,
288 .vmux
= SAA7115_COMPOSITE0
,
289 .amux
= EM28XX_AMUX_LINE_IN
,
291 .type
= EM28XX_VMUX_SVIDEO
,
292 .vmux
= SAA7115_SVIDEO3
,
293 .amux
= EM28XX_AMUX_LINE_IN
,
296 [EM2820_BOARD_VIDEOLOGY_20K14XUSB
] = {
297 .name
= "Videology 20K14XUSB USB2.0",
298 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
301 .type
= EM28XX_VMUX_COMPOSITE1
,
303 .amux
= EM28XX_AMUX_VIDEO
,
306 [EM2821_BOARD_PROLINK_PLAYTV_USB2
] = {
307 .name
= "SIIG AVTuner-PVR/Prolink PlayTV USB 2.0",
308 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
311 .tuner_type
= TUNER_LG_PAL_NEW_TAPC
, /* unknown? */
312 .tda9887_conf
= TDA9887_PRESENT
, /* unknown? */
313 .decoder
= EM28XX_SAA7113
,
315 .type
= EM28XX_VMUX_TELEVISION
,
316 .vmux
= SAA7115_COMPOSITE2
,
317 .amux
= EM28XX_AMUX_LINE_IN
,
319 .type
= EM28XX_VMUX_COMPOSITE1
,
320 .vmux
= SAA7115_COMPOSITE0
,
321 .amux
= EM28XX_AMUX_LINE_IN
,
323 .type
= EM28XX_VMUX_SVIDEO
,
324 .vmux
= SAA7115_SVIDEO3
,
325 .amux
= EM28XX_AMUX_LINE_IN
,
328 [EM2821_BOARD_SUPERCOMP_USB_2
] = {
329 .name
= "Supercomp USB 2.0 TV",
330 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
333 .tuner_type
= TUNER_PHILIPS_FM1236_MK3
,
334 .tda9887_conf
= TDA9887_PRESENT
|
335 TDA9887_PORT1_ACTIVE
|
336 TDA9887_PORT2_ACTIVE
,
337 .decoder
= EM28XX_SAA7113
,
339 .type
= EM28XX_VMUX_TELEVISION
,
340 .vmux
= SAA7115_COMPOSITE2
,
341 .amux
= EM28XX_AMUX_LINE_IN
,
343 .type
= EM28XX_VMUX_COMPOSITE1
,
344 .vmux
= SAA7115_COMPOSITE0
,
345 .amux
= EM28XX_AMUX_VIDEO
,
347 .type
= EM28XX_VMUX_SVIDEO
,
348 .vmux
= SAA7115_SVIDEO3
,
349 .amux
= EM28XX_AMUX_LINE_IN
,
352 [EM2821_BOARD_USBGEAR_VD204
] = {
353 .name
= "Usbgear VD204v9",
354 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
356 .decoder
= EM28XX_SAA7113
,
358 .type
= EM28XX_VMUX_COMPOSITE1
,
359 .vmux
= SAA7115_COMPOSITE0
,
360 .amux
= EM28XX_AMUX_LINE_IN
,
362 .type
= EM28XX_VMUX_SVIDEO
,
363 .vmux
= SAA7115_SVIDEO3
,
364 .amux
= EM28XX_AMUX_LINE_IN
,
367 [EM2860_BOARD_NETGMBH_CAM
] = {
368 /* Beijing Huaqi Information Digital Technology Co., Ltd */
369 .name
= "NetGMBH Cam",
370 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
373 .type
= EM28XX_VMUX_COMPOSITE1
,
375 .amux
= EM28XX_AMUX_VIDEO
,
378 [EM2860_BOARD_TYPHOON_DVD_MAKER
] = {
379 .name
= "Typhoon DVD Maker",
380 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
382 .decoder
= EM28XX_SAA7113
,
384 .type
= EM28XX_VMUX_COMPOSITE1
,
385 .vmux
= SAA7115_COMPOSITE0
,
386 .amux
= EM28XX_AMUX_LINE_IN
,
388 .type
= EM28XX_VMUX_SVIDEO
,
389 .vmux
= SAA7115_SVIDEO3
,
390 .amux
= EM28XX_AMUX_LINE_IN
,
393 [EM2860_BOARD_GADMEI_UTV330
] = {
394 .name
= "Gadmei UTV330",
395 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
397 .tuner_type
= TUNER_TNF_5335MF
,
398 .tda9887_conf
= TDA9887_PRESENT
,
399 .decoder
= EM28XX_SAA7113
,
401 .type
= EM28XX_VMUX_TELEVISION
,
402 .vmux
= SAA7115_COMPOSITE2
,
403 .amux
= EM28XX_AMUX_VIDEO
,
405 .type
= EM28XX_VMUX_COMPOSITE1
,
406 .vmux
= SAA7115_COMPOSITE0
,
407 .amux
= EM28XX_AMUX_LINE_IN
,
409 .type
= EM28XX_VMUX_SVIDEO
,
410 .vmux
= SAA7115_SVIDEO3
,
411 .amux
= EM28XX_AMUX_LINE_IN
,
414 [EM2860_BOARD_TERRATEC_HYBRID_XS
] = {
415 .name
= "Terratec Cinergy A Hybrid XS",
416 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
418 .tuner_type
= TUNER_XC2028
,
419 .decoder
= EM28XX_TVP5150
,
421 .type
= EM28XX_VMUX_TELEVISION
,
422 .vmux
= TVP5150_COMPOSITE0
,
423 .amux
= EM28XX_AMUX_VIDEO
,
425 .type
= EM28XX_VMUX_COMPOSITE1
,
426 .vmux
= TVP5150_COMPOSITE1
,
427 .amux
= EM28XX_AMUX_LINE_IN
,
429 .type
= EM28XX_VMUX_SVIDEO
,
430 .vmux
= TVP5150_SVIDEO
,
431 .amux
= EM28XX_AMUX_LINE_IN
,
434 [EM2861_BOARD_KWORLD_PVRTV_300U
] = {
435 .name
= "KWorld PVRTV 300U",
436 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
438 .tuner_type
= TUNER_XC2028
,
439 .decoder
= EM28XX_TVP5150
,
441 .type
= EM28XX_VMUX_TELEVISION
,
442 .vmux
= TVP5150_COMPOSITE0
,
443 .amux
= EM28XX_AMUX_VIDEO
,
445 .type
= EM28XX_VMUX_COMPOSITE1
,
446 .vmux
= TVP5150_COMPOSITE1
,
447 .amux
= EM28XX_AMUX_LINE_IN
,
449 .type
= EM28XX_VMUX_SVIDEO
,
450 .vmux
= TVP5150_SVIDEO
,
451 .amux
= EM28XX_AMUX_LINE_IN
,
454 [EM2861_BOARD_YAKUMO_MOVIE_MIXER
] = {
455 .name
= "Yakumo MovieMixer",
456 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
458 .decoder
= EM28XX_TVP5150
,
460 .type
= EM28XX_VMUX_TELEVISION
,
461 .vmux
= TVP5150_COMPOSITE0
,
462 .amux
= EM28XX_AMUX_VIDEO
,
464 .type
= EM28XX_VMUX_COMPOSITE1
,
465 .vmux
= TVP5150_COMPOSITE1
,
466 .amux
= EM28XX_AMUX_LINE_IN
,
468 .type
= EM28XX_VMUX_SVIDEO
,
469 .vmux
= TVP5150_SVIDEO
,
470 .amux
= EM28XX_AMUX_LINE_IN
,
473 [EM2861_BOARD_PLEXTOR_PX_TV100U
] = {
474 .name
= "Plextor ConvertX PX-TV100U",
475 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
477 .tuner_type
= TUNER_TNF_5335MF
,
478 .tda9887_conf
= TDA9887_PRESENT
,
479 .decoder
= EM28XX_TVP5150
,
481 .type
= EM28XX_VMUX_TELEVISION
,
482 .vmux
= TVP5150_COMPOSITE0
,
483 .amux
= EM28XX_AMUX_LINE_IN
,
485 .type
= EM28XX_VMUX_COMPOSITE1
,
486 .vmux
= TVP5150_COMPOSITE1
,
487 .amux
= EM28XX_AMUX_LINE_IN
,
489 .type
= EM28XX_VMUX_SVIDEO
,
490 .vmux
= TVP5150_SVIDEO
,
491 .amux
= EM28XX_AMUX_LINE_IN
,
494 [EM2870_BOARD_TERRATEC_XS
] = {
495 .name
= "Terratec Cinergy T XS",
496 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
497 .tuner_type
= TUNER_XC2028
,
499 [EM2870_BOARD_TERRATEC_XS_MT2060
] = {
500 .name
= "Terratec Cinergy T XS (MT2060)",
501 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
502 .tuner_type
= TUNER_ABSENT
, /* MT2060 */
504 [EM2870_BOARD_KWORLD_350U
] = {
505 .name
= "Kworld 350 U DVB-T",
506 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
507 .tuner_type
= TUNER_XC2028
,
509 [EM2870_BOARD_KWORLD_355U
] = {
510 .name
= "Kworld 355 U DVB-T",
511 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
513 [EM2870_BOARD_PINNACLE_PCTV_DVB
] = {
514 .name
= "Pinnacle PCTV DVB-T",
515 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
516 .tuner_type
= TUNER_ABSENT
, /* MT2060 */
518 [EM2870_BOARD_COMPRO_VIDEOMATE
] = {
519 .name
= "Compro, VideoMate U3",
520 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
521 .tuner_type
= TUNER_ABSENT
, /* MT2060 */
523 [EM2880_BOARD_TERRATEC_HYBRID_XS_FR
] = {
524 .name
= "Terratec Hybrid XS Secam",
525 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
528 .tuner_type
= TUNER_XC2028
,
529 .decoder
= EM28XX_TVP5150
,
531 .type
= EM28XX_VMUX_TELEVISION
,
532 .vmux
= TVP5150_COMPOSITE0
,
533 .amux
= EM28XX_AMUX_VIDEO
,
535 .type
= EM28XX_VMUX_COMPOSITE1
,
536 .vmux
= TVP5150_COMPOSITE1
,
537 .amux
= EM28XX_AMUX_LINE_IN
,
539 .type
= EM28XX_VMUX_SVIDEO
,
540 .vmux
= TVP5150_SVIDEO
,
541 .amux
= EM28XX_AMUX_LINE_IN
,
544 [EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900
] = {
545 .name
= "Hauppauge WinTV HVR 900",
547 .tda9887_conf
= TDA9887_PRESENT
,
548 .tuner_type
= TUNER_XC2028
,
551 .decoder
= EM28XX_TVP5150
,
553 .type
= EM28XX_VMUX_TELEVISION
,
554 .vmux
= TVP5150_COMPOSITE0
,
555 .amux
= EM28XX_AMUX_VIDEO
,
557 .type
= EM28XX_VMUX_COMPOSITE1
,
558 .vmux
= TVP5150_COMPOSITE1
,
559 .amux
= EM28XX_AMUX_LINE_IN
,
561 .type
= EM28XX_VMUX_SVIDEO
,
562 .vmux
= TVP5150_SVIDEO
,
563 .amux
= EM28XX_AMUX_LINE_IN
,
566 [EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2
] = {
567 .name
= "Hauppauge WinTV HVR 900 (R2)",
569 .tda9887_conf
= TDA9887_PRESENT
,
570 .tuner_type
= TUNER_XC2028
,
572 .decoder
= EM28XX_TVP5150
,
574 .type
= EM28XX_VMUX_TELEVISION
,
575 .vmux
= TVP5150_COMPOSITE0
,
576 .amux
= EM28XX_AMUX_VIDEO
,
578 .type
= EM28XX_VMUX_COMPOSITE1
,
579 .vmux
= TVP5150_COMPOSITE1
,
582 .type
= EM28XX_VMUX_SVIDEO
,
583 .vmux
= TVP5150_SVIDEO
,
584 .amux
= EM28XX_AMUX_LINE_IN
,
587 [EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950
] = {
588 .name
= "Hauppauge WinTV HVR 950",
590 .tuner_type
= TUNER_XC2028
,
594 .ir_codes
= ir_codes_hauppauge_new
,
595 .decoder
= EM28XX_TVP5150
,
597 .type
= EM28XX_VMUX_TELEVISION
,
598 .vmux
= TVP5150_COMPOSITE0
,
599 .amux
= EM28XX_AMUX_VIDEO
,
601 .type
= EM28XX_VMUX_COMPOSITE1
,
602 .vmux
= TVP5150_COMPOSITE1
,
603 .amux
= EM28XX_AMUX_LINE_IN
,
605 .type
= EM28XX_VMUX_SVIDEO
,
606 .vmux
= TVP5150_SVIDEO
,
607 .amux
= EM28XX_AMUX_LINE_IN
,
610 [EM2880_BOARD_PINNACLE_PCTV_HD_PRO
] = {
611 .name
= "Pinnacle PCTV HD Pro Stick",
613 .tuner_type
= TUNER_XC2028
,
617 .ir_codes
= ir_codes_pinnacle_pctv_hd
,
618 .decoder
= EM28XX_TVP5150
,
620 .type
= EM28XX_VMUX_TELEVISION
,
621 .vmux
= TVP5150_COMPOSITE0
,
622 .amux
= EM28XX_AMUX_VIDEO
,
624 .type
= EM28XX_VMUX_COMPOSITE1
,
625 .vmux
= TVP5150_COMPOSITE1
,
626 .amux
= EM28XX_AMUX_LINE_IN
,
628 .type
= EM28XX_VMUX_SVIDEO
,
629 .vmux
= TVP5150_SVIDEO
,
630 .amux
= EM28XX_AMUX_LINE_IN
,
633 [EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600
] = {
634 .name
= "AMD ATI TV Wonder HD 600",
636 .tuner_type
= TUNER_XC2028
,
640 .ir_codes
= ir_codes_ati_tv_wonder_hd_600
,
641 .decoder
= EM28XX_TVP5150
,
643 .type
= EM28XX_VMUX_TELEVISION
,
644 .vmux
= TVP5150_COMPOSITE0
,
645 .amux
= EM28XX_AMUX_VIDEO
,
647 .type
= EM28XX_VMUX_COMPOSITE1
,
648 .vmux
= TVP5150_COMPOSITE1
,
649 .amux
= EM28XX_AMUX_LINE_IN
,
651 .type
= EM28XX_VMUX_SVIDEO
,
652 .vmux
= TVP5150_SVIDEO
,
653 .amux
= EM28XX_AMUX_LINE_IN
,
656 [EM2880_BOARD_TERRATEC_HYBRID_XS
] = {
657 .name
= "Terratec Hybrid XS",
659 .tuner_type
= TUNER_XC2028
,
660 .decoder
= EM28XX_TVP5150
,
663 .type
= EM28XX_VMUX_TELEVISION
,
664 .vmux
= TVP5150_COMPOSITE0
,
665 .amux
= EM28XX_AMUX_VIDEO
,
667 .type
= EM28XX_VMUX_COMPOSITE1
,
668 .vmux
= TVP5150_COMPOSITE1
,
669 .amux
= EM28XX_AMUX_LINE_IN
,
671 .type
= EM28XX_VMUX_SVIDEO
,
672 .vmux
= TVP5150_SVIDEO
,
673 .amux
= EM28XX_AMUX_LINE_IN
,
676 /* maybe there's a reason behind it why Terratec sells the Hybrid XS
677 as Prodigy XS with a different PID, let's keep it separated for now
678 maybe we'll need it lateron */
679 [EM2880_BOARD_TERRATEC_PRODIGY_XS
] = {
680 .name
= "Terratec Prodigy XS",
682 .tuner_type
= TUNER_XC2028
,
683 .decoder
= EM28XX_TVP5150
,
685 .type
= EM28XX_VMUX_TELEVISION
,
686 .vmux
= TVP5150_COMPOSITE0
,
687 .amux
= EM28XX_AMUX_VIDEO
,
689 .type
= EM28XX_VMUX_COMPOSITE1
,
690 .vmux
= TVP5150_COMPOSITE1
,
691 .amux
= EM28XX_AMUX_LINE_IN
,
693 .type
= EM28XX_VMUX_SVIDEO
,
694 .vmux
= TVP5150_SVIDEO
,
695 .amux
= EM28XX_AMUX_LINE_IN
,
698 [EM2820_BOARD_MSI_VOX_USB_2
] = {
699 .name
= "MSI VOX USB 2.0",
701 .tuner_type
= TUNER_LG_PAL_NEW_TAPC
,
702 .tda9887_conf
= TDA9887_PRESENT
|
703 TDA9887_PORT1_ACTIVE
|
704 TDA9887_PORT2_ACTIVE
,
705 .max_range_640_480
= 1,
707 .decoder
= EM28XX_SAA7114
,
709 .type
= EM28XX_VMUX_TELEVISION
,
710 .vmux
= SAA7115_COMPOSITE4
,
711 .amux
= EM28XX_AMUX_VIDEO
,
713 .type
= EM28XX_VMUX_COMPOSITE1
,
714 .vmux
= SAA7115_COMPOSITE0
,
715 .amux
= EM28XX_AMUX_LINE_IN
,
717 .type
= EM28XX_VMUX_SVIDEO
,
718 .vmux
= SAA7115_SVIDEO3
,
719 .amux
= EM28XX_AMUX_LINE_IN
,
722 [EM2800_BOARD_TERRATEC_CINERGY_200
] = {
723 .name
= "Terratec Cinergy 200 USB",
726 .tuner_type
= TUNER_LG_PAL_NEW_TAPC
,
727 .tda9887_conf
= TDA9887_PRESENT
,
728 .decoder
= EM28XX_SAA7113
,
730 .type
= EM28XX_VMUX_TELEVISION
,
731 .vmux
= SAA7115_COMPOSITE2
,
732 .amux
= EM28XX_AMUX_VIDEO
,
734 .type
= EM28XX_VMUX_COMPOSITE1
,
735 .vmux
= SAA7115_COMPOSITE0
,
736 .amux
= EM28XX_AMUX_LINE_IN
,
738 .type
= EM28XX_VMUX_SVIDEO
,
739 .vmux
= SAA7115_SVIDEO3
,
740 .amux
= EM28XX_AMUX_LINE_IN
,
743 [EM2800_BOARD_GRABBEEX_USB2800
] = {
744 .name
= "eMPIA Technology, Inc. GrabBeeX+ Video Encoder",
747 .decoder
= EM28XX_SAA7113
,
749 .type
= EM28XX_VMUX_COMPOSITE1
,
750 .vmux
= SAA7115_COMPOSITE0
,
751 .amux
= EM28XX_AMUX_LINE_IN
,
753 .type
= EM28XX_VMUX_SVIDEO
,
754 .vmux
= SAA7115_SVIDEO3
,
755 .amux
= EM28XX_AMUX_LINE_IN
,
758 [EM2800_BOARD_LEADTEK_WINFAST_USBII
] = {
759 .name
= "Leadtek Winfast USB II",
762 .tuner_type
= TUNER_LG_PAL_NEW_TAPC
,
763 .tda9887_conf
= TDA9887_PRESENT
,
764 .decoder
= EM28XX_SAA7113
,
766 .type
= EM28XX_VMUX_TELEVISION
,
767 .vmux
= SAA7115_COMPOSITE2
,
768 .amux
= EM28XX_AMUX_VIDEO
,
770 .type
= EM28XX_VMUX_COMPOSITE1
,
771 .vmux
= SAA7115_COMPOSITE0
,
772 .amux
= EM28XX_AMUX_LINE_IN
,
774 .type
= EM28XX_VMUX_SVIDEO
,
775 .vmux
= SAA7115_SVIDEO3
,
776 .amux
= EM28XX_AMUX_LINE_IN
,
779 [EM2800_BOARD_KWORLD_USB2800
] = {
780 .name
= "Kworld USB2800",
783 .tuner_type
= TUNER_PHILIPS_FCV1236D
,
784 .tda9887_conf
= TDA9887_PRESENT
,
785 .decoder
= EM28XX_SAA7113
,
787 .type
= EM28XX_VMUX_TELEVISION
,
788 .vmux
= SAA7115_COMPOSITE2
,
789 .amux
= EM28XX_AMUX_VIDEO
,
791 .type
= EM28XX_VMUX_COMPOSITE1
,
792 .vmux
= SAA7115_COMPOSITE0
,
793 .amux
= EM28XX_AMUX_LINE_IN
,
795 .type
= EM28XX_VMUX_SVIDEO
,
796 .vmux
= SAA7115_SVIDEO3
,
797 .amux
= EM28XX_AMUX_LINE_IN
,
800 [EM2820_BOARD_PINNACLE_DVC_90
] = {
801 .name
= "Pinnacle Dazzle DVC 90/DVC 100",
803 .tuner_type
= TUNER_ABSENT
,
804 .decoder
= EM28XX_SAA7113
,
806 .type
= EM28XX_VMUX_COMPOSITE1
,
807 .vmux
= SAA7115_COMPOSITE0
,
808 .amux
= EM28XX_AMUX_LINE_IN
,
810 .type
= EM28XX_VMUX_SVIDEO
,
811 .vmux
= SAA7115_SVIDEO3
,
812 .amux
= EM28XX_AMUX_LINE_IN
,
815 [EM2800_BOARD_VGEAR_POCKETTV
] = {
816 .name
= "V-Gear PocketTV",
819 .tuner_type
= TUNER_LG_PAL_NEW_TAPC
,
820 .tda9887_conf
= TDA9887_PRESENT
,
821 .decoder
= EM28XX_SAA7113
,
823 .type
= EM28XX_VMUX_TELEVISION
,
824 .vmux
= SAA7115_COMPOSITE2
,
825 .amux
= EM28XX_AMUX_VIDEO
,
827 .type
= EM28XX_VMUX_COMPOSITE1
,
828 .vmux
= SAA7115_COMPOSITE0
,
829 .amux
= EM28XX_AMUX_LINE_IN
,
831 .type
= EM28XX_VMUX_SVIDEO
,
832 .vmux
= SAA7115_SVIDEO3
,
833 .amux
= EM28XX_AMUX_LINE_IN
,
836 [EM2820_BOARD_PROLINK_PLAYTV_USB2
] = {
837 .name
= "Pixelview Prolink PlayTV USB 2.0",
839 .tda9887_conf
= TDA9887_PRESENT
,
840 .tuner_type
= TUNER_YMEC_TVF_5533MF
,
841 .decoder
= EM28XX_SAA7113
,
843 .type
= EM28XX_VMUX_TELEVISION
,
844 .vmux
= SAA7115_COMPOSITE2
,
845 .amux
= EM28XX_AMUX_VIDEO
,
846 .aout
= EM28XX_AOUT_MONO
| /* I2S */
847 EM28XX_AOUT_MASTER
, /* Line out pin */
849 .type
= EM28XX_VMUX_COMPOSITE1
,
850 .vmux
= SAA7115_COMPOSITE0
,
851 .amux
= EM28XX_AMUX_LINE_IN
,
853 .type
= EM28XX_VMUX_SVIDEO
,
854 .vmux
= SAA7115_SVIDEO3
,
855 .amux
= EM28XX_AMUX_LINE_IN
,
858 [EM2860_BOARD_POINTNIX_INTRAORAL_CAMERA
] = {
859 .name
= "PointNix Intra-Oral Camera",
860 .has_snapshot_button
= 1,
862 .tda9887_conf
= TDA9887_PRESENT
,
863 .tuner_type
= TUNER_ABSENT
,
864 .decoder
= EM28XX_SAA7113
,
866 .type
= EM28XX_VMUX_SVIDEO
,
867 .vmux
= SAA7115_SVIDEO3
,
868 .amux
= EM28XX_AMUX_VIDEO
,
871 [EM2880_BOARD_MSI_DIGIVOX_AD
] = {
872 .name
= "MSI DigiVox A/D",
873 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
875 .tuner_type
= TUNER_XC2028
,
876 .decoder
= EM28XX_TVP5150
,
878 .type
= EM28XX_VMUX_TELEVISION
,
879 .vmux
= TVP5150_COMPOSITE0
,
880 .amux
= EM28XX_AMUX_VIDEO
,
882 .type
= EM28XX_VMUX_COMPOSITE1
,
883 .vmux
= TVP5150_COMPOSITE1
,
884 .amux
= EM28XX_AMUX_LINE_IN
,
886 .type
= EM28XX_VMUX_SVIDEO
,
887 .vmux
= TVP5150_SVIDEO
,
888 .amux
= EM28XX_AMUX_LINE_IN
,
891 [EM2880_BOARD_MSI_DIGIVOX_AD_II
] = {
892 .name
= "MSI DigiVox A/D II",
893 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
895 .tuner_type
= TUNER_XC2028
,
896 .decoder
= EM28XX_TVP5150
,
898 .type
= EM28XX_VMUX_TELEVISION
,
899 .vmux
= TVP5150_COMPOSITE0
,
900 .amux
= EM28XX_AMUX_VIDEO
,
902 .type
= EM28XX_VMUX_COMPOSITE1
,
903 .vmux
= TVP5150_COMPOSITE1
,
904 .amux
= EM28XX_AMUX_LINE_IN
,
906 .type
= EM28XX_VMUX_SVIDEO
,
907 .vmux
= TVP5150_SVIDEO
,
908 .amux
= EM28XX_AMUX_LINE_IN
,
911 [EM2880_BOARD_KWORLD_DVB_305U
] = {
912 .name
= "KWorld DVB-T 305U",
913 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
915 .tuner_type
= TUNER_XC2028
,
916 .decoder
= EM28XX_TVP5150
,
918 .type
= EM28XX_VMUX_TELEVISION
,
919 .vmux
= TVP5150_COMPOSITE0
,
920 .amux
= EM28XX_AMUX_VIDEO
,
922 .type
= EM28XX_VMUX_COMPOSITE1
,
923 .vmux
= TVP5150_COMPOSITE1
,
924 .amux
= EM28XX_AMUX_LINE_IN
,
926 .type
= EM28XX_VMUX_SVIDEO
,
927 .vmux
= TVP5150_SVIDEO
,
928 .amux
= EM28XX_AMUX_LINE_IN
,
931 [EM2880_BOARD_KWORLD_DVB_310U
] = {
932 .name
= "KWorld DVB-T 310U",
934 .tuner_type
= TUNER_XC2028
,
937 .decoder
= EM28XX_TVP5150
,
939 .type
= EM28XX_VMUX_TELEVISION
,
940 .vmux
= TVP5150_COMPOSITE0
,
941 .amux
= EM28XX_AMUX_VIDEO
,
943 .type
= EM28XX_VMUX_COMPOSITE1
,
944 .vmux
= TVP5150_COMPOSITE1
,
945 .amux
= EM28XX_AMUX_LINE_IN
,
946 }, { /* S-video has not been tested yet */
947 .type
= EM28XX_VMUX_SVIDEO
,
948 .vmux
= TVP5150_SVIDEO
,
949 .amux
= EM28XX_AMUX_LINE_IN
,
952 [EM2881_BOARD_DNT_DA2_HYBRID
] = {
953 .name
= "DNT DA2 Hybrid",
954 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
956 .tuner_type
= TUNER_XC2028
,
957 .decoder
= EM28XX_TVP5150
,
959 .type
= EM28XX_VMUX_TELEVISION
,
960 .vmux
= TVP5150_COMPOSITE0
,
961 .amux
= EM28XX_AMUX_VIDEO
,
963 .type
= EM28XX_VMUX_COMPOSITE1
,
964 .vmux
= TVP5150_COMPOSITE1
,
965 .amux
= EM28XX_AMUX_LINE_IN
,
967 .type
= EM28XX_VMUX_SVIDEO
,
968 .vmux
= TVP5150_SVIDEO
,
969 .amux
= EM28XX_AMUX_LINE_IN
,
972 [EM2881_BOARD_PINNACLE_HYBRID_PRO
] = {
973 .name
= "Pinnacle Hybrid Pro",
974 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
976 .tuner_type
= TUNER_XC2028
,
977 .decoder
= EM28XX_TVP5150
,
979 .type
= EM28XX_VMUX_TELEVISION
,
980 .vmux
= TVP5150_COMPOSITE0
,
981 .amux
= EM28XX_AMUX_VIDEO
,
983 .type
= EM28XX_VMUX_COMPOSITE1
,
984 .vmux
= TVP5150_COMPOSITE1
,
985 .amux
= EM28XX_AMUX_LINE_IN
,
987 .type
= EM28XX_VMUX_SVIDEO
,
988 .vmux
= TVP5150_SVIDEO
,
989 .amux
= EM28XX_AMUX_LINE_IN
,
992 [EM2882_BOARD_PINNACLE_HYBRID_PRO
] = {
993 .name
= "Pinnacle Hybrid Pro (2)",
994 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
996 .tuner_type
= TUNER_XC2028
,
998 .decoder
= EM28XX_TVP5150
,
1000 .type
= EM28XX_VMUX_TELEVISION
,
1001 .vmux
= TVP5150_COMPOSITE0
,
1002 .amux
= EM28XX_AMUX_VIDEO
,
1004 .type
= EM28XX_VMUX_COMPOSITE1
,
1005 .vmux
= TVP5150_COMPOSITE1
,
1006 .amux
= EM28XX_AMUX_LINE_IN
,
1008 .type
= EM28XX_VMUX_SVIDEO
,
1009 .vmux
= TVP5150_SVIDEO
,
1010 .amux
= EM28XX_AMUX_LINE_IN
,
1013 [EM2882_BOARD_KWORLD_VS_DVBT
] = {
1014 .name
= "Kworld VS-DVB-T 323UR",
1015 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
1017 .tuner_type
= TUNER_XC2028
,
1018 .decoder
= EM28XX_TVP5150
,
1020 .type
= EM28XX_VMUX_TELEVISION
,
1021 .vmux
= TVP5150_COMPOSITE0
,
1022 .amux
= EM28XX_AMUX_VIDEO
,
1024 .type
= EM28XX_VMUX_COMPOSITE1
,
1025 .vmux
= TVP5150_COMPOSITE1
,
1026 .amux
= EM28XX_AMUX_LINE_IN
,
1028 .type
= EM28XX_VMUX_SVIDEO
,
1029 .vmux
= TVP5150_SVIDEO
,
1030 .amux
= EM28XX_AMUX_LINE_IN
,
1033 [EM2882_BOARD_TERRATEC_HYBRID_XS
] = {
1034 .name
= "Terratec Hybrid XS (em2882)",
1035 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
1037 .tuner_type
= TUNER_XC2028
,
1038 .decoder
= EM28XX_TVP5150
,
1040 .type
= EM28XX_VMUX_TELEVISION
,
1041 .vmux
= TVP5150_COMPOSITE0
,
1042 .amux
= EM28XX_AMUX_VIDEO
,
1044 .type
= EM28XX_VMUX_COMPOSITE1
,
1045 .vmux
= TVP5150_COMPOSITE1
,
1046 .amux
= EM28XX_AMUX_LINE_IN
,
1048 .type
= EM28XX_VMUX_SVIDEO
,
1049 .vmux
= TVP5150_SVIDEO
,
1050 .amux
= EM28XX_AMUX_LINE_IN
,
1053 [EM2883_BOARD_KWORLD_HYBRID_A316
] = {
1054 .name
= "Kworld PlusTV HD Hybrid 330",
1055 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
1058 .tuner_type
= TUNER_XC2028
,
1059 .decoder
= EM28XX_TVP5150
,
1061 .type
= EM28XX_VMUX_TELEVISION
,
1062 .vmux
= TVP5150_COMPOSITE0
,
1063 .amux
= EM28XX_AMUX_VIDEO
,
1065 .type
= EM28XX_VMUX_COMPOSITE1
,
1066 .vmux
= TVP5150_COMPOSITE1
,
1067 .amux
= EM28XX_AMUX_LINE_IN
,
1069 .type
= EM28XX_VMUX_SVIDEO
,
1070 .vmux
= TVP5150_SVIDEO
,
1071 .amux
= EM28XX_AMUX_LINE_IN
,
1074 [EM2820_BOARD_COMPRO_VIDEOMATE_FORYOU
] = {
1075 .name
= "Compro VideoMate ForYou/Stereo",
1077 .tuner_type
= TUNER_LG_PAL_NEW_TAPC
,
1078 .tda9887_conf
= TDA9887_PRESENT
,
1079 .decoder
= EM28XX_TVP5150
,
1081 .type
= EM28XX_VMUX_TELEVISION
,
1082 .vmux
= TVP5150_COMPOSITE0
,
1083 .amux
= EM28XX_AMUX_LINE_IN
,
1085 .type
= EM28XX_VMUX_SVIDEO
,
1086 .vmux
= TVP5150_SVIDEO
,
1087 .amux
= EM28XX_AMUX_LINE_IN
,
1090 [EM2874_BOARD_PINNACLE_PCTV_80E
] = {
1091 .name
= "Pinnacle PCTV HD Mini",
1093 .tuner_type
= TUNER_ABSENT
,
1095 .ir_codes
= ir_codes_pinnacle_pctv_hd
,
1096 .decoder
= EM28XX_NODECODER
,
1099 .type
= EM28XX_VMUX_TELEVISION
,
1100 .vmux
= TVP5150_COMPOSITE0
,
1101 .amux
= EM28XX_AMUX_LINE_IN
,
1106 const unsigned int em28xx_bcount
= ARRAY_SIZE(em28xx_boards
);
1108 /* table of devices that work with this driver */
1109 struct usb_device_id em28xx_id_table
[] = {
1110 { USB_DEVICE(0xeb1a, 0x2750),
1111 .driver_info
= EM2750_BOARD_UNKNOWN
},
1112 { USB_DEVICE(0xeb1a, 0x2751),
1113 .driver_info
= EM2750_BOARD_UNKNOWN
},
1114 { USB_DEVICE(0xeb1a, 0x2800),
1115 .driver_info
= EM2800_BOARD_UNKNOWN
},
1116 { USB_DEVICE(0xeb1a, 0x2820),
1117 .driver_info
= EM2820_BOARD_UNKNOWN
},
1118 { USB_DEVICE(0xeb1a, 0x2821),
1119 .driver_info
= EM2820_BOARD_PROLINK_PLAYTV_USB2
},
1120 { USB_DEVICE(0xeb1a, 0x2860),
1121 .driver_info
= EM2820_BOARD_UNKNOWN
},
1122 { USB_DEVICE(0xeb1a, 0x2861),
1123 .driver_info
= EM2820_BOARD_UNKNOWN
},
1124 { USB_DEVICE(0xeb1a, 0x2870),
1125 .driver_info
= EM2820_BOARD_UNKNOWN
},
1126 { USB_DEVICE(0xeb1a, 0x2881),
1127 .driver_info
= EM2820_BOARD_UNKNOWN
},
1128 { USB_DEVICE(0xeb1a, 0x2883),
1129 .driver_info
= EM2820_BOARD_UNKNOWN
},
1130 { USB_DEVICE(0xeb1a, 0xe300),
1131 .driver_info
= EM2861_BOARD_KWORLD_PVRTV_300U
},
1132 { USB_DEVICE(0xeb1a, 0xe305),
1133 .driver_info
= EM2880_BOARD_KWORLD_DVB_305U
},
1134 { USB_DEVICE(0xeb1a, 0xe310),
1135 .driver_info
= EM2880_BOARD_MSI_DIGIVOX_AD
},
1136 { USB_DEVICE(0xeb1a, 0xa316),
1137 .driver_info
= EM2883_BOARD_KWORLD_HYBRID_A316
},
1138 { USB_DEVICE(0xeb1a, 0xe320),
1139 .driver_info
= EM2880_BOARD_MSI_DIGIVOX_AD_II
},
1140 { USB_DEVICE(0xeb1a, 0xe323),
1141 .driver_info
= EM2882_BOARD_KWORLD_VS_DVBT
},
1142 { USB_DEVICE(0xeb1a, 0xe350),
1143 .driver_info
= EM2870_BOARD_KWORLD_350U
},
1144 { USB_DEVICE(0xeb1a, 0xe355),
1145 .driver_info
= EM2870_BOARD_KWORLD_355U
},
1146 { USB_DEVICE(0xeb1a, 0x2801),
1147 .driver_info
= EM2800_BOARD_GRABBEEX_USB2800
},
1148 { USB_DEVICE(0xeb1a, 0xe357),
1149 .driver_info
= EM2870_BOARD_KWORLD_355U
},
1150 { USB_DEVICE(0x0ccd, 0x0036),
1151 .driver_info
= EM2820_BOARD_TERRATEC_CINERGY_250
},
1152 { USB_DEVICE(0x0ccd, 0x004c),
1153 .driver_info
= EM2880_BOARD_TERRATEC_HYBRID_XS_FR
},
1154 { USB_DEVICE(0x0ccd, 0x004f),
1155 .driver_info
= EM2860_BOARD_TERRATEC_HYBRID_XS
},
1156 { USB_DEVICE(0x0ccd, 0x005e),
1157 .driver_info
= EM2882_BOARD_TERRATEC_HYBRID_XS
},
1158 { USB_DEVICE(0x0ccd, 0x0042),
1159 .driver_info
= EM2880_BOARD_TERRATEC_HYBRID_XS
},
1160 { USB_DEVICE(0x0ccd, 0x0043),
1161 .driver_info
= EM2870_BOARD_TERRATEC_XS
},
1162 { USB_DEVICE(0x0ccd, 0x0047),
1163 .driver_info
= EM2880_BOARD_TERRATEC_PRODIGY_XS
},
1164 { USB_DEVICE(0x185b, 0x2870),
1165 .driver_info
= EM2870_BOARD_COMPRO_VIDEOMATE
},
1166 { USB_DEVICE(0x185b, 0x2041),
1167 .driver_info
= EM2820_BOARD_COMPRO_VIDEOMATE_FORYOU
},
1168 { USB_DEVICE(0x2040, 0x4200),
1169 .driver_info
= EM2820_BOARD_HAUPPAUGE_WINTV_USB_2
},
1170 { USB_DEVICE(0x2040, 0x4201),
1171 .driver_info
= EM2820_BOARD_HAUPPAUGE_WINTV_USB_2
},
1172 { USB_DEVICE(0x2040, 0x6500),
1173 .driver_info
= EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900
},
1174 { USB_DEVICE(0x2040, 0x6502),
1175 .driver_info
= EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2
},
1176 { USB_DEVICE(0x2040, 0x6513), /* HCW HVR-980 */
1177 .driver_info
= EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950
},
1178 { USB_DEVICE(0x2040, 0x6517), /* HP HVR-950 */
1179 .driver_info
= EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950
},
1180 { USB_DEVICE(0x2040, 0x651b), /* RP HVR-950 */
1181 .driver_info
= EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950
},
1182 { USB_DEVICE(0x2040, 0x651f), /* HCW HVR-850 */
1183 .driver_info
= EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950
},
1184 { USB_DEVICE(0x0438, 0xb002),
1185 .driver_info
= EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600
},
1186 { USB_DEVICE(0x2001, 0xf112),
1187 .driver_info
= EM2820_BOARD_DLINK_USB_TV
},
1188 { USB_DEVICE(0x2304, 0x0207),
1189 .driver_info
= EM2820_BOARD_PINNACLE_DVC_90
},
1190 { USB_DEVICE(0x2304, 0x0208),
1191 .driver_info
= EM2820_BOARD_PINNACLE_USB_2
},
1192 { USB_DEVICE(0x2304, 0x021a),
1193 .driver_info
= EM2820_BOARD_PINNACLE_DVC_90
},
1194 { USB_DEVICE(0x2304, 0x0226),
1195 .driver_info
= EM2882_BOARD_PINNACLE_HYBRID_PRO
},
1196 { USB_DEVICE(0x2304, 0x0227),
1197 .driver_info
= EM2880_BOARD_PINNACLE_PCTV_HD_PRO
},
1198 { USB_DEVICE(0x2304, 0x023f),
1199 .driver_info
= EM2874_BOARD_PINNACLE_PCTV_80E
},
1200 { USB_DEVICE(0x0413, 0x6023),
1201 .driver_info
= EM2800_BOARD_LEADTEK_WINFAST_USBII
},
1202 { USB_DEVICE(0x093b, 0xa005),
1203 .driver_info
= EM2861_BOARD_PLEXTOR_PX_TV100U
},
1206 MODULE_DEVICE_TABLE(usb
, em28xx_id_table
);
1209 * Reset sequences for analog/digital modes
1212 /* Reset for the most [analog] boards */
1213 static struct em28xx_reg_seq default_analog
[] = {
1214 {EM28XX_R08_GPIO
, 0x6d, ~EM_GPIO_4
, 10},
1218 /* Reset for the most [digital] boards */
1219 static struct em28xx_reg_seq default_digital
[] = {
1220 {EM28XX_R08_GPIO
, 0x6e, ~EM_GPIO_4
, 10},
1224 /* Board Hauppauge WinTV HVR 900 analog */
1225 static struct em28xx_reg_seq hauppauge_wintv_hvr_900_analog
[] = {
1226 {EM28XX_R08_GPIO
, 0x2d, ~EM_GPIO_4
, 10},
1227 {0x05, 0xff, 0x10, 10},
1231 /* Board Hauppauge WinTV HVR 900 digital */
1232 static struct em28xx_reg_seq hauppauge_wintv_hvr_900_digital
[] = {
1233 {EM28XX_R08_GPIO
, 0x2e, ~EM_GPIO_4
, 10},
1234 {EM2880_R04_GPO
, 0x04, 0x0f, 10},
1235 {EM2880_R04_GPO
, 0x0c, 0x0f, 10},
1239 /* Boards - EM2880 MSI DIGIVOX AD and EM2880_BOARD_MSI_DIGIVOX_AD_II */
1240 static struct em28xx_reg_seq em2880_msi_digivox_ad_analog
[] = {
1241 {EM28XX_R08_GPIO
, 0x69, ~EM_GPIO_4
, 10},
1245 /* Boards - EM2880 MSI DIGIVOX AD and EM2880_BOARD_MSI_DIGIVOX_AD_II */
1246 static struct em28xx_reg_seq em2880_msi_digivox_ad_digital
[] = {
1247 {EM28XX_R08_GPIO
, 0x6a, ~EM_GPIO_4
, 10},
1251 /* Board - EM2870 Kworld 355u
1252 Analog - No input analog */
1253 static struct em28xx_reg_seq em2870_kworld_355u_digital
[] = {
1254 {EM2880_R04_GPO
, 0x01, 0xff, 10},
1258 /* Callback for the most boards */
1259 static struct em28xx_reg_seq default_callback
[] = {
1260 {EM28XX_R08_GPIO
, EM_GPIO_4
, EM_GPIO_4
, 10},
1261 {EM28XX_R08_GPIO
, 0, EM_GPIO_4
, 10},
1262 {EM28XX_R08_GPIO
, EM_GPIO_4
, EM_GPIO_4
, 10},
1266 /* Callback for EM2882 TERRATEC HYBRID XS */
1267 static struct em28xx_reg_seq em2882_terratec_hybrid_xs_digital
[] = {
1268 {EM28XX_R08_GPIO
, 0x2e, 0xff, 6},
1269 {EM28XX_R08_GPIO
, 0x3e, ~EM_GPIO_4
, 6},
1270 {EM2880_R04_GPO
, 0x04, 0xff, 10},
1271 {EM2880_R04_GPO
, 0x0c, 0xff, 10},
1275 /* Pinnacle PCTV HD Mini (80e) GPIOs
1277 6: demod reset, active low
1278 7: LED on, active high */
1279 static struct em28xx_reg_seq em2874_pinnacle_80e_digital
[] = {
1280 {EM28XX_R06_I2C_CLK
, 0x45, 0xff, 10}, /*400 KHz*/
1281 {EM2874_R80_GPIO
, 0x80, 0xff, 100},/*Demod reset*/
1282 {EM2874_R80_GPIO
, 0xc0, 0xff, 10},
1287 * EEPROM hash table for devices with generic USB IDs
1289 static struct em28xx_hash_table em28xx_eeprom_hash
[] = {
1290 /* P/N: SA 60002070465 Tuner: TVF7533-MF */
1291 {0x6ce05a8f, EM2820_BOARD_PROLINK_PLAYTV_USB2
, TUNER_YMEC_TVF_5533MF
},
1292 {0x966a0441, EM2880_BOARD_KWORLD_DVB_310U
, TUNER_XC2028
},
1295 /* I2C devicelist hash table for devices with generic USB IDs */
1296 static struct em28xx_hash_table em28xx_i2c_hash
[] = {
1297 {0xb06a32c3, EM2800_BOARD_TERRATEC_CINERGY_200
, TUNER_LG_PAL_NEW_TAPC
},
1298 {0xf51200e3, EM2800_BOARD_VGEAR_POCKETTV
, TUNER_LG_PAL_NEW_TAPC
},
1299 {0x1ba50080, EM2860_BOARD_POINTNIX_INTRAORAL_CAMERA
, TUNER_ABSENT
},
1302 int em28xx_tuner_callback(void *ptr
, int component
, int command
, int arg
)
1305 struct em28xx
*dev
= ptr
;
1307 if (dev
->tuner_type
!= TUNER_XC2028
)
1310 if (command
!= XC2028_TUNER_RESET
)
1313 if (dev
->mode
== EM28XX_ANALOG_MODE
)
1314 rc
= em28xx_gpio_set(dev
, dev
->tun_analog_gpio
);
1316 rc
= em28xx_gpio_set(dev
, dev
->tun_digital_gpio
);
1320 EXPORT_SYMBOL_GPL(em28xx_tuner_callback
);
1322 static void em28xx_set_model(struct em28xx
*dev
)
1324 dev
->is_em2800
= em28xx_boards
[dev
->model
].is_em2800
;
1325 dev
->has_msp34xx
= em28xx_boards
[dev
->model
].has_msp34xx
;
1326 dev
->tda9887_conf
= em28xx_boards
[dev
->model
].tda9887_conf
;
1327 dev
->decoder
= em28xx_boards
[dev
->model
].decoder
;
1328 dev
->video_inputs
= em28xx_boards
[dev
->model
].vchannels
;
1329 dev
->has_12mhz_i2s
= em28xx_boards
[dev
->model
].has_12mhz_i2s
;
1330 dev
->max_range_640_480
= em28xx_boards
[dev
->model
].max_range_640_480
;
1331 dev
->has_dvb
= em28xx_boards
[dev
->model
].has_dvb
;
1332 dev
->has_snapshot_button
= em28xx_boards
[dev
->model
].has_snapshot_button
;
1333 dev
->ir_codes
= em28xx_boards
[dev
->model
].ir_codes
;
1334 dev
->valid
= em28xx_boards
[dev
->model
].valid
;
1337 /* Since em28xx_pre_card_setup() requires a proper dev->model,
1338 * this won't work for boards with generic PCI IDs
1340 void em28xx_pre_card_setup(struct em28xx
*dev
)
1344 /* Set the default GPO/GPIO for legacy devices */
1345 dev
->reg_gpo_num
= EM2880_R04_GPO
;
1346 dev
->reg_gpio_num
= EM28XX_R08_GPIO
;
1348 dev
->wait_after_write
= 5;
1350 /* Based on the Chip ID, set the device configuration */
1351 rc
= em28xx_read_reg(dev
, EM28XX_R0A_CHIPID
);
1355 case CHIP_ID_EM2750
:
1356 em28xx_info("chip ID is em2750\n");
1358 case CHIP_ID_EM2820
:
1359 em28xx_info("chip ID is em2820\n");
1361 case CHIP_ID_EM2840
:
1362 em28xx_info("chip ID is em2840\n");
1364 case CHIP_ID_EM2860
:
1365 em28xx_info("chip ID is em2860\n");
1367 case CHIP_ID_EM2874
:
1368 em28xx_info("chip ID is em2874\n");
1369 dev
->reg_gpio_num
= EM2874_R80_GPIO
;
1370 dev
->wait_after_write
= 0;
1372 case CHIP_ID_EM2883
:
1373 em28xx_info("chip ID is em2882/em2883\n");
1374 dev
->wait_after_write
= 0;
1377 em28xx_info("em28xx chip ID = %d\n", rc
);
1381 /* Prepopulate cached GPO register content */
1382 rc
= em28xx_read_reg(dev
, dev
->reg_gpo_num
);
1386 em28xx_set_model(dev
);
1388 /* request some modules */
1389 switch (dev
->model
) {
1390 case EM2880_BOARD_TERRATEC_PRODIGY_XS
:
1391 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900
:
1392 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2
:
1393 case EM2860_BOARD_TERRATEC_HYBRID_XS
:
1394 case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950
:
1395 case EM2880_BOARD_PINNACLE_PCTV_HD_PRO
:
1396 case EM2882_BOARD_PINNACLE_HYBRID_PRO
:
1397 case EM2883_BOARD_KWORLD_HYBRID_A316
:
1398 case EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600
:
1399 em28xx_write_regs(dev
, EM28XX_R0F_XCLK
, "\x27", 1);
1400 em28xx_write_reg(dev
, EM28XX_R06_I2C_CLK
,
1401 EM28XX_I2C_CLK_WAIT_ENABLE
|
1402 EM28XX_I2C_FREQ_100_KHZ
);
1405 /* Sets GPO/GPIO sequences for this device */
1406 dev
->analog_gpio
= hauppauge_wintv_hvr_900_analog
;
1407 dev
->digital_gpio
= hauppauge_wintv_hvr_900_digital
;
1408 dev
->tun_analog_gpio
= default_callback
;
1409 dev
->tun_digital_gpio
= default_callback
;
1412 case EM2882_BOARD_TERRATEC_HYBRID_XS
:
1413 em28xx_write_regs(dev
, EM28XX_R0F_XCLK
, "\x27", 1);
1414 em28xx_write_reg(dev
, EM28XX_R06_I2C_CLK
,
1415 EM28XX_I2C_CLK_WAIT_ENABLE
|
1416 EM28XX_I2C_FREQ_100_KHZ
);
1419 /* should be added ir_codes here */
1421 /* Sets GPO/GPIO sequences for this device */
1422 dev
->analog_gpio
= hauppauge_wintv_hvr_900_analog
;
1423 dev
->digital_gpio
= hauppauge_wintv_hvr_900_digital
;
1424 dev
->tun_analog_gpio
= default_callback
;
1425 dev
->tun_digital_gpio
= em2882_terratec_hybrid_xs_digital
;
1428 case EM2880_BOARD_TERRATEC_HYBRID_XS_FR
:
1429 case EM2880_BOARD_TERRATEC_HYBRID_XS
:
1430 case EM2870_BOARD_TERRATEC_XS
:
1431 case EM2881_BOARD_PINNACLE_HYBRID_PRO
:
1432 case EM2880_BOARD_KWORLD_DVB_310U
:
1433 case EM2870_BOARD_KWORLD_350U
:
1434 case EM2881_BOARD_DNT_DA2_HYBRID
:
1435 em28xx_write_regs(dev
, EM28XX_R0F_XCLK
, "\x27", 1);
1436 em28xx_write_reg(dev
, EM28XX_R06_I2C_CLK
,
1437 EM28XX_I2C_CLK_WAIT_ENABLE
|
1438 EM28XX_I2C_FREQ_100_KHZ
);
1441 /* NOTE: EM2881_DNT_DA2_HYBRID spend 140 msleep for digital
1442 and analog commands. If this commands doesn't work,
1445 /* Sets GPO/GPIO sequences for this device */
1446 dev
->analog_gpio
= default_analog
;
1447 dev
->digital_gpio
= default_digital
;
1448 dev
->tun_analog_gpio
= default_callback
;
1449 dev
->tun_digital_gpio
= default_callback
;
1452 case EM2880_BOARD_MSI_DIGIVOX_AD
:
1453 case EM2880_BOARD_MSI_DIGIVOX_AD_II
:
1454 em28xx_write_regs(dev
, EM28XX_R0F_XCLK
, "\x27", 1);
1455 em28xx_write_reg(dev
, EM28XX_R06_I2C_CLK
,
1456 EM28XX_I2C_CLK_WAIT_ENABLE
|
1457 EM28XX_I2C_FREQ_100_KHZ
);
1460 /* Sets GPO/GPIO sequences for this device */
1461 dev
->analog_gpio
= em2880_msi_digivox_ad_analog
;
1462 dev
->digital_gpio
= em2880_msi_digivox_ad_digital
;
1463 dev
->tun_analog_gpio
= default_callback
;
1464 dev
->tun_digital_gpio
= default_callback
;
1467 case EM2750_BOARD_UNKNOWN
:
1468 case EM2750_BOARD_DLCW_130
:
1469 em28xx_write_regs(dev
, EM28XX_R0F_XCLK
, "\x0a", 1);
1472 case EM2861_BOARD_PLEXTOR_PX_TV100U
:
1473 em28xx_write_regs(dev
, EM28XX_R0F_XCLK
, "\x27", 1);
1474 em28xx_write_reg(dev
, EM28XX_R06_I2C_CLK
,
1475 EM28XX_I2C_CLK_WAIT_ENABLE
|
1476 EM28XX_I2C_FREQ_100_KHZ
);
1478 /* Turn on analog audio output */
1479 em28xx_write_regs_req(dev
, 0x00, 0x08, "\xfd", 1);
1482 case EM2861_BOARD_KWORLD_PVRTV_300U
:
1483 case EM2880_BOARD_KWORLD_DVB_305U
:
1484 em28xx_write_regs(dev
, EM28XX_R0F_XCLK
, "\x27", 1);
1485 em28xx_write_reg(dev
, EM28XX_R06_I2C_CLK
,
1486 EM28XX_I2C_CLK_WAIT_ENABLE
|
1487 EM28XX_I2C_FREQ_100_KHZ
);
1489 em28xx_write_regs(dev
, 0x08, "\x6d", 1);
1491 em28xx_write_regs(dev
, 0x08, "\x7d", 1);
1495 case EM2870_BOARD_KWORLD_355U
:
1496 em28xx_write_regs(dev
, EM28XX_R0F_XCLK
, "\x27", 1);
1497 em28xx_write_reg(dev
, EM28XX_R06_I2C_CLK
,
1498 EM28XX_I2C_CLK_WAIT_ENABLE
|
1499 EM28XX_I2C_FREQ_100_KHZ
);
1502 /* Sets GPO/GPIO sequences for this device */
1503 dev
->digital_gpio
= em2870_kworld_355u_digital
;
1506 case EM2870_BOARD_COMPRO_VIDEOMATE
:
1507 em28xx_write_regs(dev
, EM28XX_R0F_XCLK
, "\x27", 1);
1508 em28xx_write_reg(dev
, EM28XX_R06_I2C_CLK
,
1509 EM28XX_I2C_CLK_WAIT_ENABLE
|
1510 EM28XX_I2C_FREQ_100_KHZ
);
1511 /* TODO: someone can do some cleanup here...
1512 not everything's needed */
1513 em28xx_write_regs(dev
, 0x04, "\x00", 1);
1515 em28xx_write_regs(dev
, 0x04, "\x01", 1);
1517 em28xx_write_regs(dev
, 0x08, "\xfd", 1);
1519 em28xx_write_regs(dev
, 0x08, "\xfc", 1);
1521 em28xx_write_regs(dev
, 0x08, "\xdc", 1);
1523 em28xx_write_regs(dev
, 0x08, "\xfc", 1);
1527 case EM2870_BOARD_TERRATEC_XS_MT2060
:
1528 em28xx_write_regs(dev
, EM28XX_R0F_XCLK
, "\x27", 1);
1529 em28xx_write_reg(dev
, EM28XX_R06_I2C_CLK
,
1530 EM28XX_I2C_CLK_WAIT_ENABLE
|
1531 EM28XX_I2C_FREQ_100_KHZ
);
1532 /* this device needs some gpio writes to get the DVB-T
1534 em28xx_write_regs(dev
, 0x08, "\xfe", 1);
1536 em28xx_write_regs(dev
, 0x08, "\xde", 1);
1538 dev
->em28xx_write_regs(dev
, 0x08, "\xfe", 1);
1542 case EM2870_BOARD_PINNACLE_PCTV_DVB
:
1543 em28xx_write_reg(dev
, EM28XX_R06_I2C_CLK
,
1544 EM28XX_I2C_CLK_WAIT_ENABLE
|
1545 EM28XX_I2C_FREQ_100_KHZ
);
1547 /* this device needs some gpio writes to get the
1549 em28xx_write_regs(dev
, 0x08, "\xfe", 1);
1551 em28xx_write_regs(dev
, 0x08, "\xde", 1);
1553 em28xx_write_regs(dev
, 0x08, "\xfe", 1);
1555 /* switch em2880 rc protocol */
1556 em28xx_write_regs(dev
, EM28XX_R0F_XCLK
, "\x22", 1);
1557 /* should be added ir_codes here */
1560 case EM2820_BOARD_GADMEI_UTV310
:
1561 em28xx_write_regs(dev
, EM28XX_R0F_XCLK
, "\x27", 1);
1562 em28xx_write_reg(dev
, EM28XX_R06_I2C_CLK
,
1563 EM28XX_I2C_CLK_WAIT_ENABLE
|
1564 EM28XX_I2C_FREQ_100_KHZ
);
1565 /* Turn on analog audio output */
1566 em28xx_write_regs_req(dev
, 0x00, 0x08, "\xfd", 1);
1569 case EM2860_BOARD_GADMEI_UTV330
:
1571 em28xx_write_regs(dev
, EM28XX_R0F_XCLK
, "\x07", 1);
1572 em28xx_write_reg(dev
, EM28XX_R06_I2C_CLK
,
1573 EM28XX_I2C_CLK_WAIT_ENABLE
|
1574 EM28XX_I2C_FREQ_100_KHZ
);
1575 /* should be added ir_codes here */
1578 case EM2820_BOARD_MSI_VOX_USB_2
:
1579 em28xx_write_regs(dev
, EM28XX_R0F_XCLK
, "\x27", 1);
1580 em28xx_write_reg(dev
, EM28XX_R06_I2C_CLK
,
1581 EM28XX_I2C_CLK_WAIT_ENABLE
|
1582 EM28XX_I2C_FREQ_100_KHZ
);
1583 /* enables audio for that device */
1584 em28xx_write_regs_req(dev
, 0x00, 0x08, "\xfd", 1);
1587 case EM2874_BOARD_PINNACLE_PCTV_80E
:
1588 /* Set 400 KHz clock and select secondary i2c bus */
1589 em28xx_write_reg(dev
, EM28XX_R06_I2C_CLK
,
1590 EM28XX_I2C_CLK_WAIT_ENABLE
|
1591 EM2874_I2C_SECONDARY_BUS_SELECT
|
1592 EM28XX_I2C_FREQ_400_KHZ
);
1594 dev
->digital_gpio
= em2874_pinnacle_80e_digital
;
1598 em28xx_gpio_set(dev
, dev
->tun_analog_gpio
);
1599 em28xx_set_mode(dev
, EM28XX_ANALOG_MODE
);
1602 em28xx_set_mode(dev
, EM28XX_MODE_UNDEFINED
);
1605 static void em28xx_setup_xc3028(struct em28xx
*dev
, struct xc2028_ctrl
*ctl
)
1607 memset(ctl
, 0, sizeof(*ctl
));
1609 ctl
->fname
= XC2028_DEFAULT_FIRMWARE
;
1611 ctl
->mts
= em28xx_boards
[dev
->model
].mts_firmware
;
1613 switch (dev
->model
) {
1614 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900
:
1615 ctl
->demod
= XC3028_FE_ZARLINK456
;
1617 case EM2880_BOARD_TERRATEC_HYBRID_XS
:
1618 ctl
->demod
= XC3028_FE_ZARLINK456
;
1620 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2
:
1621 /* djh - Not sure which demod we need here */
1622 ctl
->demod
= XC3028_FE_DEFAULT
;
1624 case EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600
:
1625 ctl
->demod
= XC3028_FE_DEFAULT
;
1626 ctl
->fname
= XC3028L_DEFAULT_FIRMWARE
;
1628 case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950
:
1629 case EM2880_BOARD_PINNACLE_PCTV_HD_PRO
:
1630 /* FIXME: Better to specify the needed IF */
1631 ctl
->demod
= XC3028_FE_DEFAULT
;
1634 ctl
->demod
= XC3028_FE_OREN538
;
1638 static void em28xx_config_tuner(struct em28xx
*dev
)
1640 struct v4l2_priv_tun_config xc2028_cfg
;
1641 struct tuner_setup tun_setup
;
1642 struct v4l2_frequency f
;
1644 if (dev
->tuner_type
== TUNER_ABSENT
)
1647 tun_setup
.mode_mask
= T_ANALOG_TV
| T_RADIO
;
1648 tun_setup
.type
= dev
->tuner_type
;
1649 tun_setup
.addr
= dev
->tuner_addr
;
1650 tun_setup
.tuner_callback
= em28xx_tuner_callback
;
1652 em28xx_i2c_call_clients(dev
, TUNER_SET_TYPE_ADDR
, &tun_setup
);
1654 if (dev
->tuner_type
== TUNER_XC2028
) {
1655 struct xc2028_ctrl ctl
;
1657 em28xx_setup_xc3028(dev
, &ctl
);
1659 xc2028_cfg
.tuner
= TUNER_XC2028
;
1660 xc2028_cfg
.priv
= &ctl
;
1662 em28xx_i2c_call_clients(dev
, TUNER_SET_CONFIG
, &xc2028_cfg
);
1665 /* configure tuner */
1667 f
.type
= V4L2_TUNER_ANALOG_TV
;
1668 f
.frequency
= 9076; /* just a magic number */
1669 dev
->ctl_freq
= f
.frequency
;
1670 em28xx_i2c_call_clients(dev
, VIDIOC_S_FREQUENCY
, &f
);
1673 static int em28xx_hint_board(struct em28xx
*dev
)
1677 /* HINT method: EEPROM
1679 * This method works only for boards with eeprom.
1680 * Uses a hash of all eeprom bytes. The hash should be
1681 * unique for a vendor/tuner pair.
1682 * There are a high chance that tuners for different
1683 * video standards produce different hashes.
1685 for (i
= 0; i
< ARRAY_SIZE(em28xx_eeprom_hash
); i
++) {
1686 if (dev
->hash
== em28xx_eeprom_hash
[i
].hash
) {
1687 dev
->model
= em28xx_eeprom_hash
[i
].model
;
1688 dev
->tuner_type
= em28xx_eeprom_hash
[i
].tuner
;
1690 em28xx_errdev("Your board has no unique USB ID.\n");
1691 em28xx_errdev("A hint were successfully done, "
1692 "based on eeprom hash.\n");
1693 em28xx_errdev("This method is not 100%% failproof.\n");
1694 em28xx_errdev("If the board were missdetected, "
1695 "please email this log to:\n");
1696 em28xx_errdev("\tV4L Mailing List "
1697 " <video4linux-list@redhat.com>\n");
1698 em28xx_errdev("Board detected as %s\n",
1699 em28xx_boards
[dev
->model
].name
);
1705 /* HINT method: I2C attached devices
1707 * This method works for all boards.
1708 * Uses a hash of i2c scanned devices.
1709 * Devices with the same i2c attached chips will
1710 * be considered equal.
1711 * This method is less precise than the eeprom one.
1714 /* user did not request i2c scanning => do it now */
1716 em28xx_do_i2c_scan(dev
);
1718 for (i
= 0; i
< ARRAY_SIZE(em28xx_i2c_hash
); i
++) {
1719 if (dev
->i2c_hash
== em28xx_i2c_hash
[i
].hash
) {
1720 dev
->model
= em28xx_i2c_hash
[i
].model
;
1721 dev
->tuner_type
= em28xx_i2c_hash
[i
].tuner
;
1722 em28xx_errdev("Your board has no unique USB ID.\n");
1723 em28xx_errdev("A hint were successfully done, "
1724 "based on i2c devicelist hash.\n");
1725 em28xx_errdev("This method is not 100%% failproof.\n");
1726 em28xx_errdev("If the board were missdetected, "
1727 "please email this log to:\n");
1728 em28xx_errdev("\tV4L Mailing List "
1729 " <video4linux-list@redhat.com>\n");
1730 em28xx_errdev("Board detected as %s\n",
1731 em28xx_boards
[dev
->model
].name
);
1737 em28xx_errdev("Your board has no unique USB ID and thus need a "
1738 "hint to be detected.\n");
1739 em28xx_errdev("You may try to use card=<n> insmod option to "
1740 "workaround that.\n");
1741 em28xx_errdev("Please send an email with this log to:\n");
1742 em28xx_errdev("\tV4L Mailing List <video4linux-list@redhat.com>\n");
1743 em28xx_errdev("Board eeprom hash is 0x%08lx\n", dev
->hash
);
1744 em28xx_errdev("Board i2c devicelist hash is 0x%08lx\n", dev
->i2c_hash
);
1746 em28xx_errdev("Here is a list of valid choices for the card=<n>"
1747 " insmod option:\n");
1748 for (i
= 0; i
< em28xx_bcount
; i
++) {
1749 em28xx_errdev(" card=%d -> %s\n",
1750 i
, em28xx_boards
[i
].name
);
1755 /* ----------------------------------------------------------------------- */
1756 void em28xx_set_ir(struct em28xx
*dev
, struct IR_i2c
*ir
)
1763 /* detect & configure */
1764 switch (dev
->model
) {
1765 case (EM2800_BOARD_UNKNOWN
):
1767 case (EM2820_BOARD_UNKNOWN
):
1769 case (EM2800_BOARD_TERRATEC_CINERGY_200
):
1770 case (EM2820_BOARD_TERRATEC_CINERGY_250
):
1771 ir
->ir_codes
= ir_codes_em_terratec
;
1772 ir
->get_key
= em28xx_get_key_terratec
;
1773 snprintf(ir
->c
.name
, sizeof(ir
->c
.name
),
1774 "i2c IR (EM28XX Terratec)");
1776 case (EM2820_BOARD_PINNACLE_USB_2
):
1777 ir
->ir_codes
= ir_codes_pinnacle_grey
;
1778 ir
->get_key
= em28xx_get_key_pinnacle_usb_grey
;
1779 snprintf(ir
->c
.name
, sizeof(ir
->c
.name
),
1780 "i2c IR (EM28XX Pinnacle PCTV)");
1782 case (EM2820_BOARD_HAUPPAUGE_WINTV_USB_2
):
1783 ir
->ir_codes
= ir_codes_hauppauge_new
;
1784 ir
->get_key
= em28xx_get_key_em_haup
;
1785 snprintf(ir
->c
.name
, sizeof(ir
->c
.name
),
1786 "i2c IR (EM2840 Hauppauge)");
1788 case (EM2820_BOARD_MSI_VOX_USB_2
):
1790 case (EM2800_BOARD_LEADTEK_WINFAST_USBII
):
1792 case (EM2800_BOARD_KWORLD_USB2800
):
1794 case (EM2800_BOARD_GRABBEEX_USB2800
):
1799 void em28xx_card_setup(struct em28xx
*dev
)
1801 em28xx_set_model(dev
);
1803 dev
->tuner_type
= em28xx_boards
[dev
->model
].tuner_type
;
1804 if (em28xx_boards
[dev
->model
].tuner_addr
)
1805 dev
->tuner_addr
= em28xx_boards
[dev
->model
].tuner_addr
;
1807 /* request some modules */
1808 switch (dev
->model
) {
1809 case EM2820_BOARD_HAUPPAUGE_WINTV_USB_2
:
1810 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900
:
1811 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2
:
1812 case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950
:
1815 #ifdef CONFIG_MODULES
1816 request_module("tveeprom");
1818 /* Call first TVeeprom */
1820 dev
->i2c_client
.addr
= 0xa0 >> 1;
1821 tveeprom_hauppauge_analog(&dev
->i2c_client
, &tv
, dev
->eedata
);
1823 dev
->tuner_type
= tv
.tuner_type
;
1825 if (tv
.audio_processor
== V4L2_IDENT_MSPX4XX
) {
1826 dev
->i2s_speed
= 2048000;
1827 dev
->has_msp34xx
= 1;
1829 #ifdef CONFIG_MODULES
1831 request_module("ir-kbd-i2c");
1835 case EM2820_BOARD_KWORLD_PVRTV2800RF
:
1836 /* GPIO enables sound on KWORLD PVR TV 2800RF */
1837 em28xx_write_regs_req(dev
, 0x00, 0x08, "\xf9", 1);
1839 case EM2820_BOARD_UNKNOWN
:
1840 case EM2800_BOARD_UNKNOWN
:
1842 * The K-WORLD DVB-T 310U is detected as an MSI Digivox AD.
1844 * This occurs because they share identical USB vendor and
1847 * What we do here is look up the EEPROM hash of the K-WORLD
1848 * and if it is found then we decide that we do not have
1849 * a DIGIVOX and reset the device to the K-WORLD instead.
1851 * This solution is only valid if they do not share eeprom
1852 * hash identities which has not been determined as yet.
1854 case EM2880_BOARD_MSI_DIGIVOX_AD
:
1855 if (!em28xx_hint_board(dev
))
1856 em28xx_set_model(dev
);
1860 if (dev
->has_snapshot_button
)
1861 em28xx_register_snapshot_button(dev
);
1863 if (dev
->valid
== EM28XX_BOARD_NOT_VALIDATED
) {
1864 em28xx_errdev("\n\n");
1865 em28xx_errdev("The support for this board weren't "
1867 em28xx_errdev("Please send a report of having this working\n");
1868 em28xx_errdev("not to V4L mailing list (and/or to other "
1872 /* Allow override tuner type by a module parameter */
1874 dev
->tuner_type
= tuner
;
1876 #ifdef CONFIG_MODULES
1877 /* request some modules */
1878 if (dev
->has_msp34xx
)
1879 request_module("msp3400");
1880 if (dev
->decoder
== EM28XX_SAA7113
|| dev
->decoder
== EM28XX_SAA7114
)
1881 request_module("saa7115");
1882 if (dev
->decoder
== EM28XX_TVP5150
)
1883 request_module("tvp5150");
1884 if (dev
->tuner_type
!= TUNER_ABSENT
)
1885 request_module("tuner");
1888 em28xx_config_tuner(dev
);
1890 em28xx_ir_init(dev
);