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>
9 Copyright (C) 2012 Frank Schäfer <fschaefer.oss@googlemail.com>
11 This program is free software; you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by
13 the Free Software Foundation; either version 2 of the License, or
14 (at your option) any later version.
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with this program; if not, write to the Free Software
23 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26 #include <linux/init.h>
27 #include <linux/module.h>
28 #include <linux/slab.h>
29 #include <linux/delay.h>
30 #include <linux/i2c.h>
31 #include <linux/usb.h>
32 #include <media/tuner.h>
33 #include <media/msp3400.h>
34 #include <media/saa7115.h>
35 #include <media/tvp5150.h>
36 #include <media/tvaudio.h>
37 #include <media/i2c-addr.h>
38 #include <media/tveeprom.h>
39 #include <media/v4l2-common.h>
43 #define DRIVER_NAME "em28xx"
45 static int tuner
= -1;
46 module_param(tuner
, int, 0444);
47 MODULE_PARM_DESC(tuner
, "tuner type");
49 static unsigned int disable_ir
;
50 module_param(disable_ir
, int, 0444);
51 MODULE_PARM_DESC(disable_ir
, "disable infrared remote support");
53 static unsigned int disable_usb_speed_check
;
54 module_param(disable_usb_speed_check
, int, 0444);
55 MODULE_PARM_DESC(disable_usb_speed_check
,
56 "override min bandwidth requirement of 480M bps");
58 static unsigned int card
[] = {[0 ... (EM28XX_MAXBOARDS
- 1)] = -1U };
59 module_param_array(card
, int, NULL
, 0444);
60 MODULE_PARM_DESC(card
, "card type");
62 static int usb_xfer_mode
= -1;
63 module_param(usb_xfer_mode
, int, 0444);
64 MODULE_PARM_DESC(usb_xfer_mode
,
65 "USB transfer mode for frame data (-1 = auto, 0 = prefer isoc, 1 = prefer bulk)");
68 /* Bitmask marking allocated devices from 0 to EM28XX_MAXBOARDS - 1 */
69 static unsigned long em28xx_devused
;
71 struct em28xx_hash_table
{
77 static void em28xx_pre_card_setup(struct em28xx
*dev
);
80 * Reset sequences for analog/digital modes
83 /* Reset for the most [analog] boards */
84 static struct em28xx_reg_seq default_analog
[] = {
85 {EM2820_R08_GPIO_CTRL
, 0x6d, ~EM_GPIO_4
, 10},
89 /* Reset for the most [digital] boards */
90 static struct em28xx_reg_seq default_digital
[] = {
91 {EM2820_R08_GPIO_CTRL
, 0x6e, ~EM_GPIO_4
, 10},
95 /* Board Hauppauge WinTV HVR 900 analog */
96 static struct em28xx_reg_seq hauppauge_wintv_hvr_900_analog
[] = {
97 {EM2820_R08_GPIO_CTRL
, 0x2d, ~EM_GPIO_4
, 10},
98 {0x05, 0xff, 0x10, 10},
102 /* Board Hauppauge WinTV HVR 900 digital */
103 static struct em28xx_reg_seq hauppauge_wintv_hvr_900_digital
[] = {
104 {EM2820_R08_GPIO_CTRL
, 0x2e, ~EM_GPIO_4
, 10},
105 {EM2880_R04_GPO
, 0x04, 0x0f, 10},
106 {EM2880_R04_GPO
, 0x0c, 0x0f, 10},
110 /* Board Hauppauge WinTV HVR 900 (R2) digital */
111 static struct em28xx_reg_seq hauppauge_wintv_hvr_900R2_digital
[] = {
112 {EM2820_R08_GPIO_CTRL
, 0x2e, ~EM_GPIO_4
, 10},
113 {EM2880_R04_GPO
, 0x0c, 0x0f, 10},
117 /* Boards - EM2880 MSI DIGIVOX AD and EM2880_BOARD_MSI_DIGIVOX_AD_II */
118 static struct em28xx_reg_seq em2880_msi_digivox_ad_analog
[] = {
119 {EM2820_R08_GPIO_CTRL
, 0x69, ~EM_GPIO_4
, 10},
123 /* Boards - EM2880 MSI DIGIVOX AD and EM2880_BOARD_MSI_DIGIVOX_AD_II */
125 /* Board - EM2870 Kworld 355u
126 Analog - No input analog */
128 /* Board - EM2882 Kworld 315U digital */
129 static struct em28xx_reg_seq em2882_kworld_315u_digital
[] = {
130 {EM2820_R08_GPIO_CTRL
, 0xff, 0xff, 10},
131 {EM2820_R08_GPIO_CTRL
, 0xfe, 0xff, 10},
132 {EM2880_R04_GPO
, 0x04, 0xff, 10},
133 {EM2880_R04_GPO
, 0x0c, 0xff, 10},
134 {EM2820_R08_GPIO_CTRL
, 0x7e, 0xff, 10},
138 static struct em28xx_reg_seq em2882_kworld_315u_tuner_gpio
[] = {
139 {EM2880_R04_GPO
, 0x08, 0xff, 10},
140 {EM2880_R04_GPO
, 0x0c, 0xff, 10},
141 {EM2880_R04_GPO
, 0x08, 0xff, 10},
142 {EM2880_R04_GPO
, 0x0c, 0xff, 10},
146 static struct em28xx_reg_seq kworld_330u_analog
[] = {
147 {EM2820_R08_GPIO_CTRL
, 0x6d, ~EM_GPIO_4
, 10},
148 {EM2880_R04_GPO
, 0x00, 0xff, 10},
152 static struct em28xx_reg_seq kworld_330u_digital
[] = {
153 {EM2820_R08_GPIO_CTRL
, 0x6e, ~EM_GPIO_4
, 10},
154 {EM2880_R04_GPO
, 0x08, 0xff, 10},
159 GPIO0 - Enable digital power (s5h1409) - low to enable
160 GPIO1 - Enable analog power (tvp5150/emp202) - low to enable
164 static struct em28xx_reg_seq evga_indtube_analog
[] = {
165 {EM2820_R08_GPIO_CTRL
, 0x79, 0xff, 60},
169 static struct em28xx_reg_seq evga_indtube_digital
[] = {
170 {EM2820_R08_GPIO_CTRL
, 0x7a, 0xff, 1},
171 {EM2880_R04_GPO
, 0x04, 0xff, 10},
172 {EM2880_R04_GPO
, 0x0c, 0xff, 1},
177 * KWorld PlusTV 340U and UB435-Q (ATSC) GPIOs map:
178 * EM_GPIO_0 - currently unknown
179 * EM_GPIO_1 - LED disable/enable (1 = off, 0 = on)
180 * EM_GPIO_2 - currently unknown
181 * EM_GPIO_3 - currently unknown
182 * EM_GPIO_4 - TDA18271HD/C1 tuner (1 = active, 0 = in reset)
183 * EM_GPIO_5 - LGDT3304 ATSC/QAM demod (1 = active, 0 = in reset)
184 * EM_GPIO_6 - currently unknown
185 * EM_GPIO_7 - currently unknown
187 static struct em28xx_reg_seq kworld_a340_digital
[] = {
188 {EM2820_R08_GPIO_CTRL
, 0x6d, ~EM_GPIO_4
, 10},
192 /* Pinnacle Hybrid Pro eb1a:2881 */
193 static struct em28xx_reg_seq pinnacle_hybrid_pro_analog
[] = {
194 {EM2820_R08_GPIO_CTRL
, 0xfd, ~EM_GPIO_4
, 10},
198 static struct em28xx_reg_seq pinnacle_hybrid_pro_digital
[] = {
199 {EM2820_R08_GPIO_CTRL
, 0x6e, ~EM_GPIO_4
, 10},
200 {EM2880_R04_GPO
, 0x04, 0xff, 100},/* zl10353 reset */
201 {EM2880_R04_GPO
, 0x0c, 0xff, 1},
205 static struct em28xx_reg_seq terratec_cinergy_USB_XS_FR_analog
[] = {
206 {EM2820_R08_GPIO_CTRL
, 0x6d, ~EM_GPIO_4
, 10},
207 {EM2880_R04_GPO
, 0x00, 0xff, 10},
211 static struct em28xx_reg_seq terratec_cinergy_USB_XS_FR_digital
[] = {
212 {EM2820_R08_GPIO_CTRL
, 0x6e, ~EM_GPIO_4
, 10},
213 {EM2880_R04_GPO
, 0x08, 0xff, 10},
217 /* eb1a:2868 Reddo DVB-C USB TV Box
219 Other GPIOs seems to be don't care. */
220 static struct em28xx_reg_seq reddo_dvb_c_usb_box
[] = {
221 {EM2820_R08_GPIO_CTRL
, 0xfe, 0xff, 10},
222 {EM2820_R08_GPIO_CTRL
, 0xde, 0xff, 10},
223 {EM2820_R08_GPIO_CTRL
, 0xfe, 0xff, 10},
224 {EM2820_R08_GPIO_CTRL
, 0xff, 0xff, 10},
225 {EM2820_R08_GPIO_CTRL
, 0x7f, 0xff, 10},
226 {EM2820_R08_GPIO_CTRL
, 0x6f, 0xff, 10},
227 {EM2820_R08_GPIO_CTRL
, 0xff, 0xff, 10},
231 /* Callback for the most boards */
232 static struct em28xx_reg_seq default_tuner_gpio
[] = {
233 {EM2820_R08_GPIO_CTRL
, EM_GPIO_4
, EM_GPIO_4
, 10},
234 {EM2820_R08_GPIO_CTRL
, 0, EM_GPIO_4
, 10},
235 {EM2820_R08_GPIO_CTRL
, EM_GPIO_4
, EM_GPIO_4
, 10},
240 static struct em28xx_reg_seq compro_unmute_tv_gpio
[] = {
241 {EM2820_R08_GPIO_CTRL
, 5, 7, 10},
245 static struct em28xx_reg_seq compro_unmute_svid_gpio
[] = {
246 {EM2820_R08_GPIO_CTRL
, 4, 7, 10},
250 static struct em28xx_reg_seq compro_mute_gpio
[] = {
251 {EM2820_R08_GPIO_CTRL
, 6, 7, 10},
256 static struct em28xx_reg_seq terratec_av350_mute_gpio
[] = {
257 {EM2820_R08_GPIO_CTRL
, 0xff, 0x7f, 10},
261 static struct em28xx_reg_seq terratec_av350_unmute_gpio
[] = {
262 {EM2820_R08_GPIO_CTRL
, 0xff, 0xff, 10},
266 static struct em28xx_reg_seq silvercrest_reg_seq
[] = {
267 {EM2820_R08_GPIO_CTRL
, 0xff, 0xff, 10},
268 {EM2820_R08_GPIO_CTRL
, 0x01, 0xf7, 10},
272 static struct em28xx_reg_seq vc211a_enable
[] = {
273 {EM2820_R08_GPIO_CTRL
, 0xff, 0x07, 10},
274 {EM2820_R08_GPIO_CTRL
, 0xff, 0x0f, 10},
275 {EM2820_R08_GPIO_CTRL
, 0xff, 0x0b, 10},
279 static struct em28xx_reg_seq dikom_dk300_digital
[] = {
280 {EM2820_R08_GPIO_CTRL
, 0x6e, ~EM_GPIO_4
, 10},
281 {EM2880_R04_GPO
, 0x08, 0xff, 10},
286 /* Reset for the most [digital] boards */
287 static struct em28xx_reg_seq leadership_digital
[] = {
288 {EM2874_R80_GPIO_P0_CTRL
, 0x70, 0xff, 10},
292 static struct em28xx_reg_seq leadership_reset
[] = {
293 {EM2874_R80_GPIO_P0_CTRL
, 0xf0, 0xff, 10},
294 {EM2874_R80_GPIO_P0_CTRL
, 0xb0, 0xff, 10},
295 {EM2874_R80_GPIO_P0_CTRL
, 0xf0, 0xff, 10},
299 /* 2013:024f PCTV nanoStick T2 290e
300 * GPIO_6 - demod reset
303 static struct em28xx_reg_seq pctv_290e
[] = {
304 {EM2874_R80_GPIO_P0_CTRL
, 0x00, 0xff, 80},
305 {EM2874_R80_GPIO_P0_CTRL
, 0x40, 0xff, 80}, /* GPIO_6 = 1 */
306 {EM2874_R80_GPIO_P0_CTRL
, 0xc0, 0xff, 80}, /* GPIO_7 = 1 */
311 static struct em28xx_reg_seq terratec_h5_gpio
[] = {
312 {EM2820_R08_GPIO_CTRL
, 0xff, 0xff, 10},
313 {EM2874_R80_GPIO_P0_CTRL
, 0xf6, 0xff, 100},
314 {EM2874_R80_GPIO_P0_CTRL
, 0xf2, 0xff, 50},
315 {EM2874_R80_GPIO_P0_CTRL
, 0xf6, 0xff, 50},
319 static struct em28xx_reg_seq terratec_h5_digital
[] = {
320 {EM2874_R80_GPIO_P0_CTRL
, 0xf6, 0xff, 10},
321 {EM2874_R80_GPIO_P0_CTRL
, 0xe6, 0xff, 100},
322 {EM2874_R80_GPIO_P0_CTRL
, 0xa6, 0xff, 10},
327 /* 2013:024f PCTV DVB-S2 Stick 460e
330 * GPIO_2 - VUV_LNB (red LED)
332 * GPIO_4 - INT_DEM (DEMOD GPIO_0)
335 * GPIO_7 - LED (green LED)
337 static struct em28xx_reg_seq pctv_460e
[] = {
338 {EM2874_R80_GPIO_P0_CTRL
, 0x01, 0xff, 50},
339 {0x0d, 0xff, 0xff, 50},
340 {EM2874_R80_GPIO_P0_CTRL
, 0x41, 0xff, 50}, /* GPIO_6=1 */
341 {0x0d, 0x42, 0xff, 50},
342 {EM2874_R80_GPIO_P0_CTRL
, 0x61, 0xff, 50}, /* GPIO_5=1 */
346 static struct em28xx_reg_seq c3tech_digital_duo_digital
[] = {
347 {EM2874_R80_GPIO_P0_CTRL
, 0xff, 0xff, 10},
348 {EM2874_R80_GPIO_P0_CTRL
, 0xfd, 0xff, 10}, /* xc5000 reset */
349 {EM2874_R80_GPIO_P0_CTRL
, 0xf9, 0xff, 35},
350 {EM2874_R80_GPIO_P0_CTRL
, 0xfd, 0xff, 10},
351 {EM2874_R80_GPIO_P0_CTRL
, 0xff, 0xff, 10},
352 {EM2874_R80_GPIO_P0_CTRL
, 0xfe, 0xff, 10},
353 {EM2874_R80_GPIO_P0_CTRL
, 0xbe, 0xff, 10},
354 {EM2874_R80_GPIO_P0_CTRL
, 0xfe, 0xff, 20},
359 static struct em28xx_reg_seq hauppauge_930c_gpio
[] = {
360 {EM2874_R80_GPIO_P0_CTRL
, 0x6f, 0xff, 10},
361 {EM2874_R80_GPIO_P0_CTRL
, 0x4f, 0xff, 10}, /* xc5000 reset */
362 {EM2874_R80_GPIO_P0_CTRL
, 0x6f, 0xff, 10},
363 {EM2874_R80_GPIO_P0_CTRL
, 0x4f, 0xff, 10},
367 static struct em28xx_reg_seq hauppauge_930c_digital
[] = {
368 {EM2874_R80_GPIO_P0_CTRL
, 0xf6, 0xff, 10},
369 {EM2874_R80_GPIO_P0_CTRL
, 0xe6, 0xff, 100},
370 {EM2874_R80_GPIO_P0_CTRL
, 0xa6, 0xff, 10},
375 /* 1b80:e425 MaxMedia UB425-TC
376 * 1b80:e1cc Delock 61959
377 * GPIO_6 - demod reset, 0=active
378 * GPIO_7 - LED, 0=active
380 static struct em28xx_reg_seq maxmedia_ub425_tc
[] = {
381 {EM2874_R80_GPIO_P0_CTRL
, 0x83, 0xff, 100},
382 {EM2874_R80_GPIO_P0_CTRL
, 0xc3, 0xff, 100}, /* GPIO_6 = 1 */
383 {EM2874_R80_GPIO_P0_CTRL
, 0x43, 0xff, 000}, /* GPIO_7 = 0 */
387 /* 2304:0242 PCTV QuatroStick (510e)
388 * GPIO_2: decoder reset, 0=active
389 * GPIO_4: decoder suspend, 0=active
390 * GPIO_6: demod reset, 0=active
391 * GPIO_7: LED, 1=active
393 static struct em28xx_reg_seq pctv_510e
[] = {
394 {EM2874_R80_GPIO_P0_CTRL
, 0x10, 0xff, 100},
395 {EM2874_R80_GPIO_P0_CTRL
, 0x14, 0xff, 100}, /* GPIO_2 = 1 */
396 {EM2874_R80_GPIO_P0_CTRL
, 0x54, 0xff, 050}, /* GPIO_6 = 1 */
400 /* 2013:0251 PCTV QuatroStick nano (520e)
401 * GPIO_2: decoder reset, 0=active
402 * GPIO_4: decoder suspend, 0=active
403 * GPIO_6: demod reset, 0=active
404 * GPIO_7: LED, 1=active
406 static struct em28xx_reg_seq pctv_520e
[] = {
407 {EM2874_R80_GPIO_P0_CTRL
, 0x10, 0xff, 100},
408 {EM2874_R80_GPIO_P0_CTRL
, 0x14, 0xff, 100}, /* GPIO_2 = 1 */
409 {EM2874_R80_GPIO_P0_CTRL
, 0x54, 0xff, 050}, /* GPIO_6 = 1 */
410 {EM2874_R80_GPIO_P0_CTRL
, 0xd4, 0xff, 000}, /* GPIO_7 = 1 */
417 struct em28xx_board em28xx_boards
[] = {
418 [EM2750_BOARD_UNKNOWN
] = {
419 .name
= "EM2710/EM2750/EM2751 webcam grabber",
420 .xclk
= EM28XX_XCLK_FREQUENCY_20MHZ
,
421 .tuner_type
= TUNER_ABSENT
,
424 .type
= EM28XX_VMUX_COMPOSITE1
,
426 .amux
= EM28XX_AMUX_VIDEO
,
427 .gpio
= silvercrest_reg_seq
,
430 [EM2800_BOARD_UNKNOWN
] = {
431 .name
= "Unknown EM2800 video grabber",
433 .tda9887_conf
= TDA9887_PRESENT
,
434 .decoder
= EM28XX_SAA711X
,
435 .tuner_type
= TUNER_ABSENT
,
437 .type
= EM28XX_VMUX_COMPOSITE1
,
438 .vmux
= SAA7115_COMPOSITE0
,
439 .amux
= EM28XX_AMUX_LINE_IN
,
441 .type
= EM28XX_VMUX_SVIDEO
,
442 .vmux
= SAA7115_SVIDEO3
,
443 .amux
= EM28XX_AMUX_LINE_IN
,
446 [EM2820_BOARD_UNKNOWN
] = {
447 .name
= "Unknown EM2750/28xx video grabber",
448 .tuner_type
= TUNER_ABSENT
,
449 .is_webcam
= 1, /* To enable sensor probe */
451 [EM2750_BOARD_DLCW_130
] = {
452 /* Beijing Huaqi Information Digital Technology Co., Ltd */
453 .name
= "Huaqi DLCW-130",
454 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
455 .xclk
= EM28XX_XCLK_FREQUENCY_48MHZ
,
456 .tuner_type
= TUNER_ABSENT
,
459 .type
= EM28XX_VMUX_COMPOSITE1
,
461 .amux
= EM28XX_AMUX_VIDEO
,
464 [EM2820_BOARD_KWORLD_PVRTV2800RF
] = {
465 .name
= "Kworld PVR TV 2800 RF",
466 .tuner_type
= TUNER_TEMIC_PAL
,
467 .tda9887_conf
= TDA9887_PRESENT
,
468 .decoder
= EM28XX_SAA711X
,
470 .type
= EM28XX_VMUX_COMPOSITE1
,
471 .vmux
= SAA7115_COMPOSITE0
,
472 .amux
= EM28XX_AMUX_LINE_IN
,
474 .type
= EM28XX_VMUX_SVIDEO
,
475 .vmux
= SAA7115_SVIDEO3
,
476 .amux
= EM28XX_AMUX_LINE_IN
,
479 [EM2820_BOARD_GADMEI_TVR200
] = {
480 .name
= "Gadmei TVR200",
481 .tuner_type
= TUNER_LG_PAL_NEW_TAPC
,
482 .tda9887_conf
= TDA9887_PRESENT
,
483 .decoder
= EM28XX_SAA711X
,
485 .type
= EM28XX_VMUX_TELEVISION
,
486 .vmux
= SAA7115_COMPOSITE2
,
487 .amux
= EM28XX_AMUX_LINE_IN
,
489 .type
= EM28XX_VMUX_COMPOSITE1
,
490 .vmux
= SAA7115_COMPOSITE0
,
491 .amux
= EM28XX_AMUX_LINE_IN
,
493 .type
= EM28XX_VMUX_SVIDEO
,
494 .vmux
= SAA7115_SVIDEO3
,
495 .amux
= EM28XX_AMUX_LINE_IN
,
498 [EM2820_BOARD_TERRATEC_CINERGY_250
] = {
499 .name
= "Terratec Cinergy 250 USB",
500 .tuner_type
= TUNER_LG_PAL_NEW_TAPC
,
502 .tda9887_conf
= TDA9887_PRESENT
,
503 .decoder
= EM28XX_SAA711X
,
505 .type
= EM28XX_VMUX_TELEVISION
,
506 .vmux
= SAA7115_COMPOSITE2
,
507 .amux
= EM28XX_AMUX_VIDEO
,
509 .type
= EM28XX_VMUX_COMPOSITE1
,
510 .vmux
= SAA7115_COMPOSITE0
,
511 .amux
= EM28XX_AMUX_LINE_IN
,
513 .type
= EM28XX_VMUX_SVIDEO
,
514 .vmux
= SAA7115_SVIDEO3
,
515 .amux
= EM28XX_AMUX_LINE_IN
,
518 [EM2820_BOARD_PINNACLE_USB_2
] = {
519 .name
= "Pinnacle PCTV USB 2",
520 .tuner_type
= TUNER_LG_PAL_NEW_TAPC
,
522 .tda9887_conf
= TDA9887_PRESENT
,
523 .decoder
= EM28XX_SAA711X
,
525 .type
= EM28XX_VMUX_TELEVISION
,
526 .vmux
= SAA7115_COMPOSITE2
,
527 .amux
= EM28XX_AMUX_VIDEO
,
529 .type
= EM28XX_VMUX_COMPOSITE1
,
530 .vmux
= SAA7115_COMPOSITE0
,
531 .amux
= EM28XX_AMUX_LINE_IN
,
533 .type
= EM28XX_VMUX_SVIDEO
,
534 .vmux
= SAA7115_SVIDEO3
,
535 .amux
= EM28XX_AMUX_LINE_IN
,
538 [EM2820_BOARD_HAUPPAUGE_WINTV_USB_2
] = {
539 .name
= "Hauppauge WinTV USB 2",
540 .tuner_type
= TUNER_PHILIPS_FM1236_MK3
,
541 .tda9887_conf
= TDA9887_PRESENT
|
542 TDA9887_PORT1_ACTIVE
|
543 TDA9887_PORT2_ACTIVE
,
544 .decoder
= EM28XX_TVP5150
,
548 .type
= EM28XX_VMUX_TELEVISION
,
549 .vmux
= TVP5150_COMPOSITE0
,
550 .amux
= MSP_INPUT_DEFAULT
,
552 .type
= EM28XX_VMUX_SVIDEO
,
553 .vmux
= TVP5150_SVIDEO
,
554 .amux
= MSP_INPUT(MSP_IN_SCART1
, MSP_IN_TUNER1
,
555 MSP_DSP_IN_SCART
, MSP_DSP_IN_SCART
),
558 [EM2820_BOARD_DLINK_USB_TV
] = {
559 .name
= "D-Link DUB-T210 TV Tuner",
560 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
561 .tuner_type
= TUNER_LG_PAL_NEW_TAPC
,
562 .tda9887_conf
= TDA9887_PRESENT
,
563 .decoder
= EM28XX_SAA711X
,
565 .type
= EM28XX_VMUX_TELEVISION
,
566 .vmux
= SAA7115_COMPOSITE2
,
567 .amux
= EM28XX_AMUX_LINE_IN
,
569 .type
= EM28XX_VMUX_COMPOSITE1
,
570 .vmux
= SAA7115_COMPOSITE0
,
571 .amux
= EM28XX_AMUX_LINE_IN
,
573 .type
= EM28XX_VMUX_SVIDEO
,
574 .vmux
= SAA7115_SVIDEO3
,
575 .amux
= EM28XX_AMUX_LINE_IN
,
578 [EM2820_BOARD_HERCULES_SMART_TV_USB2
] = {
579 .name
= "Hercules Smart TV USB 2.0",
580 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
581 .tuner_type
= TUNER_LG_PAL_NEW_TAPC
,
582 .tda9887_conf
= TDA9887_PRESENT
,
583 .decoder
= EM28XX_SAA711X
,
585 .type
= EM28XX_VMUX_TELEVISION
,
586 .vmux
= SAA7115_COMPOSITE2
,
587 .amux
= EM28XX_AMUX_LINE_IN
,
589 .type
= EM28XX_VMUX_COMPOSITE1
,
590 .vmux
= SAA7115_COMPOSITE0
,
591 .amux
= EM28XX_AMUX_LINE_IN
,
593 .type
= EM28XX_VMUX_SVIDEO
,
594 .vmux
= SAA7115_SVIDEO3
,
595 .amux
= EM28XX_AMUX_LINE_IN
,
598 [EM2820_BOARD_PINNACLE_USB_2_FM1216ME
] = {
599 .name
= "Pinnacle PCTV USB 2 (Philips FM1216ME)",
600 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
601 .tuner_type
= TUNER_PHILIPS_FM1216ME_MK3
,
602 .tda9887_conf
= TDA9887_PRESENT
,
603 .decoder
= EM28XX_SAA711X
,
605 .type
= EM28XX_VMUX_TELEVISION
,
606 .vmux
= SAA7115_COMPOSITE2
,
607 .amux
= EM28XX_AMUX_VIDEO
,
609 .type
= EM28XX_VMUX_COMPOSITE1
,
610 .vmux
= SAA7115_COMPOSITE0
,
611 .amux
= EM28XX_AMUX_LINE_IN
,
613 .type
= EM28XX_VMUX_SVIDEO
,
614 .vmux
= SAA7115_SVIDEO3
,
615 .amux
= EM28XX_AMUX_LINE_IN
,
618 [EM2820_BOARD_GADMEI_UTV310
] = {
619 .name
= "Gadmei UTV310",
620 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
621 .tuner_type
= TUNER_TNF_5335MF
,
622 .tda9887_conf
= TDA9887_PRESENT
,
623 .decoder
= EM28XX_SAA711X
,
625 .type
= EM28XX_VMUX_TELEVISION
,
626 .vmux
= SAA7115_COMPOSITE1
,
627 .amux
= EM28XX_AMUX_LINE_IN
,
629 .type
= EM28XX_VMUX_COMPOSITE1
,
630 .vmux
= SAA7115_COMPOSITE0
,
631 .amux
= EM28XX_AMUX_LINE_IN
,
633 .type
= EM28XX_VMUX_SVIDEO
,
634 .vmux
= SAA7115_SVIDEO3
,
635 .amux
= EM28XX_AMUX_LINE_IN
,
638 [EM2820_BOARD_LEADTEK_WINFAST_USBII_DELUXE
] = {
639 .name
= "Leadtek Winfast USB II Deluxe",
640 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
641 .tuner_type
= TUNER_PHILIPS_FM1216ME_MK3
,
643 .tvaudio_addr
= 0x58,
644 .tda9887_conf
= TDA9887_PRESENT
|
645 TDA9887_PORT2_ACTIVE
|
647 .decoder
= EM28XX_SAA711X
,
648 .adecoder
= EM28XX_TVAUDIO
,
650 .type
= EM28XX_VMUX_TELEVISION
,
651 .vmux
= SAA7115_COMPOSITE4
,
652 .amux
= EM28XX_AMUX_AUX
,
654 .type
= EM28XX_VMUX_COMPOSITE1
,
655 .vmux
= SAA7115_COMPOSITE5
,
656 .amux
= EM28XX_AMUX_LINE_IN
,
658 .type
= EM28XX_VMUX_SVIDEO
,
659 .vmux
= SAA7115_SVIDEO3
,
660 .amux
= EM28XX_AMUX_LINE_IN
,
663 .type
= EM28XX_RADIO
,
664 .amux
= EM28XX_AMUX_AUX
,
667 [EM2820_BOARD_VIDEOLOGY_20K14XUSB
] = {
668 .name
= "Videology 20K14XUSB USB2.0",
669 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
670 .tuner_type
= TUNER_ABSENT
,
673 .type
= EM28XX_VMUX_COMPOSITE1
,
675 .amux
= EM28XX_AMUX_VIDEO
,
678 [EM2820_BOARD_SILVERCREST_WEBCAM
] = {
679 .name
= "Silvercrest Webcam 1.3mpix",
680 .tuner_type
= TUNER_ABSENT
,
683 .type
= EM28XX_VMUX_COMPOSITE1
,
685 .amux
= EM28XX_AMUX_VIDEO
,
686 .gpio
= silvercrest_reg_seq
,
689 [EM2821_BOARD_SUPERCOMP_USB_2
] = {
690 .name
= "Supercomp USB 2.0 TV",
691 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
692 .tuner_type
= TUNER_PHILIPS_FM1236_MK3
,
693 .tda9887_conf
= TDA9887_PRESENT
|
694 TDA9887_PORT1_ACTIVE
|
695 TDA9887_PORT2_ACTIVE
,
696 .decoder
= EM28XX_SAA711X
,
698 .type
= EM28XX_VMUX_TELEVISION
,
699 .vmux
= SAA7115_COMPOSITE2
,
700 .amux
= EM28XX_AMUX_LINE_IN
,
702 .type
= EM28XX_VMUX_COMPOSITE1
,
703 .vmux
= SAA7115_COMPOSITE0
,
704 .amux
= EM28XX_AMUX_VIDEO
,
706 .type
= EM28XX_VMUX_SVIDEO
,
707 .vmux
= SAA7115_SVIDEO3
,
708 .amux
= EM28XX_AMUX_LINE_IN
,
711 [EM2821_BOARD_USBGEAR_VD204
] = {
712 .name
= "Usbgear VD204v9",
713 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
714 .tuner_type
= TUNER_ABSENT
, /* Capture only device */
715 .decoder
= EM28XX_SAA711X
,
717 .type
= EM28XX_VMUX_COMPOSITE1
,
718 .vmux
= SAA7115_COMPOSITE0
,
719 .amux
= EM28XX_AMUX_LINE_IN
,
721 .type
= EM28XX_VMUX_SVIDEO
,
722 .vmux
= SAA7115_SVIDEO3
,
723 .amux
= EM28XX_AMUX_LINE_IN
,
726 [EM2860_BOARD_NETGMBH_CAM
] = {
727 /* Beijing Huaqi Information Digital Technology Co., Ltd */
728 .name
= "NetGMBH Cam",
729 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
730 .tuner_type
= TUNER_ABSENT
,
733 .type
= EM28XX_VMUX_COMPOSITE1
,
735 .amux
= EM28XX_AMUX_VIDEO
,
738 [EM2860_BOARD_TYPHOON_DVD_MAKER
] = {
739 .name
= "Typhoon DVD Maker",
740 .decoder
= EM28XX_SAA711X
,
741 .tuner_type
= TUNER_ABSENT
, /* Capture only device */
743 .type
= EM28XX_VMUX_COMPOSITE1
,
744 .vmux
= SAA7115_COMPOSITE0
,
745 .amux
= EM28XX_AMUX_LINE_IN
,
747 .type
= EM28XX_VMUX_SVIDEO
,
748 .vmux
= SAA7115_SVIDEO3
,
749 .amux
= EM28XX_AMUX_LINE_IN
,
752 [EM2860_BOARD_GADMEI_UTV330
] = {
753 .name
= "Gadmei UTV330",
754 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
755 .tuner_type
= TUNER_TNF_5335MF
,
756 .tda9887_conf
= TDA9887_PRESENT
,
757 .decoder
= EM28XX_SAA711X
,
759 .type
= EM28XX_VMUX_TELEVISION
,
760 .vmux
= SAA7115_COMPOSITE2
,
761 .amux
= EM28XX_AMUX_VIDEO
,
763 .type
= EM28XX_VMUX_COMPOSITE1
,
764 .vmux
= SAA7115_COMPOSITE0
,
765 .amux
= EM28XX_AMUX_LINE_IN
,
767 .type
= EM28XX_VMUX_SVIDEO
,
768 .vmux
= SAA7115_SVIDEO3
,
769 .amux
= EM28XX_AMUX_LINE_IN
,
772 [EM2861_BOARD_GADMEI_UTV330PLUS
] = {
773 .name
= "Gadmei UTV330+",
774 .tuner_type
= TUNER_TNF_5335MF
,
775 .tda9887_conf
= TDA9887_PRESENT
,
776 .ir_codes
= RC_MAP_GADMEI_RM008Z
,
777 .decoder
= EM28XX_SAA711X
,
778 .xclk
= EM28XX_XCLK_FREQUENCY_12MHZ
,
780 .type
= EM28XX_VMUX_TELEVISION
,
781 .vmux
= SAA7115_COMPOSITE2
,
782 .amux
= EM28XX_AMUX_VIDEO
,
784 .type
= EM28XX_VMUX_COMPOSITE1
,
785 .vmux
= SAA7115_COMPOSITE0
,
786 .amux
= EM28XX_AMUX_LINE_IN
,
788 .type
= EM28XX_VMUX_SVIDEO
,
789 .vmux
= SAA7115_SVIDEO3
,
790 .amux
= EM28XX_AMUX_LINE_IN
,
793 [EM2860_BOARD_TERRATEC_HYBRID_XS
] = {
794 .name
= "Terratec Cinergy A Hybrid XS",
795 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
796 .tuner_type
= TUNER_XC2028
,
797 .tuner_gpio
= default_tuner_gpio
,
798 .decoder
= EM28XX_TVP5150
,
801 .type
= EM28XX_VMUX_TELEVISION
,
802 .vmux
= TVP5150_COMPOSITE0
,
803 .amux
= EM28XX_AMUX_VIDEO
,
804 .gpio
= hauppauge_wintv_hvr_900_analog
,
806 .type
= EM28XX_VMUX_COMPOSITE1
,
807 .vmux
= TVP5150_COMPOSITE1
,
808 .amux
= EM28XX_AMUX_LINE_IN
,
809 .gpio
= hauppauge_wintv_hvr_900_analog
,
811 .type
= EM28XX_VMUX_SVIDEO
,
812 .vmux
= TVP5150_SVIDEO
,
813 .amux
= EM28XX_AMUX_LINE_IN
,
814 .gpio
= hauppauge_wintv_hvr_900_analog
,
817 [EM2861_BOARD_KWORLD_PVRTV_300U
] = {
818 .name
= "KWorld PVRTV 300U",
819 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
820 .tuner_type
= TUNER_XC2028
,
821 .tuner_gpio
= default_tuner_gpio
,
822 .decoder
= EM28XX_TVP5150
,
824 .type
= EM28XX_VMUX_TELEVISION
,
825 .vmux
= TVP5150_COMPOSITE0
,
826 .amux
= EM28XX_AMUX_VIDEO
,
828 .type
= EM28XX_VMUX_COMPOSITE1
,
829 .vmux
= TVP5150_COMPOSITE1
,
830 .amux
= EM28XX_AMUX_LINE_IN
,
832 .type
= EM28XX_VMUX_SVIDEO
,
833 .vmux
= TVP5150_SVIDEO
,
834 .amux
= EM28XX_AMUX_LINE_IN
,
837 [EM2861_BOARD_YAKUMO_MOVIE_MIXER
] = {
838 .name
= "Yakumo MovieMixer",
839 .tuner_type
= TUNER_ABSENT
, /* Capture only device */
840 .decoder
= EM28XX_TVP5150
,
842 .type
= EM28XX_VMUX_TELEVISION
,
843 .vmux
= TVP5150_COMPOSITE0
,
844 .amux
= EM28XX_AMUX_VIDEO
,
846 .type
= EM28XX_VMUX_COMPOSITE1
,
847 .vmux
= TVP5150_COMPOSITE1
,
848 .amux
= EM28XX_AMUX_LINE_IN
,
850 .type
= EM28XX_VMUX_SVIDEO
,
851 .vmux
= TVP5150_SVIDEO
,
852 .amux
= EM28XX_AMUX_LINE_IN
,
855 [EM2860_BOARD_TVP5150_REFERENCE_DESIGN
] = {
856 .name
= "EM2860/TVP5150 Reference Design",
857 .tuner_type
= TUNER_ABSENT
, /* Capture only device */
858 .decoder
= EM28XX_TVP5150
,
860 .type
= EM28XX_VMUX_COMPOSITE1
,
861 .vmux
= TVP5150_COMPOSITE1
,
862 .amux
= EM28XX_AMUX_LINE_IN
,
864 .type
= EM28XX_VMUX_SVIDEO
,
865 .vmux
= TVP5150_SVIDEO
,
866 .amux
= EM28XX_AMUX_LINE_IN
,
869 [EM2861_BOARD_PLEXTOR_PX_TV100U
] = {
870 .name
= "Plextor ConvertX PX-TV100U",
871 .tuner_type
= TUNER_TNF_5335MF
,
872 .xclk
= EM28XX_XCLK_I2S_MSB_TIMING
|
873 EM28XX_XCLK_FREQUENCY_12MHZ
,
874 .tda9887_conf
= TDA9887_PRESENT
,
875 .decoder
= EM28XX_TVP5150
,
878 .type
= EM28XX_VMUX_TELEVISION
,
879 .vmux
= TVP5150_COMPOSITE0
,
880 .amux
= EM28XX_AMUX_LINE_IN
,
881 .gpio
= pinnacle_hybrid_pro_analog
,
883 .type
= EM28XX_VMUX_COMPOSITE1
,
884 .vmux
= TVP5150_COMPOSITE1
,
885 .amux
= EM28XX_AMUX_LINE_IN
,
886 .gpio
= pinnacle_hybrid_pro_analog
,
888 .type
= EM28XX_VMUX_SVIDEO
,
889 .vmux
= TVP5150_SVIDEO
,
890 .amux
= EM28XX_AMUX_LINE_IN
,
891 .gpio
= pinnacle_hybrid_pro_analog
,
895 /* Those boards with em2870 are DVB Only*/
897 [EM2870_BOARD_TERRATEC_XS
] = {
898 .name
= "Terratec Cinergy T XS",
899 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
900 .tuner_type
= TUNER_XC2028
,
901 .tuner_gpio
= default_tuner_gpio
,
903 [EM2870_BOARD_TERRATEC_XS_MT2060
] = {
904 .name
= "Terratec Cinergy T XS (MT2060)",
905 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
906 .tuner_type
= TUNER_ABSENT
, /* MT2060 */
908 [EM2870_BOARD_KWORLD_350U
] = {
909 .name
= "Kworld 350 U DVB-T",
910 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
911 .tuner_type
= TUNER_XC2028
,
912 .tuner_gpio
= default_tuner_gpio
,
914 [EM2870_BOARD_KWORLD_355U
] = {
915 .name
= "Kworld 355 U DVB-T",
916 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
917 .tuner_type
= TUNER_ABSENT
,
918 .tuner_gpio
= default_tuner_gpio
,
920 .dvb_gpio
= default_digital
,
922 [EM2870_BOARD_PINNACLE_PCTV_DVB
] = {
923 .name
= "Pinnacle PCTV DVB-T",
924 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
925 .tuner_type
= TUNER_ABSENT
, /* MT2060 */
926 /* djh - I have serious doubts this is right... */
927 .xclk
= EM28XX_XCLK_IR_RC5_MODE
|
928 EM28XX_XCLK_FREQUENCY_10MHZ
,
930 [EM2870_BOARD_COMPRO_VIDEOMATE
] = {
931 .name
= "Compro, VideoMate U3",
932 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
933 .tuner_type
= TUNER_ABSENT
, /* MT2060 */
936 [EM2880_BOARD_TERRATEC_HYBRID_XS_FR
] = {
937 .name
= "Terratec Hybrid XS Secam",
939 .tuner_type
= TUNER_XC2028
,
940 .tuner_gpio
= default_tuner_gpio
,
941 .decoder
= EM28XX_TVP5150
,
943 .dvb_gpio
= terratec_cinergy_USB_XS_FR_digital
,
945 .type
= EM28XX_VMUX_TELEVISION
,
946 .vmux
= TVP5150_COMPOSITE0
,
947 .amux
= EM28XX_AMUX_VIDEO
,
948 .gpio
= terratec_cinergy_USB_XS_FR_analog
,
950 .type
= EM28XX_VMUX_COMPOSITE1
,
951 .vmux
= TVP5150_COMPOSITE1
,
952 .amux
= EM28XX_AMUX_LINE_IN
,
953 .gpio
= terratec_cinergy_USB_XS_FR_analog
,
955 .type
= EM28XX_VMUX_SVIDEO
,
956 .vmux
= TVP5150_SVIDEO
,
957 .amux
= EM28XX_AMUX_LINE_IN
,
958 .gpio
= terratec_cinergy_USB_XS_FR_analog
,
961 [EM2884_BOARD_TERRATEC_H5
] = {
962 .name
= "Terratec Cinergy H5",
965 .tuner_type
= TUNER_PHILIPS_TDA8290
,
967 .dvb_gpio
= terratec_h5_digital
, /* FIXME: probably wrong */
968 .tuner_gpio
= terratec_h5_gpio
,
970 .tuner_type
= TUNER_ABSENT
,
973 .i2c_speed
= EM28XX_I2C_CLK_WAIT_ENABLE
|
974 EM28XX_I2C_FREQ_400_KHZ
,
976 [EM2884_BOARD_HAUPPAUGE_WINTV_HVR_930C
] = {
977 .name
= "Hauppauge WinTV HVR 930C",
979 #if 0 /* FIXME: Add analog support */
980 .tuner_type
= TUNER_XC5000
,
982 .dvb_gpio
= hauppauge_930c_digital
,
983 .tuner_gpio
= hauppauge_930c_gpio
,
985 .tuner_type
= TUNER_ABSENT
,
987 .ir_codes
= RC_MAP_HAUPPAUGE
,
989 .i2c_speed
= EM28XX_I2C_CLK_WAIT_ENABLE
|
990 EM28XX_I2C_FREQ_400_KHZ
,
992 [EM2884_BOARD_C3TECH_DIGITAL_DUO
] = {
993 .name
= "C3 Tech Digital Duo HDTV/SDTV USB",
995 /* FIXME: Add analog support - need a saa7136 driver */
996 .tuner_type
= TUNER_ABSENT
, /* Digital-only TDA18271HD */
997 .ir_codes
= RC_MAP_EMPTY
,
999 .i2c_speed
= EM28XX_I2C_CLK_WAIT_ENABLE
,
1000 .dvb_gpio
= c3tech_digital_duo_digital
,
1002 [EM2884_BOARD_CINERGY_HTC_STICK
] = {
1003 .name
= "Terratec Cinergy HTC Stick",
1005 .ir_codes
= RC_MAP_NEC_TERRATEC_CINERGY_XS
,
1006 .tuner_type
= TUNER_ABSENT
,
1008 .i2c_speed
= EM28XX_I2C_CLK_WAIT_ENABLE
|
1009 EM28XX_I2C_FREQ_400_KHZ
,
1011 [EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900
] = {
1012 .name
= "Hauppauge WinTV HVR 900",
1013 .tda9887_conf
= TDA9887_PRESENT
,
1014 .tuner_type
= TUNER_XC2028
,
1015 .tuner_gpio
= default_tuner_gpio
,
1018 .dvb_gpio
= hauppauge_wintv_hvr_900_digital
,
1019 .ir_codes
= RC_MAP_HAUPPAUGE
,
1020 .decoder
= EM28XX_TVP5150
,
1022 .type
= EM28XX_VMUX_TELEVISION
,
1023 .vmux
= TVP5150_COMPOSITE0
,
1024 .amux
= EM28XX_AMUX_VIDEO
,
1025 .gpio
= hauppauge_wintv_hvr_900_analog
,
1027 .type
= EM28XX_VMUX_COMPOSITE1
,
1028 .vmux
= TVP5150_COMPOSITE1
,
1029 .amux
= EM28XX_AMUX_LINE_IN
,
1030 .gpio
= hauppauge_wintv_hvr_900_analog
,
1032 .type
= EM28XX_VMUX_SVIDEO
,
1033 .vmux
= TVP5150_SVIDEO
,
1034 .amux
= EM28XX_AMUX_LINE_IN
,
1035 .gpio
= hauppauge_wintv_hvr_900_analog
,
1038 [EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2
] = {
1039 .name
= "Hauppauge WinTV HVR 900 (R2)",
1040 .tda9887_conf
= TDA9887_PRESENT
,
1041 .tuner_type
= TUNER_XC2028
,
1042 .tuner_gpio
= default_tuner_gpio
,
1045 .dvb_gpio
= hauppauge_wintv_hvr_900R2_digital
,
1046 .ir_codes
= RC_MAP_HAUPPAUGE
,
1047 .decoder
= EM28XX_TVP5150
,
1049 .type
= EM28XX_VMUX_TELEVISION
,
1050 .vmux
= TVP5150_COMPOSITE0
,
1051 .amux
= EM28XX_AMUX_VIDEO
,
1052 .gpio
= hauppauge_wintv_hvr_900_analog
,
1054 .type
= EM28XX_VMUX_COMPOSITE1
,
1055 .vmux
= TVP5150_COMPOSITE1
,
1056 .amux
= EM28XX_AMUX_LINE_IN
,
1057 .gpio
= hauppauge_wintv_hvr_900_analog
,
1059 .type
= EM28XX_VMUX_SVIDEO
,
1060 .vmux
= TVP5150_SVIDEO
,
1061 .amux
= EM28XX_AMUX_LINE_IN
,
1062 .gpio
= hauppauge_wintv_hvr_900_analog
,
1065 [EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850
] = {
1066 .name
= "Hauppauge WinTV HVR 850",
1067 .tuner_type
= TUNER_XC2028
,
1068 .tuner_gpio
= default_tuner_gpio
,
1071 .dvb_gpio
= hauppauge_wintv_hvr_900_digital
,
1072 .ir_codes
= RC_MAP_HAUPPAUGE
,
1073 .decoder
= EM28XX_TVP5150
,
1075 .type
= EM28XX_VMUX_TELEVISION
,
1076 .vmux
= TVP5150_COMPOSITE0
,
1077 .amux
= EM28XX_AMUX_VIDEO
,
1078 .gpio
= hauppauge_wintv_hvr_900_analog
,
1080 .type
= EM28XX_VMUX_COMPOSITE1
,
1081 .vmux
= TVP5150_COMPOSITE1
,
1082 .amux
= EM28XX_AMUX_LINE_IN
,
1083 .gpio
= hauppauge_wintv_hvr_900_analog
,
1085 .type
= EM28XX_VMUX_SVIDEO
,
1086 .vmux
= TVP5150_SVIDEO
,
1087 .amux
= EM28XX_AMUX_LINE_IN
,
1088 .gpio
= hauppauge_wintv_hvr_900_analog
,
1091 [EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950
] = {
1092 .name
= "Hauppauge WinTV HVR 950",
1093 .tuner_type
= TUNER_XC2028
,
1094 .tuner_gpio
= default_tuner_gpio
,
1097 .dvb_gpio
= hauppauge_wintv_hvr_900_digital
,
1098 .ir_codes
= RC_MAP_HAUPPAUGE
,
1099 .decoder
= EM28XX_TVP5150
,
1101 .type
= EM28XX_VMUX_TELEVISION
,
1102 .vmux
= TVP5150_COMPOSITE0
,
1103 .amux
= EM28XX_AMUX_VIDEO
,
1104 .gpio
= hauppauge_wintv_hvr_900_analog
,
1106 .type
= EM28XX_VMUX_COMPOSITE1
,
1107 .vmux
= TVP5150_COMPOSITE1
,
1108 .amux
= EM28XX_AMUX_LINE_IN
,
1109 .gpio
= hauppauge_wintv_hvr_900_analog
,
1111 .type
= EM28XX_VMUX_SVIDEO
,
1112 .vmux
= TVP5150_SVIDEO
,
1113 .amux
= EM28XX_AMUX_LINE_IN
,
1114 .gpio
= hauppauge_wintv_hvr_900_analog
,
1117 [EM2880_BOARD_PINNACLE_PCTV_HD_PRO
] = {
1118 .name
= "Pinnacle PCTV HD Pro Stick",
1119 .tuner_type
= TUNER_XC2028
,
1120 .tuner_gpio
= default_tuner_gpio
,
1123 .dvb_gpio
= hauppauge_wintv_hvr_900_digital
,
1124 .ir_codes
= RC_MAP_PINNACLE_PCTV_HD
,
1125 .decoder
= EM28XX_TVP5150
,
1127 .type
= EM28XX_VMUX_TELEVISION
,
1128 .vmux
= TVP5150_COMPOSITE0
,
1129 .amux
= EM28XX_AMUX_VIDEO
,
1130 .gpio
= hauppauge_wintv_hvr_900_analog
,
1132 .type
= EM28XX_VMUX_COMPOSITE1
,
1133 .vmux
= TVP5150_COMPOSITE1
,
1134 .amux
= EM28XX_AMUX_LINE_IN
,
1135 .gpio
= hauppauge_wintv_hvr_900_analog
,
1137 .type
= EM28XX_VMUX_SVIDEO
,
1138 .vmux
= TVP5150_SVIDEO
,
1139 .amux
= EM28XX_AMUX_LINE_IN
,
1140 .gpio
= hauppauge_wintv_hvr_900_analog
,
1143 [EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600
] = {
1144 .name
= "AMD ATI TV Wonder HD 600",
1145 .tuner_type
= TUNER_XC2028
,
1146 .tuner_gpio
= default_tuner_gpio
,
1149 .dvb_gpio
= hauppauge_wintv_hvr_900_digital
,
1150 .ir_codes
= RC_MAP_ATI_TV_WONDER_HD_600
,
1151 .decoder
= EM28XX_TVP5150
,
1153 .type
= EM28XX_VMUX_TELEVISION
,
1154 .vmux
= TVP5150_COMPOSITE0
,
1155 .amux
= EM28XX_AMUX_VIDEO
,
1156 .gpio
= hauppauge_wintv_hvr_900_analog
,
1158 .type
= EM28XX_VMUX_COMPOSITE1
,
1159 .vmux
= TVP5150_COMPOSITE1
,
1160 .amux
= EM28XX_AMUX_LINE_IN
,
1161 .gpio
= hauppauge_wintv_hvr_900_analog
,
1163 .type
= EM28XX_VMUX_SVIDEO
,
1164 .vmux
= TVP5150_SVIDEO
,
1165 .amux
= EM28XX_AMUX_LINE_IN
,
1166 .gpio
= hauppauge_wintv_hvr_900_analog
,
1169 [EM2880_BOARD_TERRATEC_HYBRID_XS
] = {
1170 .name
= "Terratec Hybrid XS",
1171 .tuner_type
= TUNER_XC2028
,
1172 .tuner_gpio
= default_tuner_gpio
,
1173 .decoder
= EM28XX_TVP5150
,
1175 .dvb_gpio
= default_digital
,
1176 .ir_codes
= RC_MAP_TERRATEC_CINERGY_XS
,
1177 .xclk
= EM28XX_XCLK_FREQUENCY_12MHZ
, /* NEC IR */
1179 .type
= EM28XX_VMUX_TELEVISION
,
1180 .vmux
= TVP5150_COMPOSITE0
,
1181 .amux
= EM28XX_AMUX_VIDEO
,
1182 .gpio
= default_analog
,
1184 .type
= EM28XX_VMUX_COMPOSITE1
,
1185 .vmux
= TVP5150_COMPOSITE1
,
1186 .amux
= EM28XX_AMUX_LINE_IN
,
1187 .gpio
= default_analog
,
1189 .type
= EM28XX_VMUX_SVIDEO
,
1190 .vmux
= TVP5150_SVIDEO
,
1191 .amux
= EM28XX_AMUX_LINE_IN
,
1192 .gpio
= default_analog
,
1195 /* maybe there's a reason behind it why Terratec sells the Hybrid XS
1196 as Prodigy XS with a different PID, let's keep it separated for now
1197 maybe we'll need it lateron */
1198 [EM2880_BOARD_TERRATEC_PRODIGY_XS
] = {
1199 .name
= "Terratec Prodigy XS",
1200 .tuner_type
= TUNER_XC2028
,
1201 .tuner_gpio
= default_tuner_gpio
,
1202 .decoder
= EM28XX_TVP5150
,
1204 .type
= EM28XX_VMUX_TELEVISION
,
1205 .vmux
= TVP5150_COMPOSITE0
,
1206 .amux
= EM28XX_AMUX_VIDEO
,
1207 .gpio
= hauppauge_wintv_hvr_900_analog
,
1209 .type
= EM28XX_VMUX_COMPOSITE1
,
1210 .vmux
= TVP5150_COMPOSITE1
,
1211 .amux
= EM28XX_AMUX_LINE_IN
,
1212 .gpio
= hauppauge_wintv_hvr_900_analog
,
1214 .type
= EM28XX_VMUX_SVIDEO
,
1215 .vmux
= TVP5150_SVIDEO
,
1216 .amux
= EM28XX_AMUX_LINE_IN
,
1217 .gpio
= hauppauge_wintv_hvr_900_analog
,
1220 [EM2820_BOARD_MSI_VOX_USB_2
] = {
1221 .name
= "MSI VOX USB 2.0",
1222 .tuner_type
= TUNER_LG_PAL_NEW_TAPC
,
1223 .tda9887_conf
= TDA9887_PRESENT
|
1224 TDA9887_PORT1_ACTIVE
|
1225 TDA9887_PORT2_ACTIVE
,
1226 .max_range_640_480
= 1,
1227 .decoder
= EM28XX_SAA711X
,
1229 .type
= EM28XX_VMUX_TELEVISION
,
1230 .vmux
= SAA7115_COMPOSITE4
,
1231 .amux
= EM28XX_AMUX_VIDEO
,
1233 .type
= EM28XX_VMUX_COMPOSITE1
,
1234 .vmux
= SAA7115_COMPOSITE0
,
1235 .amux
= EM28XX_AMUX_LINE_IN
,
1237 .type
= EM28XX_VMUX_SVIDEO
,
1238 .vmux
= SAA7115_SVIDEO3
,
1239 .amux
= EM28XX_AMUX_LINE_IN
,
1242 [EM2800_BOARD_TERRATEC_CINERGY_200
] = {
1243 .name
= "Terratec Cinergy 200 USB",
1246 .tuner_type
= TUNER_LG_TALN
,
1247 .tda9887_conf
= TDA9887_PRESENT
,
1248 .decoder
= EM28XX_SAA711X
,
1250 .type
= EM28XX_VMUX_TELEVISION
,
1251 .vmux
= SAA7115_COMPOSITE2
,
1252 .amux
= EM28XX_AMUX_VIDEO
,
1254 .type
= EM28XX_VMUX_COMPOSITE1
,
1255 .vmux
= SAA7115_COMPOSITE0
,
1256 .amux
= EM28XX_AMUX_LINE_IN
,
1258 .type
= EM28XX_VMUX_SVIDEO
,
1259 .vmux
= SAA7115_SVIDEO3
,
1260 .amux
= EM28XX_AMUX_LINE_IN
,
1263 [EM2800_BOARD_GRABBEEX_USB2800
] = {
1264 .name
= "eMPIA Technology, Inc. GrabBeeX+ Video Encoder",
1266 .decoder
= EM28XX_SAA711X
,
1267 .tuner_type
= TUNER_ABSENT
, /* capture only board */
1269 .type
= EM28XX_VMUX_COMPOSITE1
,
1270 .vmux
= SAA7115_COMPOSITE0
,
1271 .amux
= EM28XX_AMUX_LINE_IN
,
1273 .type
= EM28XX_VMUX_SVIDEO
,
1274 .vmux
= SAA7115_SVIDEO3
,
1275 .amux
= EM28XX_AMUX_LINE_IN
,
1278 [EM2800_BOARD_VC211A
] = {
1279 .name
= "Actionmaster/LinXcel/Digitus VC211A",
1281 .tuner_type
= TUNER_ABSENT
, /* Capture-only board */
1282 .decoder
= EM28XX_SAA711X
,
1284 .type
= EM28XX_VMUX_COMPOSITE1
,
1285 .vmux
= SAA7115_COMPOSITE0
,
1286 .amux
= EM28XX_AMUX_LINE_IN
,
1287 .gpio
= vc211a_enable
,
1289 .type
= EM28XX_VMUX_SVIDEO
,
1290 .vmux
= SAA7115_SVIDEO3
,
1291 .amux
= EM28XX_AMUX_LINE_IN
,
1292 .gpio
= vc211a_enable
,
1295 [EM2800_BOARD_LEADTEK_WINFAST_USBII
] = {
1296 .name
= "Leadtek Winfast USB II",
1298 .tuner_type
= TUNER_LG_PAL_NEW_TAPC
,
1299 .tda9887_conf
= TDA9887_PRESENT
,
1300 .decoder
= EM28XX_SAA711X
,
1302 .type
= EM28XX_VMUX_TELEVISION
,
1303 .vmux
= SAA7115_COMPOSITE2
,
1304 .amux
= EM28XX_AMUX_VIDEO
,
1306 .type
= EM28XX_VMUX_COMPOSITE1
,
1307 .vmux
= SAA7115_COMPOSITE0
,
1308 .amux
= EM28XX_AMUX_LINE_IN
,
1310 .type
= EM28XX_VMUX_SVIDEO
,
1311 .vmux
= SAA7115_SVIDEO3
,
1312 .amux
= EM28XX_AMUX_LINE_IN
,
1315 [EM2800_BOARD_KWORLD_USB2800
] = {
1316 .name
= "Kworld USB2800",
1318 .tuner_type
= TUNER_PHILIPS_FCV1236D
,
1319 .tda9887_conf
= TDA9887_PRESENT
,
1320 .decoder
= EM28XX_SAA711X
,
1322 .type
= EM28XX_VMUX_TELEVISION
,
1323 .vmux
= SAA7115_COMPOSITE2
,
1324 .amux
= EM28XX_AMUX_VIDEO
,
1326 .type
= EM28XX_VMUX_COMPOSITE1
,
1327 .vmux
= SAA7115_COMPOSITE0
,
1328 .amux
= EM28XX_AMUX_LINE_IN
,
1330 .type
= EM28XX_VMUX_SVIDEO
,
1331 .vmux
= SAA7115_SVIDEO3
,
1332 .amux
= EM28XX_AMUX_LINE_IN
,
1335 [EM2820_BOARD_PINNACLE_DVC_90
] = {
1336 .name
= "Pinnacle Dazzle DVC 90/100/101/107 / Kaiser Baas Video to DVD maker "
1337 "/ Kworld DVD Maker 2 / Plextor ConvertX PX-AV100U",
1338 .tuner_type
= TUNER_ABSENT
, /* capture only board */
1339 .decoder
= EM28XX_SAA711X
,
1341 .type
= EM28XX_VMUX_COMPOSITE1
,
1342 .vmux
= SAA7115_COMPOSITE0
,
1343 .amux
= EM28XX_AMUX_LINE_IN
,
1345 .type
= EM28XX_VMUX_SVIDEO
,
1346 .vmux
= SAA7115_SVIDEO3
,
1347 .amux
= EM28XX_AMUX_LINE_IN
,
1350 [EM2800_BOARD_VGEAR_POCKETTV
] = {
1351 .name
= "V-Gear PocketTV",
1353 .tuner_type
= TUNER_LG_PAL_NEW_TAPC
,
1354 .tda9887_conf
= TDA9887_PRESENT
,
1355 .decoder
= EM28XX_SAA711X
,
1357 .type
= EM28XX_VMUX_TELEVISION
,
1358 .vmux
= SAA7115_COMPOSITE2
,
1359 .amux
= EM28XX_AMUX_VIDEO
,
1361 .type
= EM28XX_VMUX_COMPOSITE1
,
1362 .vmux
= SAA7115_COMPOSITE0
,
1363 .amux
= EM28XX_AMUX_LINE_IN
,
1365 .type
= EM28XX_VMUX_SVIDEO
,
1366 .vmux
= SAA7115_SVIDEO3
,
1367 .amux
= EM28XX_AMUX_LINE_IN
,
1370 [EM2820_BOARD_PROLINK_PLAYTV_BOX4_USB2
] = {
1371 .name
= "Pixelview PlayTV Box 4 USB 2.0",
1372 .tda9887_conf
= TDA9887_PRESENT
,
1373 .tuner_type
= TUNER_YMEC_TVF_5533MF
,
1374 .decoder
= EM28XX_SAA711X
,
1376 .type
= EM28XX_VMUX_TELEVISION
,
1377 .vmux
= SAA7115_COMPOSITE2
,
1378 .amux
= EM28XX_AMUX_VIDEO
,
1379 .aout
= EM28XX_AOUT_MONO
| /* I2S */
1380 EM28XX_AOUT_MASTER
, /* Line out pin */
1382 .type
= EM28XX_VMUX_COMPOSITE1
,
1383 .vmux
= SAA7115_COMPOSITE0
,
1384 .amux
= EM28XX_AMUX_LINE_IN
,
1386 .type
= EM28XX_VMUX_SVIDEO
,
1387 .vmux
= SAA7115_SVIDEO3
,
1388 .amux
= EM28XX_AMUX_LINE_IN
,
1391 [EM2820_BOARD_PROLINK_PLAYTV_USB2
] = {
1392 .name
= "SIIG AVTuner-PVR / Pixelview Prolink PlayTV USB 2.0",
1393 .has_snapshot_button
= 1,
1394 .tda9887_conf
= TDA9887_PRESENT
,
1395 .tuner_type
= TUNER_YMEC_TVF_5533MF
,
1396 .decoder
= EM28XX_SAA711X
,
1398 .type
= EM28XX_VMUX_TELEVISION
,
1399 .vmux
= SAA7115_COMPOSITE2
,
1400 .amux
= EM28XX_AMUX_VIDEO
,
1401 .aout
= EM28XX_AOUT_MONO
| /* I2S */
1402 EM28XX_AOUT_MASTER
, /* Line out pin */
1404 .type
= EM28XX_VMUX_COMPOSITE1
,
1405 .vmux
= SAA7115_COMPOSITE0
,
1406 .amux
= EM28XX_AMUX_LINE_IN
,
1408 .type
= EM28XX_VMUX_SVIDEO
,
1409 .vmux
= SAA7115_SVIDEO3
,
1410 .amux
= EM28XX_AMUX_LINE_IN
,
1413 [EM2860_BOARD_SAA711X_REFERENCE_DESIGN
] = {
1414 .name
= "EM2860/SAA711X Reference Design",
1415 .has_snapshot_button
= 1,
1416 .tuner_type
= TUNER_ABSENT
,
1417 .decoder
= EM28XX_SAA711X
,
1419 .type
= EM28XX_VMUX_SVIDEO
,
1420 .vmux
= SAA7115_SVIDEO3
,
1422 .type
= EM28XX_VMUX_COMPOSITE1
,
1423 .vmux
= SAA7115_COMPOSITE0
,
1427 [EM2874_BOARD_LEADERSHIP_ISDBT
] = {
1429 .i2c_speed
= EM28XX_I2C_CLK_WAIT_ENABLE
|
1430 EM28XX_I2C_FREQ_100_KHZ
,
1431 .xclk
= EM28XX_XCLK_FREQUENCY_10MHZ
,
1432 .name
= "EM2874 Leadership ISDBT",
1433 .tuner_type
= TUNER_ABSENT
,
1434 .tuner_gpio
= leadership_reset
,
1435 .dvb_gpio
= leadership_digital
,
1439 [EM2880_BOARD_MSI_DIGIVOX_AD
] = {
1440 .name
= "MSI DigiVox A/D",
1441 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
1442 .tuner_type
= TUNER_XC2028
,
1443 .tuner_gpio
= default_tuner_gpio
,
1444 .decoder
= EM28XX_TVP5150
,
1446 .type
= EM28XX_VMUX_TELEVISION
,
1447 .vmux
= TVP5150_COMPOSITE0
,
1448 .amux
= EM28XX_AMUX_VIDEO
,
1449 .gpio
= em2880_msi_digivox_ad_analog
,
1451 .type
= EM28XX_VMUX_COMPOSITE1
,
1452 .vmux
= TVP5150_COMPOSITE1
,
1453 .amux
= EM28XX_AMUX_LINE_IN
,
1454 .gpio
= em2880_msi_digivox_ad_analog
,
1456 .type
= EM28XX_VMUX_SVIDEO
,
1457 .vmux
= TVP5150_SVIDEO
,
1458 .amux
= EM28XX_AMUX_LINE_IN
,
1459 .gpio
= em2880_msi_digivox_ad_analog
,
1462 [EM2880_BOARD_MSI_DIGIVOX_AD_II
] = {
1463 .name
= "MSI DigiVox A/D II",
1464 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
1465 .tuner_type
= TUNER_XC2028
,
1466 .tuner_gpio
= default_tuner_gpio
,
1467 .decoder
= EM28XX_TVP5150
,
1469 .type
= EM28XX_VMUX_TELEVISION
,
1470 .vmux
= TVP5150_COMPOSITE0
,
1471 .amux
= EM28XX_AMUX_VIDEO
,
1472 .gpio
= em2880_msi_digivox_ad_analog
,
1474 .type
= EM28XX_VMUX_COMPOSITE1
,
1475 .vmux
= TVP5150_COMPOSITE1
,
1476 .amux
= EM28XX_AMUX_LINE_IN
,
1477 .gpio
= em2880_msi_digivox_ad_analog
,
1479 .type
= EM28XX_VMUX_SVIDEO
,
1480 .vmux
= TVP5150_SVIDEO
,
1481 .amux
= EM28XX_AMUX_LINE_IN
,
1482 .gpio
= em2880_msi_digivox_ad_analog
,
1485 [EM2880_BOARD_KWORLD_DVB_305U
] = {
1486 .name
= "KWorld DVB-T 305U",
1487 .tuner_type
= TUNER_XC2028
,
1488 .tuner_gpio
= default_tuner_gpio
,
1489 .decoder
= EM28XX_TVP5150
,
1491 .type
= EM28XX_VMUX_TELEVISION
,
1492 .vmux
= TVP5150_COMPOSITE0
,
1493 .amux
= EM28XX_AMUX_VIDEO
,
1495 .type
= EM28XX_VMUX_COMPOSITE1
,
1496 .vmux
= TVP5150_COMPOSITE1
,
1497 .amux
= EM28XX_AMUX_LINE_IN
,
1499 .type
= EM28XX_VMUX_SVIDEO
,
1500 .vmux
= TVP5150_SVIDEO
,
1501 .amux
= EM28XX_AMUX_LINE_IN
,
1504 [EM2880_BOARD_KWORLD_DVB_310U
] = {
1505 .name
= "KWorld DVB-T 310U",
1506 .tuner_type
= TUNER_XC2028
,
1507 .tuner_gpio
= default_tuner_gpio
,
1509 .dvb_gpio
= default_digital
,
1511 .decoder
= EM28XX_TVP5150
,
1513 .type
= EM28XX_VMUX_TELEVISION
,
1514 .vmux
= TVP5150_COMPOSITE0
,
1515 .amux
= EM28XX_AMUX_VIDEO
,
1516 .gpio
= default_analog
,
1518 .type
= EM28XX_VMUX_COMPOSITE1
,
1519 .vmux
= TVP5150_COMPOSITE1
,
1520 .amux
= EM28XX_AMUX_LINE_IN
,
1521 .gpio
= default_analog
,
1522 }, { /* S-video has not been tested yet */
1523 .type
= EM28XX_VMUX_SVIDEO
,
1524 .vmux
= TVP5150_SVIDEO
,
1525 .amux
= EM28XX_AMUX_LINE_IN
,
1526 .gpio
= default_analog
,
1529 [EM2882_BOARD_KWORLD_ATSC_315U
] = {
1530 .name
= "KWorld ATSC 315U HDTV TV Box",
1531 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
1532 .tuner_type
= TUNER_THOMSON_DTT761X
,
1533 .tuner_gpio
= em2882_kworld_315u_tuner_gpio
,
1534 .tda9887_conf
= TDA9887_PRESENT
,
1535 .decoder
= EM28XX_SAA711X
,
1537 .dvb_gpio
= em2882_kworld_315u_digital
,
1538 .ir_codes
= RC_MAP_KWORLD_315U
,
1539 .xclk
= EM28XX_XCLK_FREQUENCY_12MHZ
,
1540 .i2c_speed
= EM28XX_I2C_CLK_WAIT_ENABLE
,
1541 /* Analog mode - still not ready */
1543 .type = EM28XX_VMUX_TELEVISION,
1544 .vmux = SAA7115_COMPOSITE2,
1545 .amux = EM28XX_AMUX_VIDEO,
1546 .gpio = em2882_kworld_315u_analog,
1547 .aout = EM28XX_AOUT_PCM_IN | EM28XX_AOUT_PCM_STEREO,
1549 .type = EM28XX_VMUX_COMPOSITE1,
1550 .vmux = SAA7115_COMPOSITE0,
1551 .amux = EM28XX_AMUX_LINE_IN,
1552 .gpio = em2882_kworld_315u_analog1,
1553 .aout = EM28XX_AOUT_PCM_IN | EM28XX_AOUT_PCM_STEREO,
1555 .type = EM28XX_VMUX_SVIDEO,
1556 .vmux = SAA7115_SVIDEO3,
1557 .amux = EM28XX_AMUX_LINE_IN,
1558 .gpio = em2882_kworld_315u_analog1,
1559 .aout = EM28XX_AOUT_PCM_IN | EM28XX_AOUT_PCM_STEREO,
1562 [EM2880_BOARD_EMPIRE_DUAL_TV
] = {
1563 .name
= "Empire dual TV",
1564 .tuner_type
= TUNER_XC2028
,
1565 .tuner_gpio
= default_tuner_gpio
,
1567 .dvb_gpio
= default_digital
,
1569 .decoder
= EM28XX_TVP5150
,
1571 .type
= EM28XX_VMUX_TELEVISION
,
1572 .vmux
= TVP5150_COMPOSITE0
,
1573 .amux
= EM28XX_AMUX_VIDEO
,
1574 .gpio
= default_analog
,
1576 .type
= EM28XX_VMUX_COMPOSITE1
,
1577 .vmux
= TVP5150_COMPOSITE1
,
1578 .amux
= EM28XX_AMUX_LINE_IN
,
1579 .gpio
= default_analog
,
1581 .type
= EM28XX_VMUX_SVIDEO
,
1582 .vmux
= TVP5150_SVIDEO
,
1583 .amux
= EM28XX_AMUX_LINE_IN
,
1584 .gpio
= default_analog
,
1587 [EM2881_BOARD_DNT_DA2_HYBRID
] = {
1588 .name
= "DNT DA2 Hybrid",
1589 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
1590 .tuner_type
= TUNER_XC2028
,
1591 .tuner_gpio
= default_tuner_gpio
,
1592 .decoder
= EM28XX_TVP5150
,
1594 .type
= EM28XX_VMUX_TELEVISION
,
1595 .vmux
= TVP5150_COMPOSITE0
,
1596 .amux
= EM28XX_AMUX_VIDEO
,
1597 .gpio
= default_analog
,
1599 .type
= EM28XX_VMUX_COMPOSITE1
,
1600 .vmux
= TVP5150_COMPOSITE1
,
1601 .amux
= EM28XX_AMUX_LINE_IN
,
1602 .gpio
= default_analog
,
1604 .type
= EM28XX_VMUX_SVIDEO
,
1605 .vmux
= TVP5150_SVIDEO
,
1606 .amux
= EM28XX_AMUX_LINE_IN
,
1607 .gpio
= default_analog
,
1610 [EM2881_BOARD_PINNACLE_HYBRID_PRO
] = {
1611 .name
= "Pinnacle Hybrid Pro",
1612 .tuner_type
= TUNER_XC2028
,
1613 .tuner_gpio
= default_tuner_gpio
,
1614 .decoder
= EM28XX_TVP5150
,
1616 .dvb_gpio
= pinnacle_hybrid_pro_digital
,
1618 .type
= EM28XX_VMUX_TELEVISION
,
1619 .vmux
= TVP5150_COMPOSITE0
,
1620 .amux
= EM28XX_AMUX_VIDEO
,
1621 .gpio
= pinnacle_hybrid_pro_analog
,
1623 .type
= EM28XX_VMUX_COMPOSITE1
,
1624 .vmux
= TVP5150_COMPOSITE1
,
1625 .amux
= EM28XX_AMUX_LINE_IN
,
1626 .gpio
= pinnacle_hybrid_pro_analog
,
1628 .type
= EM28XX_VMUX_SVIDEO
,
1629 .vmux
= TVP5150_SVIDEO
,
1630 .amux
= EM28XX_AMUX_LINE_IN
,
1631 .gpio
= pinnacle_hybrid_pro_analog
,
1634 [EM2882_BOARD_PINNACLE_HYBRID_PRO_330E
] = {
1635 .name
= "Pinnacle Hybrid Pro (330e)",
1636 .tuner_type
= TUNER_XC2028
,
1637 .tuner_gpio
= default_tuner_gpio
,
1640 .dvb_gpio
= hauppauge_wintv_hvr_900R2_digital
,
1641 .ir_codes
= RC_MAP_PINNACLE_PCTV_HD
,
1642 .decoder
= EM28XX_TVP5150
,
1644 .type
= EM28XX_VMUX_TELEVISION
,
1645 .vmux
= TVP5150_COMPOSITE0
,
1646 .amux
= EM28XX_AMUX_VIDEO
,
1647 .gpio
= hauppauge_wintv_hvr_900_analog
,
1649 .type
= EM28XX_VMUX_COMPOSITE1
,
1650 .vmux
= TVP5150_COMPOSITE1
,
1651 .amux
= EM28XX_AMUX_LINE_IN
,
1652 .gpio
= hauppauge_wintv_hvr_900_analog
,
1654 .type
= EM28XX_VMUX_SVIDEO
,
1655 .vmux
= TVP5150_SVIDEO
,
1656 .amux
= EM28XX_AMUX_LINE_IN
,
1657 .gpio
= hauppauge_wintv_hvr_900_analog
,
1660 [EM2882_BOARD_KWORLD_VS_DVBT
] = {
1661 .name
= "Kworld VS-DVB-T 323UR",
1662 .tuner_type
= TUNER_XC2028
,
1663 .tuner_gpio
= default_tuner_gpio
,
1664 .decoder
= EM28XX_TVP5150
,
1667 .dvb_gpio
= kworld_330u_digital
,
1668 .xclk
= EM28XX_XCLK_FREQUENCY_12MHZ
, /* NEC IR */
1669 .ir_codes
= RC_MAP_KWORLD_315U
,
1671 .type
= EM28XX_VMUX_TELEVISION
,
1672 .vmux
= TVP5150_COMPOSITE0
,
1673 .amux
= EM28XX_AMUX_VIDEO
,
1675 .type
= EM28XX_VMUX_COMPOSITE1
,
1676 .vmux
= TVP5150_COMPOSITE1
,
1677 .amux
= EM28XX_AMUX_LINE_IN
,
1679 .type
= EM28XX_VMUX_SVIDEO
,
1680 .vmux
= TVP5150_SVIDEO
,
1681 .amux
= EM28XX_AMUX_LINE_IN
,
1684 [EM2882_BOARD_TERRATEC_HYBRID_XS
] = {
1685 .name
= "Terratec Cinnergy Hybrid T USB XS (em2882)",
1686 .tuner_type
= TUNER_XC2028
,
1687 .tuner_gpio
= default_tuner_gpio
,
1689 .decoder
= EM28XX_TVP5150
,
1691 .dvb_gpio
= hauppauge_wintv_hvr_900_digital
,
1692 .ir_codes
= RC_MAP_TERRATEC_CINERGY_XS
,
1693 .xclk
= EM28XX_XCLK_FREQUENCY_12MHZ
,
1695 .type
= EM28XX_VMUX_TELEVISION
,
1696 .vmux
= TVP5150_COMPOSITE0
,
1697 .amux
= EM28XX_AMUX_VIDEO
,
1698 .gpio
= hauppauge_wintv_hvr_900_analog
,
1700 .type
= EM28XX_VMUX_COMPOSITE1
,
1701 .vmux
= TVP5150_COMPOSITE1
,
1702 .amux
= EM28XX_AMUX_LINE_IN
,
1703 .gpio
= hauppauge_wintv_hvr_900_analog
,
1705 .type
= EM28XX_VMUX_SVIDEO
,
1706 .vmux
= TVP5150_SVIDEO
,
1707 .amux
= EM28XX_AMUX_LINE_IN
,
1708 .gpio
= hauppauge_wintv_hvr_900_analog
,
1711 [EM2882_BOARD_DIKOM_DK300
] = {
1712 .name
= "Dikom DK300",
1713 .tuner_type
= TUNER_XC2028
,
1714 .tuner_gpio
= default_tuner_gpio
,
1715 .decoder
= EM28XX_TVP5150
,
1718 .dvb_gpio
= dikom_dk300_digital
,
1720 .type
= EM28XX_VMUX_TELEVISION
,
1721 .vmux
= TVP5150_COMPOSITE0
,
1722 .amux
= EM28XX_AMUX_VIDEO
,
1723 .gpio
= default_analog
,
1726 [EM2883_BOARD_KWORLD_HYBRID_330U
] = {
1727 .name
= "Kworld PlusTV HD Hybrid 330",
1728 .tuner_type
= TUNER_XC2028
,
1729 .tuner_gpio
= default_tuner_gpio
,
1730 .decoder
= EM28XX_TVP5150
,
1733 .dvb_gpio
= kworld_330u_digital
,
1734 .xclk
= EM28XX_XCLK_FREQUENCY_12MHZ
,
1735 .i2c_speed
= EM28XX_I2C_CLK_WAIT_ENABLE
|
1736 EM28XX_I2C_EEPROM_ON_BOARD
|
1737 EM28XX_I2C_EEPROM_KEY_VALID
,
1739 .type
= EM28XX_VMUX_TELEVISION
,
1740 .vmux
= TVP5150_COMPOSITE0
,
1741 .amux
= EM28XX_AMUX_VIDEO
,
1742 .gpio
= kworld_330u_analog
,
1743 .aout
= EM28XX_AOUT_PCM_IN
| EM28XX_AOUT_PCM_STEREO
,
1745 .type
= EM28XX_VMUX_COMPOSITE1
,
1746 .vmux
= TVP5150_COMPOSITE1
,
1747 .amux
= EM28XX_AMUX_LINE_IN
,
1748 .gpio
= kworld_330u_analog
,
1749 .aout
= EM28XX_AOUT_PCM_IN
| EM28XX_AOUT_PCM_STEREO
,
1751 .type
= EM28XX_VMUX_SVIDEO
,
1752 .vmux
= TVP5150_SVIDEO
,
1753 .amux
= EM28XX_AMUX_LINE_IN
,
1754 .gpio
= kworld_330u_analog
,
1757 [EM2820_BOARD_COMPRO_VIDEOMATE_FORYOU
] = {
1758 .name
= "Compro VideoMate ForYou/Stereo",
1759 .tuner_type
= TUNER_LG_PAL_NEW_TAPC
,
1760 .tvaudio_addr
= 0xb0,
1761 .tda9887_conf
= TDA9887_PRESENT
,
1762 .decoder
= EM28XX_TVP5150
,
1763 .adecoder
= EM28XX_TVAUDIO
,
1764 .mute_gpio
= compro_mute_gpio
,
1766 .type
= EM28XX_VMUX_TELEVISION
,
1767 .vmux
= TVP5150_COMPOSITE0
,
1768 .amux
= EM28XX_AMUX_VIDEO
,
1769 .gpio
= compro_unmute_tv_gpio
,
1771 .type
= EM28XX_VMUX_SVIDEO
,
1772 .vmux
= TVP5150_SVIDEO
,
1773 .amux
= EM28XX_AMUX_LINE_IN
,
1774 .gpio
= compro_unmute_svid_gpio
,
1777 [EM2860_BOARD_KAIOMY_TVNPC_U2
] = {
1778 .name
= "Kaiomy TVnPC U2",
1780 .tuner_type
= TUNER_XC2028
,
1783 .decoder
= EM28XX_TVP5150
,
1784 .tuner_gpio
= default_tuner_gpio
,
1785 .ir_codes
= RC_MAP_KAIOMY
,
1787 .type
= EM28XX_VMUX_TELEVISION
,
1788 .vmux
= TVP5150_COMPOSITE0
,
1789 .amux
= EM28XX_AMUX_VIDEO
,
1792 .type
= EM28XX_VMUX_COMPOSITE1
,
1793 .vmux
= TVP5150_COMPOSITE1
,
1794 .amux
= EM28XX_AMUX_LINE_IN
,
1796 .type
= EM28XX_VMUX_SVIDEO
,
1797 .vmux
= TVP5150_SVIDEO
,
1798 .amux
= EM28XX_AMUX_LINE_IN
,
1801 .type
= EM28XX_RADIO
,
1802 .amux
= EM28XX_AMUX_LINE_IN
,
1805 [EM2860_BOARD_EASYCAP
] = {
1806 .name
= "Easy Cap Capture DC-60",
1808 .tuner_type
= TUNER_ABSENT
,
1809 .decoder
= EM28XX_SAA711X
,
1811 .type
= EM28XX_VMUX_COMPOSITE1
,
1812 .vmux
= SAA7115_COMPOSITE0
,
1813 .amux
= EM28XX_AMUX_LINE_IN
,
1815 .type
= EM28XX_VMUX_SVIDEO
,
1816 .vmux
= SAA7115_SVIDEO3
,
1817 .amux
= EM28XX_AMUX_LINE_IN
,
1820 [EM2820_BOARD_IODATA_GVMVP_SZ
] = {
1821 .name
= "IO-DATA GV-MVP/SZ",
1822 .tuner_type
= TUNER_PHILIPS_FM1236_MK3
,
1823 .tuner_gpio
= default_tuner_gpio
,
1824 .tda9887_conf
= TDA9887_PRESENT
,
1825 .decoder
= EM28XX_TVP5150
,
1827 .type
= EM28XX_VMUX_TELEVISION
,
1828 .vmux
= TVP5150_COMPOSITE0
,
1829 .amux
= EM28XX_AMUX_VIDEO
,
1830 }, { /* Composite has not been tested yet */
1831 .type
= EM28XX_VMUX_COMPOSITE1
,
1832 .vmux
= TVP5150_COMPOSITE1
,
1833 .amux
= EM28XX_AMUX_VIDEO
,
1834 }, { /* S-video has not been tested yet */
1835 .type
= EM28XX_VMUX_SVIDEO
,
1836 .vmux
= TVP5150_SVIDEO
,
1837 .amux
= EM28XX_AMUX_VIDEO
,
1840 [EM2860_BOARD_TERRATEC_GRABBY
] = {
1841 .name
= "Terratec Grabby",
1843 .tuner_type
= TUNER_ABSENT
,
1844 .decoder
= EM28XX_SAA711X
,
1845 .xclk
= EM28XX_XCLK_FREQUENCY_12MHZ
,
1847 .type
= EM28XX_VMUX_COMPOSITE1
,
1848 .vmux
= SAA7115_COMPOSITE0
,
1849 .amux
= EM28XX_AMUX_LINE_IN
,
1851 .type
= EM28XX_VMUX_SVIDEO
,
1852 .vmux
= SAA7115_SVIDEO3
,
1853 .amux
= EM28XX_AMUX_LINE_IN
,
1856 [EM2860_BOARD_TERRATEC_AV350
] = {
1857 .name
= "Terratec AV350",
1859 .tuner_type
= TUNER_ABSENT
,
1860 .decoder
= EM28XX_TVP5150
,
1861 .xclk
= EM28XX_XCLK_FREQUENCY_12MHZ
,
1862 .mute_gpio
= terratec_av350_mute_gpio
,
1864 .type
= EM28XX_VMUX_COMPOSITE1
,
1865 .vmux
= TVP5150_COMPOSITE1
,
1866 .amux
= EM28XX_AUDIO_SRC_LINE
,
1867 .gpio
= terratec_av350_unmute_gpio
,
1870 .type
= EM28XX_VMUX_SVIDEO
,
1871 .vmux
= TVP5150_SVIDEO
,
1872 .amux
= EM28XX_AUDIO_SRC_LINE
,
1873 .gpio
= terratec_av350_unmute_gpio
,
1877 [EM2860_BOARD_ELGATO_VIDEO_CAPTURE
] = {
1878 .name
= "Elgato Video Capture",
1879 .decoder
= EM28XX_SAA711X
,
1880 .tuner_type
= TUNER_ABSENT
, /* Capture only device */
1882 .type
= EM28XX_VMUX_COMPOSITE1
,
1883 .vmux
= SAA7115_COMPOSITE0
,
1884 .amux
= EM28XX_AMUX_LINE_IN
,
1886 .type
= EM28XX_VMUX_SVIDEO
,
1887 .vmux
= SAA7115_SVIDEO3
,
1888 .amux
= EM28XX_AMUX_LINE_IN
,
1892 [EM2882_BOARD_EVGA_INDTUBE
] = {
1893 .name
= "Evga inDtube",
1894 .tuner_type
= TUNER_XC2028
,
1895 .tuner_gpio
= default_tuner_gpio
,
1896 .decoder
= EM28XX_TVP5150
,
1897 .xclk
= EM28XX_XCLK_FREQUENCY_12MHZ
, /* NEC IR */
1900 .dvb_gpio
= evga_indtube_digital
,
1901 .ir_codes
= RC_MAP_EVGA_INDTUBE
,
1903 .type
= EM28XX_VMUX_TELEVISION
,
1904 .vmux
= TVP5150_COMPOSITE0
,
1905 .amux
= EM28XX_AMUX_VIDEO
,
1906 .gpio
= evga_indtube_analog
,
1908 .type
= EM28XX_VMUX_COMPOSITE1
,
1909 .vmux
= TVP5150_COMPOSITE1
,
1910 .amux
= EM28XX_AMUX_LINE_IN
,
1911 .gpio
= evga_indtube_analog
,
1913 .type
= EM28XX_VMUX_SVIDEO
,
1914 .vmux
= TVP5150_SVIDEO
,
1915 .amux
= EM28XX_AMUX_LINE_IN
,
1916 .gpio
= evga_indtube_analog
,
1919 /* eb1a:2868 Empia EM2870 + Philips CU1216L NIM (Philips TDA10023 +
1920 Infineon TUA6034) */
1921 [EM2870_BOARD_REDDO_DVB_C_USB_BOX
] = {
1922 .name
= "Reddo DVB-C USB TV Box",
1923 .tuner_type
= TUNER_ABSENT
,
1924 .tuner_gpio
= reddo_dvb_c_usb_box
,
1927 /* 1b80:a340 - Empia EM2870, NXP TDA18271HD and LG DT3304, sold
1928 * initially as the KWorld PlusTV 340U, then as the UB435-Q.
1929 * Early variants have a TDA18271HD/C1, later ones a TDA18271HD/C2 */
1930 [EM2870_BOARD_KWORLD_A340
] = {
1931 .name
= "KWorld PlusTV 340U or UB435-Q (ATSC)",
1932 .tuner_type
= TUNER_ABSENT
, /* Digital-only TDA18271HD */
1934 .dvb_gpio
= kworld_a340_digital
,
1935 .tuner_gpio
= default_tuner_gpio
,
1937 /* 2013:024f PCTV nanoStick T2 290e.
1938 * Empia EM28174, Sony CXD2820R and NXP TDA18271HD/C2 */
1939 [EM28174_BOARD_PCTV_290E
] = {
1940 .name
= "PCTV nanoStick T2 290e",
1942 .i2c_speed
= EM28XX_I2C_CLK_WAIT_ENABLE
| EM28XX_I2C_FREQ_100_KHZ
,
1943 .tuner_type
= TUNER_ABSENT
,
1944 .tuner_gpio
= pctv_290e
,
1946 .ir_codes
= RC_MAP_PINNACLE_PCTV_HD
,
1948 /* 2013:024f PCTV DVB-S2 Stick 460e
1949 * Empia EM28174, NXP TDA10071, Conexant CX24118A and Allegro A8293 */
1950 [EM28174_BOARD_PCTV_460E
] = {
1952 .i2c_speed
= EM28XX_I2C_CLK_WAIT_ENABLE
| EM28XX_I2C_FREQ_400_KHZ
,
1953 .name
= "PCTV DVB-S2 Stick (460e)",
1954 .tuner_type
= TUNER_ABSENT
,
1955 .tuner_gpio
= pctv_460e
,
1957 .ir_codes
= RC_MAP_PINNACLE_PCTV_HD
,
1959 /* eb1a:5006 Honestech VIDBOX NW03
1960 * Empia EM2860, Philips SAA7113, Empia EMP202, No Tuner */
1961 [EM2860_BOARD_HT_VIDBOX_NW03
] = {
1962 .name
= "Honestech Vidbox NW03",
1963 .tuner_type
= TUNER_ABSENT
,
1964 .decoder
= EM28XX_SAA711X
,
1966 .type
= EM28XX_VMUX_COMPOSITE1
,
1967 .vmux
= SAA7115_COMPOSITE0
,
1968 .amux
= EM28XX_AMUX_LINE_IN
,
1970 .type
= EM28XX_VMUX_SVIDEO
,
1971 .vmux
= SAA7115_SVIDEO3
, /* S-VIDEO needs confirming */
1972 .amux
= EM28XX_AMUX_LINE_IN
,
1975 /* 1b80:e425 MaxMedia UB425-TC
1976 * Empia EM2874B + Micronas DRX 3913KA2 + NXP TDA18271HDC2 */
1977 [EM2874_BOARD_MAXMEDIA_UB425_TC
] = {
1978 .name
= "MaxMedia UB425-TC",
1979 .tuner_type
= TUNER_ABSENT
,
1980 .tuner_gpio
= maxmedia_ub425_tc
,
1982 .ir_codes
= RC_MAP_REDDO
,
1984 .i2c_speed
= EM28XX_I2C_CLK_WAIT_ENABLE
|
1985 EM28XX_I2C_FREQ_400_KHZ
,
1987 /* 2304:0242 PCTV QuatroStick (510e)
1988 * Empia EM2884 + Micronas DRX 3926K + NXP TDA18271HDC2 */
1989 [EM2884_BOARD_PCTV_510E
] = {
1990 .name
= "PCTV QuatroStick (510e)",
1991 .tuner_type
= TUNER_ABSENT
,
1992 .tuner_gpio
= pctv_510e
,
1994 .ir_codes
= RC_MAP_PINNACLE_PCTV_HD
,
1996 .i2c_speed
= EM28XX_I2C_CLK_WAIT_ENABLE
|
1997 EM28XX_I2C_FREQ_400_KHZ
,
1999 /* 2013:0251 PCTV QuatroStick nano (520e)
2000 * Empia EM2884 + Micronas DRX 3926K + NXP TDA18271HDC2 */
2001 [EM2884_BOARD_PCTV_520E
] = {
2002 .name
= "PCTV QuatroStick nano (520e)",
2003 .tuner_type
= TUNER_ABSENT
,
2004 .tuner_gpio
= pctv_520e
,
2006 .ir_codes
= RC_MAP_PINNACLE_PCTV_HD
,
2008 .i2c_speed
= EM28XX_I2C_CLK_WAIT_ENABLE
|
2009 EM28XX_I2C_FREQ_400_KHZ
,
2011 [EM2884_BOARD_TERRATEC_HTC_USB_XS
] = {
2012 .name
= "Terratec Cinergy HTC USB XS",
2014 .ir_codes
= RC_MAP_NEC_TERRATEC_CINERGY_XS
,
2015 .tuner_type
= TUNER_ABSENT
,
2017 .i2c_speed
= EM28XX_I2C_CLK_WAIT_ENABLE
|
2018 EM28XX_I2C_FREQ_400_KHZ
,
2020 /* 1b80:e1cc Delock 61959
2021 * Empia EM2874B + Micronas DRX 3913KA2 + NXP TDA18271HDC2
2022 * mostly the same as MaxMedia UB-425-TC but different remote */
2023 [EM2874_BOARD_DELOCK_61959
] = {
2024 .name
= "Delock 61959",
2025 .tuner_type
= TUNER_ABSENT
,
2026 .tuner_gpio
= maxmedia_ub425_tc
,
2028 .ir_codes
= RC_MAP_DELOCK_61959
,
2030 .i2c_speed
= EM28XX_I2C_CLK_WAIT_ENABLE
|
2031 EM28XX_I2C_FREQ_400_KHZ
,
2034 const unsigned int em28xx_bcount
= ARRAY_SIZE(em28xx_boards
);
2036 /* table of devices that work with this driver */
2037 struct usb_device_id em28xx_id_table
[] = {
2038 { USB_DEVICE(0xeb1a, 0x2750),
2039 .driver_info
= EM2750_BOARD_UNKNOWN
},
2040 { USB_DEVICE(0xeb1a, 0x2751),
2041 .driver_info
= EM2750_BOARD_UNKNOWN
},
2042 { USB_DEVICE(0xeb1a, 0x2800),
2043 .driver_info
= EM2800_BOARD_UNKNOWN
},
2044 { USB_DEVICE(0xeb1a, 0x2710),
2045 .driver_info
= EM2820_BOARD_UNKNOWN
},
2046 { USB_DEVICE(0xeb1a, 0x2820),
2047 .driver_info
= EM2820_BOARD_UNKNOWN
},
2048 { USB_DEVICE(0xeb1a, 0x2821),
2049 .driver_info
= EM2820_BOARD_UNKNOWN
},
2050 { USB_DEVICE(0xeb1a, 0x2860),
2051 .driver_info
= EM2820_BOARD_UNKNOWN
},
2052 { USB_DEVICE(0xeb1a, 0x2861),
2053 .driver_info
= EM2820_BOARD_UNKNOWN
},
2054 { USB_DEVICE(0xeb1a, 0x2862),
2055 .driver_info
= EM2820_BOARD_UNKNOWN
},
2056 { USB_DEVICE(0xeb1a, 0x2863),
2057 .driver_info
= EM2820_BOARD_UNKNOWN
},
2058 { USB_DEVICE(0xeb1a, 0x2870),
2059 .driver_info
= EM2820_BOARD_UNKNOWN
},
2060 { USB_DEVICE(0xeb1a, 0x2881),
2061 .driver_info
= EM2820_BOARD_UNKNOWN
},
2062 { USB_DEVICE(0xeb1a, 0x2883),
2063 .driver_info
= EM2820_BOARD_UNKNOWN
},
2064 { USB_DEVICE(0xeb1a, 0x2868),
2065 .driver_info
= EM2820_BOARD_UNKNOWN
},
2066 { USB_DEVICE(0xeb1a, 0x2875),
2067 .driver_info
= EM2820_BOARD_UNKNOWN
},
2068 { USB_DEVICE(0xeb1a, 0xe300),
2069 .driver_info
= EM2861_BOARD_KWORLD_PVRTV_300U
},
2070 { USB_DEVICE(0xeb1a, 0xe303),
2071 .driver_info
= EM2860_BOARD_KAIOMY_TVNPC_U2
},
2072 { USB_DEVICE(0xeb1a, 0xe305),
2073 .driver_info
= EM2880_BOARD_KWORLD_DVB_305U
},
2074 { USB_DEVICE(0xeb1a, 0xe310),
2075 .driver_info
= EM2880_BOARD_MSI_DIGIVOX_AD
},
2076 { USB_DEVICE(0xeb1a, 0xa313),
2077 .driver_info
= EM2882_BOARD_KWORLD_ATSC_315U
},
2078 { USB_DEVICE(0xeb1a, 0xa316),
2079 .driver_info
= EM2883_BOARD_KWORLD_HYBRID_330U
},
2080 { USB_DEVICE(0xeb1a, 0xe320),
2081 .driver_info
= EM2880_BOARD_MSI_DIGIVOX_AD_II
},
2082 { USB_DEVICE(0xeb1a, 0xe323),
2083 .driver_info
= EM2882_BOARD_KWORLD_VS_DVBT
},
2084 { USB_DEVICE(0xeb1a, 0xe350),
2085 .driver_info
= EM2870_BOARD_KWORLD_350U
},
2086 { USB_DEVICE(0xeb1a, 0xe355),
2087 .driver_info
= EM2870_BOARD_KWORLD_355U
},
2088 { USB_DEVICE(0xeb1a, 0x2801),
2089 .driver_info
= EM2800_BOARD_GRABBEEX_USB2800
},
2090 { USB_DEVICE(0xeb1a, 0xe357),
2091 .driver_info
= EM2870_BOARD_KWORLD_355U
},
2092 { USB_DEVICE(0xeb1a, 0xe359),
2093 .driver_info
= EM2870_BOARD_KWORLD_355U
},
2094 { USB_DEVICE(0x1b80, 0xe302),
2095 .driver_info
= EM2820_BOARD_PINNACLE_DVC_90
}, /* Kaiser Baas Video to DVD maker */
2096 { USB_DEVICE(0x1b80, 0xe304),
2097 .driver_info
= EM2820_BOARD_PINNACLE_DVC_90
}, /* Kworld DVD Maker 2 */
2098 { USB_DEVICE(0x0ccd, 0x0036),
2099 .driver_info
= EM2820_BOARD_TERRATEC_CINERGY_250
},
2100 { USB_DEVICE(0x0ccd, 0x004c),
2101 .driver_info
= EM2880_BOARD_TERRATEC_HYBRID_XS_FR
},
2102 { USB_DEVICE(0x0ccd, 0x004f),
2103 .driver_info
= EM2860_BOARD_TERRATEC_HYBRID_XS
},
2104 { USB_DEVICE(0x0ccd, 0x005e),
2105 .driver_info
= EM2882_BOARD_TERRATEC_HYBRID_XS
},
2106 { USB_DEVICE(0x0ccd, 0x0042),
2107 .driver_info
= EM2882_BOARD_TERRATEC_HYBRID_XS
},
2108 { USB_DEVICE(0x0ccd, 0x0043),
2109 .driver_info
= EM2870_BOARD_TERRATEC_XS
},
2110 { USB_DEVICE(0x0ccd, 0x008e), /* Cinergy HTC USB XS Rev. 1 */
2111 .driver_info
= EM2884_BOARD_TERRATEC_HTC_USB_XS
},
2112 { USB_DEVICE(0x0ccd, 0x00ac), /* Cinergy HTC USB XS Rev. 2 */
2113 .driver_info
= EM2884_BOARD_TERRATEC_HTC_USB_XS
},
2114 { USB_DEVICE(0x0ccd, 0x10a2), /* H5 Rev. 1 */
2115 .driver_info
= EM2884_BOARD_TERRATEC_H5
},
2116 { USB_DEVICE(0x0ccd, 0x10ad), /* H5 Rev. 2 */
2117 .driver_info
= EM2884_BOARD_TERRATEC_H5
},
2118 { USB_DEVICE(0x0ccd, 0x10b6), /* H5 Rev. 3 */
2119 .driver_info
= EM2884_BOARD_TERRATEC_H5
},
2120 { USB_DEVICE(0x0ccd, 0x0084),
2121 .driver_info
= EM2860_BOARD_TERRATEC_AV350
},
2122 { USB_DEVICE(0x0ccd, 0x0096),
2123 .driver_info
= EM2860_BOARD_TERRATEC_GRABBY
},
2124 { USB_DEVICE(0x0ccd, 0x10AF),
2125 .driver_info
= EM2860_BOARD_TERRATEC_GRABBY
},
2126 { USB_DEVICE(0x0ccd, 0x00b2),
2127 .driver_info
= EM2884_BOARD_CINERGY_HTC_STICK
},
2128 { USB_DEVICE(0x0fd9, 0x0033),
2129 .driver_info
= EM2860_BOARD_ELGATO_VIDEO_CAPTURE
},
2130 { USB_DEVICE(0x185b, 0x2870),
2131 .driver_info
= EM2870_BOARD_COMPRO_VIDEOMATE
},
2132 { USB_DEVICE(0x185b, 0x2041),
2133 .driver_info
= EM2820_BOARD_COMPRO_VIDEOMATE_FORYOU
},
2134 { USB_DEVICE(0x2040, 0x4200),
2135 .driver_info
= EM2820_BOARD_HAUPPAUGE_WINTV_USB_2
},
2136 { USB_DEVICE(0x2040, 0x4201),
2137 .driver_info
= EM2820_BOARD_HAUPPAUGE_WINTV_USB_2
},
2138 { USB_DEVICE(0x2040, 0x6500),
2139 .driver_info
= EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900
},
2140 { USB_DEVICE(0x2040, 0x6502),
2141 .driver_info
= EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2
},
2142 { USB_DEVICE(0x2040, 0x6513), /* HCW HVR-980 */
2143 .driver_info
= EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950
},
2144 { USB_DEVICE(0x2040, 0x6517), /* HP HVR-950 */
2145 .driver_info
= EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950
},
2146 { USB_DEVICE(0x2040, 0x651b), /* RP HVR-950 */
2147 .driver_info
= EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950
},
2148 { USB_DEVICE(0x2040, 0x651f),
2149 .driver_info
= EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850
},
2150 { USB_DEVICE(0x0438, 0xb002),
2151 .driver_info
= EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600
},
2152 { USB_DEVICE(0x2001, 0xf112),
2153 .driver_info
= EM2820_BOARD_DLINK_USB_TV
},
2154 { USB_DEVICE(0x2304, 0x0207),
2155 .driver_info
= EM2820_BOARD_PINNACLE_DVC_90
},
2156 { USB_DEVICE(0x2304, 0x0208),
2157 .driver_info
= EM2820_BOARD_PINNACLE_USB_2
},
2158 { USB_DEVICE(0x2304, 0x021a),
2159 .driver_info
= EM2820_BOARD_PINNACLE_DVC_90
},
2160 { USB_DEVICE(0x2304, 0x0226),
2161 .driver_info
= EM2882_BOARD_PINNACLE_HYBRID_PRO_330E
},
2162 { USB_DEVICE(0x2304, 0x0227),
2163 .driver_info
= EM2880_BOARD_PINNACLE_PCTV_HD_PRO
},
2164 { USB_DEVICE(0x0413, 0x6023),
2165 .driver_info
= EM2800_BOARD_LEADTEK_WINFAST_USBII
},
2166 { USB_DEVICE(0x093b, 0xa003),
2167 .driver_info
= EM2820_BOARD_PINNACLE_DVC_90
},
2168 { USB_DEVICE(0x093b, 0xa005),
2169 .driver_info
= EM2861_BOARD_PLEXTOR_PX_TV100U
},
2170 { USB_DEVICE(0x04bb, 0x0515),
2171 .driver_info
= EM2820_BOARD_IODATA_GVMVP_SZ
},
2172 { USB_DEVICE(0xeb1a, 0x50a6),
2173 .driver_info
= EM2860_BOARD_GADMEI_UTV330
},
2174 { USB_DEVICE(0x1b80, 0xa340),
2175 .driver_info
= EM2870_BOARD_KWORLD_A340
},
2176 { USB_DEVICE(0x2013, 0x024f),
2177 .driver_info
= EM28174_BOARD_PCTV_290E
},
2178 { USB_DEVICE(0x2013, 0x024c),
2179 .driver_info
= EM28174_BOARD_PCTV_460E
},
2180 { USB_DEVICE(0x2040, 0x1605),
2181 .driver_info
= EM2884_BOARD_HAUPPAUGE_WINTV_HVR_930C
},
2182 { USB_DEVICE(0x1b80, 0xe755),
2183 .driver_info
= EM2884_BOARD_C3TECH_DIGITAL_DUO
},
2184 { USB_DEVICE(0xeb1a, 0x5006),
2185 .driver_info
= EM2860_BOARD_HT_VIDBOX_NW03
},
2186 { USB_DEVICE(0x1b80, 0xe309), /* Sveon STV40 */
2187 .driver_info
= EM2860_BOARD_EASYCAP
},
2188 { USB_DEVICE(0x1b80, 0xe425),
2189 .driver_info
= EM2874_BOARD_MAXMEDIA_UB425_TC
},
2190 { USB_DEVICE(0x2304, 0x0242),
2191 .driver_info
= EM2884_BOARD_PCTV_510E
},
2192 { USB_DEVICE(0x2013, 0x0251),
2193 .driver_info
= EM2884_BOARD_PCTV_520E
},
2194 { USB_DEVICE(0x1b80, 0xe1cc),
2195 .driver_info
= EM2874_BOARD_DELOCK_61959
},
2198 MODULE_DEVICE_TABLE(usb
, em28xx_id_table
);
2201 * EEPROM hash table for devices with generic USB IDs
2203 static struct em28xx_hash_table em28xx_eeprom_hash
[] = {
2204 /* P/N: SA 60002070465 Tuner: TVF7533-MF */
2205 {0x6ce05a8f, EM2820_BOARD_PROLINK_PLAYTV_USB2
, TUNER_YMEC_TVF_5533MF
},
2206 {0x72cc5a8b, EM2820_BOARD_PROLINK_PLAYTV_BOX4_USB2
, TUNER_YMEC_TVF_5533MF
},
2207 {0x966a0441, EM2880_BOARD_KWORLD_DVB_310U
, TUNER_XC2028
},
2208 {0x166a0441, EM2880_BOARD_EMPIRE_DUAL_TV
, TUNER_XC2028
},
2209 {0xcee44a99, EM2882_BOARD_EVGA_INDTUBE
, TUNER_XC2028
},
2210 {0xb8846b20, EM2881_BOARD_PINNACLE_HYBRID_PRO
, TUNER_XC2028
},
2211 {0x63f653bd, EM2870_BOARD_REDDO_DVB_C_USB_BOX
, TUNER_ABSENT
},
2212 {0x4e913442, EM2882_BOARD_DIKOM_DK300
, TUNER_XC2028
},
2215 /* I2C devicelist hash table for devices with generic USB IDs */
2216 static struct em28xx_hash_table em28xx_i2c_hash
[] = {
2217 {0xb06a32c3, EM2800_BOARD_TERRATEC_CINERGY_200
, TUNER_LG_PAL_NEW_TAPC
},
2218 {0xf51200e3, EM2800_BOARD_VGEAR_POCKETTV
, TUNER_LG_PAL_NEW_TAPC
},
2219 {0x1ba50080, EM2860_BOARD_SAA711X_REFERENCE_DESIGN
, TUNER_ABSENT
},
2220 {0x77800080, EM2860_BOARD_TVP5150_REFERENCE_DESIGN
, TUNER_ABSENT
},
2221 {0xc51200e3, EM2820_BOARD_GADMEI_TVR200
, TUNER_LG_PAL_NEW_TAPC
},
2222 {0x4ba50080, EM2861_BOARD_GADMEI_UTV330PLUS
, TUNER_TNF_5335MF
},
2223 {0x6b800080, EM2874_BOARD_LEADERSHIP_ISDBT
, TUNER_ABSENT
},
2225 /* NOTE: introduce a separate hash table for devices with 16 bit eeproms */
2227 /* I2C possible address to saa7115, tvp5150, msp3400, tvaudio */
2228 static unsigned short saa711x_addrs
[] = {
2229 0x4a >> 1, 0x48 >> 1, /* SAA7111, SAA7111A and SAA7113 */
2230 0x42 >> 1, 0x40 >> 1, /* SAA7114, SAA7115 and SAA7118 */
2233 static unsigned short tvp5150_addrs
[] = {
2239 static unsigned short msp3400_addrs
[] = {
2245 int em28xx_tuner_callback(void *ptr
, int component
, int command
, int arg
)
2247 struct em28xx_i2c_bus
*i2c_bus
= ptr
;
2248 struct em28xx
*dev
= i2c_bus
->dev
;
2251 if (dev
->tuner_type
!= TUNER_XC2028
&& dev
->tuner_type
!= TUNER_XC5000
)
2254 if (command
!= XC2028_TUNER_RESET
&& command
!= XC5000_TUNER_RESET
)
2257 rc
= em28xx_gpio_set(dev
, dev
->board
.tuner_gpio
);
2261 EXPORT_SYMBOL_GPL(em28xx_tuner_callback
);
2263 static inline void em28xx_set_model(struct em28xx
*dev
)
2265 dev
->board
= em28xx_boards
[dev
->model
];
2267 /* Those are the default values for the majority of boards
2268 Use those values if not specified otherwise at boards entry
2270 if (!dev
->board
.xclk
)
2271 dev
->board
.xclk
= EM28XX_XCLK_IR_RC5_MODE
|
2272 EM28XX_XCLK_FREQUENCY_12MHZ
;
2274 if (!dev
->board
.i2c_speed
)
2275 dev
->board
.i2c_speed
= EM28XX_I2C_CLK_WAIT_ENABLE
|
2276 EM28XX_I2C_FREQ_100_KHZ
;
2278 /* Should be initialized early, for I2C to work */
2279 dev
->def_i2c_bus
= dev
->board
.def_i2c_bus
;
2282 /* Since em28xx_pre_card_setup() requires a proper dev->model,
2283 * this won't work for boards with generic PCI IDs
2285 static void em28xx_pre_card_setup(struct em28xx
*dev
)
2287 /* Set the initial XCLK and I2C clock values based on the board
2289 em28xx_write_reg(dev
, EM28XX_R0F_XCLK
, dev
->board
.xclk
& 0x7f);
2290 if (!dev
->board
.is_em2800
)
2291 em28xx_write_reg(dev
, EM28XX_R06_I2C_CLK
, dev
->board
.i2c_speed
);
2294 /* request some modules */
2295 switch (dev
->model
) {
2296 case EM2861_BOARD_PLEXTOR_PX_TV100U
:
2297 /* Sets the msp34xx I2S speed */
2298 dev
->i2s_speed
= 2048000;
2300 case EM2861_BOARD_KWORLD_PVRTV_300U
:
2301 case EM2880_BOARD_KWORLD_DVB_305U
:
2302 em28xx_write_reg(dev
, EM2820_R08_GPIO_CTRL
, 0x6d);
2304 em28xx_write_reg(dev
, EM2820_R08_GPIO_CTRL
, 0x7d);
2307 case EM2870_BOARD_COMPRO_VIDEOMATE
:
2308 /* TODO: someone can do some cleanup here...
2309 not everything's needed */
2310 em28xx_write_reg(dev
, EM2880_R04_GPO
, 0x00);
2312 em28xx_write_reg(dev
, EM2880_R04_GPO
, 0x01);
2314 em28xx_write_reg(dev
, EM2820_R08_GPIO_CTRL
, 0xfd);
2316 em28xx_write_reg(dev
, EM2820_R08_GPIO_CTRL
, 0xfc);
2318 em28xx_write_reg(dev
, EM2820_R08_GPIO_CTRL
, 0xdc);
2320 em28xx_write_reg(dev
, EM2820_R08_GPIO_CTRL
, 0xfc);
2323 case EM2870_BOARD_TERRATEC_XS_MT2060
:
2324 /* this device needs some gpio writes to get the DVB-T
2326 em28xx_write_reg(dev
, EM2820_R08_GPIO_CTRL
, 0xfe);
2328 em28xx_write_reg(dev
, EM2820_R08_GPIO_CTRL
, 0xde);
2330 em28xx_write_reg(dev
, EM2820_R08_GPIO_CTRL
, 0xfe);
2333 case EM2870_BOARD_PINNACLE_PCTV_DVB
:
2334 /* this device needs some gpio writes to get the
2336 em28xx_write_reg(dev
, EM2820_R08_GPIO_CTRL
, 0xfe);
2338 em28xx_write_reg(dev
, EM2820_R08_GPIO_CTRL
, 0xde);
2340 em28xx_write_reg(dev
, EM2820_R08_GPIO_CTRL
, 0xfe);
2343 case EM2820_BOARD_GADMEI_UTV310
:
2344 case EM2820_BOARD_MSI_VOX_USB_2
:
2345 /* enables audio for that devices */
2346 em28xx_write_reg(dev
, EM2820_R08_GPIO_CTRL
, 0xfd);
2349 case EM2882_BOARD_KWORLD_ATSC_315U
:
2350 em28xx_write_reg(dev
, EM2820_R08_GPIO_CTRL
, 0xff);
2352 em28xx_write_reg(dev
, EM2820_R08_GPIO_CTRL
, 0xfe);
2354 em28xx_write_reg(dev
, EM2880_R04_GPO
, 0x00);
2356 em28xx_write_reg(dev
, EM2880_R04_GPO
, 0x08);
2360 case EM2860_BOARD_KAIOMY_TVNPC_U2
:
2361 em28xx_write_regs(dev
, EM28XX_R0F_XCLK
, "\x07", 1);
2362 em28xx_write_regs(dev
, EM28XX_R06_I2C_CLK
, "\x40", 1);
2363 em28xx_write_regs(dev
, 0x0d, "\x42", 1);
2364 em28xx_write_regs(dev
, 0x08, "\xfd", 1);
2366 em28xx_write_regs(dev
, 0x08, "\xff", 1);
2368 em28xx_write_regs(dev
, 0x08, "\x7f", 1);
2370 em28xx_write_regs(dev
, 0x08, "\x6b", 1);
2373 case EM2860_BOARD_EASYCAP
:
2374 em28xx_write_regs(dev
, 0x08, "\xf8", 1);
2377 case EM2820_BOARD_IODATA_GVMVP_SZ
:
2378 em28xx_write_reg(dev
, EM2820_R08_GPIO_CTRL
, 0xff);
2380 em28xx_write_reg(dev
, EM2820_R08_GPIO_CTRL
, 0xf7);
2382 em28xx_write_reg(dev
, EM2820_R08_GPIO_CTRL
, 0xfe);
2384 em28xx_write_reg(dev
, EM2820_R08_GPIO_CTRL
, 0xfd);
2389 em28xx_gpio_set(dev
, dev
->board
.tuner_gpio
);
2390 em28xx_set_mode(dev
, EM28XX_ANALOG_MODE
);
2393 em28xx_set_mode(dev
, EM28XX_SUSPEND
);
2396 static void em28xx_setup_xc3028(struct em28xx
*dev
, struct xc2028_ctrl
*ctl
)
2398 memset(ctl
, 0, sizeof(*ctl
));
2400 ctl
->fname
= XC2028_DEFAULT_FIRMWARE
;
2402 ctl
->mts
= em28xx_boards
[dev
->model
].mts_firmware
;
2404 switch (dev
->model
) {
2405 case EM2880_BOARD_EMPIRE_DUAL_TV
:
2406 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900
:
2407 case EM2882_BOARD_TERRATEC_HYBRID_XS
:
2408 ctl
->demod
= XC3028_FE_ZARLINK456
;
2410 case EM2880_BOARD_TERRATEC_HYBRID_XS
:
2411 case EM2880_BOARD_TERRATEC_HYBRID_XS_FR
:
2412 case EM2881_BOARD_PINNACLE_HYBRID_PRO
:
2413 ctl
->demod
= XC3028_FE_ZARLINK456
;
2415 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2
:
2416 case EM2882_BOARD_PINNACLE_HYBRID_PRO_330E
:
2417 ctl
->demod
= XC3028_FE_DEFAULT
;
2419 case EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600
:
2420 ctl
->demod
= XC3028_FE_DEFAULT
;
2421 ctl
->fname
= XC3028L_DEFAULT_FIRMWARE
;
2423 case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850
:
2424 case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950
:
2425 case EM2880_BOARD_PINNACLE_PCTV_HD_PRO
:
2426 /* FIXME: Better to specify the needed IF */
2427 ctl
->demod
= XC3028_FE_DEFAULT
;
2429 case EM2883_BOARD_KWORLD_HYBRID_330U
:
2430 case EM2882_BOARD_DIKOM_DK300
:
2431 case EM2882_BOARD_KWORLD_VS_DVBT
:
2432 ctl
->demod
= XC3028_FE_CHINA
;
2433 ctl
->fname
= XC2028_DEFAULT_FIRMWARE
;
2435 case EM2882_BOARD_EVGA_INDTUBE
:
2436 ctl
->demod
= XC3028_FE_CHINA
;
2437 ctl
->fname
= XC3028L_DEFAULT_FIRMWARE
;
2440 ctl
->demod
= XC3028_FE_OREN538
;
2444 static void em28xx_tuner_setup(struct em28xx
*dev
)
2446 struct tuner_setup tun_setup
;
2447 struct v4l2_frequency f
;
2449 if (dev
->tuner_type
== TUNER_ABSENT
)
2452 memset(&tun_setup
, 0, sizeof(tun_setup
));
2454 tun_setup
.mode_mask
= T_ANALOG_TV
| T_RADIO
;
2455 tun_setup
.tuner_callback
= em28xx_tuner_callback
;
2457 if (dev
->board
.radio
.type
) {
2458 tun_setup
.type
= dev
->board
.radio
.type
;
2459 tun_setup
.addr
= dev
->board
.radio_addr
;
2461 v4l2_device_call_all(&dev
->v4l2_dev
, 0, tuner
, s_type_addr
, &tun_setup
);
2464 if ((dev
->tuner_type
!= TUNER_ABSENT
) && (dev
->tuner_type
)) {
2465 tun_setup
.type
= dev
->tuner_type
;
2466 tun_setup
.addr
= dev
->tuner_addr
;
2468 v4l2_device_call_all(&dev
->v4l2_dev
, 0, tuner
, s_type_addr
, &tun_setup
);
2471 if (dev
->tda9887_conf
) {
2472 struct v4l2_priv_tun_config tda9887_cfg
;
2474 tda9887_cfg
.tuner
= TUNER_TDA9887
;
2475 tda9887_cfg
.priv
= &dev
->tda9887_conf
;
2477 v4l2_device_call_all(&dev
->v4l2_dev
, 0, tuner
, s_config
, &tda9887_cfg
);
2480 if (dev
->tuner_type
== TUNER_XC2028
) {
2481 struct v4l2_priv_tun_config xc2028_cfg
;
2482 struct xc2028_ctrl ctl
;
2484 memset(&xc2028_cfg
, 0, sizeof(xc2028_cfg
));
2485 memset(&ctl
, 0, sizeof(ctl
));
2487 em28xx_setup_xc3028(dev
, &ctl
);
2489 xc2028_cfg
.tuner
= TUNER_XC2028
;
2490 xc2028_cfg
.priv
= &ctl
;
2492 v4l2_device_call_all(&dev
->v4l2_dev
, 0, tuner
, s_config
, &xc2028_cfg
);
2495 /* configure tuner */
2497 f
.type
= V4L2_TUNER_ANALOG_TV
;
2498 f
.frequency
= 9076; /* just a magic number */
2499 dev
->ctl_freq
= f
.frequency
;
2500 v4l2_device_call_all(&dev
->v4l2_dev
, 0, tuner
, s_frequency
, &f
);
2503 static int em28xx_hint_board(struct em28xx
*dev
)
2507 if (dev
->board
.is_webcam
) {
2508 if (dev
->em28xx_sensor
== EM28XX_MT9V011
) {
2509 dev
->model
= EM2820_BOARD_SILVERCREST_WEBCAM
;
2510 } else if (dev
->em28xx_sensor
== EM28XX_MT9M001
||
2511 dev
->em28xx_sensor
== EM28XX_MT9M111
) {
2512 dev
->model
= EM2750_BOARD_UNKNOWN
;
2514 /* FIXME: IMPROVE ! */
2519 /* HINT method: EEPROM
2521 * This method works only for boards with eeprom.
2522 * Uses a hash of all eeprom bytes. The hash should be
2523 * unique for a vendor/tuner pair.
2524 * There are a high chance that tuners for different
2525 * video standards produce different hashes.
2527 for (i
= 0; i
< ARRAY_SIZE(em28xx_eeprom_hash
); i
++) {
2528 if (dev
->hash
== em28xx_eeprom_hash
[i
].hash
) {
2529 dev
->model
= em28xx_eeprom_hash
[i
].model
;
2530 dev
->tuner_type
= em28xx_eeprom_hash
[i
].tuner
;
2532 em28xx_errdev("Your board has no unique USB ID.\n");
2533 em28xx_errdev("A hint were successfully done, "
2534 "based on eeprom hash.\n");
2535 em28xx_errdev("This method is not 100%% failproof.\n");
2536 em28xx_errdev("If the board were missdetected, "
2537 "please email this log to:\n");
2538 em28xx_errdev("\tV4L Mailing List "
2539 " <linux-media@vger.kernel.org>\n");
2540 em28xx_errdev("Board detected as %s\n",
2541 em28xx_boards
[dev
->model
].name
);
2547 /* HINT method: I2C attached devices
2549 * This method works for all boards.
2550 * Uses a hash of i2c scanned devices.
2551 * Devices with the same i2c attached chips will
2552 * be considered equal.
2553 * This method is less precise than the eeprom one.
2556 /* user did not request i2c scanning => do it now */
2558 em28xx_do_i2c_scan(dev
, dev
->def_i2c_bus
);
2560 for (i
= 0; i
< ARRAY_SIZE(em28xx_i2c_hash
); i
++) {
2561 if (dev
->i2c_hash
== em28xx_i2c_hash
[i
].hash
) {
2562 dev
->model
= em28xx_i2c_hash
[i
].model
;
2563 dev
->tuner_type
= em28xx_i2c_hash
[i
].tuner
;
2564 em28xx_errdev("Your board has no unique USB ID.\n");
2565 em28xx_errdev("A hint were successfully done, "
2566 "based on i2c devicelist hash.\n");
2567 em28xx_errdev("This method is not 100%% failproof.\n");
2568 em28xx_errdev("If the board were missdetected, "
2569 "please email this log to:\n");
2570 em28xx_errdev("\tV4L Mailing List "
2571 " <linux-media@vger.kernel.org>\n");
2572 em28xx_errdev("Board detected as %s\n",
2573 em28xx_boards
[dev
->model
].name
);
2579 em28xx_errdev("Your board has no unique USB ID and thus need a "
2580 "hint to be detected.\n");
2581 em28xx_errdev("You may try to use card=<n> insmod option to "
2582 "workaround that.\n");
2583 em28xx_errdev("Please send an email with this log to:\n");
2584 em28xx_errdev("\tV4L Mailing List <linux-media@vger.kernel.org>\n");
2585 em28xx_errdev("Board eeprom hash is 0x%08lx\n", dev
->hash
);
2586 em28xx_errdev("Board i2c devicelist hash is 0x%08lx\n", dev
->i2c_hash
);
2588 em28xx_errdev("Here is a list of valid choices for the card=<n>"
2589 " insmod option:\n");
2590 for (i
= 0; i
< em28xx_bcount
; i
++) {
2591 em28xx_errdev(" card=%d -> %s\n",
2592 i
, em28xx_boards
[i
].name
);
2597 static void em28xx_card_setup(struct em28xx
*dev
)
2600 * If the device can be a webcam, seek for a sensor.
2601 * If sensor is not found, then it isn't a webcam.
2603 if (dev
->board
.is_webcam
) {
2604 if (em28xx_detect_sensor(dev
) < 0)
2605 dev
->board
.is_webcam
= 0;
2607 dev
->progressive
= 1;
2610 switch (dev
->model
) {
2611 case EM2750_BOARD_UNKNOWN
:
2612 case EM2820_BOARD_UNKNOWN
:
2613 case EM2800_BOARD_UNKNOWN
:
2615 * The K-WORLD DVB-T 310U is detected as an MSI Digivox AD.
2617 * This occurs because they share identical USB vendor and
2620 * What we do here is look up the EEPROM hash of the K-WORLD
2621 * and if it is found then we decide that we do not have
2622 * a DIGIVOX and reset the device to the K-WORLD instead.
2624 * This solution is only valid if they do not share eeprom
2625 * hash identities which has not been determined as yet.
2627 if (em28xx_hint_board(dev
) < 0)
2628 em28xx_errdev("Board not discovered\n");
2630 em28xx_set_model(dev
);
2631 em28xx_pre_card_setup(dev
);
2635 em28xx_set_model(dev
);
2638 em28xx_info("Identified as %s (card=%d)\n",
2639 dev
->board
.name
, dev
->model
);
2641 dev
->tuner_type
= em28xx_boards
[dev
->model
].tuner_type
;
2642 if (em28xx_boards
[dev
->model
].tuner_addr
)
2643 dev
->tuner_addr
= em28xx_boards
[dev
->model
].tuner_addr
;
2645 if (em28xx_boards
[dev
->model
].tda9887_conf
)
2646 dev
->tda9887_conf
= em28xx_boards
[dev
->model
].tda9887_conf
;
2648 /* request some modules */
2649 switch (dev
->model
) {
2650 case EM2820_BOARD_HAUPPAUGE_WINTV_USB_2
:
2651 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900
:
2652 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2
:
2653 case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850
:
2654 case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950
:
2655 case EM2884_BOARD_HAUPPAUGE_WINTV_HVR_930C
:
2659 if (dev
->eedata
== NULL
)
2661 #if defined(CONFIG_MODULES) && defined(MODULE)
2662 request_module("tveeprom");
2664 /* Call first TVeeprom */
2666 dev
->i2c_client
[dev
->def_i2c_bus
].addr
= 0xa0 >> 1;
2667 tveeprom_hauppauge_analog(&dev
->i2c_client
[dev
->def_i2c_bus
], &tv
, dev
->eedata
);
2669 dev
->tuner_type
= tv
.tuner_type
;
2671 if (tv
.audio_processor
== TVEEPROM_AUDPROC_MSP
) {
2672 dev
->i2s_speed
= 2048000;
2673 dev
->board
.has_msp34xx
= 1;
2677 case EM2882_BOARD_KWORLD_ATSC_315U
:
2678 em28xx_write_reg(dev
, 0x0d, 0x42);
2680 em28xx_write_reg(dev
, EM2820_R08_GPIO_CTRL
, 0xfd);
2683 case EM2820_BOARD_KWORLD_PVRTV2800RF
:
2684 /* GPIO enables sound on KWORLD PVR TV 2800RF */
2685 em28xx_write_reg(dev
, EM2820_R08_GPIO_CTRL
, 0xf9);
2687 case EM2820_BOARD_UNKNOWN
:
2688 case EM2800_BOARD_UNKNOWN
:
2690 * The K-WORLD DVB-T 310U is detected as an MSI Digivox AD.
2692 * This occurs because they share identical USB vendor and
2695 * What we do here is look up the EEPROM hash of the K-WORLD
2696 * and if it is found then we decide that we do not have
2697 * a DIGIVOX and reset the device to the K-WORLD instead.
2699 * This solution is only valid if they do not share eeprom
2700 * hash identities which has not been determined as yet.
2702 case EM2880_BOARD_MSI_DIGIVOX_AD
:
2703 if (!em28xx_hint_board(dev
))
2704 em28xx_set_model(dev
);
2706 /* In cases where we had to use a board hint, the call to
2707 em28xx_set_mode() in em28xx_pre_card_setup() was a no-op,
2708 so make the call now so the analog GPIOs are set properly
2709 before probing the i2c bus. */
2710 em28xx_gpio_set(dev
, dev
->board
.tuner_gpio
);
2711 em28xx_set_mode(dev
, EM28XX_ANALOG_MODE
);
2715 * The Dikom DK300 is detected as an Kworld VS-DVB-T 323UR.
2717 * This occurs because they share identical USB vendor and
2720 * What we do here is look up the EEPROM hash of the Dikom
2721 * and if it is found then we decide that we do not have
2722 * a Kworld and reset the device to the Dikom instead.
2724 * This solution is only valid if they do not share eeprom
2725 * hash identities which has not been determined as yet.
2727 case EM2882_BOARD_KWORLD_VS_DVBT
:
2728 if (!em28xx_hint_board(dev
))
2729 em28xx_set_model(dev
);
2731 /* In cases where we had to use a board hint, the call to
2732 em28xx_set_mode() in em28xx_pre_card_setup() was a no-op,
2733 so make the call now so the analog GPIOs are set properly
2734 before probing the i2c bus. */
2735 em28xx_gpio_set(dev
, dev
->board
.tuner_gpio
);
2736 em28xx_set_mode(dev
, EM28XX_ANALOG_MODE
);
2740 if (dev
->board
.valid
== EM28XX_BOARD_NOT_VALIDATED
) {
2741 em28xx_errdev("\n\n");
2742 em28xx_errdev("The support for this board weren't "
2744 em28xx_errdev("Please send a report of having this working\n");
2745 em28xx_errdev("not to V4L mailing list (and/or to other "
2749 /* Free eeprom data memory */
2753 /* Allow override tuner type by a module parameter */
2755 dev
->tuner_type
= tuner
;
2757 /* request some modules */
2758 if (dev
->board
.has_msp34xx
)
2759 v4l2_i2c_new_subdev(&dev
->v4l2_dev
, &dev
->i2c_adap
[dev
->def_i2c_bus
],
2760 "msp3400", 0, msp3400_addrs
);
2762 if (dev
->board
.decoder
== EM28XX_SAA711X
)
2763 v4l2_i2c_new_subdev(&dev
->v4l2_dev
, &dev
->i2c_adap
[dev
->def_i2c_bus
],
2764 "saa7115_auto", 0, saa711x_addrs
);
2766 if (dev
->board
.decoder
== EM28XX_TVP5150
)
2767 v4l2_i2c_new_subdev(&dev
->v4l2_dev
, &dev
->i2c_adap
[dev
->def_i2c_bus
],
2768 "tvp5150", 0, tvp5150_addrs
);
2770 if (dev
->board
.adecoder
== EM28XX_TVAUDIO
)
2771 v4l2_i2c_new_subdev(&dev
->v4l2_dev
, &dev
->i2c_adap
[dev
->def_i2c_bus
],
2772 "tvaudio", dev
->board
.tvaudio_addr
, NULL
);
2774 if (dev
->board
.tuner_type
!= TUNER_ABSENT
) {
2775 int has_demod
= (dev
->tda9887_conf
& TDA9887_PRESENT
);
2777 if (dev
->board
.radio
.type
)
2778 v4l2_i2c_new_subdev(&dev
->v4l2_dev
, &dev
->i2c_adap
[dev
->def_i2c_bus
],
2779 "tuner", dev
->board
.radio_addr
, NULL
);
2782 v4l2_i2c_new_subdev(&dev
->v4l2_dev
,
2783 &dev
->i2c_adap
[dev
->def_i2c_bus
], "tuner",
2784 0, v4l2_i2c_tuner_addrs(ADDRS_DEMOD
));
2785 if (dev
->tuner_addr
== 0) {
2786 enum v4l2_i2c_tuner_type type
=
2787 has_demod
? ADDRS_TV_WITH_DEMOD
: ADDRS_TV
;
2788 struct v4l2_subdev
*sd
;
2790 sd
= v4l2_i2c_new_subdev(&dev
->v4l2_dev
,
2791 &dev
->i2c_adap
[dev
->def_i2c_bus
], "tuner",
2792 0, v4l2_i2c_tuner_addrs(type
));
2795 dev
->tuner_addr
= v4l2_i2c_subdev_addr(sd
);
2797 v4l2_i2c_new_subdev(&dev
->v4l2_dev
, &dev
->i2c_adap
[dev
->def_i2c_bus
],
2798 "tuner", dev
->tuner_addr
, NULL
);
2802 em28xx_tuner_setup(dev
);
2804 em28xx_init_camera(dev
);
2808 static void request_module_async(struct work_struct
*work
)
2810 struct em28xx
*dev
= container_of(work
,
2811 struct em28xx
, request_module_wk
);
2814 * The em28xx extensions can be modules or builtin. If the
2815 * modules are already loaded or are built in, those extensions
2816 * can be initialised right now. Otherwise, the module init
2819 em28xx_init_extension(dev
);
2821 #if defined(CONFIG_MODULES) && defined(MODULE)
2822 if (dev
->has_audio_class
)
2823 request_module("snd-usb-audio");
2824 else if (dev
->has_alsa_audio
)
2825 request_module("em28xx-alsa");
2827 if (dev
->board
.has_dvb
)
2828 request_module("em28xx-dvb");
2829 if (dev
->board
.has_snapshot_button
||
2830 ((dev
->board
.ir_codes
|| dev
->board
.has_ir_i2c
) && !disable_ir
))
2831 request_module("em28xx-rc");
2832 #endif /* CONFIG_MODULES */
2835 static void request_modules(struct em28xx
*dev
)
2837 INIT_WORK(&dev
->request_module_wk
, request_module_async
);
2838 schedule_work(&dev
->request_module_wk
);
2841 static void flush_request_modules(struct em28xx
*dev
)
2843 flush_work(&dev
->request_module_wk
);
2847 * em28xx_release_resources()
2848 * unregisters the v4l2,i2c and usb devices
2849 * called when the device gets disconnected or at module unload
2851 void em28xx_release_resources(struct em28xx
*dev
)
2853 /*FIXME: I2C IR should be disconnected */
2855 em28xx_release_analog_resources(dev
);
2857 if (dev
->def_i2c_bus
)
2858 em28xx_i2c_unregister(dev
, 1);
2859 em28xx_i2c_unregister(dev
, 0);
2861 v4l2_ctrl_handler_free(&dev
->ctrl_handler
);
2863 v4l2_device_unregister(&dev
->v4l2_dev
);
2865 usb_put_dev(dev
->udev
);
2867 /* Mark device as unused */
2868 clear_bit(dev
->devno
, &em28xx_devused
);
2873 * allocates and inits the device structs, registers i2c bus and v4l device
2875 static int em28xx_init_dev(struct em28xx
*dev
, struct usb_device
*udev
,
2876 struct usb_interface
*interface
,
2879 struct v4l2_ctrl_handler
*hdl
= &dev
->ctrl_handler
;
2881 static const char *default_chip_name
= "em28xx";
2882 const char *chip_name
= default_chip_name
;
2885 mutex_init(&dev
->vb_queue_lock
);
2886 mutex_init(&dev
->vb_vbi_queue_lock
);
2887 mutex_init(&dev
->ctrl_urb_lock
);
2888 spin_lock_init(&dev
->slock
);
2890 dev
->em28xx_write_regs
= em28xx_write_regs
;
2891 dev
->em28xx_read_reg
= em28xx_read_reg
;
2892 dev
->em28xx_read_reg_req_len
= em28xx_read_reg_req_len
;
2893 dev
->em28xx_write_regs_req
= em28xx_write_regs_req
;
2894 dev
->em28xx_read_reg_req
= em28xx_read_reg_req
;
2895 dev
->board
.is_em2800
= em28xx_boards
[dev
->model
].is_em2800
;
2897 em28xx_set_model(dev
);
2899 dev
->wait_after_write
= 5;
2901 /* Based on the Chip ID, set the device configuration */
2902 retval
= em28xx_read_reg(dev
, EM28XX_R0A_CHIPID
);
2904 dev
->chip_id
= retval
;
2906 switch (dev
->chip_id
) {
2907 case CHIP_ID_EM2800
:
2908 chip_name
= "em2800";
2910 case CHIP_ID_EM2710
:
2911 chip_name
= "em2710";
2913 case CHIP_ID_EM2750
:
2914 chip_name
= "em2750";
2916 case CHIP_ID_EM2765
:
2917 chip_name
= "em2765";
2918 dev
->wait_after_write
= 0;
2920 dev
->eeprom_addrwidth_16bit
= 1;
2922 case CHIP_ID_EM2820
:
2923 chip_name
= "em2710/2820";
2924 if (le16_to_cpu(dev
->udev
->descriptor
.idVendor
)
2926 __le16 idProd
= dev
->udev
->descriptor
.idProduct
;
2927 if (le16_to_cpu(idProd
) == 0x2710)
2928 chip_name
= "em2710";
2929 else if (le16_to_cpu(idProd
) == 0x2820)
2930 chip_name
= "em2820";
2932 /* NOTE: the em2820 is used in webcams, too ! */
2934 case CHIP_ID_EM2840
:
2935 chip_name
= "em2840";
2937 case CHIP_ID_EM2860
:
2938 chip_name
= "em2860";
2940 case CHIP_ID_EM2870
:
2941 chip_name
= "em2870";
2942 dev
->wait_after_write
= 0;
2944 case CHIP_ID_EM2874
:
2945 chip_name
= "em2874";
2946 dev
->wait_after_write
= 0;
2947 dev
->eeprom_addrwidth_16bit
= 1;
2949 case CHIP_ID_EM28174
:
2950 chip_name
= "em28174";
2951 dev
->wait_after_write
= 0;
2952 dev
->eeprom_addrwidth_16bit
= 1;
2954 case CHIP_ID_EM2883
:
2955 chip_name
= "em2882/3";
2956 dev
->wait_after_write
= 0;
2958 case CHIP_ID_EM2884
:
2959 chip_name
= "em2884";
2960 dev
->wait_after_write
= 0;
2961 dev
->eeprom_addrwidth_16bit
= 1;
2964 printk(KERN_INFO DRIVER_NAME
2965 ": unknown em28xx chip ID (%d)\n", dev
->chip_id
);
2969 if (chip_name
!= default_chip_name
)
2970 printk(KERN_INFO DRIVER_NAME
2971 ": chip ID is %s\n", chip_name
);
2974 * For em2820/em2710, the name may change latter, after checking
2975 * if the device has a sensor (so, it is em2710) or not.
2977 snprintf(dev
->name
, sizeof(dev
->name
), "%s #%d", chip_name
, dev
->devno
);
2979 if (dev
->is_audio_only
) {
2980 retval
= em28xx_audio_setup(dev
);
2983 em28xx_init_extension(dev
);
2988 em28xx_pre_card_setup(dev
);
2990 if (!dev
->board
.is_em2800
) {
2991 /* Resets I2C speed */
2992 retval
= em28xx_write_reg(dev
, EM28XX_R06_I2C_CLK
, dev
->board
.i2c_speed
);
2994 em28xx_errdev("%s: em28xx_write_reg failed!"
3001 retval
= v4l2_device_register(&interface
->dev
, &dev
->v4l2_dev
);
3003 em28xx_errdev("Call to v4l2_device_register() failed!\n");
3007 v4l2_ctrl_handler_init(hdl
, 8);
3008 dev
->v4l2_dev
.ctrl_handler
= hdl
;
3010 rt_mutex_init(&dev
->i2c_bus_lock
);
3012 /* register i2c bus 0 */
3013 if (dev
->board
.is_em2800
)
3014 retval
= em28xx_i2c_register(dev
, 0, EM28XX_I2C_ALGO_EM2800
);
3016 retval
= em28xx_i2c_register(dev
, 0, EM28XX_I2C_ALGO_EM28XX
);
3018 em28xx_errdev("%s: em28xx_i2c_register bus 0 - error [%d]!\n",
3020 goto unregister_dev
;
3023 /* register i2c bus 1 */
3024 if (dev
->def_i2c_bus
) {
3026 retval
= em28xx_i2c_register(dev
, 1,
3027 EM28XX_I2C_ALGO_EM25XX_BUS_B
);
3029 retval
= em28xx_i2c_register(dev
, 1,
3030 EM28XX_I2C_ALGO_EM28XX
);
3032 em28xx_errdev("%s: em28xx_i2c_register bus 1 - error [%d]!\n",
3034 goto unregister_dev
;
3039 * Default format, used for tvp5150 or saa711x output formats
3041 dev
->vinmode
= 0x10;
3042 dev
->vinctl
= EM28XX_VINCTRL_INTERLACED
|
3043 EM28XX_VINCTRL_CCIR656_ENABLE
;
3045 /* Do board specific init and eeprom reading */
3046 em28xx_card_setup(dev
);
3048 /* Configure audio */
3049 retval
= em28xx_audio_setup(dev
);
3051 em28xx_errdev("%s: Error while setting audio - error [%d]!\n",
3055 if (dev
->audio_mode
.ac97
!= EM28XX_NO_AC97
) {
3056 v4l2_ctrl_new_std(hdl
, &em28xx_ctrl_ops
,
3057 V4L2_CID_AUDIO_MUTE
, 0, 1, 1, 1);
3058 v4l2_ctrl_new_std(hdl
, &em28xx_ctrl_ops
,
3059 V4L2_CID_AUDIO_VOLUME
, 0, 0x1f, 1, 0x1f);
3061 /* install the em28xx notify callback */
3062 v4l2_ctrl_notify(v4l2_ctrl_find(hdl
, V4L2_CID_AUDIO_MUTE
),
3063 em28xx_ctrl_notify
, dev
);
3064 v4l2_ctrl_notify(v4l2_ctrl_find(hdl
, V4L2_CID_AUDIO_VOLUME
),
3065 em28xx_ctrl_notify
, dev
);
3068 /* wake i2c devices */
3069 em28xx_wake_i2c(dev
);
3071 /* init video dma queues */
3072 INIT_LIST_HEAD(&dev
->vidq
.active
);
3073 INIT_LIST_HEAD(&dev
->vbiq
.active
);
3075 if (dev
->board
.has_msp34xx
) {
3076 /* Send a reset to other chips via gpio */
3077 retval
= em28xx_write_reg(dev
, EM2820_R08_GPIO_CTRL
, 0xf7);
3079 em28xx_errdev("%s: em28xx_write_reg - "
3080 "msp34xx(1) failed! error [%d]\n",
3086 retval
= em28xx_write_reg(dev
, EM2820_R08_GPIO_CTRL
, 0xff);
3088 em28xx_errdev("%s: em28xx_write_reg - "
3089 "msp34xx(2) failed! error [%d]\n",
3096 retval
= em28xx_register_analog_devices(dev
);
3101 /* Save some power by putting tuner to sleep */
3102 v4l2_device_call_all(&dev
->v4l2_dev
, 0, core
, s_power
, 0);
3107 if (dev
->def_i2c_bus
)
3108 em28xx_i2c_unregister(dev
, 1);
3109 em28xx_i2c_unregister(dev
, 0);
3110 v4l2_ctrl_handler_free(&dev
->ctrl_handler
);
3113 v4l2_device_unregister(&dev
->v4l2_dev
);
3118 /* high bandwidth multiplier, as encoded in highspeed endpoint descriptors */
3119 #define hb_mult(wMaxPacketSize) (1 + (((wMaxPacketSize) >> 11) & 0x03))
3122 * em28xx_usb_probe()
3123 * checks for supported devices
3125 static int em28xx_usb_probe(struct usb_interface
*interface
,
3126 const struct usb_device_id
*id
)
3128 struct usb_device
*udev
;
3129 struct em28xx
*dev
= NULL
;
3131 bool has_audio
= false, has_video
= false, has_dvb
= false;
3132 int i
, nr
, try_bulk
;
3133 const int ifnum
= interface
->altsetting
[0].desc
.bInterfaceNumber
;
3136 udev
= usb_get_dev(interface_to_usbdev(interface
));
3138 /* Check to see next free device and mark as used */
3140 nr
= find_first_zero_bit(&em28xx_devused
, EM28XX_MAXBOARDS
);
3141 if (nr
>= EM28XX_MAXBOARDS
) {
3142 /* No free device slots */
3143 printk(DRIVER_NAME
": Supports only %i em28xx boards.\n",
3148 } while (test_and_set_bit(nr
, &em28xx_devused
));
3150 /* Don't register audio interfaces */
3151 if (interface
->altsetting
[0].desc
.bInterfaceClass
== USB_CLASS_AUDIO
) {
3152 em28xx_err(DRIVER_NAME
" audio device (%04x:%04x): "
3153 "interface %i, class %i\n",
3154 le16_to_cpu(udev
->descriptor
.idVendor
),
3155 le16_to_cpu(udev
->descriptor
.idProduct
),
3157 interface
->altsetting
[0].desc
.bInterfaceClass
);
3163 /* allocate memory for our device state and initialize it */
3164 dev
= kzalloc(sizeof(*dev
), GFP_KERNEL
);
3166 em28xx_err(DRIVER_NAME
": out of memory!\n");
3171 /* compute alternate max packet sizes */
3172 dev
->alt_max_pkt_size_isoc
=
3173 kmalloc(sizeof(dev
->alt_max_pkt_size_isoc
[0]) *
3174 interface
->num_altsetting
, GFP_KERNEL
);
3175 if (dev
->alt_max_pkt_size_isoc
== NULL
) {
3176 em28xx_errdev("out of memory!\n");
3183 for (i
= 0; i
< interface
->num_altsetting
; i
++) {
3186 for (ep
= 0; ep
< interface
->altsetting
[i
].desc
.bNumEndpoints
; ep
++) {
3187 const struct usb_endpoint_descriptor
*e
;
3188 int sizedescr
, size
;
3190 e
= &interface
->altsetting
[i
].endpoint
[ep
].desc
;
3192 sizedescr
= le16_to_cpu(e
->wMaxPacketSize
);
3193 size
= sizedescr
& 0x7ff;
3195 if (udev
->speed
== USB_SPEED_HIGH
)
3196 size
= size
* hb_mult(sizedescr
);
3198 if (usb_endpoint_dir_in(e
)) {
3199 switch (e
->bEndpointAddress
) {
3202 if (usb_endpoint_xfer_isoc(e
)) {
3203 dev
->analog_ep_isoc
=
3204 e
->bEndpointAddress
;
3205 dev
->alt_max_pkt_size_isoc
[i
] = size
;
3206 } else if (usb_endpoint_xfer_bulk(e
)) {
3207 dev
->analog_ep_bulk
=
3208 e
->bEndpointAddress
;
3212 if (usb_endpoint_xfer_isoc(e
)) {
3215 printk(KERN_INFO DRIVER_NAME
3216 ": error: skipping audio endpoint 0x83, because it uses bulk transfers !\n");
3221 (usb_endpoint_xfer_bulk(e
))) {
3222 dev
->analog_ep_bulk
=
3223 e
->bEndpointAddress
;
3225 if (usb_endpoint_xfer_isoc(e
)) {
3226 if (size
> dev
->dvb_max_pkt_size_isoc
) {
3227 has_dvb
= true; /* see NOTE (~) */
3228 dev
->dvb_ep_isoc
= e
->bEndpointAddress
;
3229 dev
->dvb_max_pkt_size_isoc
= size
;
3230 dev
->dvb_alt_isoc
= i
;
3234 dev
->dvb_ep_bulk
= e
->bEndpointAddress
;
3241 * Old logic with support for isoc transfers only was:
3242 * 0x82 isoc => analog
3243 * 0x83 isoc => audio
3244 * 0x84 isoc => digital
3246 * New logic with support for bulk transfers
3247 * 0x82 isoc => analog
3248 * 0x82 bulk => analog
3249 * 0x83 isoc* => audio
3250 * 0x84 isoc => digital
3251 * 0x84 bulk => analog or digital**
3252 * (*: audio should always be isoc)
3253 * (**: analog, if ep 0x82 is isoc, otherwise digital)
3255 * The new logic preserves backwards compatibility and
3256 * reflects the endpoint configurations we have seen
3257 * so far. But there might be devices for which this
3258 * logic is not sufficient...
3261 * NOTE (~): some manufacturers (e.g. Terratec) disable
3262 * endpoints by setting wMaxPacketSize to 0 bytes for
3263 * all alt settings. So far, we've seen this for
3264 * DVB isoc endpoints only.
3269 if (!(has_audio
|| has_video
|| has_dvb
)) {
3274 switch (udev
->speed
) {
3278 case USB_SPEED_UNKNOWN
:
3279 case USB_SPEED_FULL
:
3282 case USB_SPEED_HIGH
:
3289 printk(KERN_INFO DRIVER_NAME
3290 ": New device %s %s @ %s Mbps "
3291 "(%04x:%04x, interface %d, class %d)\n",
3292 udev
->manufacturer
? udev
->manufacturer
: "",
3293 udev
->product
? udev
->product
: "",
3295 le16_to_cpu(udev
->descriptor
.idVendor
),
3296 le16_to_cpu(udev
->descriptor
.idProduct
),
3298 interface
->altsetting
->desc
.bInterfaceNumber
);
3301 * Make sure we have 480 Mbps of bandwidth, otherwise things like
3302 * video stream wouldn't likely work, since 12 Mbps is generally
3303 * not enough even for most Digital TV streams.
3305 if (udev
->speed
!= USB_SPEED_HIGH
&& disable_usb_speed_check
== 0) {
3306 printk(DRIVER_NAME
": Device initialization failed.\n");
3307 printk(DRIVER_NAME
": Device must be connected to a high-speed"
3308 " USB 2.0 port.\n");
3314 dev
->model
= id
->driver_info
;
3316 dev
->is_audio_only
= has_audio
&& !(has_video
|| has_dvb
);
3317 dev
->has_alsa_audio
= has_audio
;
3318 dev
->audio_ifnum
= ifnum
;
3320 /* Checks if audio is provided by some interface */
3321 for (i
= 0; i
< udev
->config
->desc
.bNumInterfaces
; i
++) {
3322 struct usb_interface
*uif
= udev
->config
->interface
[i
];
3323 if (uif
->altsetting
[0].desc
.bInterfaceClass
== USB_CLASS_AUDIO
) {
3324 dev
->has_audio_class
= 1;
3330 printk(KERN_INFO DRIVER_NAME
3331 ": Audio interface %i found %s\n",
3333 dev
->has_audio_class
? "(USB Audio Class)" : "(Vendor Class)");
3335 printk(KERN_INFO DRIVER_NAME
3336 ": Video interface %i found:%s%s\n",
3338 dev
->analog_ep_bulk
? " bulk" : "",
3339 dev
->analog_ep_isoc
? " isoc" : "");
3341 printk(KERN_INFO DRIVER_NAME
3342 ": DVB interface %i found:%s%s\n",
3344 dev
->dvb_ep_bulk
? " bulk" : "",
3345 dev
->dvb_ep_isoc
? " isoc" : "");
3347 dev
->num_alt
= interface
->num_altsetting
;
3349 if ((unsigned)card
[nr
] < em28xx_bcount
)
3350 dev
->model
= card
[nr
];
3352 /* save our data pointer in this interface device */
3353 usb_set_intfdata(interface
, dev
);
3355 /* initialize videobuf2 stuff */
3356 em28xx_vb2_setup(dev
);
3358 /* allocate device struct */
3359 mutex_init(&dev
->lock
);
3360 mutex_lock(&dev
->lock
);
3361 retval
= em28xx_init_dev(dev
, udev
, interface
, nr
);
3363 goto unlock_and_free
;
3366 if (usb_xfer_mode
< 0) {
3367 if (dev
->board
.is_webcam
)
3372 try_bulk
= usb_xfer_mode
> 0;
3375 /* Select USB transfer types to use */
3377 if (!dev
->analog_ep_isoc
|| (try_bulk
&& dev
->analog_ep_bulk
))
3378 dev
->analog_xfer_bulk
= 1;
3379 em28xx_info("analog set to %s mode.\n",
3380 dev
->analog_xfer_bulk
? "bulk" : "isoc");
3383 if (!dev
->dvb_ep_isoc
|| (try_bulk
&& dev
->dvb_ep_bulk
))
3384 dev
->dvb_xfer_bulk
= 1;
3386 em28xx_info("dvb set to %s mode.\n",
3387 dev
->dvb_xfer_bulk
? "bulk" : "isoc");
3389 /* pre-allocate DVB usb transfer buffers */
3390 if (dev
->dvb_xfer_bulk
) {
3391 retval
= em28xx_alloc_urbs(dev
, EM28XX_DIGITAL_MODE
,
3393 EM28XX_DVB_NUM_BUFS
,
3395 EM28XX_DVB_BULK_PACKET_MULTIPLIER
);
3397 retval
= em28xx_alloc_urbs(dev
, EM28XX_DIGITAL_MODE
,
3399 EM28XX_DVB_NUM_BUFS
,
3400 dev
->dvb_max_pkt_size_isoc
,
3401 EM28XX_DVB_NUM_ISOC_PACKETS
);
3405 ": Failed to pre-allocate USB transfer buffers for DVB.\n");
3406 goto unlock_and_free
;
3410 request_modules(dev
);
3412 /* Should be the last thing to do, to avoid newer udev's to
3413 open the device before fully initializing it
3415 mutex_unlock(&dev
->lock
);
3420 mutex_unlock(&dev
->lock
);
3423 kfree(dev
->alt_max_pkt_size_isoc
);
3427 clear_bit(nr
, &em28xx_devused
);
3435 * em28xx_usb_disconnect()
3436 * called when the device gets disconnected
3437 * video device will be unregistered on v4l2_close in case it is still open
3439 static void em28xx_usb_disconnect(struct usb_interface
*interface
)
3443 dev
= usb_get_intfdata(interface
);
3444 usb_set_intfdata(interface
, NULL
);
3449 dev
->disconnected
= 1;
3451 if (dev
->is_audio_only
) {
3452 mutex_lock(&dev
->lock
);
3453 em28xx_close_extension(dev
);
3454 mutex_unlock(&dev
->lock
);
3458 em28xx_info("disconnecting %s\n", dev
->vdev
->name
);
3460 flush_request_modules(dev
);
3462 mutex_lock(&dev
->lock
);
3464 v4l2_device_disconnect(&dev
->v4l2_dev
);
3467 em28xx_warn("device %s is open! Deregistration and memory deallocation are deferred on close.\n",
3468 video_device_node_name(dev
->vdev
));
3470 em28xx_uninit_usb_xfer(dev
, EM28XX_ANALOG_MODE
);
3471 em28xx_uninit_usb_xfer(dev
, EM28XX_DIGITAL_MODE
);
3474 em28xx_close_extension(dev
);
3475 /* NOTE: must be called BEFORE the resources are released */
3478 em28xx_release_resources(dev
);
3480 mutex_unlock(&dev
->lock
);
3483 kfree(dev
->alt_max_pkt_size_isoc
);
3488 static struct usb_driver em28xx_usb_driver
= {
3490 .probe
= em28xx_usb_probe
,
3491 .disconnect
= em28xx_usb_disconnect
,
3492 .id_table
= em28xx_id_table
,
3495 module_usb_driver(em28xx_usb_driver
);