1 // SPDX-License-Identifier: GPL-2.0+
3 // em28xx-cards.c - driver for Empia EM2800/EM2820/2840 USB
4 // video capture devices
6 // Copyright (C) 2005 Ludovico Cavedon <cavedon@sssup.it>
7 // Markus Rechberger <mrechberger@gmail.com>
8 // Mauro Carvalho Chehab <mchehab@kernel.org>
9 // Sascha Sommer <saschasommer@freenet.de>
10 // Copyright (C) 2012 Frank Schäfer <fschaefer.oss@googlemail.com>
14 #include <linux/init.h>
15 #include <linux/module.h>
16 #include <linux/slab.h>
17 #include <linux/delay.h>
18 #include <linux/i2c.h>
19 #include <linux/usb.h>
20 #include <media/tuner.h>
21 #include <media/drv-intf/msp3400.h>
22 #include <media/i2c/saa7115.h>
23 #include <dt-bindings/media/tvp5150.h>
24 #include <media/i2c/tvaudio.h>
25 #include <media/tveeprom.h>
26 #include <media/v4l2-common.h>
27 #include <sound/ac97_codec.h>
29 #define DRIVER_NAME "em28xx"
31 static int tuner
= -1;
32 module_param(tuner
, int, 0444);
33 MODULE_PARM_DESC(tuner
, "tuner type");
35 static unsigned int disable_ir
;
36 module_param(disable_ir
, int, 0444);
37 MODULE_PARM_DESC(disable_ir
, "disable infrared remote support");
39 static unsigned int disable_usb_speed_check
;
40 module_param(disable_usb_speed_check
, int, 0444);
41 MODULE_PARM_DESC(disable_usb_speed_check
,
42 "override min bandwidth requirement of 480M bps");
44 static unsigned int card
[] = {[0 ... (EM28XX_MAXBOARDS
- 1)] = -1U };
45 module_param_array(card
, int, NULL
, 0444);
46 MODULE_PARM_DESC(card
, "card type");
48 static int usb_xfer_mode
= -1;
49 module_param(usb_xfer_mode
, int, 0444);
50 MODULE_PARM_DESC(usb_xfer_mode
,
51 "USB transfer mode for frame data (-1 = auto, 0 = prefer isoc, 1 = prefer bulk)");
53 /* Bitmask marking allocated devices from 0 to EM28XX_MAXBOARDS - 1 */
54 static DECLARE_BITMAP(em28xx_devused
, EM28XX_MAXBOARDS
);
56 struct em28xx_hash_table
{
62 static void em28xx_pre_card_setup(struct em28xx
*dev
);
65 * Reset sequences for analog/digital modes
68 /* Reset for the most [analog] boards */
69 static const struct em28xx_reg_seq default_analog
[] = {
70 {EM2820_R08_GPIO_CTRL
, 0x6d, ~EM_GPIO_4
, 10},
74 /* Reset for the most [digital] boards */
75 static const struct em28xx_reg_seq default_digital
[] = {
76 {EM2820_R08_GPIO_CTRL
, 0x6e, ~EM_GPIO_4
, 10},
80 /* Board :Zolid Hybrid Tv Stick */
81 static struct em28xx_reg_seq zolid_tuner
[] = {
82 {EM2820_R08_GPIO_CTRL
, 0xfd, 0xff, 100},
83 {EM2820_R08_GPIO_CTRL
, 0xfe, 0xff, 100},
87 static struct em28xx_reg_seq zolid_digital
[] = {
88 {EM2820_R08_GPIO_CTRL
, 0x6a, 0xff, 100},
89 {EM2820_R08_GPIO_CTRL
, 0x7a, 0xff, 100},
90 {EM2880_R04_GPO
, 0x04, 0xff, 100},
91 {EM2880_R04_GPO
, 0x0c, 0xff, 100},
95 /* Board Hauppauge WinTV HVR 900 analog */
96 static const 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 const 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 const 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 const struct em28xx_reg_seq em2880_msi_digivox_ad_analog
[] = {
119 {EM2820_R08_GPIO_CTRL
, 0x69, ~EM_GPIO_4
, 10},
123 /* Board - EM2882 Kworld 315U digital */
124 static const struct em28xx_reg_seq em2882_kworld_315u_digital
[] = {
125 {EM2820_R08_GPIO_CTRL
, 0xff, 0xff, 10},
126 {EM2820_R08_GPIO_CTRL
, 0xfe, 0xff, 10},
127 {EM2880_R04_GPO
, 0x04, 0xff, 10},
128 {EM2880_R04_GPO
, 0x0c, 0xff, 10},
129 {EM2820_R08_GPIO_CTRL
, 0x7e, 0xff, 10},
133 static const struct em28xx_reg_seq em2882_kworld_315u_tuner_gpio
[] = {
134 {EM2880_R04_GPO
, 0x08, 0xff, 10},
135 {EM2880_R04_GPO
, 0x0c, 0xff, 10},
136 {EM2880_R04_GPO
, 0x08, 0xff, 10},
137 {EM2880_R04_GPO
, 0x0c, 0xff, 10},
141 static const struct em28xx_reg_seq kworld_330u_analog
[] = {
142 {EM2820_R08_GPIO_CTRL
, 0x6d, ~EM_GPIO_4
, 10},
143 {EM2880_R04_GPO
, 0x00, 0xff, 10},
147 static const struct em28xx_reg_seq kworld_330u_digital
[] = {
148 {EM2820_R08_GPIO_CTRL
, 0x6e, ~EM_GPIO_4
, 10},
149 {EM2880_R04_GPO
, 0x08, 0xff, 10},
155 * GPIO0 - Enable digital power (s5h1409) - low to enable
156 * GPIO1 - Enable analog power (tvp5150/emp202) - low to enable
157 * GPIO4 - xc3028 reset
158 * GOP3 - s5h1409 reset
160 static const struct em28xx_reg_seq evga_indtube_analog
[] = {
161 {EM2820_R08_GPIO_CTRL
, 0x79, 0xff, 60},
165 static const struct em28xx_reg_seq evga_indtube_digital
[] = {
166 {EM2820_R08_GPIO_CTRL
, 0x7a, 0xff, 1},
167 {EM2880_R04_GPO
, 0x04, 0xff, 10},
168 {EM2880_R04_GPO
, 0x0c, 0xff, 1},
173 * KWorld PlusTV 340U, UB435-Q and UB435-Q V2 (ATSC) GPIOs map:
174 * EM_GPIO_0 - currently unknown
175 * EM_GPIO_1 - LED disable/enable (1 = off, 0 = on)
176 * EM_GPIO_2 - currently unknown
177 * EM_GPIO_3 - currently unknown
178 * EM_GPIO_4 - TDA18271HD/C1 tuner (1 = active, 0 = in reset)
179 * EM_GPIO_5 - LGDT3304 ATSC/QAM demod (1 = active, 0 = in reset)
180 * EM_GPIO_6 - currently unknown
181 * EM_GPIO_7 - currently unknown
183 static const struct em28xx_reg_seq kworld_a340_digital
[] = {
184 {EM2820_R08_GPIO_CTRL
, 0x6d, ~EM_GPIO_4
, 10},
188 static const struct em28xx_reg_seq kworld_ub435q_v3_digital
[] = {
189 {EM2874_R80_GPIO_P0_CTRL
, 0xff, 0xff, 100},
190 {EM2874_R80_GPIO_P0_CTRL
, 0xfe, 0xff, 100},
191 {EM2874_R80_GPIO_P0_CTRL
, 0xbe, 0xff, 100},
192 {EM2874_R80_GPIO_P0_CTRL
, 0xfe, 0xff, 100},
196 /* Pinnacle Hybrid Pro eb1a:2881 */
197 static const struct em28xx_reg_seq pinnacle_hybrid_pro_analog
[] = {
198 {EM2820_R08_GPIO_CTRL
, 0xfd, ~EM_GPIO_4
, 10},
202 static const struct em28xx_reg_seq pinnacle_hybrid_pro_digital
[] = {
203 {EM2820_R08_GPIO_CTRL
, 0x6e, ~EM_GPIO_4
, 10},
204 {EM2880_R04_GPO
, 0x04, 0xff, 100},/* zl10353 reset */
205 {EM2880_R04_GPO
, 0x0c, 0xff, 1},
209 static const struct em28xx_reg_seq terratec_cinergy_USB_XS_FR_analog
[] = {
210 {EM2820_R08_GPIO_CTRL
, 0x6d, ~EM_GPIO_4
, 10},
211 {EM2880_R04_GPO
, 0x00, 0xff, 10},
215 static const struct em28xx_reg_seq terratec_cinergy_USB_XS_FR_digital
[] = {
216 {EM2820_R08_GPIO_CTRL
, 0x6e, ~EM_GPIO_4
, 10},
217 {EM2880_R04_GPO
, 0x08, 0xff, 10},
222 * PCTV HD Mini (80e) GPIOs
224 * 6: demod reset, active low
225 * 7: LED on, active high
227 static const struct em28xx_reg_seq em2874_pctv_80e_digital
[] = {
228 {EM28XX_R06_I2C_CLK
, 0x45, 0xff, 10}, /*400 KHz*/
229 {EM2874_R80_GPIO_P0_CTRL
, 0x00, 0xff, 100},/*Demod reset*/
230 {EM2874_R80_GPIO_P0_CTRL
, 0x40, 0xff, 10},
235 * eb1a:2868 Reddo DVB-C USB TV Box
236 * GPIO4 - CU1216L NIM
237 * Other GPIOs seems to be don't care.
239 static const struct em28xx_reg_seq reddo_dvb_c_usb_box
[] = {
240 {EM2820_R08_GPIO_CTRL
, 0xfe, 0xff, 10},
241 {EM2820_R08_GPIO_CTRL
, 0xde, 0xff, 10},
242 {EM2820_R08_GPIO_CTRL
, 0xfe, 0xff, 10},
243 {EM2820_R08_GPIO_CTRL
, 0xff, 0xff, 10},
244 {EM2820_R08_GPIO_CTRL
, 0x7f, 0xff, 10},
245 {EM2820_R08_GPIO_CTRL
, 0x6f, 0xff, 10},
246 {EM2820_R08_GPIO_CTRL
, 0xff, 0xff, 10},
250 /* Callback for the most boards */
251 static const struct em28xx_reg_seq default_tuner_gpio
[] = {
252 {EM2820_R08_GPIO_CTRL
, EM_GPIO_4
, EM_GPIO_4
, 10},
253 {EM2820_R08_GPIO_CTRL
, 0, EM_GPIO_4
, 10},
254 {EM2820_R08_GPIO_CTRL
, EM_GPIO_4
, EM_GPIO_4
, 10},
259 static const struct em28xx_reg_seq compro_unmute_tv_gpio
[] = {
260 {EM2820_R08_GPIO_CTRL
, 5, 7, 10},
264 static const struct em28xx_reg_seq compro_unmute_svid_gpio
[] = {
265 {EM2820_R08_GPIO_CTRL
, 4, 7, 10},
269 static const struct em28xx_reg_seq compro_mute_gpio
[] = {
270 {EM2820_R08_GPIO_CTRL
, 6, 7, 10},
275 static const struct em28xx_reg_seq terratec_av350_mute_gpio
[] = {
276 {EM2820_R08_GPIO_CTRL
, 0xff, 0x7f, 10},
280 static const struct em28xx_reg_seq terratec_av350_unmute_gpio
[] = {
281 {EM2820_R08_GPIO_CTRL
, 0xff, 0xff, 10},
285 static const struct em28xx_reg_seq silvercrest_reg_seq
[] = {
286 {EM2820_R08_GPIO_CTRL
, 0xff, 0xff, 10},
287 {EM2820_R08_GPIO_CTRL
, 0x01, 0xf7, 10},
291 static const struct em28xx_reg_seq vc211a_enable
[] = {
292 {EM2820_R08_GPIO_CTRL
, 0xff, 0x07, 10},
293 {EM2820_R08_GPIO_CTRL
, 0xff, 0x0f, 10},
294 {EM2820_R08_GPIO_CTRL
, 0xff, 0x0b, 10},
298 static const struct em28xx_reg_seq dikom_dk300_digital
[] = {
299 {EM2820_R08_GPIO_CTRL
, 0x6e, ~EM_GPIO_4
, 10},
300 {EM2880_R04_GPO
, 0x08, 0xff, 10},
304 /* Reset for the most [digital] boards */
305 static const struct em28xx_reg_seq leadership_digital
[] = {
306 {EM2874_R80_GPIO_P0_CTRL
, 0x70, 0xff, 10},
310 static const struct em28xx_reg_seq leadership_reset
[] = {
311 {EM2874_R80_GPIO_P0_CTRL
, 0xf0, 0xff, 10},
312 {EM2874_R80_GPIO_P0_CTRL
, 0xb0, 0xff, 10},
313 {EM2874_R80_GPIO_P0_CTRL
, 0xf0, 0xff, 10},
318 * 2013:024f PCTV nanoStick T2 290e
319 * GPIO_6 - demod reset
322 static const struct em28xx_reg_seq pctv_290e
[] = {
323 {EM2874_R80_GPIO_P0_CTRL
, 0x00, 0xff, 80},
324 {EM2874_R80_GPIO_P0_CTRL
, 0x40, 0xff, 80}, /* GPIO_6 = 1 */
325 {EM2874_R80_GPIO_P0_CTRL
, 0xc0, 0xff, 80}, /* GPIO_7 = 1 */
330 static const struct em28xx_reg_seq terratec_h5_gpio
[] = {
331 {EM2820_R08_GPIO_CTRL
, 0xff, 0xff, 10},
332 {EM2874_R80_GPIO_P0_CTRL
, 0xf6, 0xff, 100},
333 {EM2874_R80_GPIO_P0_CTRL
, 0xf2, 0xff, 50},
334 {EM2874_R80_GPIO_P0_CTRL
, 0xf6, 0xff, 50},
338 static const struct em28xx_reg_seq terratec_h5_digital
[] = {
339 {EM2874_R80_GPIO_P0_CTRL
, 0xf6, 0xff, 10},
340 {EM2874_R80_GPIO_P0_CTRL
, 0xe6, 0xff, 100},
341 {EM2874_R80_GPIO_P0_CTRL
, 0xa6, 0xff, 10},
347 * 2013:024f PCTV DVB-S2 Stick 460e
350 * GPIO_2 - VUV_LNB (red LED)
352 * GPIO_4 - INT_DEM (DEMOD GPIO_0)
355 * GPIO_7 - LED (green LED)
357 static const struct em28xx_reg_seq pctv_460e
[] = {
358 {EM2874_R80_GPIO_P0_CTRL
, 0x01, 0xff, 50},
359 { 0x0d, 0xff, 0xff, 50},
360 {EM2874_R80_GPIO_P0_CTRL
, 0x41, 0xff, 50}, /* GPIO_6=1 */
361 { 0x0d, 0x42, 0xff, 50},
362 {EM2874_R80_GPIO_P0_CTRL
, 0x61, 0xff, 50}, /* GPIO_5=1 */
366 static const struct em28xx_reg_seq c3tech_digital_duo_digital
[] = {
367 {EM2874_R80_GPIO_P0_CTRL
, 0xff, 0xff, 10},
368 {EM2874_R80_GPIO_P0_CTRL
, 0xfd, 0xff, 10}, /* xc5000 reset */
369 {EM2874_R80_GPIO_P0_CTRL
, 0xf9, 0xff, 35},
370 {EM2874_R80_GPIO_P0_CTRL
, 0xfd, 0xff, 10},
371 {EM2874_R80_GPIO_P0_CTRL
, 0xff, 0xff, 10},
372 {EM2874_R80_GPIO_P0_CTRL
, 0xfe, 0xff, 10},
373 {EM2874_R80_GPIO_P0_CTRL
, 0xbe, 0xff, 10},
374 {EM2874_R80_GPIO_P0_CTRL
, 0xfe, 0xff, 20},
379 * 2013:0258 PCTV DVB-S2 Stick (461e)
382 * GPIO 2 = VUV_LNB (red LED)
386 * GPIO 6 = #RESET_DEM
387 * GPIO 7 = P07_LED (green LED)
389 static const struct em28xx_reg_seq pctv_461e
[] = {
390 {EM2874_R80_GPIO_P0_CTRL
, 0x7f, 0xff, 0},
391 {0x0d, 0xff, 0xff, 0},
392 {EM2874_R80_GPIO_P0_CTRL
, 0x3f, 0xff, 100}, /* reset demod */
393 {EM2874_R80_GPIO_P0_CTRL
, 0x7f, 0xff, 200}, /* reset demod */
394 {0x0d, 0x42, 0xff, 0},
395 {EM2874_R80_GPIO_P0_CTRL
, 0xeb, 0xff, 0},
396 {EM2874_R5F_TS_ENABLE
, 0x84, 0x84, 0}, /* parallel? | null discard */
401 static const struct em28xx_reg_seq hauppauge_930c_gpio
[] = {
402 {EM2874_R80_GPIO_P0_CTRL
, 0x6f, 0xff, 10},
403 {EM2874_R80_GPIO_P0_CTRL
, 0x4f, 0xff, 10}, /* xc5000 reset */
404 {EM2874_R80_GPIO_P0_CTRL
, 0x6f, 0xff, 10},
405 {EM2874_R80_GPIO_P0_CTRL
, 0x4f, 0xff, 10},
409 static const struct em28xx_reg_seq hauppauge_930c_digital
[] = {
410 {EM2874_R80_GPIO_P0_CTRL
, 0xf6, 0xff, 10},
411 {EM2874_R80_GPIO_P0_CTRL
, 0xe6, 0xff, 100},
412 {EM2874_R80_GPIO_P0_CTRL
, 0xa6, 0xff, 10},
418 * 1b80:e425 MaxMedia UB425-TC
419 * 1b80:e1cc Delock 61959
420 * GPIO_6 - demod reset, 0=active
421 * GPIO_7 - LED, 0=active
423 static const struct em28xx_reg_seq maxmedia_ub425_tc
[] = {
424 {EM2874_R80_GPIO_P0_CTRL
, 0x83, 0xff, 100},
425 {EM2874_R80_GPIO_P0_CTRL
, 0xc3, 0xff, 100}, /* GPIO_6 = 1 */
426 {EM2874_R80_GPIO_P0_CTRL
, 0x43, 0xff, 000}, /* GPIO_7 = 0 */
431 * 2304:0242 PCTV QuatroStick (510e)
432 * GPIO_2: decoder reset, 0=active
433 * GPIO_4: decoder suspend, 0=active
434 * GPIO_6: demod reset, 0=active
435 * GPIO_7: LED, 1=active
437 static const struct em28xx_reg_seq pctv_510e
[] = {
438 {EM2874_R80_GPIO_P0_CTRL
, 0x10, 0xff, 100},
439 {EM2874_R80_GPIO_P0_CTRL
, 0x14, 0xff, 100}, /* GPIO_2 = 1 */
440 {EM2874_R80_GPIO_P0_CTRL
, 0x54, 0xff, 050}, /* GPIO_6 = 1 */
445 * 2013:0251 PCTV QuatroStick nano (520e)
446 * GPIO_2: decoder reset, 0=active
447 * GPIO_4: decoder suspend, 0=active
448 * GPIO_6: demod reset, 0=active
449 * GPIO_7: LED, 1=active
451 static const struct em28xx_reg_seq pctv_520e
[] = {
452 {EM2874_R80_GPIO_P0_CTRL
, 0x10, 0xff, 100},
453 {EM2874_R80_GPIO_P0_CTRL
, 0x14, 0xff, 100}, /* GPIO_2 = 1 */
454 {EM2874_R80_GPIO_P0_CTRL
, 0x54, 0xff, 050}, /* GPIO_6 = 1 */
455 {EM2874_R80_GPIO_P0_CTRL
, 0xd4, 0xff, 000}, /* GPIO_7 = 1 */
460 * 1ae7:9003/9004 SpeedLink Vicious And Devine Laplace webcam
462 * GPIO_0: capturing LED, 0=on, 1=off
463 * GPIO_2: AV mute button, 0=pressed, 1=unpressed
464 * GPIO 3: illumination button, 0=pressed, 1=unpressed
465 * GPIO_6: illumination/flash LED, 0=on, 1=off
467 * GPIO_7: snapshot button, 0=pressed, 1=unpressed
469 static const struct em28xx_reg_seq speedlink_vad_laplace_reg_seq
[] = {
470 {EM2820_R08_GPIO_CTRL
, 0xf7, 0xff, 10},
471 {EM2874_R80_GPIO_P0_CTRL
, 0xff, 0xb2, 10},
475 static const struct em28xx_reg_seq pctv_292e
[] = {
476 {EM2874_R80_GPIO_P0_CTRL
, 0xff, 0xff, 0},
477 {0x0d, 0xff, 0xff, 950},
478 {EM2874_R80_GPIO_P0_CTRL
, 0xbd, 0xff, 100},
479 {EM2874_R80_GPIO_P0_CTRL
, 0xfd, 0xff, 410},
480 {EM2874_R80_GPIO_P0_CTRL
, 0x7d, 0xff, 300},
481 {EM2874_R80_GPIO_P0_CTRL
, 0x7c, 0xff, 60},
482 {0x0d, 0x42, 0xff, 50},
483 {EM2874_R5F_TS_ENABLE
, 0x85, 0xff, 0},
487 static const struct em28xx_reg_seq terratec_t2_stick_hd
[] = {
488 {EM2874_R80_GPIO_P0_CTRL
, 0xff, 0xff, 0},
489 {0x0d, 0xff, 0xff, 600},
490 {EM2874_R80_GPIO_P0_CTRL
, 0xfc, 0xff, 10},
491 {EM2874_R80_GPIO_P0_CTRL
, 0xbc, 0xff, 100},
492 {EM2874_R80_GPIO_P0_CTRL
, 0xfc, 0xff, 100},
493 {EM2874_R80_GPIO_P0_CTRL
, 0x00, 0xff, 300},
494 {EM2874_R80_GPIO_P0_CTRL
, 0xf8, 0xff, 100},
495 {EM2874_R80_GPIO_P0_CTRL
, 0xfc, 0xff, 300},
496 {0x0d, 0x42, 0xff, 1000},
497 {EM2874_R5F_TS_ENABLE
, 0x85, 0xff, 0},
501 static const struct em28xx_reg_seq plex_px_bcud
[] = {
502 {EM2874_R80_GPIO_P0_CTRL
, 0xff, 0xff, 0},
503 {0x0d, 0xff, 0xff, 0},
504 {EM2874_R50_IR_CONFIG
, 0x01, 0xff, 0},
505 {EM28XX_R06_I2C_CLK
, 0x40, 0xff, 0},
506 {EM2874_R80_GPIO_P0_CTRL
, 0xfd, 0xff, 100},
507 {EM28XX_R12_VINENABLE
, 0x20, 0x20, 0},
508 {0x0d, 0x42, 0xff, 1000},
509 {EM2874_R80_GPIO_P0_CTRL
, 0xfc, 0xff, 10},
510 {EM2874_R80_GPIO_P0_CTRL
, 0xfd, 0xff, 10},
511 {0x73, 0xfd, 0xff, 100},
516 * 2040:0265 Hauppauge WinTV-dualHD DVB Isoc
517 * 2040:8265 Hauppauge WinTV-dualHD DVB Bulk
518 * 2040:026d Hauppauge WinTV-dualHD ATSC/QAM Isoc
519 * 2040:826d Hauppauge WinTV-dualHD ATSC/QAM Bulk
521 * GPIO_0: Yellow LED tuner 1, 0=on, 1=off
522 * GPIO_1: Green LED tuner 1, 0=on, 1=off
523 * GPIO_2: Yellow LED tuner 2, 0=on, 1=off
524 * GPIO_3: Green LED tuner 2, 0=on, 1=off
525 * GPIO_5: Reset #2, 0=active
526 * GPIO_6: Reset #1, 0=active
528 static const struct em28xx_reg_seq hauppauge_dualhd_dvb
[] = {
529 {EM2874_R80_GPIO_P0_CTRL
, 0xff, 0xff, 0},
530 {0x0d, 0xff, 0xff, 200},
531 {0x50, 0x04, 0xff, 300},
532 {EM2874_R80_GPIO_P0_CTRL
, 0xbf, 0xff, 100}, /* demod 1 reset */
533 {EM2874_R80_GPIO_P0_CTRL
, 0xff, 0xff, 100},
534 {EM2874_R80_GPIO_P0_CTRL
, 0xdf, 0xff, 100}, /* demod 2 reset */
535 {EM2874_R80_GPIO_P0_CTRL
, 0xff, 0xff, 100},
536 {EM2874_R5F_TS_ENABLE
, 0x00, 0xff, 50}, /* disable TS filters */
537 {EM2874_R5D_TS1_PKT_SIZE
, 0x05, 0xff, 50},
538 {EM2874_R5E_TS2_PKT_SIZE
, 0x05, 0xff, 50},
542 /* Hauppauge USB QuadHD */
543 static struct em28xx_reg_seq hauppauge_usb_quadhd_atsc_reg_seq
[] = {
544 {EM2874_R80_GPIO_P0_CTRL
, 0xff, 0xff, 0},
545 {0x0d, 0xff, 0xff, 200},
546 {0x50, 0x04, 0xff, 300},
547 {EM2874_R80_GPIO_P0_CTRL
, 0xb0, 0xf0, 100}, /* demod 1 reset */
548 {EM2874_R80_GPIO_P0_CTRL
, 0xf0, 0xf0, 100},
549 {EM2874_R80_GPIO_P0_CTRL
, 0xd0, 0xf0, 100}, /* demod 2 reset */
550 {EM2874_R80_GPIO_P0_CTRL
, 0xf0, 0xf0, 100},
551 {EM2874_R5F_TS_ENABLE
, 0x44, 0xff, 50},
552 {EM2874_R5D_TS1_PKT_SIZE
, 0x05, 0xff, 50},
553 {EM2874_R5E_TS2_PKT_SIZE
, 0x05, 0xff, 50},
559 * GPIO_1,0: 00=Composite audio
562 * 11=FM radio? (if equipped)
566 static const struct em28xx_reg_seq mygica_utv3_composite_audio_gpio
[] = {
567 {EM2820_R08_GPIO_CTRL
, 0xfc, 0xff, 0},
571 static const struct em28xx_reg_seq mygica_utv3_tuner_audio_gpio
[] = {
572 {EM2820_R08_GPIO_CTRL
, 0xfd, 0xff, 0},
576 static const struct em28xx_reg_seq mygica_utv3_suspend_gpio
[] = {
577 {EM2820_R08_GPIO_CTRL
, 0xfe, 0xff, 0},
584 static const struct em28xx_button std_snapshot_button
[] = {
586 .role
= EM28XX_BUTTON_SNAPSHOT
,
587 .reg_r
= EM28XX_R0C_USBSUSP
,
588 .reg_clearing
= EM28XX_R0C_USBSUSP
,
589 .mask
= EM28XX_R0C_USBSUSP_SNAPSHOT
,
595 static const struct em28xx_button speedlink_vad_laplace_buttons
[] = {
597 .role
= EM28XX_BUTTON_SNAPSHOT
,
598 .reg_r
= EM2874_R85_GPIO_P1_STATE
,
603 .role
= EM28XX_BUTTON_ILLUMINATION
,
604 .reg_r
= EM2874_R84_GPIO_P0_STATE
,
614 static struct em28xx_led speedlink_vad_laplace_leds
[] = {
616 .role
= EM28XX_LED_ANALOG_CAPTURING
,
617 .gpio_reg
= EM2874_R80_GPIO_P0_CTRL
,
622 .role
= EM28XX_LED_ILLUMINATION
,
623 .gpio_reg
= EM2874_R80_GPIO_P0_CTRL
,
630 static struct em28xx_led kworld_ub435q_v3_leds
[] = {
632 .role
= EM28XX_LED_DIGITAL_CAPTURING
,
633 .gpio_reg
= EM2874_R80_GPIO_P0_CTRL
,
640 static struct em28xx_led pctv_80e_leds
[] = {
642 .role
= EM28XX_LED_DIGITAL_CAPTURING
,
643 .gpio_reg
= EM2874_R80_GPIO_P0_CTRL
,
650 static struct em28xx_led terratec_grabby_leds
[] = {
652 .role
= EM28XX_LED_ANALOG_CAPTURING
,
653 .gpio_reg
= EM2820_R08_GPIO_CTRL
,
654 .gpio_mask
= EM_GPIO_3
,
660 static struct em28xx_led hauppauge_dualhd_leds
[] = {
662 .role
= EM28XX_LED_DIGITAL_CAPTURING
,
663 .gpio_reg
= EM2874_R80_GPIO_P0_CTRL
,
664 .gpio_mask
= EM_GPIO_1
,
668 .role
= EM28XX_LED_DIGITAL_CAPTURING_TS2
,
669 .gpio_reg
= EM2874_R80_GPIO_P0_CTRL
,
670 .gpio_mask
= EM_GPIO_3
,
676 static struct em28xx_led hauppauge_usb_quadhd_leds
[] = {
678 .role
= EM28XX_LED_DIGITAL_CAPTURING
,
679 .gpio_reg
= EM2874_R80_GPIO_P0_CTRL
,
680 .gpio_mask
= EM_GPIO_2
,
684 .role
= EM28XX_LED_DIGITAL_CAPTURING_TS2
,
685 .gpio_reg
= EM2874_R80_GPIO_P0_CTRL
,
686 .gpio_mask
= EM_GPIO_0
,
695 const struct em28xx_board em28xx_boards
[] = {
696 [EM2750_BOARD_UNKNOWN
] = {
697 .name
= "EM2710/EM2750/EM2751 webcam grabber",
698 .xclk
= EM28XX_XCLK_FREQUENCY_20MHZ
,
699 .tuner_type
= TUNER_ABSENT
,
702 .type
= EM28XX_VMUX_COMPOSITE
,
704 .amux
= EM28XX_AMUX_VIDEO
,
705 .gpio
= silvercrest_reg_seq
,
708 [EM2800_BOARD_UNKNOWN
] = {
709 .name
= "Unknown EM2800 video grabber",
711 .tda9887_conf
= TDA9887_PRESENT
,
712 .decoder
= EM28XX_SAA711X
,
713 .tuner_type
= TUNER_ABSENT
,
715 .type
= EM28XX_VMUX_COMPOSITE
,
716 .vmux
= SAA7115_COMPOSITE0
,
717 .amux
= EM28XX_AMUX_LINE_IN
,
719 .type
= EM28XX_VMUX_SVIDEO
,
720 .vmux
= SAA7115_SVIDEO3
,
721 .amux
= EM28XX_AMUX_LINE_IN
,
724 [EM2820_BOARD_UNKNOWN
] = {
725 .name
= "Unknown EM2750/28xx video grabber",
726 .tuner_type
= TUNER_ABSENT
,
727 .is_webcam
= 1, /* To enable sensor probe */
729 [EM2882_BOARD_ZOLID_HYBRID_TV_STICK
] = {
730 .name
= ":ZOLID HYBRID TV STICK",
731 .tuner_type
= TUNER_XC2028
,
732 .tuner_gpio
= zolid_tuner
,
733 .decoder
= EM28XX_TVP5150
,
734 .xclk
= EM28XX_XCLK_FREQUENCY_12MHZ
,
737 .dvb_gpio
= zolid_digital
,
739 [EM2750_BOARD_DLCW_130
] = {
740 /* Beijing Huaqi Information Digital Technology Co., Ltd */
741 .name
= "Huaqi DLCW-130",
742 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
743 .xclk
= EM28XX_XCLK_FREQUENCY_48MHZ
,
744 .tuner_type
= TUNER_ABSENT
,
747 .type
= EM28XX_VMUX_COMPOSITE
,
749 .amux
= EM28XX_AMUX_VIDEO
,
752 [EM2820_BOARD_KWORLD_PVRTV2800RF
] = {
753 .name
= "Kworld PVR TV 2800 RF",
754 .tuner_type
= TUNER_TEMIC_PAL
,
755 .tda9887_conf
= TDA9887_PRESENT
,
756 .decoder
= EM28XX_SAA711X
,
758 .type
= EM28XX_VMUX_COMPOSITE
,
759 .vmux
= SAA7115_COMPOSITE0
,
760 .amux
= EM28XX_AMUX_LINE_IN
,
762 .type
= EM28XX_VMUX_SVIDEO
,
763 .vmux
= SAA7115_SVIDEO3
,
764 .amux
= EM28XX_AMUX_LINE_IN
,
767 [EM2820_BOARD_GADMEI_TVR200
] = {
768 .name
= "Gadmei TVR200",
769 .tuner_type
= TUNER_LG_PAL_NEW_TAPC
,
770 .tda9887_conf
= TDA9887_PRESENT
,
771 .decoder
= EM28XX_SAA711X
,
773 .type
= EM28XX_VMUX_TELEVISION
,
774 .vmux
= SAA7115_COMPOSITE2
,
775 .amux
= EM28XX_AMUX_LINE_IN
,
777 .type
= EM28XX_VMUX_COMPOSITE
,
778 .vmux
= SAA7115_COMPOSITE0
,
779 .amux
= EM28XX_AMUX_LINE_IN
,
781 .type
= EM28XX_VMUX_SVIDEO
,
782 .vmux
= SAA7115_SVIDEO3
,
783 .amux
= EM28XX_AMUX_LINE_IN
,
786 [EM2820_BOARD_TERRATEC_CINERGY_250
] = {
787 .name
= "Terratec Cinergy 250 USB",
788 .tuner_type
= TUNER_LG_PAL_NEW_TAPC
,
790 .tda9887_conf
= TDA9887_PRESENT
,
791 .decoder
= EM28XX_SAA711X
,
793 .type
= EM28XX_VMUX_TELEVISION
,
794 .vmux
= SAA7115_COMPOSITE2
,
795 .amux
= EM28XX_AMUX_VIDEO
,
797 .type
= EM28XX_VMUX_COMPOSITE
,
798 .vmux
= SAA7115_COMPOSITE0
,
799 .amux
= EM28XX_AMUX_LINE_IN
,
801 .type
= EM28XX_VMUX_SVIDEO
,
802 .vmux
= SAA7115_SVIDEO3
,
803 .amux
= EM28XX_AMUX_LINE_IN
,
806 [EM2820_BOARD_PINNACLE_USB_2
] = {
807 .name
= "Pinnacle PCTV USB 2",
808 .tuner_type
= TUNER_LG_PAL_NEW_TAPC
,
810 .tda9887_conf
= TDA9887_PRESENT
,
811 .decoder
= EM28XX_SAA711X
,
813 .type
= EM28XX_VMUX_TELEVISION
,
814 .vmux
= SAA7115_COMPOSITE2
,
815 .amux
= EM28XX_AMUX_VIDEO
,
817 .type
= EM28XX_VMUX_COMPOSITE
,
818 .vmux
= SAA7115_COMPOSITE0
,
819 .amux
= EM28XX_AMUX_LINE_IN
,
821 .type
= EM28XX_VMUX_SVIDEO
,
822 .vmux
= SAA7115_SVIDEO3
,
823 .amux
= EM28XX_AMUX_LINE_IN
,
826 [EM2820_BOARD_HAUPPAUGE_WINTV_USB_2
] = {
827 .name
= "Hauppauge WinTV USB 2",
828 .tuner_type
= TUNER_PHILIPS_FM1236_MK3
,
829 .tda9887_conf
= TDA9887_PRESENT
|
830 TDA9887_PORT1_ACTIVE
|
831 TDA9887_PORT2_ACTIVE
,
832 .decoder
= EM28XX_TVP5150
,
836 .type
= EM28XX_VMUX_TELEVISION
,
837 .vmux
= TVP5150_COMPOSITE0
,
838 .amux
= MSP_INPUT_DEFAULT
,
840 .type
= EM28XX_VMUX_SVIDEO
,
841 .vmux
= TVP5150_SVIDEO
,
842 .amux
= MSP_INPUT(MSP_IN_SCART1
, MSP_IN_TUNER1
,
843 MSP_DSP_IN_SCART
, MSP_DSP_IN_SCART
),
846 [EM2820_BOARD_DLINK_USB_TV
] = {
847 .name
= "D-Link DUB-T210 TV Tuner",
848 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
849 .tuner_type
= TUNER_LG_PAL_NEW_TAPC
,
850 .tda9887_conf
= TDA9887_PRESENT
,
851 .decoder
= EM28XX_SAA711X
,
853 .type
= EM28XX_VMUX_TELEVISION
,
854 .vmux
= SAA7115_COMPOSITE2
,
855 .amux
= EM28XX_AMUX_LINE_IN
,
857 .type
= EM28XX_VMUX_COMPOSITE
,
858 .vmux
= SAA7115_COMPOSITE0
,
859 .amux
= EM28XX_AMUX_LINE_IN
,
861 .type
= EM28XX_VMUX_SVIDEO
,
862 .vmux
= SAA7115_SVIDEO3
,
863 .amux
= EM28XX_AMUX_LINE_IN
,
866 [EM2820_BOARD_HERCULES_SMART_TV_USB2
] = {
867 .name
= "Hercules Smart TV USB 2.0",
868 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
869 .tuner_type
= TUNER_LG_PAL_NEW_TAPC
,
870 .tda9887_conf
= TDA9887_PRESENT
,
871 .decoder
= EM28XX_SAA711X
,
873 .type
= EM28XX_VMUX_TELEVISION
,
874 .vmux
= SAA7115_COMPOSITE2
,
875 .amux
= EM28XX_AMUX_LINE_IN
,
877 .type
= EM28XX_VMUX_COMPOSITE
,
878 .vmux
= SAA7115_COMPOSITE0
,
879 .amux
= EM28XX_AMUX_LINE_IN
,
881 .type
= EM28XX_VMUX_SVIDEO
,
882 .vmux
= SAA7115_SVIDEO3
,
883 .amux
= EM28XX_AMUX_LINE_IN
,
886 [EM2820_BOARD_PINNACLE_USB_2_FM1216ME
] = {
887 .name
= "Pinnacle PCTV USB 2 (Philips FM1216ME)",
888 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
889 .tuner_type
= TUNER_PHILIPS_FM1216ME_MK3
,
890 .tda9887_conf
= TDA9887_PRESENT
,
891 .decoder
= EM28XX_SAA711X
,
893 .type
= EM28XX_VMUX_TELEVISION
,
894 .vmux
= SAA7115_COMPOSITE2
,
895 .amux
= EM28XX_AMUX_VIDEO
,
897 .type
= EM28XX_VMUX_COMPOSITE
,
898 .vmux
= SAA7115_COMPOSITE0
,
899 .amux
= EM28XX_AMUX_LINE_IN
,
901 .type
= EM28XX_VMUX_SVIDEO
,
902 .vmux
= SAA7115_SVIDEO3
,
903 .amux
= EM28XX_AMUX_LINE_IN
,
906 [EM2820_BOARD_GADMEI_UTV310
] = {
907 .name
= "Gadmei UTV310",
908 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
909 .tuner_type
= TUNER_TNF_5335MF
,
910 .tda9887_conf
= TDA9887_PRESENT
,
911 .decoder
= EM28XX_SAA711X
,
913 .type
= EM28XX_VMUX_TELEVISION
,
914 .vmux
= SAA7115_COMPOSITE1
,
915 .amux
= EM28XX_AMUX_LINE_IN
,
917 .type
= EM28XX_VMUX_COMPOSITE
,
918 .vmux
= SAA7115_COMPOSITE0
,
919 .amux
= EM28XX_AMUX_LINE_IN
,
921 .type
= EM28XX_VMUX_SVIDEO
,
922 .vmux
= SAA7115_SVIDEO3
,
923 .amux
= EM28XX_AMUX_LINE_IN
,
926 [EM2820_BOARD_LEADTEK_WINFAST_USBII_DELUXE
] = {
927 .name
= "Leadtek Winfast USB II Deluxe",
928 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
929 .tuner_type
= TUNER_PHILIPS_FM1216ME_MK3
,
931 .tvaudio_addr
= 0x58,
932 .tda9887_conf
= TDA9887_PRESENT
|
933 TDA9887_PORT2_ACTIVE
|
935 .decoder
= EM28XX_SAA711X
,
936 .adecoder
= EM28XX_TVAUDIO
,
938 .type
= EM28XX_VMUX_TELEVISION
,
939 .vmux
= SAA7115_COMPOSITE4
,
940 .amux
= EM28XX_AMUX_AUX
,
942 .type
= EM28XX_VMUX_COMPOSITE
,
943 .vmux
= SAA7115_COMPOSITE5
,
944 .amux
= EM28XX_AMUX_LINE_IN
,
946 .type
= EM28XX_VMUX_SVIDEO
,
947 .vmux
= SAA7115_SVIDEO3
,
948 .amux
= EM28XX_AMUX_LINE_IN
,
951 .type
= EM28XX_RADIO
,
952 .amux
= EM28XX_AMUX_AUX
,
955 [EM2820_BOARD_VIDEOLOGY_20K14XUSB
] = {
956 .name
= "Videology 20K14XUSB USB2.0",
957 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
958 .tuner_type
= TUNER_ABSENT
,
961 .type
= EM28XX_VMUX_COMPOSITE
,
963 .amux
= EM28XX_AMUX_VIDEO
,
966 [EM2820_BOARD_SILVERCREST_WEBCAM
] = {
967 .name
= "Silvercrest Webcam 1.3mpix",
968 .tuner_type
= TUNER_ABSENT
,
971 .type
= EM28XX_VMUX_COMPOSITE
,
973 .amux
= EM28XX_AMUX_VIDEO
,
974 .gpio
= silvercrest_reg_seq
,
977 [EM2821_BOARD_SUPERCOMP_USB_2
] = {
978 .name
= "Supercomp USB 2.0 TV",
979 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
980 .tuner_type
= TUNER_PHILIPS_FM1236_MK3
,
981 .tda9887_conf
= TDA9887_PRESENT
|
982 TDA9887_PORT1_ACTIVE
|
983 TDA9887_PORT2_ACTIVE
,
984 .decoder
= EM28XX_SAA711X
,
986 .type
= EM28XX_VMUX_TELEVISION
,
987 .vmux
= SAA7115_COMPOSITE2
,
988 .amux
= EM28XX_AMUX_LINE_IN
,
990 .type
= EM28XX_VMUX_COMPOSITE
,
991 .vmux
= SAA7115_COMPOSITE0
,
992 .amux
= EM28XX_AMUX_VIDEO
,
994 .type
= EM28XX_VMUX_SVIDEO
,
995 .vmux
= SAA7115_SVIDEO3
,
996 .amux
= EM28XX_AMUX_LINE_IN
,
999 [EM2821_BOARD_USBGEAR_VD204
] = {
1000 .name
= "Usbgear VD204v9",
1001 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
1002 .tuner_type
= TUNER_ABSENT
, /* Capture only device */
1003 .decoder
= EM28XX_SAA711X
,
1005 .type
= EM28XX_VMUX_COMPOSITE
,
1006 .vmux
= SAA7115_COMPOSITE0
,
1007 .amux
= EM28XX_AMUX_LINE_IN
,
1009 .type
= EM28XX_VMUX_SVIDEO
,
1010 .vmux
= SAA7115_SVIDEO3
,
1011 .amux
= EM28XX_AMUX_LINE_IN
,
1014 [EM2860_BOARD_NETGMBH_CAM
] = {
1015 /* Beijing Huaqi Information Digital Technology Co., Ltd */
1016 .name
= "NetGMBH Cam",
1017 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
1018 .tuner_type
= TUNER_ABSENT
,
1021 .type
= EM28XX_VMUX_COMPOSITE
,
1023 .amux
= EM28XX_AMUX_VIDEO
,
1026 [EM2860_BOARD_TYPHOON_DVD_MAKER
] = {
1027 .name
= "Typhoon DVD Maker",
1028 .decoder
= EM28XX_SAA711X
,
1029 .tuner_type
= TUNER_ABSENT
, /* Capture only device */
1031 .type
= EM28XX_VMUX_COMPOSITE
,
1032 .vmux
= SAA7115_COMPOSITE0
,
1033 .amux
= EM28XX_AMUX_LINE_IN
,
1035 .type
= EM28XX_VMUX_SVIDEO
,
1036 .vmux
= SAA7115_SVIDEO3
,
1037 .amux
= EM28XX_AMUX_LINE_IN
,
1040 [EM2860_BOARD_GADMEI_UTV330
] = {
1041 .name
= "Gadmei UTV330",
1042 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
1043 .tuner_type
= TUNER_TNF_5335MF
,
1044 .tda9887_conf
= TDA9887_PRESENT
,
1045 .decoder
= EM28XX_SAA711X
,
1047 .type
= EM28XX_VMUX_TELEVISION
,
1048 .vmux
= SAA7115_COMPOSITE2
,
1049 .amux
= EM28XX_AMUX_VIDEO
,
1051 .type
= EM28XX_VMUX_COMPOSITE
,
1052 .vmux
= SAA7115_COMPOSITE0
,
1053 .amux
= EM28XX_AMUX_LINE_IN
,
1055 .type
= EM28XX_VMUX_SVIDEO
,
1056 .vmux
= SAA7115_SVIDEO3
,
1057 .amux
= EM28XX_AMUX_LINE_IN
,
1060 [EM2861_BOARD_GADMEI_UTV330PLUS
] = {
1061 .name
= "Gadmei UTV330+",
1062 .tuner_type
= TUNER_TNF_5335MF
,
1063 .tda9887_conf
= TDA9887_PRESENT
,
1064 .ir_codes
= RC_MAP_GADMEI_RM008Z
,
1065 .decoder
= EM28XX_SAA711X
,
1066 .xclk
= EM28XX_XCLK_FREQUENCY_12MHZ
,
1068 .type
= EM28XX_VMUX_TELEVISION
,
1069 .vmux
= SAA7115_COMPOSITE2
,
1070 .amux
= EM28XX_AMUX_VIDEO
,
1072 .type
= EM28XX_VMUX_COMPOSITE
,
1073 .vmux
= SAA7115_COMPOSITE0
,
1074 .amux
= EM28XX_AMUX_LINE_IN
,
1076 .type
= EM28XX_VMUX_SVIDEO
,
1077 .vmux
= SAA7115_SVIDEO3
,
1078 .amux
= EM28XX_AMUX_LINE_IN
,
1081 [EM2860_BOARD_TERRATEC_HYBRID_XS
] = {
1082 .name
= "Terratec Cinergy A Hybrid XS",
1083 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
1084 .tuner_type
= TUNER_XC2028
,
1085 .tuner_gpio
= default_tuner_gpio
,
1086 .decoder
= EM28XX_TVP5150
,
1089 .type
= EM28XX_VMUX_TELEVISION
,
1090 .vmux
= TVP5150_COMPOSITE0
,
1091 .amux
= EM28XX_AMUX_VIDEO
,
1092 .gpio
= hauppauge_wintv_hvr_900_analog
,
1094 .type
= EM28XX_VMUX_COMPOSITE
,
1095 .vmux
= TVP5150_COMPOSITE1
,
1096 .amux
= EM28XX_AMUX_LINE_IN
,
1097 .gpio
= hauppauge_wintv_hvr_900_analog
,
1099 .type
= EM28XX_VMUX_SVIDEO
,
1100 .vmux
= TVP5150_SVIDEO
,
1101 .amux
= EM28XX_AMUX_LINE_IN
,
1102 .gpio
= hauppauge_wintv_hvr_900_analog
,
1105 [EM2861_BOARD_KWORLD_PVRTV_300U
] = {
1106 .name
= "KWorld PVRTV 300U",
1107 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
1108 .tuner_type
= TUNER_XC2028
,
1109 .tuner_gpio
= default_tuner_gpio
,
1110 .decoder
= EM28XX_TVP5150
,
1112 .type
= EM28XX_VMUX_TELEVISION
,
1113 .vmux
= TVP5150_COMPOSITE0
,
1114 .amux
= EM28XX_AMUX_VIDEO
,
1116 .type
= EM28XX_VMUX_COMPOSITE
,
1117 .vmux
= TVP5150_COMPOSITE1
,
1118 .amux
= EM28XX_AMUX_LINE_IN
,
1120 .type
= EM28XX_VMUX_SVIDEO
,
1121 .vmux
= TVP5150_SVIDEO
,
1122 .amux
= EM28XX_AMUX_LINE_IN
,
1125 [EM2861_BOARD_YAKUMO_MOVIE_MIXER
] = {
1126 .name
= "Yakumo MovieMixer",
1127 .tuner_type
= TUNER_ABSENT
, /* Capture only device */
1128 .decoder
= EM28XX_TVP5150
,
1130 .type
= EM28XX_VMUX_TELEVISION
,
1131 .vmux
= TVP5150_COMPOSITE0
,
1132 .amux
= EM28XX_AMUX_VIDEO
,
1134 .type
= EM28XX_VMUX_COMPOSITE
,
1135 .vmux
= TVP5150_COMPOSITE1
,
1136 .amux
= EM28XX_AMUX_LINE_IN
,
1138 .type
= EM28XX_VMUX_SVIDEO
,
1139 .vmux
= TVP5150_SVIDEO
,
1140 .amux
= EM28XX_AMUX_LINE_IN
,
1143 [EM2860_BOARD_TVP5150_REFERENCE_DESIGN
] = {
1144 .name
= "EM2860/TVP5150 Reference Design",
1145 .tuner_type
= TUNER_ABSENT
, /* Capture only device */
1146 .decoder
= EM28XX_TVP5150
,
1148 .type
= EM28XX_VMUX_COMPOSITE
,
1149 .vmux
= TVP5150_COMPOSITE1
,
1150 .amux
= EM28XX_AMUX_LINE_IN
,
1152 .type
= EM28XX_VMUX_SVIDEO
,
1153 .vmux
= TVP5150_SVIDEO
,
1154 .amux
= EM28XX_AMUX_LINE_IN
,
1157 [EM2861_BOARD_PLEXTOR_PX_TV100U
] = {
1158 .name
= "Plextor ConvertX PX-TV100U",
1159 .tuner_type
= TUNER_TNF_5335MF
,
1160 .xclk
= EM28XX_XCLK_I2S_MSB_TIMING
|
1161 EM28XX_XCLK_FREQUENCY_12MHZ
,
1162 .tda9887_conf
= TDA9887_PRESENT
,
1163 .decoder
= EM28XX_TVP5150
,
1166 .type
= EM28XX_VMUX_TELEVISION
,
1167 .vmux
= TVP5150_COMPOSITE0
,
1168 .amux
= EM28XX_AMUX_LINE_IN
,
1169 .gpio
= pinnacle_hybrid_pro_analog
,
1171 .type
= EM28XX_VMUX_COMPOSITE
,
1172 .vmux
= TVP5150_COMPOSITE1
,
1173 .amux
= EM28XX_AMUX_LINE_IN
,
1174 .gpio
= pinnacle_hybrid_pro_analog
,
1176 .type
= EM28XX_VMUX_SVIDEO
,
1177 .vmux
= TVP5150_SVIDEO
,
1178 .amux
= EM28XX_AMUX_LINE_IN
,
1179 .gpio
= pinnacle_hybrid_pro_analog
,
1183 /* Those boards with em2870 are DVB Only*/
1185 [EM2870_BOARD_TERRATEC_XS
] = {
1186 .name
= "Terratec Cinergy T XS",
1187 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
1188 .tuner_type
= TUNER_XC2028
,
1189 .tuner_gpio
= default_tuner_gpio
,
1191 [EM2870_BOARD_TERRATEC_XS_MT2060
] = {
1192 .name
= "Terratec Cinergy T XS (MT2060)",
1193 .xclk
= EM28XX_XCLK_IR_RC5_MODE
|
1194 EM28XX_XCLK_FREQUENCY_12MHZ
,
1195 .i2c_speed
= EM28XX_I2C_CLK_WAIT_ENABLE
,
1196 .tuner_type
= TUNER_ABSENT
, /* MT2060 */
1198 .tuner_gpio
= default_tuner_gpio
,
1200 [EM2870_BOARD_KWORLD_350U
] = {
1201 .name
= "Kworld 350 U DVB-T",
1202 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
1203 .tuner_type
= TUNER_XC2028
,
1204 .tuner_gpio
= default_tuner_gpio
,
1206 [EM2870_BOARD_KWORLD_355U
] = {
1207 .name
= "Kworld 355 U DVB-T",
1208 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
1209 .tuner_type
= TUNER_ABSENT
,
1210 .tuner_gpio
= default_tuner_gpio
,
1212 .dvb_gpio
= default_digital
,
1214 [EM2870_BOARD_PINNACLE_PCTV_DVB
] = {
1215 .name
= "Pinnacle PCTV DVB-T",
1216 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
1217 .tuner_type
= TUNER_ABSENT
, /* MT2060 */
1218 /* djh - I have serious doubts this is right... */
1219 .xclk
= EM28XX_XCLK_IR_RC5_MODE
|
1220 EM28XX_XCLK_FREQUENCY_10MHZ
,
1222 [EM2870_BOARD_COMPRO_VIDEOMATE
] = {
1223 .name
= "Compro, VideoMate U3",
1224 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
1225 .tuner_type
= TUNER_ABSENT
, /* MT2060 */
1228 [EM2880_BOARD_TERRATEC_HYBRID_XS_FR
] = {
1229 .name
= "Terratec Hybrid XS Secam",
1231 .tuner_type
= TUNER_XC2028
,
1232 .tuner_gpio
= default_tuner_gpio
,
1233 .decoder
= EM28XX_TVP5150
,
1235 .dvb_gpio
= terratec_cinergy_USB_XS_FR_digital
,
1237 .type
= EM28XX_VMUX_TELEVISION
,
1238 .vmux
= TVP5150_COMPOSITE0
,
1239 .amux
= EM28XX_AMUX_VIDEO
,
1240 .gpio
= terratec_cinergy_USB_XS_FR_analog
,
1242 .type
= EM28XX_VMUX_COMPOSITE
,
1243 .vmux
= TVP5150_COMPOSITE1
,
1244 .amux
= EM28XX_AMUX_LINE_IN
,
1245 .gpio
= terratec_cinergy_USB_XS_FR_analog
,
1247 .type
= EM28XX_VMUX_SVIDEO
,
1248 .vmux
= TVP5150_SVIDEO
,
1249 .amux
= EM28XX_AMUX_LINE_IN
,
1250 .gpio
= terratec_cinergy_USB_XS_FR_analog
,
1253 [EM2884_BOARD_TERRATEC_H5
] = {
1254 .name
= "Terratec Cinergy H5",
1257 .tuner_type
= TUNER_PHILIPS_TDA8290
,
1259 .dvb_gpio
= terratec_h5_digital
, /* FIXME: probably wrong */
1260 .tuner_gpio
= terratec_h5_gpio
,
1262 .tuner_type
= TUNER_ABSENT
,
1265 .i2c_speed
= EM28XX_I2C_CLK_WAIT_ENABLE
|
1266 EM28XX_I2C_FREQ_400_KHZ
,
1268 [EM2884_BOARD_TERRATEC_H6
] = {
1269 .name
= "Terratec Cinergy H6 rev. 2",
1271 .ir_codes
= RC_MAP_NEC_TERRATEC_CINERGY_XS
,
1273 .tuner_type
= TUNER_PHILIPS_TDA8290
,
1275 .dvb_gpio
= terratec_h5_digital
, /* FIXME: probably wrong */
1276 .tuner_gpio
= terratec_h5_gpio
,
1278 .tuner_type
= TUNER_ABSENT
,
1281 .i2c_speed
= EM28XX_I2C_CLK_WAIT_ENABLE
|
1282 EM28XX_I2C_FREQ_400_KHZ
,
1284 [EM2884_BOARD_HAUPPAUGE_WINTV_HVR_930C
] = {
1285 .name
= "Hauppauge WinTV HVR 930C",
1287 #if 0 /* FIXME: Add analog support */
1288 .tuner_type
= TUNER_XC5000
,
1290 .dvb_gpio
= hauppauge_930c_digital
,
1291 .tuner_gpio
= hauppauge_930c_gpio
,
1293 .tuner_type
= TUNER_ABSENT
,
1295 .ir_codes
= RC_MAP_HAUPPAUGE
,
1297 .i2c_speed
= EM28XX_I2C_CLK_WAIT_ENABLE
|
1298 EM28XX_I2C_FREQ_400_KHZ
,
1300 [EM2884_BOARD_C3TECH_DIGITAL_DUO
] = {
1301 .name
= "C3 Tech Digital Duo HDTV/SDTV USB",
1303 /* FIXME: Add analog support - need a saa7136 driver */
1304 .tuner_type
= TUNER_ABSENT
, /* Digital-only TDA18271HD */
1305 .ir_codes
= RC_MAP_EMPTY
,
1307 .i2c_speed
= EM28XX_I2C_CLK_WAIT_ENABLE
,
1308 .dvb_gpio
= c3tech_digital_duo_digital
,
1310 [EM2884_BOARD_CINERGY_HTC_STICK
] = {
1311 .name
= "Terratec Cinergy HTC Stick",
1313 .ir_codes
= RC_MAP_NEC_TERRATEC_CINERGY_XS
,
1314 .tuner_type
= TUNER_ABSENT
,
1316 .i2c_speed
= EM28XX_I2C_CLK_WAIT_ENABLE
|
1317 EM28XX_I2C_FREQ_400_KHZ
,
1319 [EM2884_BOARD_ELGATO_EYETV_HYBRID_2008
] = {
1320 .name
= "Elgato EyeTV Hybrid 2008 INT",
1322 .ir_codes
= RC_MAP_NEC_TERRATEC_CINERGY_XS
,
1323 .tuner_type
= TUNER_ABSENT
,
1325 .i2c_speed
= EM28XX_I2C_CLK_WAIT_ENABLE
|
1326 EM28XX_I2C_FREQ_400_KHZ
,
1328 [EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900
] = {
1329 .name
= "Hauppauge WinTV HVR 900",
1330 .tda9887_conf
= TDA9887_PRESENT
,
1331 .tuner_type
= TUNER_XC2028
,
1332 .tuner_gpio
= default_tuner_gpio
,
1335 .dvb_gpio
= hauppauge_wintv_hvr_900_digital
,
1336 .ir_codes
= RC_MAP_HAUPPAUGE
,
1337 .decoder
= EM28XX_TVP5150
,
1339 .type
= EM28XX_VMUX_TELEVISION
,
1340 .vmux
= TVP5150_COMPOSITE0
,
1341 .amux
= EM28XX_AMUX_VIDEO
,
1342 .gpio
= hauppauge_wintv_hvr_900_analog
,
1344 .type
= EM28XX_VMUX_COMPOSITE
,
1345 .vmux
= TVP5150_COMPOSITE1
,
1346 .amux
= EM28XX_AMUX_LINE_IN
,
1347 .gpio
= hauppauge_wintv_hvr_900_analog
,
1349 .type
= EM28XX_VMUX_SVIDEO
,
1350 .vmux
= TVP5150_SVIDEO
,
1351 .amux
= EM28XX_AMUX_LINE_IN
,
1352 .gpio
= hauppauge_wintv_hvr_900_analog
,
1355 [EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2
] = {
1356 .name
= "Hauppauge WinTV HVR 900 (R2)",
1357 .tda9887_conf
= TDA9887_PRESENT
,
1358 .tuner_type
= TUNER_XC2028
,
1359 .tuner_gpio
= default_tuner_gpio
,
1362 .dvb_gpio
= hauppauge_wintv_hvr_900R2_digital
,
1363 .ir_codes
= RC_MAP_HAUPPAUGE
,
1364 .decoder
= EM28XX_TVP5150
,
1366 .type
= EM28XX_VMUX_TELEVISION
,
1367 .vmux
= TVP5150_COMPOSITE0
,
1368 .amux
= EM28XX_AMUX_VIDEO
,
1369 .gpio
= hauppauge_wintv_hvr_900_analog
,
1371 .type
= EM28XX_VMUX_COMPOSITE
,
1372 .vmux
= TVP5150_COMPOSITE1
,
1373 .amux
= EM28XX_AMUX_LINE_IN
,
1374 .gpio
= hauppauge_wintv_hvr_900_analog
,
1376 .type
= EM28XX_VMUX_SVIDEO
,
1377 .vmux
= TVP5150_SVIDEO
,
1378 .amux
= EM28XX_AMUX_LINE_IN
,
1379 .gpio
= hauppauge_wintv_hvr_900_analog
,
1382 [EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850
] = {
1383 .name
= "Hauppauge WinTV HVR 850",
1384 .tuner_type
= TUNER_XC2028
,
1385 .tuner_gpio
= default_tuner_gpio
,
1388 .dvb_gpio
= hauppauge_wintv_hvr_900_digital
,
1389 .ir_codes
= RC_MAP_HAUPPAUGE
,
1390 .decoder
= EM28XX_TVP5150
,
1392 .type
= EM28XX_VMUX_TELEVISION
,
1393 .vmux
= TVP5150_COMPOSITE0
,
1394 .amux
= EM28XX_AMUX_VIDEO
,
1395 .gpio
= hauppauge_wintv_hvr_900_analog
,
1397 .type
= EM28XX_VMUX_COMPOSITE
,
1398 .vmux
= TVP5150_COMPOSITE1
,
1399 .amux
= EM28XX_AMUX_LINE_IN
,
1400 .gpio
= hauppauge_wintv_hvr_900_analog
,
1402 .type
= EM28XX_VMUX_SVIDEO
,
1403 .vmux
= TVP5150_SVIDEO
,
1404 .amux
= EM28XX_AMUX_LINE_IN
,
1405 .gpio
= hauppauge_wintv_hvr_900_analog
,
1408 [EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950
] = {
1409 .name
= "Hauppauge WinTV HVR 950",
1410 .tuner_type
= TUNER_XC2028
,
1411 .tuner_gpio
= default_tuner_gpio
,
1414 .dvb_gpio
= hauppauge_wintv_hvr_900_digital
,
1415 .ir_codes
= RC_MAP_HAUPPAUGE
,
1416 .decoder
= EM28XX_TVP5150
,
1418 .type
= EM28XX_VMUX_TELEVISION
,
1419 .vmux
= TVP5150_COMPOSITE0
,
1420 .amux
= EM28XX_AMUX_VIDEO
,
1421 .gpio
= hauppauge_wintv_hvr_900_analog
,
1423 .type
= EM28XX_VMUX_COMPOSITE
,
1424 .vmux
= TVP5150_COMPOSITE1
,
1425 .amux
= EM28XX_AMUX_LINE_IN
,
1426 .gpio
= hauppauge_wintv_hvr_900_analog
,
1428 .type
= EM28XX_VMUX_SVIDEO
,
1429 .vmux
= TVP5150_SVIDEO
,
1430 .amux
= EM28XX_AMUX_LINE_IN
,
1431 .gpio
= hauppauge_wintv_hvr_900_analog
,
1434 [EM2880_BOARD_PINNACLE_PCTV_HD_PRO
] = {
1435 .name
= "Pinnacle PCTV HD Pro Stick",
1436 .tuner_type
= TUNER_XC2028
,
1437 .tuner_gpio
= default_tuner_gpio
,
1440 .dvb_gpio
= hauppauge_wintv_hvr_900_digital
,
1441 .ir_codes
= RC_MAP_PINNACLE_PCTV_HD
,
1442 .decoder
= EM28XX_TVP5150
,
1444 .type
= EM28XX_VMUX_TELEVISION
,
1445 .vmux
= TVP5150_COMPOSITE0
,
1446 .amux
= EM28XX_AMUX_VIDEO
,
1447 .gpio
= hauppauge_wintv_hvr_900_analog
,
1449 .type
= EM28XX_VMUX_COMPOSITE
,
1450 .vmux
= TVP5150_COMPOSITE1
,
1451 .amux
= EM28XX_AMUX_LINE_IN
,
1452 .gpio
= hauppauge_wintv_hvr_900_analog
,
1454 .type
= EM28XX_VMUX_SVIDEO
,
1455 .vmux
= TVP5150_SVIDEO
,
1456 .amux
= EM28XX_AMUX_LINE_IN
,
1457 .gpio
= hauppauge_wintv_hvr_900_analog
,
1460 [EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600
] = {
1461 .name
= "AMD ATI TV Wonder HD 600",
1462 .tuner_type
= TUNER_XC2028
,
1463 .tuner_gpio
= default_tuner_gpio
,
1466 .dvb_gpio
= hauppauge_wintv_hvr_900_digital
,
1467 .ir_codes
= RC_MAP_ATI_TV_WONDER_HD_600
,
1468 .decoder
= EM28XX_TVP5150
,
1470 .type
= EM28XX_VMUX_TELEVISION
,
1471 .vmux
= TVP5150_COMPOSITE0
,
1472 .amux
= EM28XX_AMUX_VIDEO
,
1473 .gpio
= hauppauge_wintv_hvr_900_analog
,
1475 .type
= EM28XX_VMUX_COMPOSITE
,
1476 .vmux
= TVP5150_COMPOSITE1
,
1477 .amux
= EM28XX_AMUX_LINE_IN
,
1478 .gpio
= hauppauge_wintv_hvr_900_analog
,
1480 .type
= EM28XX_VMUX_SVIDEO
,
1481 .vmux
= TVP5150_SVIDEO
,
1482 .amux
= EM28XX_AMUX_LINE_IN
,
1483 .gpio
= hauppauge_wintv_hvr_900_analog
,
1486 [EM2880_BOARD_TERRATEC_HYBRID_XS
] = {
1487 .name
= "Terratec Hybrid XS",
1488 .tuner_type
= TUNER_XC2028
,
1489 .tuner_gpio
= default_tuner_gpio
,
1490 .decoder
= EM28XX_TVP5150
,
1492 .dvb_gpio
= default_digital
,
1493 .ir_codes
= RC_MAP_TERRATEC_CINERGY_XS
,
1494 .xclk
= EM28XX_XCLK_FREQUENCY_12MHZ
, /* NEC IR */
1496 .type
= EM28XX_VMUX_TELEVISION
,
1497 .vmux
= TVP5150_COMPOSITE0
,
1498 .amux
= EM28XX_AMUX_VIDEO
,
1499 .gpio
= default_analog
,
1501 .type
= EM28XX_VMUX_COMPOSITE
,
1502 .vmux
= TVP5150_COMPOSITE1
,
1503 .amux
= EM28XX_AMUX_LINE_IN
,
1504 .gpio
= default_analog
,
1506 .type
= EM28XX_VMUX_SVIDEO
,
1507 .vmux
= TVP5150_SVIDEO
,
1508 .amux
= EM28XX_AMUX_LINE_IN
,
1509 .gpio
= default_analog
,
1513 * maybe there's a reason behind it why Terratec sells the Hybrid XS
1514 * as Prodigy XS with a different PID, let's keep it separated for now
1515 * maybe we'll need it later on
1517 [EM2880_BOARD_TERRATEC_PRODIGY_XS
] = {
1518 .name
= "Terratec Prodigy XS",
1519 .tuner_type
= TUNER_XC2028
,
1520 .tuner_gpio
= default_tuner_gpio
,
1521 .decoder
= EM28XX_TVP5150
,
1523 .type
= EM28XX_VMUX_TELEVISION
,
1524 .vmux
= TVP5150_COMPOSITE0
,
1525 .amux
= EM28XX_AMUX_VIDEO
,
1526 .gpio
= hauppauge_wintv_hvr_900_analog
,
1528 .type
= EM28XX_VMUX_COMPOSITE
,
1529 .vmux
= TVP5150_COMPOSITE1
,
1530 .amux
= EM28XX_AMUX_LINE_IN
,
1531 .gpio
= hauppauge_wintv_hvr_900_analog
,
1533 .type
= EM28XX_VMUX_SVIDEO
,
1534 .vmux
= TVP5150_SVIDEO
,
1535 .amux
= EM28XX_AMUX_LINE_IN
,
1536 .gpio
= hauppauge_wintv_hvr_900_analog
,
1539 [EM2820_BOARD_MSI_VOX_USB_2
] = {
1540 .name
= "MSI VOX USB 2.0",
1541 .tuner_type
= TUNER_LG_PAL_NEW_TAPC
,
1542 .tda9887_conf
= TDA9887_PRESENT
|
1543 TDA9887_PORT1_ACTIVE
|
1544 TDA9887_PORT2_ACTIVE
,
1545 .max_range_640_480
= 1,
1546 .decoder
= EM28XX_SAA711X
,
1548 .type
= EM28XX_VMUX_TELEVISION
,
1549 .vmux
= SAA7115_COMPOSITE4
,
1550 .amux
= EM28XX_AMUX_VIDEO
,
1552 .type
= EM28XX_VMUX_COMPOSITE
,
1553 .vmux
= SAA7115_COMPOSITE0
,
1554 .amux
= EM28XX_AMUX_LINE_IN
,
1556 .type
= EM28XX_VMUX_SVIDEO
,
1557 .vmux
= SAA7115_SVIDEO3
,
1558 .amux
= EM28XX_AMUX_LINE_IN
,
1561 [EM2800_BOARD_TERRATEC_CINERGY_200
] = {
1562 .name
= "Terratec Cinergy 200 USB",
1565 .tuner_type
= TUNER_LG_TALN
,
1566 .tda9887_conf
= TDA9887_PRESENT
,
1567 .decoder
= EM28XX_SAA711X
,
1569 .type
= EM28XX_VMUX_TELEVISION
,
1570 .vmux
= SAA7115_COMPOSITE2
,
1571 .amux
= EM28XX_AMUX_VIDEO
,
1573 .type
= EM28XX_VMUX_COMPOSITE
,
1574 .vmux
= SAA7115_COMPOSITE0
,
1575 .amux
= EM28XX_AMUX_LINE_IN
,
1577 .type
= EM28XX_VMUX_SVIDEO
,
1578 .vmux
= SAA7115_SVIDEO3
,
1579 .amux
= EM28XX_AMUX_LINE_IN
,
1582 [EM2800_BOARD_GRABBEEX_USB2800
] = {
1583 .name
= "eMPIA Technology, Inc. GrabBeeX+ Video Encoder",
1585 .decoder
= EM28XX_SAA711X
,
1586 .tuner_type
= TUNER_ABSENT
, /* capture only board */
1588 .type
= EM28XX_VMUX_COMPOSITE
,
1589 .vmux
= SAA7115_COMPOSITE0
,
1590 .amux
= EM28XX_AMUX_LINE_IN
,
1592 .type
= EM28XX_VMUX_SVIDEO
,
1593 .vmux
= SAA7115_SVIDEO3
,
1594 .amux
= EM28XX_AMUX_LINE_IN
,
1597 [EM2800_BOARD_VC211A
] = {
1598 .name
= "Actionmaster/LinXcel/Digitus VC211A",
1600 .tuner_type
= TUNER_ABSENT
, /* Capture-only board */
1601 .decoder
= EM28XX_SAA711X
,
1603 .type
= EM28XX_VMUX_COMPOSITE
,
1604 .vmux
= SAA7115_COMPOSITE0
,
1605 .amux
= EM28XX_AMUX_LINE_IN
,
1606 .gpio
= vc211a_enable
,
1608 .type
= EM28XX_VMUX_SVIDEO
,
1609 .vmux
= SAA7115_SVIDEO3
,
1610 .amux
= EM28XX_AMUX_LINE_IN
,
1611 .gpio
= vc211a_enable
,
1614 [EM2800_BOARD_LEADTEK_WINFAST_USBII
] = {
1615 .name
= "Leadtek Winfast USB II",
1617 .tuner_type
= TUNER_LG_PAL_NEW_TAPC
,
1618 .tda9887_conf
= TDA9887_PRESENT
,
1619 .decoder
= EM28XX_SAA711X
,
1621 .type
= EM28XX_VMUX_TELEVISION
,
1622 .vmux
= SAA7115_COMPOSITE2
,
1623 .amux
= EM28XX_AMUX_VIDEO
,
1625 .type
= EM28XX_VMUX_COMPOSITE
,
1626 .vmux
= SAA7115_COMPOSITE0
,
1627 .amux
= EM28XX_AMUX_LINE_IN
,
1629 .type
= EM28XX_VMUX_SVIDEO
,
1630 .vmux
= SAA7115_SVIDEO3
,
1631 .amux
= EM28XX_AMUX_LINE_IN
,
1634 [EM2800_BOARD_KWORLD_USB2800
] = {
1635 .name
= "Kworld USB2800",
1637 .tuner_type
= TUNER_PHILIPS_FCV1236D
,
1638 .tda9887_conf
= TDA9887_PRESENT
,
1639 .decoder
= EM28XX_SAA711X
,
1641 .type
= EM28XX_VMUX_TELEVISION
,
1642 .vmux
= SAA7115_COMPOSITE2
,
1643 .amux
= EM28XX_AMUX_VIDEO
,
1645 .type
= EM28XX_VMUX_COMPOSITE
,
1646 .vmux
= SAA7115_COMPOSITE0
,
1647 .amux
= EM28XX_AMUX_LINE_IN
,
1649 .type
= EM28XX_VMUX_SVIDEO
,
1650 .vmux
= SAA7115_SVIDEO3
,
1651 .amux
= EM28XX_AMUX_LINE_IN
,
1654 [EM2820_BOARD_PINNACLE_DVC_90
] = {
1655 .name
= "Pinnacle Dazzle DVC 90/100/101/107 / Kaiser Baas Video to DVD maker / Kworld DVD Maker 2 / Plextor ConvertX PX-AV100U",
1656 .tuner_type
= TUNER_ABSENT
, /* capture only board */
1657 .decoder
= EM28XX_SAA711X
,
1659 .type
= EM28XX_VMUX_COMPOSITE
,
1660 .vmux
= SAA7115_COMPOSITE0
,
1661 .amux
= EM28XX_AMUX_LINE_IN
,
1663 .type
= EM28XX_VMUX_SVIDEO
,
1664 .vmux
= SAA7115_SVIDEO3
,
1665 .amux
= EM28XX_AMUX_LINE_IN
,
1668 [EM2800_BOARD_VGEAR_POCKETTV
] = {
1669 .name
= "V-Gear PocketTV",
1671 .tuner_type
= TUNER_LG_PAL_NEW_TAPC
,
1672 .tda9887_conf
= TDA9887_PRESENT
,
1673 .decoder
= EM28XX_SAA711X
,
1675 .type
= EM28XX_VMUX_TELEVISION
,
1676 .vmux
= SAA7115_COMPOSITE2
,
1677 .amux
= EM28XX_AMUX_VIDEO
,
1679 .type
= EM28XX_VMUX_COMPOSITE
,
1680 .vmux
= SAA7115_COMPOSITE0
,
1681 .amux
= EM28XX_AMUX_LINE_IN
,
1683 .type
= EM28XX_VMUX_SVIDEO
,
1684 .vmux
= SAA7115_SVIDEO3
,
1685 .amux
= EM28XX_AMUX_LINE_IN
,
1688 [EM2820_BOARD_PROLINK_PLAYTV_BOX4_USB2
] = {
1689 .name
= "Pixelview PlayTV Box 4 USB 2.0",
1690 .tda9887_conf
= TDA9887_PRESENT
,
1691 .tuner_type
= TUNER_YMEC_TVF_5533MF
,
1692 .decoder
= EM28XX_SAA711X
,
1694 .type
= EM28XX_VMUX_TELEVISION
,
1695 .vmux
= SAA7115_COMPOSITE2
,
1696 .amux
= EM28XX_AMUX_VIDEO
,
1697 .aout
= EM28XX_AOUT_MONO
| /* I2S */
1698 EM28XX_AOUT_MASTER
, /* Line out pin */
1700 .type
= EM28XX_VMUX_COMPOSITE
,
1701 .vmux
= SAA7115_COMPOSITE0
,
1702 .amux
= EM28XX_AMUX_LINE_IN
,
1704 .type
= EM28XX_VMUX_SVIDEO
,
1705 .vmux
= SAA7115_SVIDEO3
,
1706 .amux
= EM28XX_AMUX_LINE_IN
,
1709 [EM2820_BOARD_PROLINK_PLAYTV_USB2
] = {
1710 .name
= "SIIG AVTuner-PVR / Pixelview Prolink PlayTV USB 2.0",
1711 .buttons
= std_snapshot_button
,
1712 .tda9887_conf
= TDA9887_PRESENT
,
1713 .tuner_type
= TUNER_YMEC_TVF_5533MF
,
1715 .decoder
= EM28XX_SAA711X
,
1717 .type
= EM28XX_VMUX_TELEVISION
,
1718 .vmux
= SAA7115_COMPOSITE2
,
1719 .amux
= EM28XX_AMUX_VIDEO
,
1720 .aout
= EM28XX_AOUT_MONO
| /* I2S */
1721 EM28XX_AOUT_MASTER
, /* Line out pin */
1723 .type
= EM28XX_VMUX_COMPOSITE
,
1724 .vmux
= SAA7115_COMPOSITE0
,
1725 .amux
= EM28XX_AMUX_LINE_IN
,
1727 .type
= EM28XX_VMUX_SVIDEO
,
1728 .vmux
= SAA7115_SVIDEO3
,
1729 .amux
= EM28XX_AMUX_LINE_IN
,
1732 [EM2860_BOARD_SAA711X_REFERENCE_DESIGN
] = {
1733 .name
= "EM2860/SAA711X Reference Design",
1734 .buttons
= std_snapshot_button
,
1735 .tuner_type
= TUNER_ABSENT
,
1736 .decoder
= EM28XX_SAA711X
,
1738 .type
= EM28XX_VMUX_SVIDEO
,
1739 .vmux
= SAA7115_SVIDEO3
,
1741 .type
= EM28XX_VMUX_COMPOSITE
,
1742 .vmux
= SAA7115_COMPOSITE0
,
1746 [EM2874_BOARD_LEADERSHIP_ISDBT
] = {
1748 .i2c_speed
= EM28XX_I2C_CLK_WAIT_ENABLE
|
1749 EM28XX_I2C_FREQ_100_KHZ
,
1750 .xclk
= EM28XX_XCLK_FREQUENCY_10MHZ
,
1751 .name
= "EM2874 Leadership ISDBT",
1752 .tuner_type
= TUNER_ABSENT
,
1753 .tuner_gpio
= leadership_reset
,
1754 .dvb_gpio
= leadership_digital
,
1758 [EM2880_BOARD_MSI_DIGIVOX_AD
] = {
1759 .name
= "MSI DigiVox A/D",
1760 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
1761 .tuner_type
= TUNER_XC2028
,
1762 .tuner_gpio
= default_tuner_gpio
,
1763 .decoder
= EM28XX_TVP5150
,
1765 .type
= EM28XX_VMUX_TELEVISION
,
1766 .vmux
= TVP5150_COMPOSITE0
,
1767 .amux
= EM28XX_AMUX_VIDEO
,
1768 .gpio
= em2880_msi_digivox_ad_analog
,
1770 .type
= EM28XX_VMUX_COMPOSITE
,
1771 .vmux
= TVP5150_COMPOSITE1
,
1772 .amux
= EM28XX_AMUX_LINE_IN
,
1773 .gpio
= em2880_msi_digivox_ad_analog
,
1775 .type
= EM28XX_VMUX_SVIDEO
,
1776 .vmux
= TVP5150_SVIDEO
,
1777 .amux
= EM28XX_AMUX_LINE_IN
,
1778 .gpio
= em2880_msi_digivox_ad_analog
,
1781 [EM2880_BOARD_MSI_DIGIVOX_AD_II
] = {
1782 .name
= "MSI DigiVox A/D II",
1783 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
1784 .tuner_type
= TUNER_XC2028
,
1785 .tuner_gpio
= default_tuner_gpio
,
1786 .decoder
= EM28XX_TVP5150
,
1788 .type
= EM28XX_VMUX_TELEVISION
,
1789 .vmux
= TVP5150_COMPOSITE0
,
1790 .amux
= EM28XX_AMUX_VIDEO
,
1791 .gpio
= em2880_msi_digivox_ad_analog
,
1793 .type
= EM28XX_VMUX_COMPOSITE
,
1794 .vmux
= TVP5150_COMPOSITE1
,
1795 .amux
= EM28XX_AMUX_LINE_IN
,
1796 .gpio
= em2880_msi_digivox_ad_analog
,
1798 .type
= EM28XX_VMUX_SVIDEO
,
1799 .vmux
= TVP5150_SVIDEO
,
1800 .amux
= EM28XX_AMUX_LINE_IN
,
1801 .gpio
= em2880_msi_digivox_ad_analog
,
1804 [EM2880_BOARD_KWORLD_DVB_305U
] = {
1805 .name
= "KWorld DVB-T 305U",
1806 .tuner_type
= TUNER_XC2028
,
1807 .tuner_gpio
= default_tuner_gpio
,
1808 .decoder
= EM28XX_TVP5150
,
1810 .type
= EM28XX_VMUX_TELEVISION
,
1811 .vmux
= TVP5150_COMPOSITE0
,
1812 .amux
= EM28XX_AMUX_VIDEO
,
1814 .type
= EM28XX_VMUX_COMPOSITE
,
1815 .vmux
= TVP5150_COMPOSITE1
,
1816 .amux
= EM28XX_AMUX_LINE_IN
,
1818 .type
= EM28XX_VMUX_SVIDEO
,
1819 .vmux
= TVP5150_SVIDEO
,
1820 .amux
= EM28XX_AMUX_LINE_IN
,
1823 [EM2880_BOARD_KWORLD_DVB_310U
] = {
1824 .name
= "KWorld DVB-T 310U",
1825 .tuner_type
= TUNER_XC2028
,
1826 .tuner_gpio
= default_tuner_gpio
,
1828 .dvb_gpio
= default_digital
,
1830 .decoder
= EM28XX_TVP5150
,
1832 .type
= EM28XX_VMUX_TELEVISION
,
1833 .vmux
= TVP5150_COMPOSITE0
,
1834 .amux
= EM28XX_AMUX_VIDEO
,
1835 .gpio
= default_analog
,
1837 .type
= EM28XX_VMUX_COMPOSITE
,
1838 .vmux
= TVP5150_COMPOSITE1
,
1839 .amux
= EM28XX_AMUX_LINE_IN
,
1840 .gpio
= default_analog
,
1841 }, { /* S-video has not been tested yet */
1842 .type
= EM28XX_VMUX_SVIDEO
,
1843 .vmux
= TVP5150_SVIDEO
,
1844 .amux
= EM28XX_AMUX_LINE_IN
,
1845 .gpio
= default_analog
,
1848 [EM2882_BOARD_KWORLD_ATSC_315U
] = {
1849 .name
= "KWorld ATSC 315U HDTV TV Box",
1850 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
1851 .tuner_type
= TUNER_THOMSON_DTT761X
,
1852 .tuner_gpio
= em2882_kworld_315u_tuner_gpio
,
1853 .tda9887_conf
= TDA9887_PRESENT
,
1854 .decoder
= EM28XX_SAA711X
,
1856 .dvb_gpio
= em2882_kworld_315u_digital
,
1857 .ir_codes
= RC_MAP_KWORLD_315U
,
1858 .xclk
= EM28XX_XCLK_FREQUENCY_12MHZ
,
1859 .i2c_speed
= EM28XX_I2C_CLK_WAIT_ENABLE
,
1861 /* FIXME: Analog mode - still not ready */
1863 .type
= EM28XX_VMUX_TELEVISION
,
1864 .vmux
= SAA7115_COMPOSITE2
,
1865 .amux
= EM28XX_AMUX_VIDEO
,
1866 .gpio
= em2882_kworld_315u_analog
,
1867 .aout
= EM28XX_AOUT_PCM_IN
| EM28XX_AOUT_PCM_STEREO
,
1869 .type
= EM28XX_VMUX_COMPOSITE
,
1870 .vmux
= SAA7115_COMPOSITE0
,
1871 .amux
= EM28XX_AMUX_LINE_IN
,
1872 .gpio
= em2882_kworld_315u_analog1
,
1873 .aout
= EM28XX_AOUT_PCM_IN
| EM28XX_AOUT_PCM_STEREO
,
1875 .type
= EM28XX_VMUX_SVIDEO
,
1876 .vmux
= SAA7115_SVIDEO3
,
1877 .amux
= EM28XX_AMUX_LINE_IN
,
1878 .gpio
= em2882_kworld_315u_analog1
,
1879 .aout
= EM28XX_AOUT_PCM_IN
| EM28XX_AOUT_PCM_STEREO
,
1883 [EM2880_BOARD_EMPIRE_DUAL_TV
] = {
1884 .name
= "Empire dual TV",
1885 .tuner_type
= TUNER_XC2028
,
1886 .tuner_gpio
= default_tuner_gpio
,
1888 .dvb_gpio
= default_digital
,
1890 .decoder
= EM28XX_TVP5150
,
1892 .type
= EM28XX_VMUX_TELEVISION
,
1893 .vmux
= TVP5150_COMPOSITE0
,
1894 .amux
= EM28XX_AMUX_VIDEO
,
1895 .gpio
= default_analog
,
1897 .type
= EM28XX_VMUX_COMPOSITE
,
1898 .vmux
= TVP5150_COMPOSITE1
,
1899 .amux
= EM28XX_AMUX_LINE_IN
,
1900 .gpio
= default_analog
,
1902 .type
= EM28XX_VMUX_SVIDEO
,
1903 .vmux
= TVP5150_SVIDEO
,
1904 .amux
= EM28XX_AMUX_LINE_IN
,
1905 .gpio
= default_analog
,
1908 [EM2881_BOARD_DNT_DA2_HYBRID
] = {
1909 .name
= "DNT DA2 Hybrid",
1910 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
1911 .tuner_type
= TUNER_XC2028
,
1912 .tuner_gpio
= default_tuner_gpio
,
1913 .decoder
= EM28XX_TVP5150
,
1915 .type
= EM28XX_VMUX_TELEVISION
,
1916 .vmux
= TVP5150_COMPOSITE0
,
1917 .amux
= EM28XX_AMUX_VIDEO
,
1918 .gpio
= default_analog
,
1920 .type
= EM28XX_VMUX_COMPOSITE
,
1921 .vmux
= TVP5150_COMPOSITE1
,
1922 .amux
= EM28XX_AMUX_LINE_IN
,
1923 .gpio
= default_analog
,
1925 .type
= EM28XX_VMUX_SVIDEO
,
1926 .vmux
= TVP5150_SVIDEO
,
1927 .amux
= EM28XX_AMUX_LINE_IN
,
1928 .gpio
= default_analog
,
1931 [EM2881_BOARD_PINNACLE_HYBRID_PRO
] = {
1932 .name
= "Pinnacle Hybrid Pro",
1933 .tuner_type
= TUNER_XC2028
,
1934 .tuner_gpio
= default_tuner_gpio
,
1935 .decoder
= EM28XX_TVP5150
,
1937 .dvb_gpio
= pinnacle_hybrid_pro_digital
,
1939 .type
= EM28XX_VMUX_TELEVISION
,
1940 .vmux
= TVP5150_COMPOSITE0
,
1941 .amux
= EM28XX_AMUX_VIDEO
,
1942 .gpio
= pinnacle_hybrid_pro_analog
,
1944 .type
= EM28XX_VMUX_COMPOSITE
,
1945 .vmux
= TVP5150_COMPOSITE1
,
1946 .amux
= EM28XX_AMUX_LINE_IN
,
1947 .gpio
= pinnacle_hybrid_pro_analog
,
1949 .type
= EM28XX_VMUX_SVIDEO
,
1950 .vmux
= TVP5150_SVIDEO
,
1951 .amux
= EM28XX_AMUX_LINE_IN
,
1952 .gpio
= pinnacle_hybrid_pro_analog
,
1955 [EM2882_BOARD_PINNACLE_HYBRID_PRO_330E
] = {
1956 .name
= "Pinnacle Hybrid Pro (330e)",
1957 .tuner_type
= TUNER_XC2028
,
1958 .tuner_gpio
= default_tuner_gpio
,
1961 .dvb_gpio
= hauppauge_wintv_hvr_900R2_digital
,
1962 .ir_codes
= RC_MAP_PINNACLE_PCTV_HD
,
1963 .decoder
= EM28XX_TVP5150
,
1965 .type
= EM28XX_VMUX_TELEVISION
,
1966 .vmux
= TVP5150_COMPOSITE0
,
1967 .amux
= EM28XX_AMUX_VIDEO
,
1968 .gpio
= hauppauge_wintv_hvr_900_analog
,
1970 .type
= EM28XX_VMUX_COMPOSITE
,
1971 .vmux
= TVP5150_COMPOSITE1
,
1972 .amux
= EM28XX_AMUX_LINE_IN
,
1973 .gpio
= hauppauge_wintv_hvr_900_analog
,
1975 .type
= EM28XX_VMUX_SVIDEO
,
1976 .vmux
= TVP5150_SVIDEO
,
1977 .amux
= EM28XX_AMUX_LINE_IN
,
1978 .gpio
= hauppauge_wintv_hvr_900_analog
,
1981 [EM2882_BOARD_KWORLD_VS_DVBT
] = {
1982 .name
= "Kworld VS-DVB-T 323UR",
1983 .tuner_type
= TUNER_XC2028
,
1984 .tuner_gpio
= default_tuner_gpio
,
1985 .decoder
= EM28XX_TVP5150
,
1988 .dvb_gpio
= kworld_330u_digital
,
1989 .xclk
= EM28XX_XCLK_FREQUENCY_12MHZ
, /* NEC IR */
1990 .ir_codes
= RC_MAP_KWORLD_315U
,
1992 .type
= EM28XX_VMUX_TELEVISION
,
1993 .vmux
= TVP5150_COMPOSITE0
,
1994 .amux
= EM28XX_AMUX_VIDEO
,
1996 .type
= EM28XX_VMUX_COMPOSITE
,
1997 .vmux
= TVP5150_COMPOSITE1
,
1998 .amux
= EM28XX_AMUX_LINE_IN
,
2000 .type
= EM28XX_VMUX_SVIDEO
,
2001 .vmux
= TVP5150_SVIDEO
,
2002 .amux
= EM28XX_AMUX_LINE_IN
,
2005 [EM2882_BOARD_TERRATEC_HYBRID_XS
] = {
2006 .name
= "Terratec Cinergy Hybrid T USB XS (em2882)",
2007 .tuner_type
= TUNER_XC2028
,
2008 .tuner_gpio
= default_tuner_gpio
,
2010 .decoder
= EM28XX_TVP5150
,
2012 .dvb_gpio
= hauppauge_wintv_hvr_900_digital
,
2013 .ir_codes
= RC_MAP_TERRATEC_CINERGY_XS
,
2014 .xclk
= EM28XX_XCLK_FREQUENCY_12MHZ
,
2016 .type
= EM28XX_VMUX_TELEVISION
,
2017 .vmux
= TVP5150_COMPOSITE0
,
2018 .amux
= EM28XX_AMUX_VIDEO
,
2019 .gpio
= hauppauge_wintv_hvr_900_analog
,
2021 .type
= EM28XX_VMUX_COMPOSITE
,
2022 .vmux
= TVP5150_COMPOSITE1
,
2023 .amux
= EM28XX_AMUX_LINE_IN
,
2024 .gpio
= hauppauge_wintv_hvr_900_analog
,
2026 .type
= EM28XX_VMUX_SVIDEO
,
2027 .vmux
= TVP5150_SVIDEO
,
2028 .amux
= EM28XX_AMUX_LINE_IN
,
2029 .gpio
= hauppauge_wintv_hvr_900_analog
,
2032 [EM2882_BOARD_DIKOM_DK300
] = {
2033 .name
= "Dikom DK300",
2034 .tuner_type
= TUNER_XC2028
,
2035 .tuner_gpio
= default_tuner_gpio
,
2036 .decoder
= EM28XX_TVP5150
,
2039 .dvb_gpio
= dikom_dk300_digital
,
2041 .type
= EM28XX_VMUX_TELEVISION
,
2042 .vmux
= TVP5150_COMPOSITE0
,
2043 .amux
= EM28XX_AMUX_VIDEO
,
2044 .gpio
= default_analog
,
2047 [EM2883_BOARD_KWORLD_HYBRID_330U
] = {
2048 .name
= "Kworld PlusTV HD Hybrid 330",
2049 .tuner_type
= TUNER_XC2028
,
2050 .tuner_gpio
= default_tuner_gpio
,
2051 .decoder
= EM28XX_TVP5150
,
2054 .dvb_gpio
= kworld_330u_digital
,
2055 .xclk
= EM28XX_XCLK_FREQUENCY_12MHZ
,
2056 .i2c_speed
= EM28XX_I2C_CLK_WAIT_ENABLE
|
2057 EM28XX_I2C_EEPROM_ON_BOARD
|
2058 EM28XX_I2C_EEPROM_KEY_VALID
,
2060 .type
= EM28XX_VMUX_TELEVISION
,
2061 .vmux
= TVP5150_COMPOSITE0
,
2062 .amux
= EM28XX_AMUX_VIDEO
,
2063 .gpio
= kworld_330u_analog
,
2064 .aout
= EM28XX_AOUT_PCM_IN
| EM28XX_AOUT_PCM_STEREO
,
2066 .type
= EM28XX_VMUX_COMPOSITE
,
2067 .vmux
= TVP5150_COMPOSITE1
,
2068 .amux
= EM28XX_AMUX_LINE_IN
,
2069 .gpio
= kworld_330u_analog
,
2070 .aout
= EM28XX_AOUT_PCM_IN
| EM28XX_AOUT_PCM_STEREO
,
2072 .type
= EM28XX_VMUX_SVIDEO
,
2073 .vmux
= TVP5150_SVIDEO
,
2074 .amux
= EM28XX_AMUX_LINE_IN
,
2075 .gpio
= kworld_330u_analog
,
2078 [EM2820_BOARD_COMPRO_VIDEOMATE_FORYOU
] = {
2079 .name
= "Compro VideoMate ForYou/Stereo",
2080 .tuner_type
= TUNER_LG_PAL_NEW_TAPC
,
2081 .tvaudio_addr
= 0xb0,
2082 .tda9887_conf
= TDA9887_PRESENT
,
2083 .decoder
= EM28XX_TVP5150
,
2084 .adecoder
= EM28XX_TVAUDIO
,
2085 .mute_gpio
= compro_mute_gpio
,
2087 .type
= EM28XX_VMUX_TELEVISION
,
2088 .vmux
= TVP5150_COMPOSITE0
,
2089 .amux
= EM28XX_AMUX_VIDEO
,
2090 .gpio
= compro_unmute_tv_gpio
,
2092 .type
= EM28XX_VMUX_SVIDEO
,
2093 .vmux
= TVP5150_SVIDEO
,
2094 .amux
= EM28XX_AMUX_LINE_IN
,
2095 .gpio
= compro_unmute_svid_gpio
,
2098 [EM2860_BOARD_KAIOMY_TVNPC_U2
] = {
2099 .name
= "Kaiomy TVnPC U2",
2101 .tuner_type
= TUNER_XC2028
,
2104 .decoder
= EM28XX_TVP5150
,
2105 .tuner_gpio
= default_tuner_gpio
,
2106 .ir_codes
= RC_MAP_KAIOMY
,
2108 .type
= EM28XX_VMUX_TELEVISION
,
2109 .vmux
= TVP5150_COMPOSITE0
,
2110 .amux
= EM28XX_AMUX_VIDEO
,
2113 .type
= EM28XX_VMUX_COMPOSITE
,
2114 .vmux
= TVP5150_COMPOSITE1
,
2115 .amux
= EM28XX_AMUX_LINE_IN
,
2117 .type
= EM28XX_VMUX_SVIDEO
,
2118 .vmux
= TVP5150_SVIDEO
,
2119 .amux
= EM28XX_AMUX_LINE_IN
,
2122 .type
= EM28XX_RADIO
,
2123 .amux
= EM28XX_AMUX_LINE_IN
,
2126 [EM2860_BOARD_EASYCAP
] = {
2127 .name
= "Easy Cap Capture DC-60",
2129 .tuner_type
= TUNER_ABSENT
,
2130 .decoder
= EM28XX_SAA711X
,
2132 .type
= EM28XX_VMUX_COMPOSITE
,
2133 .vmux
= SAA7115_COMPOSITE0
,
2134 .amux
= EM28XX_AMUX_LINE_IN
,
2136 .type
= EM28XX_VMUX_SVIDEO
,
2137 .vmux
= SAA7115_SVIDEO3
,
2138 .amux
= EM28XX_AMUX_LINE_IN
,
2141 [EM2820_BOARD_IODATA_GVMVP_SZ
] = {
2142 .name
= "IO-DATA GV-MVP/SZ",
2143 .tuner_type
= TUNER_PHILIPS_FM1236_MK3
,
2144 .tuner_gpio
= default_tuner_gpio
,
2145 .tda9887_conf
= TDA9887_PRESENT
,
2146 .decoder
= EM28XX_TVP5150
,
2148 .type
= EM28XX_VMUX_TELEVISION
,
2149 .vmux
= TVP5150_COMPOSITE0
,
2150 .amux
= EM28XX_AMUX_VIDEO
,
2151 }, { /* Composite has not been tested yet */
2152 .type
= EM28XX_VMUX_COMPOSITE
,
2153 .vmux
= TVP5150_COMPOSITE1
,
2154 .amux
= EM28XX_AMUX_VIDEO
,
2155 }, { /* S-video has not been tested yet */
2156 .type
= EM28XX_VMUX_SVIDEO
,
2157 .vmux
= TVP5150_SVIDEO
,
2158 .amux
= EM28XX_AMUX_VIDEO
,
2161 [EM2860_BOARD_TERRATEC_GRABBY
] = {
2162 .name
= "Terratec Grabby",
2164 .tuner_type
= TUNER_ABSENT
,
2165 .decoder
= EM28XX_SAA711X
,
2166 .xclk
= EM28XX_XCLK_FREQUENCY_12MHZ
,
2168 .type
= EM28XX_VMUX_COMPOSITE
,
2169 .vmux
= SAA7115_COMPOSITE0
,
2170 .amux
= EM28XX_AMUX_LINE_IN
,
2172 .type
= EM28XX_VMUX_SVIDEO
,
2173 .vmux
= SAA7115_SVIDEO3
,
2174 .amux
= EM28XX_AMUX_LINE_IN
,
2176 .buttons
= std_snapshot_button
,
2177 .leds
= terratec_grabby_leds
,
2179 [EM2860_BOARD_TERRATEC_AV350
] = {
2180 .name
= "Terratec AV350",
2182 .tuner_type
= TUNER_ABSENT
,
2183 .decoder
= EM28XX_TVP5150
,
2184 .xclk
= EM28XX_XCLK_FREQUENCY_12MHZ
,
2185 .mute_gpio
= terratec_av350_mute_gpio
,
2187 .type
= EM28XX_VMUX_COMPOSITE
,
2188 .vmux
= TVP5150_COMPOSITE1
,
2189 .amux
= EM28XX_AMUX_LINE_IN
,
2190 .gpio
= terratec_av350_unmute_gpio
,
2193 .type
= EM28XX_VMUX_SVIDEO
,
2194 .vmux
= TVP5150_SVIDEO
,
2195 .amux
= EM28XX_AMUX_LINE_IN
,
2196 .gpio
= terratec_av350_unmute_gpio
,
2200 [EM2860_BOARD_ELGATO_VIDEO_CAPTURE
] = {
2201 .name
= "Elgato Video Capture",
2202 .decoder
= EM28XX_SAA711X
,
2203 .tuner_type
= TUNER_ABSENT
, /* Capture only device */
2205 .type
= EM28XX_VMUX_COMPOSITE
,
2206 .vmux
= SAA7115_COMPOSITE0
,
2207 .amux
= EM28XX_AMUX_LINE_IN
,
2209 .type
= EM28XX_VMUX_SVIDEO
,
2210 .vmux
= SAA7115_SVIDEO3
,
2211 .amux
= EM28XX_AMUX_LINE_IN
,
2215 [EM2882_BOARD_EVGA_INDTUBE
] = {
2216 .name
= "Evga inDtube",
2217 .tuner_type
= TUNER_XC2028
,
2218 .tuner_gpio
= default_tuner_gpio
,
2219 .decoder
= EM28XX_TVP5150
,
2220 .xclk
= EM28XX_XCLK_FREQUENCY_12MHZ
, /* NEC IR */
2223 .dvb_gpio
= evga_indtube_digital
,
2224 .ir_codes
= RC_MAP_EVGA_INDTUBE
,
2226 .type
= EM28XX_VMUX_TELEVISION
,
2227 .vmux
= TVP5150_COMPOSITE0
,
2228 .amux
= EM28XX_AMUX_VIDEO
,
2229 .gpio
= evga_indtube_analog
,
2231 .type
= EM28XX_VMUX_COMPOSITE
,
2232 .vmux
= TVP5150_COMPOSITE1
,
2233 .amux
= EM28XX_AMUX_LINE_IN
,
2234 .gpio
= evga_indtube_analog
,
2236 .type
= EM28XX_VMUX_SVIDEO
,
2237 .vmux
= TVP5150_SVIDEO
,
2238 .amux
= EM28XX_AMUX_LINE_IN
,
2239 .gpio
= evga_indtube_analog
,
2243 * eb1a:2868 Empia EM2870 + Philips CU1216L NIM
2244 * (Philips TDA10023 + Infineon TUA6034)
2246 [EM2870_BOARD_REDDO_DVB_C_USB_BOX
] = {
2247 .name
= "Reddo DVB-C USB TV Box",
2248 .tuner_type
= TUNER_ABSENT
,
2249 .tuner_gpio
= reddo_dvb_c_usb_box
,
2253 * 1b80:a340 - Empia EM2870, NXP TDA18271HD and LG DT3304, sold
2254 * initially as the KWorld PlusTV 340U, then as the UB435-Q.
2255 * Early variants have a TDA18271HD/C1, later ones a TDA18271HD/C2
2257 [EM2870_BOARD_KWORLD_A340
] = {
2258 .name
= "KWorld PlusTV 340U or UB435-Q (ATSC)",
2259 .tuner_type
= TUNER_ABSENT
, /* Digital-only TDA18271HD */
2261 .dvb_gpio
= kworld_a340_digital
,
2262 .tuner_gpio
= default_tuner_gpio
,
2265 * 2013:024f PCTV nanoStick T2 290e.
2266 * Empia EM28174, Sony CXD2820R and NXP TDA18271HD/C2
2268 [EM28174_BOARD_PCTV_290E
] = {
2269 .name
= "PCTV nanoStick T2 290e",
2271 .i2c_speed
= EM28XX_I2C_CLK_WAIT_ENABLE
|
2272 EM28XX_I2C_FREQ_100_KHZ
,
2273 .tuner_type
= TUNER_ABSENT
,
2274 .tuner_gpio
= pctv_290e
,
2276 .ir_codes
= RC_MAP_PINNACLE_PCTV_HD
,
2279 * 2013:024f PCTV DVB-S2 Stick 460e
2280 * Empia EM28174, NXP TDA10071, Conexant CX24118A and Allegro A8293
2282 [EM28174_BOARD_PCTV_460E
] = {
2284 .i2c_speed
= EM28XX_I2C_CLK_WAIT_ENABLE
|
2285 EM28XX_I2C_FREQ_400_KHZ
,
2286 .name
= "PCTV DVB-S2 Stick (460e)",
2287 .tuner_type
= TUNER_ABSENT
,
2288 .tuner_gpio
= pctv_460e
,
2290 .ir_codes
= RC_MAP_PINNACLE_PCTV_HD
,
2293 * eb1a:5006 Honestech VIDBOX NW03
2294 * Empia EM2860, Philips SAA7113, Empia EMP202, No Tuner
2296 [EM2860_BOARD_HT_VIDBOX_NW03
] = {
2297 .name
= "Honestech Vidbox NW03",
2298 .tuner_type
= TUNER_ABSENT
,
2299 .decoder
= EM28XX_SAA711X
,
2301 .type
= EM28XX_VMUX_COMPOSITE
,
2302 .vmux
= SAA7115_COMPOSITE0
,
2303 .amux
= EM28XX_AMUX_LINE_IN
,
2305 .type
= EM28XX_VMUX_SVIDEO
,
2306 .vmux
= SAA7115_SVIDEO3
, /* S-VIDEO needs check */
2307 .amux
= EM28XX_AMUX_LINE_IN
,
2311 * 1b80:e425 MaxMedia UB425-TC
2312 * Empia EM2874B + Micronas DRX 3913KA2 + NXP TDA18271HDC2
2314 [EM2874_BOARD_MAXMEDIA_UB425_TC
] = {
2315 .name
= "MaxMedia UB425-TC",
2316 .tuner_type
= TUNER_ABSENT
,
2317 .tuner_gpio
= maxmedia_ub425_tc
,
2319 .ir_codes
= RC_MAP_REDDO
,
2321 .i2c_speed
= EM28XX_I2C_CLK_WAIT_ENABLE
|
2322 EM28XX_I2C_FREQ_400_KHZ
,
2325 * 2304:0242 PCTV QuatroStick (510e)
2326 * Empia EM2884 + Micronas DRX 3926K + NXP TDA18271HDC2
2328 [EM2884_BOARD_PCTV_510E
] = {
2329 .name
= "PCTV QuatroStick (510e)",
2330 .tuner_type
= TUNER_ABSENT
,
2331 .tuner_gpio
= pctv_510e
,
2333 .ir_codes
= RC_MAP_PINNACLE_PCTV_HD
,
2335 .i2c_speed
= EM28XX_I2C_CLK_WAIT_ENABLE
|
2336 EM28XX_I2C_FREQ_400_KHZ
,
2339 * 2013:0251 PCTV QuatroStick nano (520e)
2340 * Empia EM2884 + Micronas DRX 3926K + NXP TDA18271HDC2
2342 [EM2884_BOARD_PCTV_520E
] = {
2343 .name
= "PCTV QuatroStick nano (520e)",
2344 .tuner_type
= TUNER_ABSENT
,
2345 .tuner_gpio
= pctv_520e
,
2347 .ir_codes
= RC_MAP_PINNACLE_PCTV_HD
,
2349 .i2c_speed
= EM28XX_I2C_CLK_WAIT_ENABLE
|
2350 EM28XX_I2C_FREQ_400_KHZ
,
2352 [EM2884_BOARD_TERRATEC_HTC_USB_XS
] = {
2353 .name
= "Terratec Cinergy HTC USB XS",
2355 .ir_codes
= RC_MAP_NEC_TERRATEC_CINERGY_XS
,
2356 .tuner_type
= TUNER_ABSENT
,
2358 .i2c_speed
= EM28XX_I2C_CLK_WAIT_ENABLE
|
2359 EM28XX_I2C_FREQ_400_KHZ
,
2362 * 1b80:e1cc Delock 61959
2363 * Empia EM2874B + Micronas DRX 3913KA2 + NXP TDA18271HDC2
2364 * mostly the same as MaxMedia UB-425-TC but different remote
2366 [EM2874_BOARD_DELOCK_61959
] = {
2367 .name
= "Delock 61959",
2368 .tuner_type
= TUNER_ABSENT
,
2369 .tuner_gpio
= maxmedia_ub425_tc
,
2371 .ir_codes
= RC_MAP_DELOCK_61959
,
2373 .i2c_speed
= EM28XX_I2C_CLK_WAIT_ENABLE
|
2374 EM28XX_I2C_FREQ_400_KHZ
,
2377 * 1b80:e346 KWorld USB ATSC TV Stick UB435-Q V2
2378 * Empia EM2874B + LG DT3305 + NXP TDA18271HDC2
2380 [EM2874_BOARD_KWORLD_UB435Q_V2
] = {
2381 .name
= "KWorld USB ATSC TV Stick UB435-Q V2",
2382 .tuner_type
= TUNER_ABSENT
,
2384 .dvb_gpio
= kworld_a340_digital
,
2385 .tuner_gpio
= default_tuner_gpio
,
2389 * 1b80:e34c KWorld USB ATSC TV Stick UB435-Q V3
2390 * Empia EM2874B + LG DT3305 + NXP TDA18271HDC2
2392 [EM2874_BOARD_KWORLD_UB435Q_V3
] = {
2393 .name
= "KWorld USB ATSC TV Stick UB435-Q V3",
2394 .tuner_type
= TUNER_ABSENT
,
2396 .tuner_gpio
= kworld_ub435q_v3_digital
,
2398 .i2c_speed
= EM28XX_I2C_CLK_WAIT_ENABLE
|
2399 EM28XX_I2C_FREQ_100_KHZ
,
2400 .leds
= kworld_ub435q_v3_leds
,
2402 [EM2874_BOARD_PCTV_HD_MINI_80E
] = {
2403 .name
= "Pinnacle PCTV HD Mini",
2404 .tuner_type
= TUNER_ABSENT
,
2406 .dvb_gpio
= em2874_pctv_80e_digital
,
2407 .decoder
= EM28XX_NODECODER
,
2408 .ir_codes
= RC_MAP_PINNACLE_PCTV_HD
,
2409 .leds
= pctv_80e_leds
,
2412 * 1ae7:9003/9004 SpeedLink Vicious And Devine Laplace webcam
2413 * Empia EM2765 + OmniVision OV2640
2415 [EM2765_BOARD_SPEEDLINK_VAD_LAPLACE
] = {
2416 .name
= "SpeedLink Vicious And Devine Laplace webcam",
2417 .xclk
= EM28XX_XCLK_FREQUENCY_24MHZ
,
2418 .i2c_speed
= EM28XX_I2C_CLK_WAIT_ENABLE
|
2419 EM28XX_I2C_FREQ_100_KHZ
,
2421 .tuner_type
= TUNER_ABSENT
,
2424 .type
= EM28XX_VMUX_COMPOSITE
,
2425 .amux
= EM28XX_AMUX_VIDEO
,
2426 .gpio
= speedlink_vad_laplace_reg_seq
,
2428 .buttons
= speedlink_vad_laplace_buttons
,
2429 .leds
= speedlink_vad_laplace_leds
,
2432 * 2013:0258 PCTV DVB-S2 Stick (461e)
2433 * Empia EM28178, Montage M88DS3103, Montage M88TS2022, Allegro A8293
2435 [EM28178_BOARD_PCTV_461E
] = {
2437 .i2c_speed
= EM28XX_I2C_CLK_WAIT_ENABLE
|
2438 EM28XX_I2C_FREQ_400_KHZ
,
2439 .name
= "PCTV DVB-S2 Stick (461e)",
2440 .tuner_type
= TUNER_ABSENT
,
2441 .tuner_gpio
= pctv_461e
,
2443 .ir_codes
= RC_MAP_PINNACLE_PCTV_HD
,
2446 * 2013:0259 PCTV DVB-S2 Stick (461e_v2)
2447 * Empia EM28178, Montage M88DS3103b, Montage M88TS2022, Allegro A8293
2449 [EM28178_BOARD_PCTV_461E_V2
] = {
2451 .i2c_speed
= EM28XX_I2C_CLK_WAIT_ENABLE
|
2452 EM28XX_I2C_FREQ_400_KHZ
,
2453 .name
= "PCTV DVB-S2 Stick (461e v2)",
2454 .tuner_type
= TUNER_ABSENT
,
2455 .tuner_gpio
= pctv_461e
,
2457 .ir_codes
= RC_MAP_PINNACLE_PCTV_HD
,
2460 * 2013:025f PCTV tripleStick (292e).
2461 * Empia EM28178, Silicon Labs Si2168, Silicon Labs Si2157
2463 [EM28178_BOARD_PCTV_292E
] = {
2464 .name
= "PCTV tripleStick (292e)",
2466 .i2c_speed
= EM28XX_I2C_CLK_WAIT_ENABLE
|
2467 EM28XX_I2C_FREQ_400_KHZ
,
2468 .tuner_type
= TUNER_ABSENT
,
2469 .tuner_gpio
= pctv_292e
,
2471 .ir_codes
= RC_MAP_PINNACLE_PCTV_HD
,
2473 [EM2861_BOARD_LEADTEK_VC100
] = {
2474 .name
= "Leadtek VC100",
2475 .tuner_type
= TUNER_ABSENT
, /* Capture only device */
2476 .decoder
= EM28XX_TVP5150
,
2478 .type
= EM28XX_VMUX_COMPOSITE
,
2479 .vmux
= TVP5150_COMPOSITE1
,
2480 .amux
= EM28XX_AMUX_LINE_IN
,
2482 .type
= EM28XX_VMUX_SVIDEO
,
2483 .vmux
= TVP5150_SVIDEO
,
2484 .amux
= EM28XX_AMUX_LINE_IN
,
2488 * eb1a:8179 Terratec Cinergy T2 Stick HD.
2489 * Empia EM28178, Silicon Labs Si2168, Silicon Labs Si2146
2491 [EM28178_BOARD_TERRATEC_T2_STICK_HD
] = {
2492 .name
= "Terratec Cinergy T2 Stick HD",
2494 .i2c_speed
= EM28XX_I2C_CLK_WAIT_ENABLE
|
2495 EM28XX_I2C_FREQ_400_KHZ
,
2496 .tuner_type
= TUNER_ABSENT
,
2497 .tuner_gpio
= terratec_t2_stick_hd
,
2499 .ir_codes
= RC_MAP_TERRATEC_SLIM_2
,
2503 * 3275:0085 PLEX PX-BCUD.
2504 * Empia EM28178, TOSHIBA TC90532XBG, Sharp QM1D1C0042
2506 [EM28178_BOARD_PLEX_PX_BCUD
] = {
2507 .name
= "PLEX PX-BCUD",
2508 .xclk
= EM28XX_XCLK_FREQUENCY_4_3MHZ
,
2510 .i2c_speed
= EM28XX_I2C_CLK_WAIT_ENABLE
,
2511 .tuner_type
= TUNER_ABSENT
,
2512 .tuner_gpio
= plex_px_bcud
,
2516 * 2040:0265 Hauppauge WinTV-dualHD (DVB version) Isoc.
2517 * 2040:8265 Hauppauge WinTV-dualHD (DVB version) Bulk.
2518 * Empia EM28274, 2x Silicon Labs Si2168, 2x Silicon Labs Si2157
2520 [EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_DVB
] = {
2521 .name
= "Hauppauge WinTV-dualHD DVB",
2523 .i2c_speed
= EM28XX_I2C_CLK_WAIT_ENABLE
|
2524 EM28XX_I2C_FREQ_400_KHZ
,
2525 .tuner_type
= TUNER_SI2157
,
2526 .tuner_gpio
= hauppauge_dualhd_dvb
,
2529 .ir_codes
= RC_MAP_HAUPPAUGE
,
2530 .leds
= hauppauge_dualhd_leds
,
2532 .type
= EM28XX_VMUX_COMPOSITE
,
2533 .vmux
= TVP5150_COMPOSITE1
,
2534 .amux
= EM28XX_AMUX_LINE_IN
,
2538 * 2040:026d Hauppauge WinTV-dualHD (model 01595 - ATSC/QAM) Isoc.
2539 * 2040:826d Hauppauge WinTV-dualHD (model 01595 - ATSC/QAM) Bulk.
2540 * Empia EM28274, 2x LG LGDT3306A, 2x Silicon Labs Si2157
2542 [EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_01595
] = {
2543 .name
= "Hauppauge WinTV-dualHD 01595 ATSC/QAM",
2545 .i2c_speed
= EM28XX_I2C_CLK_WAIT_ENABLE
|
2546 EM28XX_I2C_FREQ_400_KHZ
,
2547 .tuner_type
= TUNER_ABSENT
,
2548 .tuner_gpio
= hauppauge_dualhd_dvb
,
2551 .ir_codes
= RC_MAP_HAUPPAUGE
,
2552 .leds
= hauppauge_dualhd_leds
,
2555 * 1b80:e349 Magix USB Videowandler-2
2556 * (same chips as Honestech VIDBOX NW03)
2557 * Empia EM2860, Philips SAA7113, Empia EMP202, No Tuner
2559 [EM2861_BOARD_MAGIX_VIDEOWANDLER2
] = {
2560 .name
= "Magix USB Videowandler-2",
2561 .tuner_type
= TUNER_ABSENT
,
2562 .decoder
= EM28XX_SAA711X
,
2564 .type
= EM28XX_VMUX_COMPOSITE
,
2565 .vmux
= SAA7115_COMPOSITE0
,
2566 .amux
= EM28XX_AMUX_LINE_IN
,
2568 .type
= EM28XX_VMUX_SVIDEO
,
2569 .amux
= EM28XX_AMUX_LINE_IN
,
2573 * 1f4d:1abe MyGica iGrabber
2574 * (same as several other EM2860 devices)
2575 * Empia EM2860, Philips SAA7113, Empia EMP202, No Tuner
2577 [EM2860_BOARD_MYGICA_IGRABBER
] = {
2578 .name
= "MyGica iGrabber",
2580 .tuner_type
= TUNER_ABSENT
,
2581 .decoder
= EM28XX_SAA711X
,
2583 .type
= EM28XX_VMUX_COMPOSITE
,
2584 .vmux
= SAA7115_COMPOSITE0
,
2585 .amux
= EM28XX_AMUX_LINE_IN
,
2587 .type
= EM28XX_VMUX_SVIDEO
,
2588 .vmux
= SAA7115_SVIDEO3
,
2589 .amux
= EM28XX_AMUX_LINE_IN
,
2592 /* 2040:826d Hauppauge USB QuadHD
2593 * Empia 28274, Max Linear 692 ATSC combo demod/tuner
2595 [EM2874_BOARD_HAUPPAUGE_USB_QUADHD
] = {
2596 .name
= "Hauppauge USB QuadHD ATSC",
2600 .i2c_speed
= EM28XX_I2C_CLK_WAIT_ENABLE
| EM28XX_I2C_FREQ_100_KHZ
,
2601 .tuner_type
= TUNER_ABSENT
,
2602 .tuner_gpio
= hauppauge_usb_quadhd_atsc_reg_seq
,
2603 .leds
= hauppauge_usb_quadhd_leds
,
2606 * eb1a:2860 MyGica UTV3 Analog USB2.0 TV Box
2607 * Empia EM2860, Philips SAA7113, NXP TDA9801T demod,
2608 * Tena TNF931D-DFDR1 tuner (contains NXP TDA6509A),
2609 * ST HCF4052 demux (switches audio to line out),
2612 [EM2860_BOARD_MYGICA_UTV3
] = {
2613 .name
= "MyGica UTV3 Analog USB2.0 TV Box",
2614 .xclk
= EM28XX_XCLK_IR_RC5_MODE
| EM28XX_XCLK_FREQUENCY_12MHZ
,
2615 .tuner_type
= TUNER_TENA_TNF_931D_DFDR1
,
2616 .ir_codes
= RC_MAP_MYGICA_UTV3
,
2617 .decoder
= EM28XX_SAA711X
,
2618 .suspend_gpio
= mygica_utv3_suspend_gpio
,
2620 .type
= EM28XX_VMUX_COMPOSITE
,
2621 .vmux
= SAA7115_COMPOSITE0
,
2622 .amux
= EM28XX_AMUX_VIDEO
,
2623 .gpio
= mygica_utv3_composite_audio_gpio
,
2625 .type
= EM28XX_VMUX_TELEVISION
,
2626 .vmux
= SAA7115_COMPOSITE2
,
2627 .amux
= EM28XX_AMUX_VIDEO
,
2628 .gpio
= mygica_utv3_tuner_audio_gpio
,
2632 EXPORT_SYMBOL_GPL(em28xx_boards
);
2634 static const unsigned int em28xx_bcount
= ARRAY_SIZE(em28xx_boards
);
2636 /* table of devices that work with this driver */
2637 struct usb_device_id em28xx_id_table
[] = {
2638 { USB_DEVICE(0xeb1a, 0x2750),
2639 .driver_info
= EM2750_BOARD_UNKNOWN
},
2640 { USB_DEVICE(0xeb1a, 0x2751),
2641 .driver_info
= EM2750_BOARD_UNKNOWN
},
2642 { USB_DEVICE(0xeb1a, 0x2800),
2643 .driver_info
= EM2800_BOARD_UNKNOWN
},
2644 { USB_DEVICE(0xeb1a, 0x2710),
2645 .driver_info
= EM2820_BOARD_UNKNOWN
},
2646 { USB_DEVICE(0xeb1a, 0x2820),
2647 .driver_info
= EM2820_BOARD_UNKNOWN
},
2648 { USB_DEVICE(0xeb1a, 0x2821),
2649 .driver_info
= EM2820_BOARD_UNKNOWN
},
2650 { USB_DEVICE(0xeb1a, 0x2860),
2651 .driver_info
= EM2820_BOARD_UNKNOWN
},
2652 { USB_DEVICE(0xeb1a, 0x2861),
2653 .driver_info
= EM2820_BOARD_UNKNOWN
},
2654 { USB_DEVICE(0xeb1a, 0x2862),
2655 .driver_info
= EM2820_BOARD_UNKNOWN
},
2656 { USB_DEVICE(0xeb1a, 0x2863),
2657 .driver_info
= EM2820_BOARD_UNKNOWN
},
2658 { USB_DEVICE(0xeb1a, 0x2870),
2659 .driver_info
= EM2820_BOARD_UNKNOWN
},
2660 { USB_DEVICE(0xeb1a, 0x2881),
2661 .driver_info
= EM2820_BOARD_UNKNOWN
},
2662 { USB_DEVICE(0xeb1a, 0x2883), /* used by :Zolid Hybrid Tv Stick */
2663 .driver_info
= EM2820_BOARD_UNKNOWN
},
2664 { USB_DEVICE(0xeb1a, 0x2868),
2665 .driver_info
= EM2820_BOARD_UNKNOWN
},
2666 { USB_DEVICE(0xeb1a, 0x2875),
2667 .driver_info
= EM2820_BOARD_UNKNOWN
},
2668 { USB_DEVICE(0xeb1a, 0x2885), /* MSI Digivox Trio */
2669 .driver_info
= EM2884_BOARD_TERRATEC_H5
},
2670 { USB_DEVICE(0xeb1a, 0xe300),
2671 .driver_info
= EM2861_BOARD_KWORLD_PVRTV_300U
},
2672 { USB_DEVICE(0xeb1a, 0xe303),
2673 .driver_info
= EM2860_BOARD_KAIOMY_TVNPC_U2
},
2674 { USB_DEVICE(0xeb1a, 0xe305),
2675 .driver_info
= EM2880_BOARD_KWORLD_DVB_305U
},
2676 { USB_DEVICE(0xeb1a, 0xe310),
2677 .driver_info
= EM2880_BOARD_MSI_DIGIVOX_AD
},
2678 { USB_DEVICE(0xeb1a, 0xa313),
2679 .driver_info
= EM2882_BOARD_KWORLD_ATSC_315U
},
2680 { USB_DEVICE(0xeb1a, 0xa316),
2681 .driver_info
= EM2883_BOARD_KWORLD_HYBRID_330U
},
2682 { USB_DEVICE(0xeb1a, 0xe320),
2683 .driver_info
= EM2880_BOARD_MSI_DIGIVOX_AD_II
},
2684 { USB_DEVICE(0xeb1a, 0xe323),
2685 .driver_info
= EM2882_BOARD_KWORLD_VS_DVBT
},
2686 { USB_DEVICE(0xeb1a, 0xe350),
2687 .driver_info
= EM2870_BOARD_KWORLD_350U
},
2688 { USB_DEVICE(0xeb1a, 0xe355),
2689 .driver_info
= EM2870_BOARD_KWORLD_355U
},
2690 { USB_DEVICE(0xeb1a, 0x2801),
2691 .driver_info
= EM2800_BOARD_GRABBEEX_USB2800
},
2692 { USB_DEVICE(0xeb1a, 0xe357),
2693 .driver_info
= EM2870_BOARD_KWORLD_355U
},
2694 { USB_DEVICE(0xeb1a, 0xe359),
2695 .driver_info
= EM2870_BOARD_KWORLD_355U
},
2696 { USB_DEVICE(0x1b80, 0xe302), /* Kaiser Baas Video to DVD maker */
2697 .driver_info
= EM2820_BOARD_PINNACLE_DVC_90
},
2698 { USB_DEVICE(0x1b80, 0xe304), /* Kworld DVD Maker 2 */
2699 .driver_info
= EM2820_BOARD_PINNACLE_DVC_90
},
2700 { USB_DEVICE(0x0ccd, 0x0036),
2701 .driver_info
= EM2820_BOARD_TERRATEC_CINERGY_250
},
2702 { USB_DEVICE(0x0ccd, 0x004c),
2703 .driver_info
= EM2880_BOARD_TERRATEC_HYBRID_XS_FR
},
2704 { USB_DEVICE(0x0ccd, 0x004f),
2705 .driver_info
= EM2860_BOARD_TERRATEC_HYBRID_XS
},
2706 { USB_DEVICE(0x0ccd, 0x005e),
2707 .driver_info
= EM2882_BOARD_TERRATEC_HYBRID_XS
},
2708 { USB_DEVICE(0x0ccd, 0x0042),
2709 .driver_info
= EM2882_BOARD_TERRATEC_HYBRID_XS
},
2710 { USB_DEVICE(0x0ccd, 0x0043),
2711 .driver_info
= EM2870_BOARD_TERRATEC_XS_MT2060
},
2712 { USB_DEVICE(0x0ccd, 0x008e), /* Cinergy HTC USB XS Rev. 1 */
2713 .driver_info
= EM2884_BOARD_TERRATEC_HTC_USB_XS
},
2714 { USB_DEVICE(0x0ccd, 0x00ac), /* Cinergy HTC USB XS Rev. 2 */
2715 .driver_info
= EM2884_BOARD_TERRATEC_HTC_USB_XS
},
2716 { USB_DEVICE(0x0ccd, 0x10a2), /* H5 Rev. 1 */
2717 .driver_info
= EM2884_BOARD_TERRATEC_H5
},
2718 { USB_DEVICE(0x0ccd, 0x10ad), /* H5 Rev. 2 */
2719 .driver_info
= EM2884_BOARD_TERRATEC_H5
},
2720 { USB_DEVICE(0x0ccd, 0x10b6), /* H5 Rev. 3 */
2721 .driver_info
= EM2884_BOARD_TERRATEC_H5
},
2722 { USB_DEVICE(0x0ccd, 0x10b2), /* H6 */
2723 .driver_info
= EM2884_BOARD_TERRATEC_H6
},
2724 { USB_DEVICE(0x0ccd, 0x0084),
2725 .driver_info
= EM2860_BOARD_TERRATEC_AV350
},
2726 { USB_DEVICE(0x0ccd, 0x0096),
2727 .driver_info
= EM2860_BOARD_TERRATEC_GRABBY
},
2728 { USB_DEVICE(0x0ccd, 0x10AF),
2729 .driver_info
= EM2860_BOARD_TERRATEC_GRABBY
},
2730 { USB_DEVICE(0x0ccd, 0x00b2),
2731 .driver_info
= EM2884_BOARD_CINERGY_HTC_STICK
},
2732 { USB_DEVICE(0x0fd9, 0x0018),
2733 .driver_info
= EM2884_BOARD_ELGATO_EYETV_HYBRID_2008
},
2734 { USB_DEVICE(0x0fd9, 0x0033),
2735 .driver_info
= EM2860_BOARD_ELGATO_VIDEO_CAPTURE
},
2736 { USB_DEVICE(0x185b, 0x2870),
2737 .driver_info
= EM2870_BOARD_COMPRO_VIDEOMATE
},
2738 { USB_DEVICE(0x185b, 0x2041),
2739 .driver_info
= EM2820_BOARD_COMPRO_VIDEOMATE_FORYOU
},
2740 { USB_DEVICE(0x2040, 0x4200),
2741 .driver_info
= EM2820_BOARD_HAUPPAUGE_WINTV_USB_2
},
2742 { USB_DEVICE(0x2040, 0x4201),
2743 .driver_info
= EM2820_BOARD_HAUPPAUGE_WINTV_USB_2
},
2744 { USB_DEVICE(0x2040, 0x6500),
2745 .driver_info
= EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900
},
2746 { USB_DEVICE(0x2040, 0x6502),
2747 .driver_info
= EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2
},
2748 { USB_DEVICE(0x2040, 0x6513), /* HCW HVR-980 */
2749 .driver_info
= EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950
},
2750 { USB_DEVICE(0x2040, 0x6517), /* HP HVR-950 */
2751 .driver_info
= EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950
},
2752 { USB_DEVICE(0x2040, 0x651b), /* RP HVR-950 */
2753 .driver_info
= EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950
},
2754 { USB_DEVICE(0x2040, 0x651f),
2755 .driver_info
= EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850
},
2756 { USB_DEVICE(0x2040, 0x0265),
2757 .driver_info
= EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_DVB
},
2758 { USB_DEVICE(0x2040, 0x8265),
2759 .driver_info
= EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_DVB
},
2760 { USB_DEVICE(0x2040, 0x026d),
2761 .driver_info
= EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_01595
},
2762 { USB_DEVICE(0x2040, 0x826d),
2763 .driver_info
= EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_01595
},
2764 { USB_DEVICE(0x2040, 0x846d),
2765 .driver_info
= EM2874_BOARD_HAUPPAUGE_USB_QUADHD
},
2766 { USB_DEVICE(0x0438, 0xb002),
2767 .driver_info
= EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600
},
2768 { USB_DEVICE(0x2001, 0xf112),
2769 .driver_info
= EM2820_BOARD_DLINK_USB_TV
},
2770 { USB_DEVICE(0x2304, 0x0207),
2771 .driver_info
= EM2820_BOARD_PINNACLE_DVC_90
},
2772 { USB_DEVICE(0x2304, 0x0208),
2773 .driver_info
= EM2820_BOARD_PINNACLE_USB_2
},
2774 { USB_DEVICE(0x2304, 0x021a),
2775 .driver_info
= EM2820_BOARD_PINNACLE_DVC_90
},
2776 { USB_DEVICE(0x2304, 0x0226),
2777 .driver_info
= EM2882_BOARD_PINNACLE_HYBRID_PRO_330E
},
2778 { USB_DEVICE(0x2304, 0x0227),
2779 .driver_info
= EM2880_BOARD_PINNACLE_PCTV_HD_PRO
},
2780 { USB_DEVICE(0x2304, 0x023f),
2781 .driver_info
= EM2874_BOARD_PCTV_HD_MINI_80E
},
2782 { USB_DEVICE(0x0413, 0x6023),
2783 .driver_info
= EM2800_BOARD_LEADTEK_WINFAST_USBII
},
2784 { USB_DEVICE(0x093b, 0xa003),
2785 .driver_info
= EM2820_BOARD_PINNACLE_DVC_90
},
2786 { USB_DEVICE(0x093b, 0xa005),
2787 .driver_info
= EM2861_BOARD_PLEXTOR_PX_TV100U
},
2788 { USB_DEVICE(0x04bb, 0x0515),
2789 .driver_info
= EM2820_BOARD_IODATA_GVMVP_SZ
},
2790 { USB_DEVICE(0xeb1a, 0x50a6),
2791 .driver_info
= EM2860_BOARD_GADMEI_UTV330
},
2792 { USB_DEVICE(0x1b80, 0xa340),
2793 .driver_info
= EM2870_BOARD_KWORLD_A340
},
2794 { USB_DEVICE(0x1b80, 0xe346),
2795 .driver_info
= EM2874_BOARD_KWORLD_UB435Q_V2
},
2796 { USB_DEVICE(0x1b80, 0xe34c),
2797 .driver_info
= EM2874_BOARD_KWORLD_UB435Q_V3
},
2798 { USB_DEVICE(0x2013, 0x024f),
2799 .driver_info
= EM28174_BOARD_PCTV_290E
},
2800 { USB_DEVICE(0x2013, 0x024c),
2801 .driver_info
= EM28174_BOARD_PCTV_460E
},
2802 { USB_DEVICE(0x2040, 0x1605),
2803 .driver_info
= EM2884_BOARD_HAUPPAUGE_WINTV_HVR_930C
},
2804 { USB_DEVICE(0x1b80, 0xe755),
2805 .driver_info
= EM2884_BOARD_C3TECH_DIGITAL_DUO
},
2806 { USB_DEVICE(0xeb1a, 0x5006),
2807 .driver_info
= EM2860_BOARD_HT_VIDBOX_NW03
},
2808 { USB_DEVICE(0x1b80, 0xe309), /* Sveon STV40 */
2809 .driver_info
= EM2860_BOARD_EASYCAP
},
2810 { USB_DEVICE(0x1b80, 0xe425),
2811 .driver_info
= EM2874_BOARD_MAXMEDIA_UB425_TC
},
2812 { USB_DEVICE(0x1f4d, 0x1abe),
2813 .driver_info
= EM2860_BOARD_MYGICA_IGRABBER
},
2814 { USB_DEVICE(0x2304, 0x0242),
2815 .driver_info
= EM2884_BOARD_PCTV_510E
},
2816 { USB_DEVICE(0x2013, 0x0251),
2817 .driver_info
= EM2884_BOARD_PCTV_520E
},
2818 { USB_DEVICE(0x1b80, 0xe1cc),
2819 .driver_info
= EM2874_BOARD_DELOCK_61959
},
2820 { USB_DEVICE(0x1ae7, 0x9003),
2821 .driver_info
= EM2765_BOARD_SPEEDLINK_VAD_LAPLACE
},
2822 { USB_DEVICE(0x1ae7, 0x9004),
2823 .driver_info
= EM2765_BOARD_SPEEDLINK_VAD_LAPLACE
},
2824 { USB_DEVICE(0x2013, 0x0258),
2825 .driver_info
= EM28178_BOARD_PCTV_461E
},
2826 { USB_DEVICE(0x2013, 0x8258), /* Bulk transport 461e */
2827 .driver_info
= EM28178_BOARD_PCTV_461E
},
2828 { USB_DEVICE(0x2013, 0x0461),
2829 .driver_info
= EM28178_BOARD_PCTV_461E_V2
},
2830 { USB_DEVICE(0x2013, 0x8461), /* Bulk transport 461e v2 */
2831 .driver_info
= EM28178_BOARD_PCTV_461E_V2
},
2832 { USB_DEVICE(0x2013, 0x0259),
2833 .driver_info
= EM28178_BOARD_PCTV_461E_V2
},
2834 { USB_DEVICE(0x2013, 0x025f),
2835 .driver_info
= EM28178_BOARD_PCTV_292E
},
2836 { USB_DEVICE(0x2013, 0x0264), /* Hauppauge WinTV-soloHD 292e SE */
2837 .driver_info
= EM28178_BOARD_PCTV_292E
},
2838 { USB_DEVICE(0x2040, 0x0264), /* Hauppauge WinTV-soloHD Isoc */
2839 .driver_info
= EM28178_BOARD_PCTV_292E
},
2840 { USB_DEVICE(0x2040, 0x8264), /* Hauppauge OEM Generic WinTV-soloHD Bulk */
2841 .driver_info
= EM28178_BOARD_PCTV_292E
},
2842 { USB_DEVICE(0x2040, 0x8268), /* Hauppauge Retail WinTV-soloHD Bulk */
2843 .driver_info
= EM28178_BOARD_PCTV_292E
},
2844 { USB_DEVICE(0x0413, 0x6f07),
2845 .driver_info
= EM2861_BOARD_LEADTEK_VC100
},
2846 { USB_DEVICE(0xeb1a, 0x8179),
2847 .driver_info
= EM28178_BOARD_TERRATEC_T2_STICK_HD
},
2848 { USB_DEVICE(0x3275, 0x0085),
2849 .driver_info
= EM28178_BOARD_PLEX_PX_BCUD
},
2850 { USB_DEVICE(0xeb1a, 0x5051), /* Ion Video 2 PC MKII / Startech svid2usb23 / Raygo R12-41373 */
2851 .driver_info
= EM2860_BOARD_TVP5150_REFERENCE_DESIGN
},
2852 { USB_DEVICE(0x1b80, 0xe349), /* Magix USB Videowandler-2 */
2853 .driver_info
= EM2861_BOARD_MAGIX_VIDEOWANDLER2
},
2856 MODULE_DEVICE_TABLE(usb
, em28xx_id_table
);
2859 * EEPROM hash table for devices with generic USB IDs
2861 static const struct em28xx_hash_table em28xx_eeprom_hash
[] = {
2862 /* P/N: SA 60002070465 Tuner: TVF7533-MF */
2863 {0x6ce05a8f, EM2820_BOARD_PROLINK_PLAYTV_USB2
, TUNER_YMEC_TVF_5533MF
},
2864 {0x72cc5a8b, EM2820_BOARD_PROLINK_PLAYTV_BOX4_USB2
, TUNER_YMEC_TVF_5533MF
},
2865 {0x966a0441, EM2880_BOARD_KWORLD_DVB_310U
, TUNER_XC2028
},
2866 {0x166a0441, EM2880_BOARD_EMPIRE_DUAL_TV
, TUNER_XC2028
},
2867 {0xcee44a99, EM2882_BOARD_EVGA_INDTUBE
, TUNER_XC2028
},
2868 {0xb8846b20, EM2881_BOARD_PINNACLE_HYBRID_PRO
, TUNER_XC2028
},
2869 {0x63f653bd, EM2870_BOARD_REDDO_DVB_C_USB_BOX
, TUNER_ABSENT
},
2870 {0x4e913442, EM2882_BOARD_DIKOM_DK300
, TUNER_XC2028
},
2871 {0x85dd871e, EM2882_BOARD_ZOLID_HYBRID_TV_STICK
, TUNER_XC2028
},
2872 {0x8f597549, EM2860_BOARD_MYGICA_UTV3
, TUNER_TENA_TNF_931D_DFDR1
},
2875 /* I2C devicelist hash table for devices with generic USB IDs */
2876 static const struct em28xx_hash_table em28xx_i2c_hash
[] = {
2877 {0xb06a32c3, EM2800_BOARD_TERRATEC_CINERGY_200
, TUNER_LG_PAL_NEW_TAPC
},
2878 {0xf51200e3, EM2800_BOARD_VGEAR_POCKETTV
, TUNER_LG_PAL_NEW_TAPC
},
2879 {0x1ba50080, EM2860_BOARD_SAA711X_REFERENCE_DESIGN
, TUNER_ABSENT
},
2880 {0x77800080, EM2860_BOARD_TVP5150_REFERENCE_DESIGN
, TUNER_ABSENT
},
2881 {0xc51200e3, EM2820_BOARD_GADMEI_TVR200
, TUNER_LG_PAL_NEW_TAPC
},
2882 {0x4ba50080, EM2861_BOARD_GADMEI_UTV330PLUS
, TUNER_TNF_5335MF
},
2883 {0x6b800080, EM2874_BOARD_LEADERSHIP_ISDBT
, TUNER_ABSENT
},
2884 {0x27e10080, EM2882_BOARD_ZOLID_HYBRID_TV_STICK
, TUNER_XC2028
},
2885 {0x840d0484, EM2860_BOARD_MYGICA_UTV3
, TUNER_TENA_TNF_931D_DFDR1
},
2888 /* NOTE: introduce a separate hash table for devices with 16 bit eeproms */
2890 int em28xx_tuner_callback(void *ptr
, int component
, int command
, int arg
)
2892 struct em28xx_i2c_bus
*i2c_bus
= ptr
;
2893 struct em28xx
*dev
= i2c_bus
->dev
;
2896 if (dev
->tuner_type
!= TUNER_XC2028
&& dev
->tuner_type
!= TUNER_XC5000
)
2899 if (command
!= XC2028_TUNER_RESET
&& command
!= XC5000_TUNER_RESET
)
2902 rc
= em28xx_gpio_set(dev
, dev
->board
.tuner_gpio
);
2906 EXPORT_SYMBOL_GPL(em28xx_tuner_callback
);
2908 static inline void em28xx_set_xclk_i2c_speed(struct em28xx
*dev
)
2910 const struct em28xx_board
*board
= &em28xx_boards
[dev
->model
];
2911 u8 xclk
= board
->xclk
, i2c_speed
= board
->i2c_speed
;
2914 * Those are the default values for the majority of boards
2915 * Use those values if not specified otherwise at boards entry
2918 xclk
= EM28XX_XCLK_IR_RC5_MODE
|
2919 EM28XX_XCLK_FREQUENCY_12MHZ
;
2921 em28xx_write_reg(dev
, EM28XX_R0F_XCLK
, xclk
);
2924 i2c_speed
= EM28XX_I2C_CLK_WAIT_ENABLE
|
2925 EM28XX_I2C_FREQ_100_KHZ
;
2927 dev
->i2c_speed
= i2c_speed
& 0x03;
2929 if (!dev
->board
.is_em2800
)
2930 em28xx_write_reg(dev
, EM28XX_R06_I2C_CLK
, i2c_speed
);
2934 static inline void em28xx_set_model(struct em28xx
*dev
)
2936 dev
->board
= em28xx_boards
[dev
->model
];
2937 dev
->has_msp34xx
= dev
->board
.has_msp34xx
;
2938 dev
->is_webcam
= dev
->board
.is_webcam
;
2940 em28xx_set_xclk_i2c_speed(dev
);
2942 /* Should be initialized early, for I2C to work */
2943 dev
->def_i2c_bus
= dev
->board
.def_i2c_bus
;
2947 * Wait until AC97_RESET reports the expected value reliably before proceeding.
2948 * We also check that two unrelated registers accesses don't return the same
2949 * value to avoid premature return.
2950 * This procedure helps ensuring AC97 register accesses are reliable.
2952 static int em28xx_wait_until_ac97_features_equals(struct em28xx
*dev
,
2955 unsigned long timeout
= jiffies
+ msecs_to_jiffies(2000);
2956 int feat
, powerdown
;
2958 while (time_is_after_jiffies(timeout
)) {
2959 feat
= em28xx_read_ac97(dev
, AC97_RESET
);
2963 powerdown
= em28xx_read_ac97(dev
, AC97_POWERDOWN
);
2967 if (feat
== expected_feat
&& feat
!= powerdown
)
2973 dev_warn(&dev
->intf
->dev
, "AC97 registers access is not reliable !\n");
2978 * Since em28xx_pre_card_setup() requires a proper dev->model,
2979 * this won't work for boards with generic PCI IDs
2981 static void em28xx_pre_card_setup(struct em28xx
*dev
)
2984 * Set the initial XCLK and I2C clock values based on the board
2987 em28xx_set_xclk_i2c_speed(dev
);
2989 /* request some modules */
2990 switch (dev
->model
) {
2991 case EM2861_BOARD_PLEXTOR_PX_TV100U
:
2992 /* Sets the msp34xx I2S speed */
2993 dev
->i2s_speed
= 2048000;
2995 case EM2861_BOARD_KWORLD_PVRTV_300U
:
2996 case EM2880_BOARD_KWORLD_DVB_305U
:
2997 em28xx_write_reg(dev
, EM2820_R08_GPIO_CTRL
, 0x6d);
2998 usleep_range(10000, 11000);
2999 em28xx_write_reg(dev
, EM2820_R08_GPIO_CTRL
, 0x7d);
3000 usleep_range(10000, 11000);
3002 case EM2870_BOARD_COMPRO_VIDEOMATE
:
3004 * TODO: someone can do some cleanup here...
3005 * not everything's needed
3007 em28xx_write_reg(dev
, EM2880_R04_GPO
, 0x00);
3008 usleep_range(10000, 11000);
3009 em28xx_write_reg(dev
, EM2880_R04_GPO
, 0x01);
3010 usleep_range(10000, 11000);
3011 em28xx_write_reg(dev
, EM2820_R08_GPIO_CTRL
, 0xfd);
3013 em28xx_write_reg(dev
, EM2820_R08_GPIO_CTRL
, 0xfc);
3015 em28xx_write_reg(dev
, EM2820_R08_GPIO_CTRL
, 0xdc);
3017 em28xx_write_reg(dev
, EM2820_R08_GPIO_CTRL
, 0xfc);
3020 case EM2870_BOARD_TERRATEC_XS_MT2060
:
3022 * this device needs some gpio writes to get the DVB-T
3025 em28xx_write_reg(dev
, EM2820_R08_GPIO_CTRL
, 0xfe);
3027 em28xx_write_reg(dev
, EM2820_R08_GPIO_CTRL
, 0xde);
3029 em28xx_write_reg(dev
, EM2820_R08_GPIO_CTRL
, 0xfe);
3032 case EM2870_BOARD_PINNACLE_PCTV_DVB
:
3034 * this device needs some gpio writes to get the
3037 em28xx_write_reg(dev
, EM2820_R08_GPIO_CTRL
, 0xfe);
3039 em28xx_write_reg(dev
, EM2820_R08_GPIO_CTRL
, 0xde);
3041 em28xx_write_reg(dev
, EM2820_R08_GPIO_CTRL
, 0xfe);
3044 case EM2820_BOARD_GADMEI_UTV310
:
3045 case EM2820_BOARD_MSI_VOX_USB_2
:
3046 /* enables audio for that devices */
3047 em28xx_write_reg(dev
, EM2820_R08_GPIO_CTRL
, 0xfd);
3050 case EM2882_BOARD_KWORLD_ATSC_315U
:
3051 em28xx_write_reg(dev
, EM2820_R08_GPIO_CTRL
, 0xff);
3052 usleep_range(10000, 11000);
3053 em28xx_write_reg(dev
, EM2820_R08_GPIO_CTRL
, 0xfe);
3054 usleep_range(10000, 11000);
3055 em28xx_write_reg(dev
, EM2880_R04_GPO
, 0x00);
3056 usleep_range(10000, 11000);
3057 em28xx_write_reg(dev
, EM2880_R04_GPO
, 0x08);
3058 usleep_range(10000, 11000);
3061 case EM2860_BOARD_KAIOMY_TVNPC_U2
:
3062 em28xx_write_regs(dev
, EM28XX_R0F_XCLK
, "\x07", 1);
3063 em28xx_write_regs(dev
, EM28XX_R06_I2C_CLK
, "\x40", 1);
3064 em28xx_write_regs(dev
, 0x0d, "\x42", 1);
3065 em28xx_write_regs(dev
, 0x08, "\xfd", 1);
3066 usleep_range(10000, 11000);
3067 em28xx_write_regs(dev
, 0x08, "\xff", 1);
3068 usleep_range(10000, 11000);
3069 em28xx_write_regs(dev
, 0x08, "\x7f", 1);
3070 usleep_range(10000, 11000);
3071 em28xx_write_regs(dev
, 0x08, "\x6b", 1);
3074 case EM2860_BOARD_EASYCAP
:
3075 em28xx_write_regs(dev
, 0x08, "\xf8", 1);
3078 case EM2820_BOARD_IODATA_GVMVP_SZ
:
3079 em28xx_write_reg(dev
, EM2820_R08_GPIO_CTRL
, 0xff);
3081 em28xx_write_reg(dev
, EM2820_R08_GPIO_CTRL
, 0xf7);
3082 usleep_range(10000, 11000);
3083 em28xx_write_reg(dev
, EM2820_R08_GPIO_CTRL
, 0xfe);
3085 em28xx_write_reg(dev
, EM2820_R08_GPIO_CTRL
, 0xfd);
3089 case EM2860_BOARD_TERRATEC_GRABBY
:
3091 * HACK?: Ensure AC97 register reading is reliable before
3092 * proceeding. In practice, this will wait about 1.6 seconds.
3094 em28xx_wait_until_ac97_features_equals(dev
, 0x6a90);
3098 em28xx_gpio_set(dev
, dev
->board
.tuner_gpio
);
3099 em28xx_set_mode(dev
, EM28XX_ANALOG_MODE
);
3102 em28xx_set_mode(dev
, EM28XX_SUSPEND
);
3105 static int em28xx_hint_board(struct em28xx
*dev
)
3109 if (dev
->is_webcam
) {
3110 if (dev
->em28xx_sensor
== EM28XX_MT9V011
) {
3111 dev
->model
= EM2820_BOARD_SILVERCREST_WEBCAM
;
3112 } else if (dev
->em28xx_sensor
== EM28XX_MT9M001
||
3113 dev
->em28xx_sensor
== EM28XX_MT9M111
) {
3114 dev
->model
= EM2750_BOARD_UNKNOWN
;
3116 /* FIXME: IMPROVE ! */
3122 * HINT method: EEPROM
3124 * This method works only for boards with eeprom.
3125 * Uses a hash of all eeprom bytes. The hash should be
3126 * unique for a vendor/tuner pair.
3127 * There are a high chance that tuners for different
3128 * video standards produce different hashes.
3130 for (i
= 0; i
< ARRAY_SIZE(em28xx_eeprom_hash
); i
++) {
3131 if (dev
->hash
== em28xx_eeprom_hash
[i
].hash
) {
3132 dev
->model
= em28xx_eeprom_hash
[i
].model
;
3133 dev
->tuner_type
= em28xx_eeprom_hash
[i
].tuner
;
3135 dev_err(&dev
->intf
->dev
,
3136 "Your board has no unique USB ID.\n"
3137 "A hint were successfully done, based on eeprom hash.\n"
3138 "This method is not 100%% failproof.\n"
3139 "If the board were misdetected, please email this log to:\n"
3140 "\tV4L Mailing List <linux-media@vger.kernel.org>\n"
3141 "Board detected as %s\n",
3142 em28xx_boards
[dev
->model
].name
);
3149 * HINT method: I2C attached devices
3151 * This method works for all boards.
3152 * Uses a hash of i2c scanned devices.
3153 * Devices with the same i2c attached chips will
3154 * be considered equal.
3155 * This method is less precise than the eeprom one.
3158 /* user did not request i2c scanning => do it now */
3160 em28xx_do_i2c_scan(dev
, dev
->def_i2c_bus
);
3162 for (i
= 0; i
< ARRAY_SIZE(em28xx_i2c_hash
); i
++) {
3163 if (dev
->i2c_hash
== em28xx_i2c_hash
[i
].hash
) {
3164 dev
->model
= em28xx_i2c_hash
[i
].model
;
3165 dev
->tuner_type
= em28xx_i2c_hash
[i
].tuner
;
3166 dev_err(&dev
->intf
->dev
,
3167 "Your board has no unique USB ID.\n"
3168 "A hint were successfully done, based on i2c devicelist hash.\n"
3169 "This method is not 100%% failproof.\n"
3170 "If the board were misdetected, please email this log to:\n"
3171 "\tV4L Mailing List <linux-media@vger.kernel.org>\n"
3172 "Board detected as %s\n",
3173 em28xx_boards
[dev
->model
].name
);
3179 dev_err(&dev
->intf
->dev
,
3180 "Your board has no unique USB ID and thus need a hint to be detected.\n"
3181 "You may try to use card=<n> insmod option to workaround that.\n"
3182 "Please send an email with this log to:\n"
3183 "\tV4L Mailing List <linux-media@vger.kernel.org>\n"
3184 "Board eeprom hash is 0x%08lx\n"
3185 "Board i2c devicelist hash is 0x%08lx\n",
3186 dev
->hash
, dev
->i2c_hash
);
3188 dev_err(&dev
->intf
->dev
,
3189 "Here is a list of valid choices for the card=<n> insmod option:\n");
3190 for (i
= 0; i
< em28xx_bcount
; i
++) {
3191 dev_err(&dev
->intf
->dev
,
3192 " card=%d -> %s\n", i
, em28xx_boards
[i
].name
);
3197 static void em28xx_card_setup(struct em28xx
*dev
)
3200 bool duplicate_entry
;
3203 * If the device can be a webcam, seek for a sensor.
3204 * If sensor is not found, then it isn't a webcam.
3206 if (dev
->is_webcam
) {
3207 em28xx_detect_sensor(dev
);
3208 if (dev
->em28xx_sensor
== EM28XX_NOSENSOR
)
3209 /* NOTE: error/unknown sensor/no sensor */
3213 switch (dev
->model
) {
3214 case EM2750_BOARD_UNKNOWN
:
3215 case EM2820_BOARD_UNKNOWN
:
3216 case EM2800_BOARD_UNKNOWN
:
3218 * The K-WORLD DVB-T 310U is detected as an MSI Digivox AD.
3220 * This occurs because they share identical USB vendor and
3223 * What we do here is look up the EEPROM hash of the K-WORLD
3224 * and if it is found then we decide that we do not have
3225 * a DIGIVOX and reset the device to the K-WORLD instead.
3227 * This solution is only valid if they do not share eeprom
3228 * hash identities which has not been determined as yet.
3230 if (em28xx_hint_board(dev
) < 0) {
3231 dev_err(&dev
->intf
->dev
, "Board not discovered\n");
3233 em28xx_set_model(dev
);
3234 em28xx_pre_card_setup(dev
);
3238 em28xx_set_model(dev
);
3241 dev_info(&dev
->intf
->dev
, "Identified as %s (card=%d)\n",
3242 dev
->board
.name
, dev
->model
);
3244 dev
->tuner_type
= em28xx_boards
[dev
->model
].tuner_type
;
3246 /* request some modules */
3247 switch (dev
->model
) {
3248 case EM2820_BOARD_HAUPPAUGE_WINTV_USB_2
:
3249 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900
:
3250 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2
:
3251 case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850
:
3252 case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950
:
3253 case EM2884_BOARD_HAUPPAUGE_WINTV_HVR_930C
:
3254 case EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_DVB
:
3255 case EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_01595
:
3261 #if defined(CONFIG_MODULES) && defined(MODULE)
3262 request_module("tveeprom");
3264 /* Call first TVeeprom */
3266 tveeprom_hauppauge_analog(&tv
, dev
->eedata
);
3268 dev
->tuner_type
= tv
.tuner_type
;
3270 if (tv
.audio_processor
== TVEEPROM_AUDPROC_MSP
) {
3271 dev
->i2s_speed
= 2048000;
3272 dev
->has_msp34xx
= 1;
3276 case EM2882_BOARD_KWORLD_ATSC_315U
:
3277 em28xx_write_reg(dev
, 0x0d, 0x42);
3278 usleep_range(10000, 11000);
3279 em28xx_write_reg(dev
, EM2820_R08_GPIO_CTRL
, 0xfd);
3280 usleep_range(10000, 11000);
3282 case EM2820_BOARD_KWORLD_PVRTV2800RF
:
3283 /* GPIO enables sound on KWORLD PVR TV 2800RF */
3284 em28xx_write_reg(dev
, EM2820_R08_GPIO_CTRL
, 0xf9);
3286 case EM2820_BOARD_UNKNOWN
:
3287 case EM2800_BOARD_UNKNOWN
:
3289 * The K-WORLD DVB-T 310U is detected as an MSI Digivox AD.
3291 * This occurs because they share identical USB vendor and
3294 * What we do here is look up the EEPROM hash of the K-WORLD
3295 * and if it is found then we decide that we do not have
3296 * a DIGIVOX and reset the device to the K-WORLD instead.
3298 * This solution is only valid if they do not share eeprom
3299 * hash identities which has not been determined as yet.
3301 case EM2880_BOARD_MSI_DIGIVOX_AD
:
3302 if (!em28xx_hint_board(dev
))
3303 em28xx_set_model(dev
);
3306 * In cases where we had to use a board hint, the call to
3307 * em28xx_set_mode() in em28xx_pre_card_setup() was a no-op,
3308 * so make the call now so the analog GPIOs are set properly
3309 * before probing the i2c bus.
3311 em28xx_gpio_set(dev
, dev
->board
.tuner_gpio
);
3312 em28xx_set_mode(dev
, EM28XX_ANALOG_MODE
);
3316 * The Dikom DK300 is detected as an Kworld VS-DVB-T 323UR.
3318 * This occurs because they share identical USB vendor and
3321 * What we do here is look up the EEPROM hash of the Dikom
3322 * and if it is found then we decide that we do not have
3323 * a Kworld and reset the device to the Dikom instead.
3325 * This solution is only valid if they do not share eeprom
3326 * hash identities which has not been determined as yet.
3328 case EM2882_BOARD_KWORLD_VS_DVBT
:
3329 if (!em28xx_hint_board(dev
))
3330 em28xx_set_model(dev
);
3333 * In cases where we had to use a board hint, the call to
3334 * em28xx_set_mode() in em28xx_pre_card_setup() was a no-op,
3335 * so make the call now so the analog GPIOs are set properly
3336 * before probing the i2c bus.
3338 em28xx_gpio_set(dev
, dev
->board
.tuner_gpio
);
3339 em28xx_set_mode(dev
, EM28XX_ANALOG_MODE
);
3343 if (dev
->board
.valid
== EM28XX_BOARD_NOT_VALIDATED
) {
3344 dev_err(&dev
->intf
->dev
,
3346 "The support for this board weren't valid yet.\n"
3347 "Please send a report of having this working\n"
3348 "not to V4L mailing list (and/or to other addresses)\n\n");
3351 /* Free eeprom data memory */
3355 /* Allow override tuner type by a module parameter */
3357 dev
->tuner_type
= tuner
;
3360 * Dynamically generate a list of valid audio inputs for this
3361 * specific board, mapping them via enum em28xx_amux.
3365 for (i
= 0; i
< MAX_EM28XX_INPUT
; i
++) {
3366 if (!INPUT(i
)->type
)
3369 /* Skip already mapped audio inputs */
3370 duplicate_entry
= false;
3371 for (j
= 0; j
< idx
; j
++) {
3372 if (INPUT(i
)->amux
== dev
->amux_map
[j
]) {
3373 duplicate_entry
= true;
3377 if (duplicate_entry
)
3380 dev
->amux_map
[idx
++] = INPUT(i
)->amux
;
3382 for (; idx
< MAX_EM28XX_INPUT
; idx
++)
3383 dev
->amux_map
[idx
] = EM28XX_AMUX_UNUSED
;
3386 void em28xx_setup_xc3028(struct em28xx
*dev
, struct xc2028_ctrl
*ctl
)
3388 memset(ctl
, 0, sizeof(*ctl
));
3390 ctl
->fname
= XC2028_DEFAULT_FIRMWARE
;
3392 ctl
->mts
= em28xx_boards
[dev
->model
].mts_firmware
;
3394 switch (dev
->model
) {
3395 case EM2880_BOARD_EMPIRE_DUAL_TV
:
3396 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900
:
3397 case EM2882_BOARD_TERRATEC_HYBRID_XS
:
3398 case EM2880_BOARD_TERRATEC_HYBRID_XS
:
3399 case EM2880_BOARD_TERRATEC_HYBRID_XS_FR
:
3400 case EM2881_BOARD_PINNACLE_HYBRID_PRO
:
3401 case EM2882_BOARD_ZOLID_HYBRID_TV_STICK
:
3402 ctl
->demod
= XC3028_FE_ZARLINK456
;
3404 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2
:
3405 case EM2882_BOARD_PINNACLE_HYBRID_PRO_330E
:
3406 ctl
->demod
= XC3028_FE_DEFAULT
;
3408 case EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600
:
3409 ctl
->demod
= XC3028_FE_DEFAULT
;
3410 ctl
->fname
= XC3028L_DEFAULT_FIRMWARE
;
3412 case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850
:
3413 case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950
:
3414 case EM2880_BOARD_PINNACLE_PCTV_HD_PRO
:
3415 /* FIXME: Better to specify the needed IF */
3416 ctl
->demod
= XC3028_FE_DEFAULT
;
3418 case EM2883_BOARD_KWORLD_HYBRID_330U
:
3419 case EM2882_BOARD_DIKOM_DK300
:
3420 case EM2882_BOARD_KWORLD_VS_DVBT
:
3421 ctl
->demod
= XC3028_FE_CHINA
;
3422 ctl
->fname
= XC2028_DEFAULT_FIRMWARE
;
3424 case EM2882_BOARD_EVGA_INDTUBE
:
3425 ctl
->demod
= XC3028_FE_CHINA
;
3426 ctl
->fname
= XC3028L_DEFAULT_FIRMWARE
;
3429 ctl
->demod
= XC3028_FE_OREN538
;
3432 EXPORT_SYMBOL_GPL(em28xx_setup_xc3028
);
3434 static void request_module_async(struct work_struct
*work
)
3436 struct em28xx
*dev
= container_of(work
,
3437 struct em28xx
, request_module_wk
);
3440 * The em28xx extensions can be modules or builtin. If the
3441 * modules are already loaded or are built in, those extensions
3442 * can be initialised right now. Otherwise, the module init
3447 * Devices with an audio-only intf also have a V4L/DVB/RC
3448 * intf. Don't register extensions twice on those devices.
3450 if (dev
->is_audio_only
) {
3451 #if defined(CONFIG_MODULES) && defined(MODULE)
3452 request_module("em28xx-alsa");
3457 em28xx_init_extension(dev
);
3459 #if defined(CONFIG_MODULES) && defined(MODULE)
3461 request_module("em28xx-v4l");
3462 if (dev
->usb_audio_type
== EM28XX_USB_AUDIO_CLASS
)
3463 request_module("snd-usb-audio");
3464 else if (dev
->usb_audio_type
== EM28XX_USB_AUDIO_VENDOR
)
3465 request_module("em28xx-alsa");
3466 if (dev
->board
.has_dvb
)
3467 request_module("em28xx-dvb");
3468 if (dev
->board
.buttons
||
3469 ((dev
->board
.ir_codes
|| dev
->board
.has_ir_i2c
) && !disable_ir
))
3470 request_module("em28xx-rc");
3471 #endif /* CONFIG_MODULES */
3474 static void request_modules(struct em28xx
*dev
)
3476 INIT_WORK(&dev
->request_module_wk
, request_module_async
);
3477 schedule_work(&dev
->request_module_wk
);
3480 static void flush_request_modules(struct em28xx
*dev
)
3482 flush_work(&dev
->request_module_wk
);
3485 static int em28xx_media_device_init(struct em28xx
*dev
,
3486 struct usb_device
*udev
)
3488 #ifdef CONFIG_MEDIA_CONTROLLER
3489 struct media_device
*mdev
;
3491 mdev
= kzalloc(sizeof(*mdev
), GFP_KERNEL
);
3496 media_device_usb_init(mdev
, udev
, udev
->product
);
3497 else if (udev
->manufacturer
)
3498 media_device_usb_init(mdev
, udev
, udev
->manufacturer
);
3500 media_device_usb_init(mdev
, udev
, dev_name(&dev
->intf
->dev
));
3502 dev
->media_dev
= mdev
;
3507 static void em28xx_unregister_media_device(struct em28xx
*dev
)
3509 #ifdef CONFIG_MEDIA_CONTROLLER
3510 if (dev
->media_dev
) {
3511 media_device_unregister(dev
->media_dev
);
3512 media_device_cleanup(dev
->media_dev
);
3513 kfree(dev
->media_dev
);
3514 dev
->media_dev
= NULL
;
3520 * em28xx_release_resources()
3521 * unregisters the v4l2,i2c and usb devices
3522 * called when the device gets disconnected or at module unload
3524 static void em28xx_release_resources(struct em28xx
*dev
)
3526 struct usb_device
*udev
= interface_to_usbdev(dev
->intf
);
3528 /*FIXME: I2C IR should be disconnected */
3530 mutex_lock(&dev
->lock
);
3532 em28xx_unregister_media_device(dev
);
3534 if (dev
->def_i2c_bus
)
3535 em28xx_i2c_unregister(dev
, 1);
3536 em28xx_i2c_unregister(dev
, 0);
3538 if (dev
->ts
== PRIMARY_TS
)
3541 /* Mark device as unused */
3542 clear_bit(dev
->devno
, em28xx_devused
);
3544 mutex_unlock(&dev
->lock
);
3548 * em28xx_free_device() - Free em28xx device
3550 * @ref: struct kref for em28xx device
3552 * This is called when all extensions and em28xx core unregisters a device
3554 void em28xx_free_device(struct kref
*ref
)
3556 struct em28xx
*dev
= kref_to_dev(ref
);
3558 dev_info(&dev
->intf
->dev
, "Freeing device\n");
3560 if (!dev
->disconnected
)
3561 em28xx_release_resources(dev
);
3563 if (dev
->ts
== PRIMARY_TS
)
3564 kfree(dev
->alt_max_pkt_size_isoc
);
3568 EXPORT_SYMBOL_GPL(em28xx_free_device
);
3572 * allocates and inits the device structs, registers i2c bus and v4l device
3574 static int em28xx_init_dev(struct em28xx
*dev
, struct usb_device
*udev
,
3575 struct usb_interface
*intf
,
3579 const char *chip_name
= NULL
;
3582 mutex_init(&dev
->ctrl_urb_lock
);
3583 spin_lock_init(&dev
->slock
);
3585 dev
->em28xx_write_regs
= em28xx_write_regs
;
3586 dev
->em28xx_read_reg
= em28xx_read_reg
;
3587 dev
->em28xx_read_reg_req_len
= em28xx_read_reg_req_len
;
3588 dev
->em28xx_write_regs_req
= em28xx_write_regs_req
;
3589 dev
->em28xx_read_reg_req
= em28xx_read_reg_req
;
3590 dev
->board
.is_em2800
= em28xx_boards
[dev
->model
].is_em2800
;
3592 em28xx_set_model(dev
);
3594 dev
->wait_after_write
= 5;
3596 /* Based on the Chip ID, set the device configuration */
3597 retval
= em28xx_read_reg(dev
, EM28XX_R0A_CHIPID
);
3599 dev
->chip_id
= retval
;
3601 switch (dev
->chip_id
) {
3602 case CHIP_ID_EM2800
:
3603 chip_name
= "em2800";
3605 case CHIP_ID_EM2710
:
3606 chip_name
= "em2710";
3608 case CHIP_ID_EM2750
:
3609 chip_name
= "em2750";
3611 case CHIP_ID_EM2765
:
3612 chip_name
= "em2765";
3613 dev
->wait_after_write
= 0;
3615 dev
->eeprom_addrwidth_16bit
= 1;
3617 case CHIP_ID_EM2820
:
3618 chip_name
= "em2710/2820";
3619 if (le16_to_cpu(udev
->descriptor
.idVendor
) == 0xeb1a) {
3620 __le16 idProd
= udev
->descriptor
.idProduct
;
3622 if (le16_to_cpu(idProd
) == 0x2710)
3623 chip_name
= "em2710";
3624 else if (le16_to_cpu(idProd
) == 0x2820)
3625 chip_name
= "em2820";
3627 /* NOTE: the em2820 is used in webcams, too ! */
3629 case CHIP_ID_EM2840
:
3630 chip_name
= "em2840";
3632 case CHIP_ID_EM2860
:
3633 chip_name
= "em2860";
3635 case CHIP_ID_EM2870
:
3636 chip_name
= "em2870";
3637 dev
->wait_after_write
= 0;
3639 case CHIP_ID_EM2874
:
3640 chip_name
= "em2874";
3641 dev
->wait_after_write
= 0;
3642 dev
->eeprom_addrwidth_16bit
= 1;
3644 case CHIP_ID_EM28174
:
3645 chip_name
= "em28174";
3646 dev
->wait_after_write
= 0;
3647 dev
->eeprom_addrwidth_16bit
= 1;
3649 case CHIP_ID_EM28178
:
3650 chip_name
= "em28178";
3651 dev
->wait_after_write
= 0;
3652 dev
->eeprom_addrwidth_16bit
= 1;
3654 case CHIP_ID_EM2883
:
3655 chip_name
= "em2882/3";
3656 dev
->wait_after_write
= 0;
3658 case CHIP_ID_EM2884
:
3659 chip_name
= "em2884";
3660 dev
->wait_after_write
= 0;
3661 dev
->eeprom_addrwidth_16bit
= 1;
3666 dev_info(&dev
->intf
->dev
,
3667 "unknown em28xx chip ID (%d)\n", dev
->chip_id
);
3669 dev_info(&dev
->intf
->dev
, "chip ID is %s\n", chip_name
);
3671 em28xx_media_device_init(dev
, udev
);
3673 if (dev
->is_audio_only
) {
3674 retval
= em28xx_audio_setup(dev
);
3677 goto err_deinit_media
;
3679 em28xx_init_extension(dev
);
3684 em28xx_pre_card_setup(dev
);
3686 rt_mutex_init(&dev
->i2c_bus_lock
);
3688 /* register i2c bus 0 */
3689 if (dev
->board
.is_em2800
)
3690 retval
= em28xx_i2c_register(dev
, 0, EM28XX_I2C_ALGO_EM2800
);
3692 retval
= em28xx_i2c_register(dev
, 0, EM28XX_I2C_ALGO_EM28XX
);
3694 dev_err(&dev
->intf
->dev
,
3695 "%s: em28xx_i2c_register bus 0 - error [%d]!\n",
3697 goto err_deinit_media
;
3700 /* register i2c bus 1 */
3701 if (dev
->def_i2c_bus
) {
3703 retval
= em28xx_i2c_register(dev
, 1,
3704 EM28XX_I2C_ALGO_EM25XX_BUS_B
);
3706 retval
= em28xx_i2c_register(dev
, 1,
3707 EM28XX_I2C_ALGO_EM28XX
);
3709 dev_err(&dev
->intf
->dev
,
3710 "%s: em28xx_i2c_register bus 1 - error [%d]!\n",
3717 /* Do board specific init and eeprom reading */
3718 em28xx_card_setup(dev
);
3723 em28xx_i2c_unregister(dev
, 0);
3725 em28xx_unregister_media_device(dev
);
3729 static int em28xx_duplicate_dev(struct em28xx
*dev
)
3732 struct em28xx
*sec_dev
= kmemdup(dev
, sizeof(*sec_dev
), GFP_KERNEL
);
3735 dev
->dev_next
= NULL
;
3738 /* Check to see next free device and mark as used */
3740 nr
= find_first_zero_bit(em28xx_devused
, EM28XX_MAXBOARDS
);
3741 if (nr
>= EM28XX_MAXBOARDS
) {
3742 /* No free device slots */
3743 dev_warn(&dev
->intf
->dev
, ": Supports only %i em28xx boards.\n",
3746 dev
->dev_next
= NULL
;
3749 } while (test_and_set_bit(nr
, em28xx_devused
));
3750 sec_dev
->devno
= nr
;
3751 snprintf(sec_dev
->name
, 28, "em28xx #%d", nr
);
3752 sec_dev
->dev_next
= NULL
;
3753 dev
->dev_next
= sec_dev
;
3757 /* high bandwidth multiplier, as encoded in highspeed endpoint descriptors */
3758 #define hb_mult(wMaxPacketSize) (1 + (((wMaxPacketSize) >> 11) & 0x03))
3760 static void em28xx_check_usb_descriptor(struct em28xx
*dev
,
3761 struct usb_device
*udev
,
3762 struct usb_interface
*intf
,
3764 bool *has_vendor_audio
,
3768 const struct usb_endpoint_descriptor
*e
;
3769 int sizedescr
, size
;
3774 * Old logic with support for isoc transfers only was:
3775 * 0x82 isoc => analog
3776 * 0x83 isoc => audio
3777 * 0x84 isoc => digital
3779 * New logic with support for bulk transfers
3780 * 0x82 isoc => analog
3781 * 0x82 bulk => analog
3782 * 0x83 isoc* => audio
3783 * 0x84 isoc => digital
3784 * 0x84 bulk => analog or digital**
3785 * 0x85 isoc => digital TS2
3786 * 0x85 bulk => digital TS2
3787 * (*: audio should always be isoc)
3788 * (**: analog, if ep 0x82 is isoc, otherwise digital)
3790 * The new logic preserves backwards compatibility and
3791 * reflects the endpoint configurations we have seen
3792 * so far. But there might be devices for which this
3793 * logic is not sufficient...
3796 e
= &intf
->altsetting
[alt
].endpoint
[ep
].desc
;
3798 if (!usb_endpoint_dir_in(e
))
3801 sizedescr
= le16_to_cpu(e
->wMaxPacketSize
);
3802 size
= sizedescr
& 0x7ff;
3804 if (udev
->speed
== USB_SPEED_HIGH
)
3805 size
= size
* hb_mult(sizedescr
);
3807 /* Only inspect input endpoints */
3809 switch (e
->bEndpointAddress
) {
3812 if (usb_endpoint_xfer_isoc(e
)) {
3813 dev
->analog_ep_isoc
= e
->bEndpointAddress
;
3814 dev
->alt_max_pkt_size_isoc
[alt
] = size
;
3815 } else if (usb_endpoint_xfer_bulk(e
)) {
3816 dev
->analog_ep_bulk
= e
->bEndpointAddress
;
3820 if (usb_endpoint_xfer_isoc(e
))
3821 *has_vendor_audio
= true;
3824 "error: skipping audio endpoint 0x83, because it uses bulk transfers !\n");
3827 if (*has_video
&& (usb_endpoint_xfer_bulk(e
))) {
3828 dev
->analog_ep_bulk
= e
->bEndpointAddress
;
3830 if (usb_endpoint_xfer_isoc(e
)) {
3831 if (size
> dev
->dvb_max_pkt_size_isoc
) {
3833 * 2) some manufacturers (e.g. Terratec)
3834 * disable endpoints by setting
3835 * wMaxPacketSize to 0 bytes for all
3836 * alt settings. So far, we've seen
3837 * this for DVB isoc endpoints only.
3840 dev
->dvb_ep_isoc
= e
->bEndpointAddress
;
3841 dev
->dvb_max_pkt_size_isoc
= size
;
3842 dev
->dvb_alt_isoc
= alt
;
3846 dev
->dvb_ep_bulk
= e
->bEndpointAddress
;
3851 if (usb_endpoint_xfer_isoc(e
)) {
3852 if (size
> dev
->dvb_max_pkt_size_isoc_ts2
) {
3853 dev
->dvb_ep_isoc_ts2
= e
->bEndpointAddress
;
3854 dev
->dvb_max_pkt_size_isoc_ts2
= size
;
3855 dev
->dvb_alt_isoc
= alt
;
3858 dev
->dvb_ep_bulk_ts2
= e
->bEndpointAddress
;
3865 * em28xx_usb_probe()
3866 * checks for supported devices
3868 static int em28xx_usb_probe(struct usb_interface
*intf
,
3869 const struct usb_device_id
*id
)
3871 struct usb_device
*udev
;
3872 struct em28xx
*dev
= NULL
;
3874 bool has_vendor_audio
= false, has_video
= false, has_dvb
= false;
3875 int i
, nr
, try_bulk
;
3876 const int ifnum
= intf
->altsetting
[0].desc
.bInterfaceNumber
;
3879 udev
= usb_get_dev(interface_to_usbdev(intf
));
3881 /* Check to see next free device and mark as used */
3883 nr
= find_first_zero_bit(em28xx_devused
, EM28XX_MAXBOARDS
);
3884 if (nr
>= EM28XX_MAXBOARDS
) {
3885 /* No free device slots */
3887 "Driver supports up to %i em28xx boards.\n",
3892 } while (test_and_set_bit(nr
, em28xx_devused
));
3894 /* Don't register audio interfaces */
3895 if (intf
->altsetting
[0].desc
.bInterfaceClass
== USB_CLASS_AUDIO
) {
3896 dev_info(&intf
->dev
,
3897 "audio device (%04x:%04x): interface %i, class %i\n",
3898 le16_to_cpu(udev
->descriptor
.idVendor
),
3899 le16_to_cpu(udev
->descriptor
.idProduct
),
3901 intf
->altsetting
[0].desc
.bInterfaceClass
);
3907 /* allocate memory for our device state and initialize it */
3908 dev
= kzalloc(sizeof(*dev
), GFP_KERNEL
);
3914 /* compute alternate max packet sizes */
3915 dev
->alt_max_pkt_size_isoc
= kcalloc(intf
->num_altsetting
,
3916 sizeof(dev
->alt_max_pkt_size_isoc
[0]),
3918 if (!dev
->alt_max_pkt_size_isoc
) {
3925 for (i
= 0; i
< intf
->num_altsetting
; i
++) {
3929 ep
< intf
->altsetting
[i
].desc
.bNumEndpoints
;
3931 em28xx_check_usb_descriptor(dev
, udev
, intf
,
3938 if (!(has_vendor_audio
|| has_video
|| has_dvb
)) {
3943 switch (udev
->speed
) {
3947 case USB_SPEED_UNKNOWN
:
3948 case USB_SPEED_FULL
:
3951 case USB_SPEED_HIGH
:
3958 dev_info(&intf
->dev
,
3959 "New device %s %s @ %s Mbps (%04x:%04x, interface %d, class %d)\n",
3960 udev
->manufacturer
? udev
->manufacturer
: "",
3961 udev
->product
? udev
->product
: "",
3963 le16_to_cpu(udev
->descriptor
.idVendor
),
3964 le16_to_cpu(udev
->descriptor
.idProduct
),
3966 intf
->altsetting
->desc
.bInterfaceNumber
);
3969 * Make sure we have 480 Mbps of bandwidth, otherwise things like
3970 * video stream wouldn't likely work, since 12 Mbps is generally
3971 * not enough even for most Digital TV streams.
3973 if (udev
->speed
!= USB_SPEED_HIGH
&& disable_usb_speed_check
== 0) {
3974 dev_err(&intf
->dev
, "Device initialization failed.\n");
3976 "Device must be connected to a high-speed USB 2.0 port.\n");
3981 kref_init(&dev
->ref
);
3984 dev
->model
= id
->driver_info
;
3986 dev
->is_audio_only
= has_vendor_audio
&& !(has_video
|| has_dvb
);
3987 dev
->has_video
= has_video
;
3990 dev
->ts
= PRIMARY_TS
;
3991 snprintf(dev
->name
, 28, "em28xx");
3992 dev
->dev_next
= NULL
;
3994 if (has_vendor_audio
) {
3995 dev_info(&intf
->dev
,
3996 "Audio interface %i found (Vendor Class)\n", ifnum
);
3997 dev
->usb_audio_type
= EM28XX_USB_AUDIO_VENDOR
;
3999 /* Checks if audio is provided by a USB Audio Class intf */
4000 for (i
= 0; i
< udev
->config
->desc
.bNumInterfaces
; i
++) {
4001 struct usb_interface
*uif
= udev
->config
->interface
[i
];
4003 if (uif
->altsetting
[0].desc
.bInterfaceClass
== USB_CLASS_AUDIO
) {
4004 if (has_vendor_audio
)
4006 "em28xx: device seems to have vendor AND usb audio class interfaces !\n"
4007 "\t\tThe vendor interface will be ignored. Please contact the developers <linux-media@vger.kernel.org>\n");
4008 dev
->usb_audio_type
= EM28XX_USB_AUDIO_CLASS
;
4014 dev_info(&intf
->dev
, "Video interface %i found:%s%s\n",
4016 dev
->analog_ep_bulk
? " bulk" : "",
4017 dev
->analog_ep_isoc
? " isoc" : "");
4019 dev_info(&intf
->dev
, "DVB interface %i found:%s%s\n",
4021 dev
->dvb_ep_bulk
? " bulk" : "",
4022 dev
->dvb_ep_isoc
? " isoc" : "");
4024 dev
->num_alt
= intf
->num_altsetting
;
4026 if ((unsigned int)card
[nr
] < em28xx_bcount
)
4027 dev
->model
= card
[nr
];
4029 /* save our data pointer in this intf device */
4030 usb_set_intfdata(intf
, dev
);
4032 /* allocate device struct and check if the device is a webcam */
4033 mutex_init(&dev
->lock
);
4034 retval
= em28xx_init_dev(dev
, udev
, intf
, nr
);
4038 if (usb_xfer_mode
< 0) {
4044 try_bulk
= usb_xfer_mode
> 0;
4047 /* Disable V4L2 if the device doesn't have a decoder or image sensor */
4049 dev
->board
.decoder
== EM28XX_NODECODER
&&
4050 dev
->em28xx_sensor
== EM28XX_NOSENSOR
) {
4052 "Currently, V4L2 is not supported on this model\n");
4054 dev
->has_video
= false;
4057 if (dev
->board
.has_dual_ts
&&
4058 (dev
->tuner_type
!= TUNER_ABSENT
|| INPUT(0)->type
)) {
4060 * The logic with sets alternate is not ready for dual-tuners
4061 * which analog modes.
4064 "We currently don't support analog TV or stream capture on dual tuners.\n");
4068 /* Select USB transfer types to use */
4070 if (!dev
->analog_ep_isoc
|| (try_bulk
&& dev
->analog_ep_bulk
))
4071 dev
->analog_xfer_bulk
= 1;
4072 dev_info(&intf
->dev
, "analog set to %s mode.\n",
4073 dev
->analog_xfer_bulk
? "bulk" : "isoc");
4076 if (!dev
->dvb_ep_isoc
|| (try_bulk
&& dev
->dvb_ep_bulk
))
4077 dev
->dvb_xfer_bulk
= 1;
4078 dev_info(&intf
->dev
, "dvb set to %s mode.\n",
4079 dev
->dvb_xfer_bulk
? "bulk" : "isoc");
4082 if (dev
->board
.has_dual_ts
&& em28xx_duplicate_dev(dev
) == 0) {
4083 kref_init(&dev
->dev_next
->ref
);
4085 dev
->dev_next
->ts
= SECONDARY_TS
;
4086 dev
->dev_next
->alt
= -1;
4087 dev
->dev_next
->is_audio_only
= has_vendor_audio
&&
4088 !(has_video
|| has_dvb
);
4089 dev
->dev_next
->has_video
= false;
4090 dev
->dev_next
->ifnum
= ifnum
;
4091 dev
->dev_next
->model
= id
->driver_info
;
4093 mutex_init(&dev
->dev_next
->lock
);
4094 retval
= em28xx_init_dev(dev
->dev_next
, udev
, intf
,
4095 dev
->dev_next
->devno
);
4099 dev
->dev_next
->board
.ir_codes
= NULL
; /* No IR for 2nd tuner */
4100 dev
->dev_next
->board
.has_ir_i2c
= 0; /* No IR for 2nd tuner */
4102 if (usb_xfer_mode
< 0) {
4103 if (dev
->dev_next
->is_webcam
)
4108 try_bulk
= usb_xfer_mode
> 0;
4111 /* Select USB transfer types to use */
4113 if (!dev
->dvb_ep_isoc_ts2
||
4114 (try_bulk
&& dev
->dvb_ep_bulk_ts2
))
4115 dev
->dev_next
->dvb_xfer_bulk
= 1;
4116 dev_info(&dev
->intf
->dev
, "dvb ts2 set to %s mode.\n",
4117 dev
->dev_next
->dvb_xfer_bulk
? "bulk" : "isoc");
4120 dev
->dev_next
->dvb_ep_isoc
= dev
->dvb_ep_isoc_ts2
;
4121 dev
->dev_next
->dvb_ep_bulk
= dev
->dvb_ep_bulk_ts2
;
4122 dev
->dev_next
->dvb_max_pkt_size_isoc
= dev
->dvb_max_pkt_size_isoc_ts2
;
4123 dev
->dev_next
->dvb_alt_isoc
= dev
->dvb_alt_isoc
;
4125 /* Configure hardware to support TS2*/
4126 if (dev
->dvb_xfer_bulk
) {
4127 /* The ep4 and ep5 are configured for BULK */
4128 em28xx_write_reg(dev
, 0x0b, 0x96);
4130 em28xx_write_reg(dev
, 0x0b, 0x80);
4133 /* The ep4 and ep5 are configured for ISO */
4134 em28xx_write_reg(dev
, 0x0b, 0x96);
4136 em28xx_write_reg(dev
, 0x0b, 0x82);
4141 request_modules(dev
);
4144 * Do it at the end, to reduce dynamic configuration changes during
4145 * the device init. Yet, as request_modules() can be async, the
4146 * topology will likely change after the load of the em28xx subdrivers.
4148 #ifdef CONFIG_MEDIA_CONTROLLER
4150 * No need to check the return value, the device will still be
4151 * usable without media controller API.
4153 retval
= media_device_register(dev
->media_dev
);
4159 kfree(dev
->alt_max_pkt_size_isoc
);
4163 clear_bit(nr
, em28xx_devused
);
4171 * em28xx_usb_disconnect()
4172 * called when the device gets disconnected
4173 * video device will be unregistered on v4l2_close in case it is still open
4175 static void em28xx_usb_disconnect(struct usb_interface
*intf
)
4179 dev
= usb_get_intfdata(intf
);
4180 usb_set_intfdata(intf
, NULL
);
4185 if (dev
->dev_next
) {
4186 dev
->dev_next
->disconnected
= 1;
4187 dev_info(&dev
->intf
->dev
, "Disconnecting %s\n",
4188 dev
->dev_next
->name
);
4191 dev
->disconnected
= 1;
4193 dev_info(&dev
->intf
->dev
, "Disconnecting %s\n", dev
->name
);
4195 flush_request_modules(dev
);
4197 em28xx_close_extension(dev
);
4200 em28xx_release_resources(dev
->dev_next
);
4201 em28xx_release_resources(dev
);
4203 if (dev
->dev_next
) {
4204 kref_put(&dev
->dev_next
->ref
, em28xx_free_device
);
4205 dev
->dev_next
= NULL
;
4207 kref_put(&dev
->ref
, em28xx_free_device
);
4210 static int em28xx_usb_suspend(struct usb_interface
*intf
,
4211 pm_message_t message
)
4215 dev
= usb_get_intfdata(intf
);
4218 em28xx_suspend_extension(dev
);
4222 static int em28xx_usb_resume(struct usb_interface
*intf
)
4226 dev
= usb_get_intfdata(intf
);
4229 em28xx_resume_extension(dev
);
4233 static struct usb_driver em28xx_usb_driver
= {
4235 .probe
= em28xx_usb_probe
,
4236 .disconnect
= em28xx_usb_disconnect
,
4237 .suspend
= em28xx_usb_suspend
,
4238 .resume
= em28xx_usb_resume
,
4239 .reset_resume
= em28xx_usb_resume
,
4240 .id_table
= em28xx_id_table
,
4243 module_usb_driver(em28xx_usb_driver
);