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 {
55 * Reset sequences for analog/digital modes
58 /* Reset for the most [analog] boards */
59 static struct em28xx_reg_seq default_analog[] = {
60 {EM28XX_R08_GPIO, 0x6d, ~EM_GPIO_4, 10},
64 /* Reset for the most [digital] boards */
65 static struct em28xx_reg_seq default_digital[] = {
66 {EM28XX_R08_GPIO, 0x6e, ~EM_GPIO_4, 10},
70 /* Board Hauppauge WinTV HVR 900 analog */
71 static struct em28xx_reg_seq hauppauge_wintv_hvr_900_analog[] = {
72 {EM28XX_R08_GPIO, 0x2d, ~EM_GPIO_4, 10},
73 {0x05, 0xff, 0x10, 10},
77 /* Board Hauppauge WinTV HVR 900 digital */
78 static struct em28xx_reg_seq hauppauge_wintv_hvr_900_digital[] = {
79 {EM28XX_R08_GPIO, 0x2e, ~EM_GPIO_4, 10},
80 {EM2880_R04_GPO, 0x04, 0x0f, 10},
81 {EM2880_R04_GPO, 0x0c, 0x0f, 10},
85 /* Boards - EM2880 MSI DIGIVOX AD and EM2880_BOARD_MSI_DIGIVOX_AD_II */
86 static struct em28xx_reg_seq em2880_msi_digivox_ad_analog[] = {
87 {EM28XX_R08_GPIO, 0x69, ~EM_GPIO_4, 10},
91 /* Boards - EM2880 MSI DIGIVOX AD and EM2880_BOARD_MSI_DIGIVOX_AD_II */
93 /* Board - EM2870 Kworld 355u
94 Analog - No input analog */
96 /* Callback for the most boards */
97 static struct em28xx_reg_seq default_tuner_gpio[] = {
98 {EM28XX_R08_GPIO, EM_GPIO_4, EM_GPIO_4, 10},
99 {EM28XX_R08_GPIO, 0, EM_GPIO_4, 10},
100 {EM28XX_R08_GPIO, EM_GPIO_4, EM_GPIO_4, 10},
104 /* Pinnacle PCTV HD Mini (80e) GPIOs
106 6: demod reset, active low
107 7: LED on, active high */
108 static struct em28xx_reg_seq em2874_pinnacle_80e_digital[] = {
109 {EM28XX_R06_I2C_CLK, 0x45, 0xff, 10}, /*400 KHz*/
110 {EM2874_R80_GPIO, 0x80, 0xff, 100},/*Demod reset*/
111 {EM2874_R80_GPIO, 0xc0, 0xff, 10},
118 struct em28xx_board em28xx_boards[] = {
119 [EM2750_BOARD_UNKNOWN] = {
120 .name = "Unknown EM2750/EM2751 webcam grabber",
121 .xclk = EM28XX_XCLK_FREQUENCY_48MHZ,
122 .tuner_type = TUNER_ABSENT, /* This is a webcam */
124 .type = EM28XX_VMUX_COMPOSITE1,
126 .amux = EM28XX_AMUX_VIDEO,
129 [EM2800_BOARD_UNKNOWN] = {
130 .name = "Unknown EM2800 video grabber",
132 .tda9887_conf = TDA9887_PRESENT,
133 .decoder = EM28XX_SAA711X,
134 .tuner_type = TUNER_ABSENT,
136 .type = EM28XX_VMUX_COMPOSITE1,
137 .vmux = SAA7115_COMPOSITE0,
138 .amux = EM28XX_AMUX_LINE_IN,
140 .type = EM28XX_VMUX_SVIDEO,
141 .vmux = SAA7115_SVIDEO3,
142 .amux = EM28XX_AMUX_LINE_IN,
145 [EM2820_BOARD_UNKNOWN] = {
146 .name = "Unknown EM2750/28xx video grabber",
147 .tuner_type = TUNER_ABSENT,
149 [EM2750_BOARD_DLCW_130] = {
150 /* Beijing Huaqi Information Digital Technology Co., Ltd */
151 .name = "Huaqi DLCW-130",
152 .valid = EM28XX_BOARD_NOT_VALIDATED,
153 .xclk = EM28XX_XCLK_FREQUENCY_48MHZ,
154 .tuner_type = TUNER_ABSENT, /* This is a webcam */
156 .type = EM28XX_VMUX_COMPOSITE1,
158 .amux = EM28XX_AMUX_VIDEO,
161 [EM2820_BOARD_KWORLD_PVRTV2800RF] = {
162 .name = "Kworld PVR TV 2800 RF",
163 .tuner_type = TUNER_TEMIC_PAL,
164 .tda9887_conf = TDA9887_PRESENT,
165 .decoder = EM28XX_SAA711X,
167 .type = EM28XX_VMUX_COMPOSITE1,
168 .vmux = SAA7115_COMPOSITE0,
169 .amux = EM28XX_AMUX_LINE_IN,
171 .type = EM28XX_VMUX_SVIDEO,
172 .vmux = SAA7115_SVIDEO3,
173 .amux = EM28XX_AMUX_LINE_IN,
176 [EM2820_BOARD_TERRATEC_CINERGY_250] = {
177 .name = "Terratec Cinergy 250 USB",
178 .tuner_type = TUNER_LG_PAL_NEW_TAPC,
179 .tda9887_conf = TDA9887_PRESENT,
180 .decoder = EM28XX_SAA711X,
182 .type = EM28XX_VMUX_TELEVISION,
183 .vmux = SAA7115_COMPOSITE2,
184 .amux = EM28XX_AMUX_LINE_IN,
186 .type = EM28XX_VMUX_COMPOSITE1,
187 .vmux = SAA7115_COMPOSITE0,
188 .amux = EM28XX_AMUX_LINE_IN,
190 .type = EM28XX_VMUX_SVIDEO,
191 .vmux = SAA7115_SVIDEO3,
192 .amux = EM28XX_AMUX_LINE_IN,
195 [EM2820_BOARD_PINNACLE_USB_2] = {
196 .name = "Pinnacle PCTV USB 2",
197 .tuner_type = TUNER_LG_PAL_NEW_TAPC,
198 .tda9887_conf = TDA9887_PRESENT,
199 .decoder = EM28XX_SAA711X,
201 .type = EM28XX_VMUX_TELEVISION,
202 .vmux = SAA7115_COMPOSITE2,
203 .amux = EM28XX_AMUX_VIDEO,
205 .type = EM28XX_VMUX_COMPOSITE1,
206 .vmux = SAA7115_COMPOSITE0,
207 .amux = EM28XX_AMUX_LINE_IN,
209 .type = EM28XX_VMUX_SVIDEO,
210 .vmux = SAA7115_SVIDEO3,
211 .amux = EM28XX_AMUX_LINE_IN,
214 [EM2820_BOARD_HAUPPAUGE_WINTV_USB_2] = {
215 .name = "Hauppauge WinTV USB 2",
216 .tuner_type = TUNER_PHILIPS_FM1236_MK3,
217 .tda9887_conf = TDA9887_PRESENT |
218 TDA9887_PORT1_ACTIVE|
219 TDA9887_PORT2_ACTIVE,
220 .decoder = EM28XX_TVP5150,
223 .type = EM28XX_VMUX_TELEVISION,
224 .vmux = TVP5150_COMPOSITE0,
225 .amux = MSP_INPUT_DEFAULT,
227 .type = EM28XX_VMUX_SVIDEO,
228 .vmux = TVP5150_SVIDEO,
229 .amux = MSP_INPUT(MSP_IN_SCART1, MSP_IN_TUNER1,
230 MSP_DSP_IN_SCART, MSP_DSP_IN_SCART),
233 [EM2820_BOARD_DLINK_USB_TV] = {
234 .name = "D-Link DUB-T210 TV Tuner",
235 .valid = EM28XX_BOARD_NOT_VALIDATED,
236 .tuner_type = TUNER_LG_PAL_NEW_TAPC,
237 .tda9887_conf = TDA9887_PRESENT,
238 .decoder = EM28XX_SAA711X,
240 .type = EM28XX_VMUX_TELEVISION,
241 .vmux = SAA7115_COMPOSITE2,
242 .amux = EM28XX_AMUX_LINE_IN,
244 .type = EM28XX_VMUX_COMPOSITE1,
245 .vmux = SAA7115_COMPOSITE0,
246 .amux = EM28XX_AMUX_LINE_IN,
248 .type = EM28XX_VMUX_SVIDEO,
249 .vmux = SAA7115_SVIDEO3,
250 .amux = EM28XX_AMUX_LINE_IN,
253 [EM2820_BOARD_HERCULES_SMART_TV_USB2] = {
254 .name = "Hercules Smart TV USB 2.0",
255 .valid = EM28XX_BOARD_NOT_VALIDATED,
256 .tuner_type = TUNER_LG_PAL_NEW_TAPC,
257 .tda9887_conf = TDA9887_PRESENT,
258 .decoder = EM28XX_SAA711X,
260 .type = EM28XX_VMUX_TELEVISION,
261 .vmux = SAA7115_COMPOSITE2,
262 .amux = EM28XX_AMUX_LINE_IN,
264 .type = EM28XX_VMUX_COMPOSITE1,
265 .vmux = SAA7115_COMPOSITE0,
266 .amux = EM28XX_AMUX_LINE_IN,
268 .type = EM28XX_VMUX_SVIDEO,
269 .vmux = SAA7115_SVIDEO3,
270 .amux = EM28XX_AMUX_LINE_IN,
273 [EM2820_BOARD_PINNACLE_USB_2_FM1216ME] = {
274 .name = "Pinnacle PCTV USB 2 (Philips FM1216ME)",
275 .valid = EM28XX_BOARD_NOT_VALIDATED,
276 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
277 .tda9887_conf = TDA9887_PRESENT,
278 .decoder = EM28XX_SAA711X,
280 .type = EM28XX_VMUX_TELEVISION,
281 .vmux = SAA7115_COMPOSITE2,
282 .amux = EM28XX_AMUX_VIDEO,
284 .type = EM28XX_VMUX_COMPOSITE1,
285 .vmux = SAA7115_COMPOSITE0,
286 .amux = EM28XX_AMUX_LINE_IN,
288 .type = EM28XX_VMUX_SVIDEO,
289 .vmux = SAA7115_SVIDEO3,
290 .amux = EM28XX_AMUX_LINE_IN,
293 [EM2820_BOARD_GADMEI_UTV310] = {
294 .name = "Gadmei UTV310",
295 .valid = EM28XX_BOARD_NOT_VALIDATED,
296 .tuner_type = TUNER_TNF_5335MF,
297 .tda9887_conf = TDA9887_PRESENT,
298 .decoder = EM28XX_SAA711X,
300 .type = EM28XX_VMUX_TELEVISION,
301 .vmux = SAA7115_COMPOSITE1,
302 .amux = EM28XX_AMUX_LINE_IN,
304 .type = EM28XX_VMUX_COMPOSITE1,
305 .vmux = SAA7115_COMPOSITE0,
306 .amux = EM28XX_AMUX_LINE_IN,
308 .type = EM28XX_VMUX_SVIDEO,
309 .vmux = SAA7115_SVIDEO3,
310 .amux = EM28XX_AMUX_LINE_IN,
313 [EM2820_BOARD_LEADTEK_WINFAST_USBII_DELUXE] = {
314 .name = "Leadtek Winfast USB II Deluxe",
315 .valid = EM28XX_BOARD_NOT_VALIDATED,
316 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
317 .tda9887_conf = TDA9887_PRESENT,
318 .decoder = EM28XX_SAA711X,
320 .type = EM28XX_VMUX_TELEVISION,
321 .vmux = SAA7115_COMPOSITE2,
322 .amux = EM28XX_AMUX_VIDEO,
324 .type = EM28XX_VMUX_COMPOSITE1,
325 .vmux = SAA7115_COMPOSITE0,
326 .amux = EM28XX_AMUX_LINE_IN,
328 .type = EM28XX_VMUX_SVIDEO,
329 .vmux = SAA7115_COMPOSITE0,
330 .amux = EM28XX_AMUX_LINE_IN,
333 [EM2820_BOARD_PINNACLE_DVC_100] = {
334 .name = "Pinnacle Dazzle DVC 100",
335 .decoder = EM28XX_SAA711X,
336 .tuner_type = TUNER_ABSENT, /* Capture only device */
338 .type = EM28XX_VMUX_COMPOSITE1,
339 .vmux = SAA7115_COMPOSITE0,
340 .amux = EM28XX_AMUX_LINE_IN,
342 .type = EM28XX_VMUX_SVIDEO,
343 .vmux = SAA7115_SVIDEO3,
344 .amux = EM28XX_AMUX_LINE_IN,
347 [EM2820_BOARD_VIDEOLOGY_20K14XUSB] = {
348 .name = "Videology 20K14XUSB USB2.0",
349 .valid = EM28XX_BOARD_NOT_VALIDATED,
350 .tuner_type = TUNER_ABSENT, /* This is a webcam */
352 .type = EM28XX_VMUX_COMPOSITE1,
354 .amux = EM28XX_AMUX_VIDEO,
357 [EM2821_BOARD_PROLINK_PLAYTV_USB2] = {
358 .name = "SIIG AVTuner-PVR/Prolink PlayTV USB 2.0",
359 .valid = EM28XX_BOARD_NOT_VALIDATED,
360 .tuner_type = TUNER_LG_PAL_NEW_TAPC, /* unknown? */
361 .tda9887_conf = TDA9887_PRESENT, /* unknown? */
362 .decoder = EM28XX_SAA711X,
364 .type = EM28XX_VMUX_TELEVISION,
365 .vmux = SAA7115_COMPOSITE2,
366 .amux = EM28XX_AMUX_LINE_IN,
368 .type = EM28XX_VMUX_COMPOSITE1,
369 .vmux = SAA7115_COMPOSITE0,
370 .amux = EM28XX_AMUX_LINE_IN,
372 .type = EM28XX_VMUX_SVIDEO,
373 .vmux = SAA7115_SVIDEO3,
374 .amux = EM28XX_AMUX_LINE_IN,
377 [EM2821_BOARD_SUPERCOMP_USB_2] = {
378 .name = "Supercomp USB 2.0 TV",
379 .valid = EM28XX_BOARD_NOT_VALIDATED,
380 .tuner_type = TUNER_PHILIPS_FM1236_MK3,
381 .tda9887_conf = TDA9887_PRESENT |
382 TDA9887_PORT1_ACTIVE |
383 TDA9887_PORT2_ACTIVE,
384 .decoder = EM28XX_SAA711X,
386 .type = EM28XX_VMUX_TELEVISION,
387 .vmux = SAA7115_COMPOSITE2,
388 .amux = EM28XX_AMUX_LINE_IN,
390 .type = EM28XX_VMUX_COMPOSITE1,
391 .vmux = SAA7115_COMPOSITE0,
392 .amux = EM28XX_AMUX_VIDEO,
394 .type = EM28XX_VMUX_SVIDEO,
395 .vmux = SAA7115_SVIDEO3,
396 .amux = EM28XX_AMUX_LINE_IN,
399 [EM2821_BOARD_USBGEAR_VD204] = {
400 .name = "Usbgear VD204v9",
401 .valid = EM28XX_BOARD_NOT_VALIDATED,
402 .tuner_type = TUNER_ABSENT, /* Capture only device */
403 .decoder = EM28XX_SAA711X,
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_NETGMBH_CAM] = {
415 /* Beijing Huaqi Information Digital Technology Co., Ltd */
416 .name = "NetGMBH Cam",
417 .valid = EM28XX_BOARD_NOT_VALIDATED,
418 .tuner_type = TUNER_ABSENT, /* This is a webcam */
420 .type = EM28XX_VMUX_COMPOSITE1,
422 .amux = EM28XX_AMUX_VIDEO,
425 [EM2860_BOARD_TYPHOON_DVD_MAKER] = {
426 .name = "Typhoon DVD Maker",
427 .decoder = EM28XX_SAA711X,
428 .tuner_type = TUNER_ABSENT, /* Capture only device */
430 .type = EM28XX_VMUX_COMPOSITE1,
431 .vmux = SAA7115_COMPOSITE0,
432 .amux = EM28XX_AMUX_LINE_IN,
434 .type = EM28XX_VMUX_SVIDEO,
435 .vmux = SAA7115_SVIDEO3,
436 .amux = EM28XX_AMUX_LINE_IN,
439 [EM2860_BOARD_GADMEI_UTV330] = {
440 .name = "Gadmei UTV330",
441 .valid = EM28XX_BOARD_NOT_VALIDATED,
442 .tuner_type = TUNER_TNF_5335MF,
443 .tda9887_conf = TDA9887_PRESENT,
444 .decoder = EM28XX_SAA711X,
446 .type = EM28XX_VMUX_TELEVISION,
447 .vmux = SAA7115_COMPOSITE2,
448 .amux = EM28XX_AMUX_VIDEO,
450 .type = EM28XX_VMUX_COMPOSITE1,
451 .vmux = SAA7115_COMPOSITE0,
452 .amux = EM28XX_AMUX_LINE_IN,
454 .type = EM28XX_VMUX_SVIDEO,
455 .vmux = SAA7115_SVIDEO3,
456 .amux = EM28XX_AMUX_LINE_IN,
459 [EM2860_BOARD_TERRATEC_HYBRID_XS] = {
460 .name = "Terratec Cinergy A Hybrid XS",
461 .valid = EM28XX_BOARD_NOT_VALIDATED,
462 .tuner_type = TUNER_XC2028,
463 .tuner_gpio = default_tuner_gpio,
464 .decoder = EM28XX_TVP5150,
467 .type = EM28XX_VMUX_TELEVISION,
468 .vmux = TVP5150_COMPOSITE0,
469 .amux = EM28XX_AMUX_VIDEO,
470 .gpio = hauppauge_wintv_hvr_900_analog,
472 .type = EM28XX_VMUX_COMPOSITE1,
473 .vmux = TVP5150_COMPOSITE1,
474 .amux = EM28XX_AMUX_LINE_IN,
475 .gpio = hauppauge_wintv_hvr_900_analog,
477 .type = EM28XX_VMUX_SVIDEO,
478 .vmux = TVP5150_SVIDEO,
479 .amux = EM28XX_AMUX_LINE_IN,
480 .gpio = hauppauge_wintv_hvr_900_analog,
483 [EM2861_BOARD_KWORLD_PVRTV_300U] = {
484 .name = "KWorld PVRTV 300U",
485 .valid = EM28XX_BOARD_NOT_VALIDATED,
486 .tuner_type = TUNER_XC2028,
487 .tuner_gpio = default_tuner_gpio,
488 .decoder = EM28XX_TVP5150,
490 .type = EM28XX_VMUX_TELEVISION,
491 .vmux = TVP5150_COMPOSITE0,
492 .amux = EM28XX_AMUX_VIDEO,
494 .type = EM28XX_VMUX_COMPOSITE1,
495 .vmux = TVP5150_COMPOSITE1,
496 .amux = EM28XX_AMUX_LINE_IN,
498 .type = EM28XX_VMUX_SVIDEO,
499 .vmux = TVP5150_SVIDEO,
500 .amux = EM28XX_AMUX_LINE_IN,
503 [EM2861_BOARD_YAKUMO_MOVIE_MIXER] = {
504 .name = "Yakumo MovieMixer",
505 .tuner_type = TUNER_ABSENT, /* Capture only device */
506 .decoder = EM28XX_TVP5150,
508 .type = EM28XX_VMUX_TELEVISION,
509 .vmux = TVP5150_COMPOSITE0,
510 .amux = EM28XX_AMUX_VIDEO,
512 .type = EM28XX_VMUX_COMPOSITE1,
513 .vmux = TVP5150_COMPOSITE1,
514 .amux = EM28XX_AMUX_LINE_IN,
516 .type = EM28XX_VMUX_SVIDEO,
517 .vmux = TVP5150_SVIDEO,
518 .amux = EM28XX_AMUX_LINE_IN,
521 [EM2861_BOARD_PLEXTOR_PX_TV100U] = {
522 .name = "Plextor ConvertX PX-TV100U",
523 .valid = EM28XX_BOARD_NOT_VALIDATED,
524 .tuner_type = TUNER_TNF_5335MF,
525 .tda9887_conf = TDA9887_PRESENT,
526 .decoder = EM28XX_TVP5150,
528 .type = EM28XX_VMUX_TELEVISION,
529 .vmux = TVP5150_COMPOSITE0,
530 .amux = EM28XX_AMUX_LINE_IN,
532 .type = EM28XX_VMUX_COMPOSITE1,
533 .vmux = TVP5150_COMPOSITE1,
534 .amux = EM28XX_AMUX_LINE_IN,
536 .type = EM28XX_VMUX_SVIDEO,
537 .vmux = TVP5150_SVIDEO,
538 .amux = EM28XX_AMUX_LINE_IN,
542 /* Those boards with em2870 are DVB Only*/
544 [EM2870_BOARD_TERRATEC_XS] = {
545 .name = "Terratec Cinergy T XS",
546 .valid = EM28XX_BOARD_NOT_VALIDATED,
547 .tuner_type = TUNER_XC2028,
548 .tuner_gpio = default_tuner_gpio,
550 [EM2870_BOARD_TERRATEC_XS_MT2060] = {
551 .name = "Terratec Cinergy T XS (MT2060)",
552 .valid = EM28XX_BOARD_NOT_VALIDATED,
553 .tuner_type = TUNER_ABSENT, /* MT2060 */
555 [EM2870_BOARD_KWORLD_350U] = {
556 .name = "Kworld 350 U DVB-T",
557 .valid = EM28XX_BOARD_NOT_VALIDATED,
558 .tuner_type = TUNER_XC2028,
559 .tuner_gpio = default_tuner_gpio,
561 [EM2870_BOARD_KWORLD_355U] = {
562 .name = "Kworld 355 U DVB-T",
563 .valid = EM28XX_BOARD_NOT_VALIDATED,
565 [EM2870_BOARD_PINNACLE_PCTV_DVB] = {
566 .name = "Pinnacle PCTV DVB-T",
567 .valid = EM28XX_BOARD_NOT_VALIDATED,
568 .tuner_type = TUNER_ABSENT, /* MT2060 */
569 /* djh - I have serious doubts this is right... */
570 .xclk = EM28XX_XCLK_IR_RC5_MODE |
571 EM28XX_XCLK_FREQUENCY_10MHZ,
573 [EM2870_BOARD_COMPRO_VIDEOMATE] = {
574 .name = "Compro, VideoMate U3",
575 .valid = EM28XX_BOARD_NOT_VALIDATED,
576 .tuner_type = TUNER_ABSENT, /* MT2060 */
579 [EM2880_BOARD_TERRATEC_HYBRID_XS_FR] = {
580 .name = "Terratec Hybrid XS Secam",
581 .valid = EM28XX_BOARD_NOT_VALIDATED,
583 .tuner_type = TUNER_XC2028,
584 .tuner_gpio = default_tuner_gpio,
585 .decoder = EM28XX_TVP5150,
587 .type = EM28XX_VMUX_TELEVISION,
588 .vmux = TVP5150_COMPOSITE0,
589 .amux = EM28XX_AMUX_VIDEO,
590 .gpio = default_analog,
592 .type = EM28XX_VMUX_COMPOSITE1,
593 .vmux = TVP5150_COMPOSITE1,
594 .amux = EM28XX_AMUX_LINE_IN,
595 .gpio = default_analog,
597 .type = EM28XX_VMUX_SVIDEO,
598 .vmux = TVP5150_SVIDEO,
599 .amux = EM28XX_AMUX_LINE_IN,
600 .gpio = default_analog,
603 [EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900] = {
604 .name = "Hauppauge WinTV HVR 900",
605 .tda9887_conf = TDA9887_PRESENT,
606 .tuner_type = TUNER_XC2028,
607 .tuner_gpio = default_tuner_gpio,
610 .dvb_gpio = hauppauge_wintv_hvr_900_digital,
611 .decoder = EM28XX_TVP5150,
613 .type = EM28XX_VMUX_TELEVISION,
614 .vmux = TVP5150_COMPOSITE0,
615 .amux = EM28XX_AMUX_VIDEO,
616 .gpio = hauppauge_wintv_hvr_900_analog,
618 .type = EM28XX_VMUX_COMPOSITE1,
619 .vmux = TVP5150_COMPOSITE1,
620 .amux = EM28XX_AMUX_LINE_IN,
621 .gpio = hauppauge_wintv_hvr_900_analog,
623 .type = EM28XX_VMUX_SVIDEO,
624 .vmux = TVP5150_SVIDEO,
625 .amux = EM28XX_AMUX_LINE_IN,
626 .gpio = hauppauge_wintv_hvr_900_analog,
629 [EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2] = {
630 .name = "Hauppauge WinTV HVR 900 (R2)",
631 .tda9887_conf = TDA9887_PRESENT,
632 .tuner_type = TUNER_XC2028,
633 .tuner_gpio = default_tuner_gpio,
635 .decoder = EM28XX_TVP5150,
637 .type = EM28XX_VMUX_TELEVISION,
638 .vmux = TVP5150_COMPOSITE0,
639 .amux = EM28XX_AMUX_VIDEO,
640 .gpio = hauppauge_wintv_hvr_900_analog,
642 .type = EM28XX_VMUX_COMPOSITE1,
643 .vmux = TVP5150_COMPOSITE1,
644 .amux = EM28XX_AMUX_LINE_IN,
645 .gpio = hauppauge_wintv_hvr_900_analog,
647 .type = EM28XX_VMUX_SVIDEO,
648 .vmux = TVP5150_SVIDEO,
649 .amux = EM28XX_AMUX_LINE_IN,
650 .gpio = hauppauge_wintv_hvr_900_analog,
653 [EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850] = {
654 .name = "Hauppauge WinTV HVR 850",
655 .tuner_type = TUNER_XC2028,
656 .tuner_gpio = default_tuner_gpio,
659 .dvb_gpio = hauppauge_wintv_hvr_900_digital,
660 .ir_codes = ir_codes_hauppauge_new,
661 .decoder = EM28XX_TVP5150,
663 .type = EM28XX_VMUX_TELEVISION,
664 .vmux = TVP5150_COMPOSITE0,
665 .amux = EM28XX_AMUX_VIDEO,
666 .gpio = hauppauge_wintv_hvr_900_analog,
668 .type = EM28XX_VMUX_COMPOSITE1,
669 .vmux = TVP5150_COMPOSITE1,
670 .amux = EM28XX_AMUX_LINE_IN,
671 .gpio = hauppauge_wintv_hvr_900_analog,
673 .type = EM28XX_VMUX_SVIDEO,
674 .vmux = TVP5150_SVIDEO,
675 .amux = EM28XX_AMUX_LINE_IN,
676 .gpio = hauppauge_wintv_hvr_900_analog,
679 [EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950] = {
680 .name = "Hauppauge WinTV HVR 950",
681 .tuner_type = TUNER_XC2028,
682 .tuner_gpio = default_tuner_gpio,
685 .dvb_gpio = hauppauge_wintv_hvr_900_digital,
686 .ir_codes = ir_codes_hauppauge_new,
687 .decoder = EM28XX_TVP5150,
689 .type = EM28XX_VMUX_TELEVISION,
690 .vmux = TVP5150_COMPOSITE0,
691 .amux = EM28XX_AMUX_VIDEO,
692 .gpio = hauppauge_wintv_hvr_900_analog,
694 .type = EM28XX_VMUX_COMPOSITE1,
695 .vmux = TVP5150_COMPOSITE1,
696 .amux = EM28XX_AMUX_LINE_IN,
697 .gpio = hauppauge_wintv_hvr_900_analog,
699 .type = EM28XX_VMUX_SVIDEO,
700 .vmux = TVP5150_SVIDEO,
701 .amux = EM28XX_AMUX_LINE_IN,
702 .gpio = hauppauge_wintv_hvr_900_analog,
705 [EM2880_BOARD_PINNACLE_PCTV_HD_PRO] = {
706 .name = "Pinnacle PCTV HD Pro Stick",
707 .tuner_type = TUNER_XC2028,
708 .tuner_gpio = default_tuner_gpio,
711 .dvb_gpio = hauppauge_wintv_hvr_900_digital,
712 .ir_codes = ir_codes_pinnacle_pctv_hd,
713 .decoder = EM28XX_TVP5150,
715 .type = EM28XX_VMUX_TELEVISION,
716 .vmux = TVP5150_COMPOSITE0,
717 .amux = EM28XX_AMUX_VIDEO,
718 .gpio = hauppauge_wintv_hvr_900_analog,
720 .type = EM28XX_VMUX_COMPOSITE1,
721 .vmux = TVP5150_COMPOSITE1,
722 .amux = EM28XX_AMUX_LINE_IN,
723 .gpio = hauppauge_wintv_hvr_900_analog,
725 .type = EM28XX_VMUX_SVIDEO,
726 .vmux = TVP5150_SVIDEO,
727 .amux = EM28XX_AMUX_LINE_IN,
728 .gpio = hauppauge_wintv_hvr_900_analog,
731 [EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600] = {
732 .name = "AMD ATI TV Wonder HD 600",
733 .tuner_type = TUNER_XC2028,
734 .tuner_gpio = default_tuner_gpio,
737 .dvb_gpio = hauppauge_wintv_hvr_900_digital,
738 .ir_codes = ir_codes_ati_tv_wonder_hd_600,
739 .decoder = EM28XX_TVP5150,
741 .type = EM28XX_VMUX_TELEVISION,
742 .vmux = TVP5150_COMPOSITE0,
743 .amux = EM28XX_AMUX_VIDEO,
744 .gpio = hauppauge_wintv_hvr_900_analog,
746 .type = EM28XX_VMUX_COMPOSITE1,
747 .vmux = TVP5150_COMPOSITE1,
748 .amux = EM28XX_AMUX_LINE_IN,
749 .gpio = hauppauge_wintv_hvr_900_analog,
751 .type = EM28XX_VMUX_SVIDEO,
752 .vmux = TVP5150_SVIDEO,
753 .amux = EM28XX_AMUX_LINE_IN,
754 .gpio = hauppauge_wintv_hvr_900_analog,
757 [EM2880_BOARD_TERRATEC_HYBRID_XS] = {
758 .name = "Terratec Hybrid XS",
759 .tuner_type = TUNER_XC2028,
760 .tuner_gpio = default_tuner_gpio,
761 .decoder = EM28XX_TVP5150,
763 .dvb_gpio = default_analog,
765 .type = EM28XX_VMUX_TELEVISION,
766 .vmux = TVP5150_COMPOSITE0,
767 .amux = EM28XX_AMUX_VIDEO,
768 .gpio = default_analog,
770 .type = EM28XX_VMUX_COMPOSITE1,
771 .vmux = TVP5150_COMPOSITE1,
772 .amux = EM28XX_AMUX_LINE_IN,
773 .gpio = default_analog,
775 .type = EM28XX_VMUX_SVIDEO,
776 .vmux = TVP5150_SVIDEO,
777 .amux = EM28XX_AMUX_LINE_IN,
778 .gpio = default_analog,
781 /* maybe there's a reason behind it why Terratec sells the Hybrid XS
782 as Prodigy XS with a different PID, let's keep it separated for now
783 maybe we'll need it lateron */
784 [EM2880_BOARD_TERRATEC_PRODIGY_XS] = {
785 .name = "Terratec Prodigy XS",
786 .tuner_type = TUNER_XC2028,
787 .tuner_gpio = default_tuner_gpio,
788 .decoder = EM28XX_TVP5150,
790 .type = EM28XX_VMUX_TELEVISION,
791 .vmux = TVP5150_COMPOSITE0,
792 .amux = EM28XX_AMUX_VIDEO,
793 .gpio = hauppauge_wintv_hvr_900_analog,
795 .type = EM28XX_VMUX_COMPOSITE1,
796 .vmux = TVP5150_COMPOSITE1,
797 .amux = EM28XX_AMUX_LINE_IN,
798 .gpio = hauppauge_wintv_hvr_900_analog,
800 .type = EM28XX_VMUX_SVIDEO,
801 .vmux = TVP5150_SVIDEO,
802 .amux = EM28XX_AMUX_LINE_IN,
803 .gpio = hauppauge_wintv_hvr_900_analog,
806 [EM2820_BOARD_MSI_VOX_USB_2] = {
807 .name = "MSI VOX USB 2.0",
808 .tuner_type = TUNER_LG_PAL_NEW_TAPC,
809 .tda9887_conf = TDA9887_PRESENT |
810 TDA9887_PORT1_ACTIVE |
811 TDA9887_PORT2_ACTIVE,
812 .max_range_640_480 = 1,
813 .decoder = EM28XX_SAA711X,
815 .type = EM28XX_VMUX_TELEVISION,
816 .vmux = SAA7115_COMPOSITE4,
817 .amux = EM28XX_AMUX_VIDEO,
819 .type = EM28XX_VMUX_COMPOSITE1,
820 .vmux = SAA7115_COMPOSITE0,
821 .amux = EM28XX_AMUX_LINE_IN,
823 .type = EM28XX_VMUX_SVIDEO,
824 .vmux = SAA7115_SVIDEO3,
825 .amux = EM28XX_AMUX_LINE_IN,
828 [EM2800_BOARD_TERRATEC_CINERGY_200] = {
829 .name = "Terratec Cinergy 200 USB",
831 .tuner_type = TUNER_LG_PAL_NEW_TAPC,
832 .tda9887_conf = TDA9887_PRESENT,
833 .decoder = EM28XX_SAA711X,
835 .type = EM28XX_VMUX_TELEVISION,
836 .vmux = SAA7115_COMPOSITE2,
837 .amux = EM28XX_AMUX_VIDEO,
839 .type = EM28XX_VMUX_COMPOSITE1,
840 .vmux = SAA7115_COMPOSITE0,
841 .amux = EM28XX_AMUX_LINE_IN,
843 .type = EM28XX_VMUX_SVIDEO,
844 .vmux = SAA7115_SVIDEO3,
845 .amux = EM28XX_AMUX_LINE_IN,
848 [EM2800_BOARD_GRABBEEX_USB2800] = {
849 .name = "eMPIA Technology, Inc. GrabBeeX+ Video Encoder",
851 .decoder = EM28XX_SAA711X,
852 .tuner_type = TUNER_ABSENT, /* capture only board */
854 .type = EM28XX_VMUX_COMPOSITE1,
855 .vmux = SAA7115_COMPOSITE0,
856 .amux = EM28XX_AMUX_LINE_IN,
858 .type = EM28XX_VMUX_SVIDEO,
859 .vmux = SAA7115_SVIDEO3,
860 .amux = EM28XX_AMUX_LINE_IN,
863 [EM2800_BOARD_LEADTEK_WINFAST_USBII] = {
864 .name = "Leadtek Winfast USB II",
866 .tuner_type = TUNER_LG_PAL_NEW_TAPC,
867 .tda9887_conf = TDA9887_PRESENT,
868 .decoder = EM28XX_SAA711X,
870 .type = EM28XX_VMUX_TELEVISION,
871 .vmux = SAA7115_COMPOSITE2,
872 .amux = EM28XX_AMUX_VIDEO,
874 .type = EM28XX_VMUX_COMPOSITE1,
875 .vmux = SAA7115_COMPOSITE0,
876 .amux = EM28XX_AMUX_LINE_IN,
878 .type = EM28XX_VMUX_SVIDEO,
879 .vmux = SAA7115_SVIDEO3,
880 .amux = EM28XX_AMUX_LINE_IN,
883 [EM2800_BOARD_KWORLD_USB2800] = {
884 .name = "Kworld USB2800",
886 .tuner_type = TUNER_PHILIPS_FCV1236D,
887 .tda9887_conf = TDA9887_PRESENT,
888 .decoder = EM28XX_SAA711X,
890 .type = EM28XX_VMUX_TELEVISION,
891 .vmux = SAA7115_COMPOSITE2,
892 .amux = EM28XX_AMUX_VIDEO,
894 .type = EM28XX_VMUX_COMPOSITE1,
895 .vmux = SAA7115_COMPOSITE0,
896 .amux = EM28XX_AMUX_LINE_IN,
898 .type = EM28XX_VMUX_SVIDEO,
899 .vmux = SAA7115_SVIDEO3,
900 .amux = EM28XX_AMUX_LINE_IN,
903 [EM2820_BOARD_PINNACLE_DVC_90] = {
904 .name = "Pinnacle Dazzle DVC 90/DVC 100",
905 .tuner_type = TUNER_ABSENT, /* capture only board */
906 .decoder = EM28XX_SAA711X,
908 .type = EM28XX_VMUX_COMPOSITE1,
909 .vmux = SAA7115_COMPOSITE0,
910 .amux = EM28XX_AMUX_LINE_IN,
912 .type = EM28XX_VMUX_SVIDEO,
913 .vmux = SAA7115_SVIDEO3,
914 .amux = EM28XX_AMUX_LINE_IN,
917 [EM2800_BOARD_VGEAR_POCKETTV] = {
918 .name = "V-Gear PocketTV",
920 .tuner_type = TUNER_LG_PAL_NEW_TAPC,
921 .tda9887_conf = TDA9887_PRESENT,
922 .decoder = EM28XX_SAA711X,
924 .type = EM28XX_VMUX_TELEVISION,
925 .vmux = SAA7115_COMPOSITE2,
926 .amux = EM28XX_AMUX_VIDEO,
928 .type = EM28XX_VMUX_COMPOSITE1,
929 .vmux = SAA7115_COMPOSITE0,
930 .amux = EM28XX_AMUX_LINE_IN,
932 .type = EM28XX_VMUX_SVIDEO,
933 .vmux = SAA7115_SVIDEO3,
934 .amux = EM28XX_AMUX_LINE_IN,
937 [EM2820_BOARD_PROLINK_PLAYTV_USB2] = {
938 .name = "Pixelview Prolink PlayTV USB 2.0",
939 .tda9887_conf = TDA9887_PRESENT,
940 .tuner_type = TUNER_YMEC_TVF_5533MF,
941 .decoder = EM28XX_SAA711X,
943 .type = EM28XX_VMUX_TELEVISION,
944 .vmux = SAA7115_COMPOSITE2,
945 .amux = EM28XX_AMUX_VIDEO,
946 .aout = EM28XX_AOUT_MONO | /* I2S */
947 EM28XX_AOUT_MASTER, /* Line out pin */
949 .type = EM28XX_VMUX_COMPOSITE1,
950 .vmux = SAA7115_COMPOSITE0,
951 .amux = EM28XX_AMUX_LINE_IN,
953 .type = EM28XX_VMUX_SVIDEO,
954 .vmux = SAA7115_SVIDEO3,
955 .amux = EM28XX_AMUX_LINE_IN,
958 [EM2860_BOARD_POINTNIX_INTRAORAL_CAMERA] = {
959 .name = "PointNix Intra-Oral Camera",
960 .has_snapshot_button = 1,
961 .tda9887_conf = TDA9887_PRESENT,
962 .tuner_type = TUNER_ABSENT,
963 .decoder = EM28XX_SAA711X,
965 .type = EM28XX_VMUX_SVIDEO,
966 .vmux = SAA7115_SVIDEO3,
967 .amux = EM28XX_AMUX_VIDEO,
970 [EM2880_BOARD_MSI_DIGIVOX_AD] = {
971 .name = "MSI DigiVox A/D",
972 .valid = EM28XX_BOARD_NOT_VALIDATED,
973 .tuner_type = TUNER_XC2028,
974 .tuner_gpio = default_tuner_gpio,
975 .decoder = EM28XX_TVP5150,
977 .type = EM28XX_VMUX_TELEVISION,
978 .vmux = TVP5150_COMPOSITE0,
979 .amux = EM28XX_AMUX_VIDEO,
980 .gpio = em2880_msi_digivox_ad_analog,
982 .type = EM28XX_VMUX_COMPOSITE1,
983 .vmux = TVP5150_COMPOSITE1,
984 .amux = EM28XX_AMUX_LINE_IN,
985 .gpio = em2880_msi_digivox_ad_analog,
987 .type = EM28XX_VMUX_SVIDEO,
988 .vmux = TVP5150_SVIDEO,
989 .amux = EM28XX_AMUX_LINE_IN,
990 .gpio = em2880_msi_digivox_ad_analog,
993 [EM2880_BOARD_MSI_DIGIVOX_AD_II] = {
994 .name = "MSI DigiVox A/D II",
995 .valid = EM28XX_BOARD_NOT_VALIDATED,
996 .tuner_type = TUNER_XC2028,
997 .tuner_gpio = default_tuner_gpio,
998 .decoder = EM28XX_TVP5150,
1000 .type = EM28XX_VMUX_TELEVISION,
1001 .vmux = TVP5150_COMPOSITE0,
1002 .amux = EM28XX_AMUX_VIDEO,
1003 .gpio = em2880_msi_digivox_ad_analog,
1005 .type = EM28XX_VMUX_COMPOSITE1,
1006 .vmux = TVP5150_COMPOSITE1,
1007 .amux = EM28XX_AMUX_LINE_IN,
1008 .gpio = em2880_msi_digivox_ad_analog,
1010 .type = EM28XX_VMUX_SVIDEO,
1011 .vmux = TVP5150_SVIDEO,
1012 .amux = EM28XX_AMUX_LINE_IN,
1013 .gpio = em2880_msi_digivox_ad_analog,
1016 [EM2880_BOARD_KWORLD_DVB_305U] = {
1017 .name = "KWorld DVB-T 305U",
1018 .valid = EM28XX_BOARD_NOT_VALIDATED,
1019 .tuner_type = TUNER_XC2028,
1020 .tuner_gpio = default_tuner_gpio,
1021 .decoder = EM28XX_TVP5150,
1023 .type = EM28XX_VMUX_TELEVISION,
1024 .vmux = TVP5150_COMPOSITE0,
1025 .amux = EM28XX_AMUX_VIDEO,
1027 .type = EM28XX_VMUX_COMPOSITE1,
1028 .vmux = TVP5150_COMPOSITE1,
1029 .amux = EM28XX_AMUX_LINE_IN,
1031 .type = EM28XX_VMUX_SVIDEO,
1032 .vmux = TVP5150_SVIDEO,
1033 .amux = EM28XX_AMUX_LINE_IN,
1036 [EM2880_BOARD_KWORLD_DVB_310U] = {
1037 .name = "KWorld DVB-T 310U",
1038 .tuner_type = TUNER_XC2028,
1039 .tuner_gpio = default_tuner_gpio,
1041 .dvb_gpio = default_digital,
1043 .decoder = EM28XX_TVP5150,
1045 .type = EM28XX_VMUX_TELEVISION,
1046 .vmux = TVP5150_COMPOSITE0,
1047 .amux = EM28XX_AMUX_VIDEO,
1048 .gpio = default_analog,
1050 .type = EM28XX_VMUX_COMPOSITE1,
1051 .vmux = TVP5150_COMPOSITE1,
1052 .amux = EM28XX_AMUX_LINE_IN,
1053 .gpio = default_analog,
1054 }, { /* S-video has not been tested yet */
1055 .type = EM28XX_VMUX_SVIDEO,
1056 .vmux = TVP5150_SVIDEO,
1057 .amux = EM28XX_AMUX_LINE_IN,
1058 .gpio = default_analog,
1061 [EM2881_BOARD_DNT_DA2_HYBRID] = {
1062 .name = "DNT DA2 Hybrid",
1063 .valid = EM28XX_BOARD_NOT_VALIDATED,
1064 .tuner_type = TUNER_XC2028,
1065 .tuner_gpio = default_tuner_gpio,
1066 .decoder = EM28XX_TVP5150,
1068 .type = EM28XX_VMUX_TELEVISION,
1069 .vmux = TVP5150_COMPOSITE0,
1070 .amux = EM28XX_AMUX_VIDEO,
1071 .gpio = default_analog,
1073 .type = EM28XX_VMUX_COMPOSITE1,
1074 .vmux = TVP5150_COMPOSITE1,
1075 .amux = EM28XX_AMUX_LINE_IN,
1076 .gpio = default_analog,
1078 .type = EM28XX_VMUX_SVIDEO,
1079 .vmux = TVP5150_SVIDEO,
1080 .amux = EM28XX_AMUX_LINE_IN,
1081 .gpio = default_analog,
1084 [EM2881_BOARD_PINNACLE_HYBRID_PRO] = {
1085 .name = "Pinnacle Hybrid Pro",
1086 .valid = EM28XX_BOARD_NOT_VALIDATED,
1087 .tuner_type = TUNER_XC2028,
1088 .tuner_gpio = default_tuner_gpio,
1089 .decoder = EM28XX_TVP5150,
1091 .type = EM28XX_VMUX_TELEVISION,
1092 .vmux = TVP5150_COMPOSITE0,
1093 .amux = EM28XX_AMUX_VIDEO,
1094 .gpio = default_analog,
1096 .type = EM28XX_VMUX_COMPOSITE1,
1097 .vmux = TVP5150_COMPOSITE1,
1098 .amux = EM28XX_AMUX_LINE_IN,
1099 .gpio = default_analog,
1101 .type = EM28XX_VMUX_SVIDEO,
1102 .vmux = TVP5150_SVIDEO,
1103 .amux = EM28XX_AMUX_LINE_IN,
1104 .gpio = default_analog,
1107 [EM2882_BOARD_PINNACLE_HYBRID_PRO] = {
1108 .name = "Pinnacle Hybrid Pro (2)",
1109 .valid = EM28XX_BOARD_NOT_VALIDATED,
1110 .tuner_type = TUNER_XC2028,
1111 .tuner_gpio = default_tuner_gpio,
1113 .decoder = EM28XX_TVP5150,
1115 .type = EM28XX_VMUX_TELEVISION,
1116 .vmux = TVP5150_COMPOSITE0,
1117 .amux = EM28XX_AMUX_VIDEO,
1118 .gpio = hauppauge_wintv_hvr_900_analog,
1120 .type = EM28XX_VMUX_COMPOSITE1,
1121 .vmux = TVP5150_COMPOSITE1,
1122 .amux = EM28XX_AMUX_LINE_IN,
1123 .gpio = hauppauge_wintv_hvr_900_analog,
1125 .type = EM28XX_VMUX_SVIDEO,
1126 .vmux = TVP5150_SVIDEO,
1127 .amux = EM28XX_AMUX_LINE_IN,
1128 .gpio = hauppauge_wintv_hvr_900_analog,
1131 [EM2882_BOARD_KWORLD_VS_DVBT] = {
1132 .name = "Kworld VS-DVB-T 323UR",
1133 .valid = EM28XX_BOARD_NOT_VALIDATED,
1134 .tuner_type = TUNER_XC2028,
1135 .tuner_gpio = default_tuner_gpio,
1136 .decoder = EM28XX_TVP5150,
1138 .type = EM28XX_VMUX_TELEVISION,
1139 .vmux = TVP5150_COMPOSITE0,
1140 .amux = EM28XX_AMUX_VIDEO,
1142 .type = EM28XX_VMUX_COMPOSITE1,
1143 .vmux = TVP5150_COMPOSITE1,
1144 .amux = EM28XX_AMUX_LINE_IN,
1146 .type = EM28XX_VMUX_SVIDEO,
1147 .vmux = TVP5150_SVIDEO,
1148 .amux = EM28XX_AMUX_LINE_IN,
1151 [EM2882_BOARD_TERRATEC_HYBRID_XS] = {
1152 .name = "Terratec Hybrid XS (em2882)",
1153 .valid = EM28XX_BOARD_NOT_VALIDATED,
1154 .tuner_type = TUNER_XC2028,
1155 .tuner_gpio = default_tuner_gpio,
1156 .decoder = EM28XX_TVP5150,
1158 .type = EM28XX_VMUX_TELEVISION,
1159 .vmux = TVP5150_COMPOSITE0,
1160 .amux = EM28XX_AMUX_VIDEO,
1161 .gpio = hauppauge_wintv_hvr_900_analog,
1163 .type = EM28XX_VMUX_COMPOSITE1,
1164 .vmux = TVP5150_COMPOSITE1,
1165 .amux = EM28XX_AMUX_LINE_IN,
1166 .gpio = hauppauge_wintv_hvr_900_analog,
1168 .type = EM28XX_VMUX_SVIDEO,
1169 .vmux = TVP5150_SVIDEO,
1170 .amux = EM28XX_AMUX_LINE_IN,
1171 .gpio = hauppauge_wintv_hvr_900_analog,
1174 [EM2883_BOARD_KWORLD_HYBRID_A316] = {
1175 .name = "Kworld PlusTV HD Hybrid 330",
1176 .tuner_type = TUNER_XC2028,
1177 .tuner_gpio = default_tuner_gpio,
1178 .decoder = EM28XX_TVP5150,
1181 .dvb_gpio = default_digital,
1183 .type = EM28XX_VMUX_TELEVISION,
1184 .vmux = TVP5150_COMPOSITE0,
1185 .amux = EM28XX_AMUX_VIDEO,
1186 .gpio = default_analog,
1188 .type = EM28XX_VMUX_COMPOSITE1,
1189 .vmux = TVP5150_COMPOSITE1,
1190 .amux = EM28XX_AMUX_LINE_IN,
1191 .gpio = hauppauge_wintv_hvr_900_analog,
1193 .type = EM28XX_VMUX_SVIDEO,
1194 .vmux = TVP5150_SVIDEO,
1195 .amux = EM28XX_AMUX_LINE_IN,
1196 .gpio = hauppauge_wintv_hvr_900_analog,
1199 [EM2820_BOARD_COMPRO_VIDEOMATE_FORYOU] = {
1200 .name = "Compro VideoMate ForYou/Stereo",
1201 .tuner_type = TUNER_LG_PAL_NEW_TAPC,
1202 .tda9887_conf = TDA9887_PRESENT,
1203 .decoder = EM28XX_TVP5150,
1205 .type = EM28XX_VMUX_TELEVISION,
1206 .vmux = TVP5150_COMPOSITE0,
1207 .amux = EM28XX_AMUX_LINE_IN,
1209 .type = EM28XX_VMUX_SVIDEO,
1210 .vmux = TVP5150_SVIDEO,
1211 .amux = EM28XX_AMUX_LINE_IN,
1215 /* em2874 tuners are DVB only */
1217 [EM2874_BOARD_PINNACLE_PCTV_80E] = {
1218 .name = "Pinnacle PCTV HD Mini",
1219 .tuner_type = TUNER_ABSENT,
1221 .dvb_gpio = em2874_pinnacle_80e_digital,
1222 .ir_codes = ir_codes_pinnacle_pctv_hd,
1223 .decoder = EM28XX_NODECODER,
1224 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE |
1225 EM2874_I2C_SECONDARY_BUS_SELECT |
1226 EM28XX_I2C_FREQ_400_KHZ,
1229 .type = EM28XX_VMUX_TELEVISION,
1230 .vmux = TVP5150_COMPOSITE0,
1231 .amux = EM28XX_AMUX_LINE_IN,
1236 const unsigned int em28xx_bcount = ARRAY_SIZE(em28xx_boards);
1238 /* table of devices that work with this driver */
1239 struct usb_device_id em28xx_id_table [] = {
1240 { USB_DEVICE(0xeb1a, 0x2750),
1241 .driver_info = EM2750_BOARD_UNKNOWN },
1242 { USB_DEVICE(0xeb1a, 0x2751),
1243 .driver_info = EM2750_BOARD_UNKNOWN },
1244 { USB_DEVICE(0xeb1a, 0x2800),
1245 .driver_info = EM2800_BOARD_UNKNOWN },
1246 { USB_DEVICE(0xeb1a, 0x2820),
1247 .driver_info = EM2820_BOARD_UNKNOWN },
1248 { USB_DEVICE(0xeb1a, 0x2821),
1249 .driver_info = EM2820_BOARD_UNKNOWN },
1250 { USB_DEVICE(0xeb1a, 0x2860),
1251 .driver_info = EM2820_BOARD_UNKNOWN },
1252 { USB_DEVICE(0xeb1a, 0x2861),
1253 .driver_info = EM2820_BOARD_UNKNOWN },
1254 { USB_DEVICE(0xeb1a, 0x2870),
1255 .driver_info = EM2820_BOARD_UNKNOWN },
1256 { USB_DEVICE(0xeb1a, 0x2881),
1257 .driver_info = EM2820_BOARD_UNKNOWN },
1258 { USB_DEVICE(0xeb1a, 0x2883),
1259 .driver_info = EM2820_BOARD_UNKNOWN },
1260 { USB_DEVICE(0xeb1a, 0xe300),
1261 .driver_info = EM2861_BOARD_KWORLD_PVRTV_300U },
1262 { USB_DEVICE(0xeb1a, 0xe305),
1263 .driver_info = EM2880_BOARD_KWORLD_DVB_305U },
1264 { USB_DEVICE(0xeb1a, 0xe310),
1265 .driver_info = EM2880_BOARD_MSI_DIGIVOX_AD },
1266 { USB_DEVICE(0xeb1a, 0xa316),
1267 .driver_info = EM2883_BOARD_KWORLD_HYBRID_A316 },
1268 { USB_DEVICE(0xeb1a, 0xe320),
1269 .driver_info = EM2880_BOARD_MSI_DIGIVOX_AD_II },
1270 { USB_DEVICE(0xeb1a, 0xe323),
1271 .driver_info = EM2882_BOARD_KWORLD_VS_DVBT },
1272 { USB_DEVICE(0xeb1a, 0xe350),
1273 .driver_info = EM2870_BOARD_KWORLD_350U },
1274 { USB_DEVICE(0xeb1a, 0xe355),
1275 .driver_info = EM2870_BOARD_KWORLD_355U },
1276 { USB_DEVICE(0xeb1a, 0x2801),
1277 .driver_info = EM2800_BOARD_GRABBEEX_USB2800 },
1278 { USB_DEVICE(0xeb1a, 0xe357),
1279 .driver_info = EM2870_BOARD_KWORLD_355U },
1280 { USB_DEVICE(0x0ccd, 0x0036),
1281 .driver_info = EM2820_BOARD_TERRATEC_CINERGY_250 },
1282 { USB_DEVICE(0x0ccd, 0x004c),
1283 .driver_info = EM2880_BOARD_TERRATEC_HYBRID_XS_FR },
1284 { USB_DEVICE(0x0ccd, 0x004f),
1285 .driver_info = EM2860_BOARD_TERRATEC_HYBRID_XS },
1286 { USB_DEVICE(0x0ccd, 0x005e),
1287 .driver_info = EM2882_BOARD_TERRATEC_HYBRID_XS },
1288 { USB_DEVICE(0x0ccd, 0x0042),
1289 .driver_info = EM2880_BOARD_TERRATEC_HYBRID_XS },
1290 { USB_DEVICE(0x0ccd, 0x0043),
1291 .driver_info = EM2870_BOARD_TERRATEC_XS },
1292 { USB_DEVICE(0x0ccd, 0x0047),
1293 .driver_info = EM2880_BOARD_TERRATEC_PRODIGY_XS },
1294 { USB_DEVICE(0x185b, 0x2870),
1295 .driver_info = EM2870_BOARD_COMPRO_VIDEOMATE },
1296 { USB_DEVICE(0x185b, 0x2041),
1297 .driver_info = EM2820_BOARD_COMPRO_VIDEOMATE_FORYOU },
1298 { USB_DEVICE(0x2040, 0x4200),
1299 .driver_info = EM2820_BOARD_HAUPPAUGE_WINTV_USB_2 },
1300 { USB_DEVICE(0x2040, 0x4201),
1301 .driver_info = EM2820_BOARD_HAUPPAUGE_WINTV_USB_2 },
1302 { USB_DEVICE(0x2040, 0x6500),
1303 .driver_info = EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900 },
1304 { USB_DEVICE(0x2040, 0x6502),
1305 .driver_info = EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2 },
1306 { USB_DEVICE(0x2040, 0x6513), /* HCW HVR-980 */
1307 .driver_info = EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950 },
1308 { USB_DEVICE(0x2040, 0x6517), /* HP HVR-950 */
1309 .driver_info = EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950 },
1310 { USB_DEVICE(0x2040, 0x651b), /* RP HVR-950 */
1311 .driver_info = EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950 },
1312 { USB_DEVICE(0x2040, 0x651f),
1313 .driver_info = EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850 },
1314 { USB_DEVICE(0x0438, 0xb002),
1315 .driver_info = EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600 },
1316 { USB_DEVICE(0x2001, 0xf112),
1317 .driver_info = EM2820_BOARD_DLINK_USB_TV },
1318 { USB_DEVICE(0x2304, 0x0207),
1319 .driver_info = EM2820_BOARD_PINNACLE_DVC_90 },
1320 { USB_DEVICE(0x2304, 0x0208),
1321 .driver_info = EM2820_BOARD_PINNACLE_USB_2 },
1322 { USB_DEVICE(0x2304, 0x021a),
1323 .driver_info = EM2820_BOARD_PINNACLE_DVC_90 },
1324 { USB_DEVICE(0x2304, 0x0226),
1325 .driver_info = EM2882_BOARD_PINNACLE_HYBRID_PRO },
1326 { USB_DEVICE(0x2304, 0x0227),
1327 .driver_info = EM2880_BOARD_PINNACLE_PCTV_HD_PRO },
1328 { USB_DEVICE(0x2304, 0x023f),
1329 .driver_info = EM2874_BOARD_PINNACLE_PCTV_80E },
1330 { USB_DEVICE(0x0413, 0x6023),
1331 .driver_info = EM2800_BOARD_LEADTEK_WINFAST_USBII },
1332 { USB_DEVICE(0x093b, 0xa005),
1333 .driver_info = EM2861_BOARD_PLEXTOR_PX_TV100U },
1336 MODULE_DEVICE_TABLE(usb, em28xx_id_table);
1339 * EEPROM hash table for devices with generic USB IDs
1341 static struct em28xx_hash_table em28xx_eeprom_hash [] = {
1342 /* P/N: SA 60002070465 Tuner: TVF7533-MF */
1343 {0x6ce05a8f, EM2820_BOARD_PROLINK_PLAYTV_USB2, TUNER_YMEC_TVF_5533MF},
1344 {0x966a0441, EM2880_BOARD_KWORLD_DVB_310U, TUNER_XC2028},
1347 /* I2C devicelist hash table for devices with generic USB IDs */
1348 static struct em28xx_hash_table em28xx_i2c_hash[] = {
1349 {0xb06a32c3, EM2800_BOARD_TERRATEC_CINERGY_200, TUNER_LG_PAL_NEW_TAPC},
1350 {0xf51200e3, EM2800_BOARD_VGEAR_POCKETTV, TUNER_LG_PAL_NEW_TAPC},
1351 {0x1ba50080, EM2860_BOARD_POINTNIX_INTRAORAL_CAMERA, TUNER_ABSENT},
1354 int em28xx_tuner_callback(void *ptr, int component, int command, int arg)
1357 struct em28xx *dev = ptr;
1359 if (dev->tuner_type != TUNER_XC2028)
1362 if (command != XC2028_TUNER_RESET)
1365 rc = em28xx_gpio_set(dev, dev->board.tuner_gpio);
1369 EXPORT_SYMBOL_GPL(em28xx_tuner_callback);
1371 static void inline em28xx_set_model(struct em28xx *dev)
1373 memcpy(&dev->board, &em28xx_boards[dev->model], sizeof(dev->board));
1376 /* Since em28xx_pre_card_setup() requires a proper dev->model,
1377 * this won't work for boards with generic PCI IDs
1379 void em28xx_pre_card_setup(struct em28xx *dev)
1383 em28xx_set_model(dev);
1385 em28xx_info("Identified as %s (card=%d)\n",
1386 dev->board.name, dev->model);
1388 /* Set the default GPO/GPIO for legacy devices */
1389 dev->reg_gpo_num = EM2880_R04_GPO;
1390 dev->reg_gpio_num = EM28XX_R08_GPIO;
1392 dev->wait_after_write = 5;
1394 /* Based on the Chip ID, set the device configuration */
1395 rc = em28xx_read_reg(dev, EM28XX_R0A_CHIPID);
1399 switch (dev->chip_id) {
1400 case CHIP_ID_EM2750:
1401 em28xx_info("chip ID is em2750\n");
1403 case CHIP_ID_EM2820:
1404 em28xx_info("chip ID is em2820\n");
1406 case CHIP_ID_EM2840:
1407 em28xx_info("chip ID is em2840\n");
1409 case CHIP_ID_EM2860:
1410 em28xx_info("chip ID is em2860\n");
1412 case CHIP_ID_EM2870:
1413 em28xx_info("chip ID is em2870\n");
1414 dev->wait_after_write = 0;
1416 case CHIP_ID_EM2874:
1417 em28xx_info("chip ID is em2874\n");
1418 dev->reg_gpio_num = EM2874_R80_GPIO;
1419 dev->wait_after_write = 0;
1421 case CHIP_ID_EM2883:
1422 em28xx_info("chip ID is em2882/em2883\n");
1423 dev->wait_after_write = 0;
1426 em28xx_info("em28xx chip ID = %d\n", dev->chip_id);
1430 /* Prepopulate cached GPO register content */
1431 rc = em28xx_read_reg(dev, dev->reg_gpo_num);
1435 /* Those are the default values for the majority of boards
1436 Use those values if not specified otherwise at boards entry
1438 if (!dev->board.xclk)
1439 dev->board.xclk = EM28XX_XCLK_IR_RC5_MODE |
1440 EM28XX_XCLK_FREQUENCY_12MHZ;
1442 if (!dev->board.i2c_speed)
1443 dev->board.i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE |
1444 EM28XX_I2C_FREQ_100_KHZ;
1446 em28xx_write_reg(dev, EM28XX_R0F_XCLK, dev->board.xclk & 0x7f);
1447 em28xx_write_reg(dev, EM28XX_R06_I2C_CLK, dev->board.i2c_speed);
1450 /* request some modules */
1451 switch (dev->model) {
1452 case EM2861_BOARD_PLEXTOR_PX_TV100U:
1454 /* Turn on analog audio output */
1455 em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xfd);
1457 case EM2861_BOARD_KWORLD_PVRTV_300U:
1458 case EM2880_BOARD_KWORLD_DVB_305U:
1459 em28xx_write_reg(dev, EM28XX_R08_GPIO, 0x6d);
1461 em28xx_write_reg(dev, EM28XX_R08_GPIO, 0x7d);
1464 case EM2870_BOARD_COMPRO_VIDEOMATE:
1465 /* TODO: someone can do some cleanup here...
1466 not everything's needed */
1467 em28xx_write_reg(dev, EM2880_R04_GPO, 0x00);
1469 em28xx_write_reg(dev, EM2880_R04_GPO, 0x01);
1471 em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xfd);
1473 em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xfc);
1475 em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xdc);
1477 em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xfc);
1480 case EM2870_BOARD_TERRATEC_XS_MT2060:
1481 /* this device needs some gpio writes to get the DVB-T
1483 em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xfe);
1485 em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xde);
1487 em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xfe);
1490 case EM2870_BOARD_PINNACLE_PCTV_DVB:
1491 /* this device needs some gpio writes to get the
1493 em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xfe);
1495 em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xde);
1497 em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xfe);
1500 case EM2820_BOARD_GADMEI_UTV310:
1501 case EM2820_BOARD_MSI_VOX_USB_2:
1502 /* enables audio for that devices */
1503 em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xfd);
1507 em28xx_gpio_set(dev, dev->board.tuner_gpio);
1508 em28xx_set_mode(dev, EM28XX_ANALOG_MODE);
1511 em28xx_set_mode(dev, EM28XX_SUSPEND);
1514 static void em28xx_setup_xc3028(struct em28xx *dev, struct xc2028_ctrl *ctl)
1516 memset(ctl, 0, sizeof(*ctl));
1518 ctl->fname = XC2028_DEFAULT_FIRMWARE;
1520 ctl->mts = em28xx_boards[dev->model].mts_firmware;
1522 switch (dev->model) {
1523 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900:
1524 ctl->demod = XC3028_FE_ZARLINK456;
1526 case EM2880_BOARD_TERRATEC_HYBRID_XS:
1527 ctl->demod = XC3028_FE_ZARLINK456;
1529 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2:
1530 /* djh - Not sure which demod we need here */
1531 ctl->demod = XC3028_FE_DEFAULT;
1533 case EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600:
1534 ctl->demod = XC3028_FE_DEFAULT;
1535 ctl->fname = XC3028L_DEFAULT_FIRMWARE;
1537 case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850:
1538 case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950:
1539 case EM2880_BOARD_PINNACLE_PCTV_HD_PRO:
1540 /* FIXME: Better to specify the needed IF */
1541 ctl->demod = XC3028_FE_DEFAULT;
1544 ctl->demod = XC3028_FE_OREN538;
1548 static void em28xx_config_tuner(struct em28xx *dev)
1550 struct v4l2_priv_tun_config xc2028_cfg;
1551 struct tuner_setup tun_setup;
1552 struct v4l2_frequency f;
1554 if (dev->tuner_type == TUNER_ABSENT)
1557 tun_setup.mode_mask = T_ANALOG_TV | T_RADIO;
1558 tun_setup.type = dev->tuner_type;
1559 tun_setup.addr = dev->tuner_addr;
1560 tun_setup.tuner_callback = em28xx_tuner_callback;
1562 em28xx_i2c_call_clients(dev, TUNER_SET_TYPE_ADDR, &tun_setup);
1564 if (dev->tuner_type == TUNER_XC2028) {
1565 struct xc2028_ctrl ctl;
1567 em28xx_setup_xc3028(dev, &ctl);
1569 xc2028_cfg.tuner = TUNER_XC2028;
1570 xc2028_cfg.priv = &ctl;
1572 em28xx_i2c_call_clients(dev, TUNER_SET_CONFIG, &xc2028_cfg);
1575 /* configure tuner */
1577 f.type = V4L2_TUNER_ANALOG_TV;
1578 f.frequency = 9076; /* just a magic number */
1579 dev->ctl_freq = f.frequency;
1580 em28xx_i2c_call_clients(dev, VIDIOC_S_FREQUENCY, &f);
1583 static int em28xx_hint_board(struct em28xx *dev)
1587 /* HINT method: EEPROM
1589 * This method works only for boards with eeprom.
1590 * Uses a hash of all eeprom bytes. The hash should be
1591 * unique for a vendor/tuner pair.
1592 * There are a high chance that tuners for different
1593 * video standards produce different hashes.
1595 for (i = 0; i < ARRAY_SIZE(em28xx_eeprom_hash); i++) {
1596 if (dev->hash == em28xx_eeprom_hash[i].hash) {
1597 dev->model = em28xx_eeprom_hash[i].model;
1598 dev->tuner_type = em28xx_eeprom_hash[i].tuner;
1600 em28xx_errdev("Your board has no unique USB ID.\n");
1601 em28xx_errdev("A hint were successfully done, "
1602 "based on eeprom hash.\n");
1603 em28xx_errdev("This method is not 100%% failproof.\n");
1604 em28xx_errdev("If the board were missdetected, "
1605 "please email this log to:\n");
1606 em28xx_errdev("\tV4L Mailing List "
1607 " <video4linux-list@redhat.com>\n");
1608 em28xx_errdev("Board detected as %s\n",
1609 em28xx_boards[dev->model].name);
1615 /* HINT method: I2C attached devices
1617 * This method works for all boards.
1618 * Uses a hash of i2c scanned devices.
1619 * Devices with the same i2c attached chips will
1620 * be considered equal.
1621 * This method is less precise than the eeprom one.
1624 /* user did not request i2c scanning => do it now */
1626 em28xx_do_i2c_scan(dev);
1628 for (i = 0; i < ARRAY_SIZE(em28xx_i2c_hash); i++) {
1629 if (dev->i2c_hash == em28xx_i2c_hash[i].hash) {
1630 dev->model = em28xx_i2c_hash[i].model;
1631 dev->tuner_type = em28xx_i2c_hash[i].tuner;
1632 em28xx_errdev("Your board has no unique USB ID.\n");
1633 em28xx_errdev("A hint were successfully done, "
1634 "based on i2c devicelist hash.\n");
1635 em28xx_errdev("This method is not 100%% failproof.\n");
1636 em28xx_errdev("If the board were missdetected, "
1637 "please email this log to:\n");
1638 em28xx_errdev("\tV4L Mailing List "
1639 " <video4linux-list@redhat.com>\n");
1640 em28xx_errdev("Board detected as %s\n",
1641 em28xx_boards[dev->model].name);
1647 em28xx_errdev("Your board has no unique USB ID and thus need a "
1648 "hint to be detected.\n");
1649 em28xx_errdev("You may try to use card=<n> insmod option to "
1650 "workaround that.\n");
1651 em28xx_errdev("Please send an email with this log to:\n");
1652 em28xx_errdev("\tV4L Mailing List <video4linux-list@redhat.com>\n");
1653 em28xx_errdev("Board eeprom hash is 0x%08lx\n", dev->hash);
1654 em28xx_errdev("Board i2c devicelist hash is 0x%08lx\n", dev->i2c_hash);
1656 em28xx_errdev("Here is a list of valid choices for the card=<n>"
1657 " insmod option:\n");
1658 for (i = 0; i < em28xx_bcount; i++) {
1659 em28xx_errdev(" card=%d -> %s\n",
1660 i, em28xx_boards[i].name);
1665 /* ----------------------------------------------------------------------- */
1666 void em28xx_set_ir(struct em28xx *dev, struct IR_i2c *ir)
1673 /* detect & configure */
1674 switch (dev->model) {
1675 case (EM2800_BOARD_UNKNOWN):
1677 case (EM2820_BOARD_UNKNOWN):
1679 case (EM2800_BOARD_TERRATEC_CINERGY_200):
1680 case (EM2820_BOARD_TERRATEC_CINERGY_250):
1681 ir->ir_codes = ir_codes_em_terratec;
1682 ir->get_key = em28xx_get_key_terratec;
1683 snprintf(ir->c.name, sizeof(ir->c.name),
1684 "i2c IR (EM28XX Terratec)");
1686 case (EM2820_BOARD_PINNACLE_USB_2):
1687 ir->ir_codes = ir_codes_pinnacle_grey;
1688 ir->get_key = em28xx_get_key_pinnacle_usb_grey;
1689 snprintf(ir->c.name, sizeof(ir->c.name),
1690 "i2c IR (EM28XX Pinnacle PCTV)");
1692 case (EM2820_BOARD_HAUPPAUGE_WINTV_USB_2):
1693 ir->ir_codes = ir_codes_hauppauge_new;
1694 ir->get_key = em28xx_get_key_em_haup;
1695 snprintf(ir->c.name, sizeof(ir->c.name),
1696 "i2c IR (EM2840 Hauppauge)");
1698 case (EM2820_BOARD_MSI_VOX_USB_2):
1700 case (EM2800_BOARD_LEADTEK_WINFAST_USBII):
1702 case (EM2800_BOARD_KWORLD_USB2800):
1704 case (EM2800_BOARD_GRABBEEX_USB2800):
1709 void em28xx_card_setup(struct em28xx *dev)
1711 em28xx_set_model(dev);
1713 dev->tuner_type = em28xx_boards[dev->model].tuner_type;
1714 if (em28xx_boards[dev->model].tuner_addr)
1715 dev->tuner_addr = em28xx_boards[dev->model].tuner_addr;
1717 /* request some modules */
1718 switch (dev->model) {
1719 case EM2820_BOARD_HAUPPAUGE_WINTV_USB_2:
1720 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900:
1721 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2:
1722 case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850:
1723 case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950:
1726 #ifdef CONFIG_MODULES
1727 request_module("tveeprom");
1729 /* Call first TVeeprom */
1731 dev->i2c_client.addr = 0xa0 >> 1;
1732 tveeprom_hauppauge_analog(&dev->i2c_client, &tv, dev->eedata);
1734 dev->tuner_type = tv.tuner_type;
1736 if (tv.audio_processor == V4L2_IDENT_MSPX4XX) {
1737 dev->i2s_speed = 2048000;
1738 dev->board.has_msp34xx = 1;
1740 #ifdef CONFIG_MODULES
1742 request_module("ir-kbd-i2c");
1746 case EM2820_BOARD_KWORLD_PVRTV2800RF:
1747 /* GPIO enables sound on KWORLD PVR TV 2800RF */
1748 em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xf9);
1750 case EM2820_BOARD_UNKNOWN:
1751 case EM2800_BOARD_UNKNOWN:
1753 * The K-WORLD DVB-T 310U is detected as an MSI Digivox AD.
1755 * This occurs because they share identical USB vendor and
1758 * What we do here is look up the EEPROM hash of the K-WORLD
1759 * and if it is found then we decide that we do not have
1760 * a DIGIVOX and reset the device to the K-WORLD instead.
1762 * This solution is only valid if they do not share eeprom
1763 * hash identities which has not been determined as yet.
1765 case EM2880_BOARD_MSI_DIGIVOX_AD:
1766 if (!em28xx_hint_board(dev))
1767 em28xx_set_model(dev);
1771 if (dev->board.has_snapshot_button)
1772 em28xx_register_snapshot_button(dev);
1774 if (dev->board.valid == EM28XX_BOARD_NOT_VALIDATED) {
1775 em28xx_errdev("\n\n");
1776 em28xx_errdev("The support for this board weren't "
1778 em28xx_errdev("Please send a report of having this working\n");
1779 em28xx_errdev("not to V4L mailing list (and/or to other "
1783 /* Allow override tuner type by a module parameter */
1785 dev->tuner_type = tuner;
1787 #ifdef CONFIG_MODULES
1788 /* request some modules */
1789 if (dev->board.has_msp34xx)
1790 request_module("msp3400");
1791 if (dev->board.decoder == EM28XX_SAA711X)
1792 request_module("saa7115");
1793 if (dev->board.decoder == EM28XX_TVP5150)
1794 request_module("tvp5150");
1795 if (dev->board.tuner_type != TUNER_ABSENT)
1796 request_module("tuner");
1799 em28xx_config_tuner(dev);
1801 em28xx_ir_init(dev);