2 em28xx-cards.c - driver for Empia EM2800/EM2820/2840 USB
5 Copyright (C) 2005 Ludovico Cavedon <cavedon@sssup.it>
6 Markus Rechberger <mrechberger@gmail.com>
7 Mauro Carvalho Chehab <mchehab@infradead.org>
8 Sascha Sommer <saschasommer@freenet.de>
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2 of the License, or
13 (at your option) any later version.
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 #include <linux/init.h>
26 #include <linux/module.h>
27 #include <linux/delay.h>
28 #include <linux/i2c.h>
29 #include <linux/usb.h>
30 #include <media/tuner.h>
31 #include <media/msp3400.h>
32 #include <media/saa7115.h>
33 #include <media/tvp5150.h>
34 #include <media/tvaudio.h>
35 #include <media/i2c-addr.h>
36 #include <media/tveeprom.h>
37 #include <media/v4l2-common.h>
38 #include <media/v4l2-chip-ident.h>
42 #define DRIVER_NAME "em28xx"
44 static int tuner
= -1;
45 module_param(tuner
, int, 0444);
46 MODULE_PARM_DESC(tuner
, "tuner type");
48 static unsigned int disable_ir
;
49 module_param(disable_ir
, int, 0444);
50 MODULE_PARM_DESC(disable_ir
, "disable infrared remote support");
52 static unsigned int disable_usb_speed_check
;
53 module_param(disable_usb_speed_check
, int, 0444);
54 MODULE_PARM_DESC(disable_usb_speed_check
,
55 "override min bandwidth requirement of 480M bps");
57 static unsigned int card
[] = {[0 ... (EM28XX_MAXBOARDS
- 1)] = UNSET
};
58 module_param_array(card
, int, NULL
, 0444);
59 MODULE_PARM_DESC(card
, "card type");
61 /* Bitmask marking allocated devices from 0 to EM28XX_MAXBOARDS */
62 static unsigned long em28xx_devused
;
64 struct em28xx_hash_table
{
71 * Reset sequences for analog/digital modes
74 /* Reset for the most [analog] boards */
75 static struct em28xx_reg_seq default_analog
[] = {
76 {EM28XX_R08_GPIO
, 0x6d, ~EM_GPIO_4
, 10},
80 /* Reset for the most [digital] boards */
81 static struct em28xx_reg_seq default_digital
[] = {
82 {EM28XX_R08_GPIO
, 0x6e, ~EM_GPIO_4
, 10},
86 /* Board Hauppauge WinTV HVR 900 analog */
87 static struct em28xx_reg_seq hauppauge_wintv_hvr_900_analog
[] = {
88 {EM28XX_R08_GPIO
, 0x2d, ~EM_GPIO_4
, 10},
89 {0x05, 0xff, 0x10, 10},
93 /* Board Hauppauge WinTV HVR 900 digital */
94 static struct em28xx_reg_seq hauppauge_wintv_hvr_900_digital
[] = {
95 {EM28XX_R08_GPIO
, 0x2e, ~EM_GPIO_4
, 10},
96 {EM2880_R04_GPO
, 0x04, 0x0f, 10},
97 {EM2880_R04_GPO
, 0x0c, 0x0f, 10},
101 /* Boards - EM2880 MSI DIGIVOX AD and EM2880_BOARD_MSI_DIGIVOX_AD_II */
102 static struct em28xx_reg_seq em2880_msi_digivox_ad_analog
[] = {
103 {EM28XX_R08_GPIO
, 0x69, ~EM_GPIO_4
, 10},
107 /* Boards - EM2880 MSI DIGIVOX AD and EM2880_BOARD_MSI_DIGIVOX_AD_II */
109 /* Board - EM2870 Kworld 355u
110 Analog - No input analog */
112 /* Board - EM2882 Kworld 315U digital */
113 static struct em28xx_reg_seq em2882_kworld_315u_digital
[] = {
114 {EM28XX_R08_GPIO
, 0xff, 0xff, 10},
115 {EM28XX_R08_GPIO
, 0xfe, 0xff, 10},
116 {EM2880_R04_GPO
, 0x04, 0xff, 10},
117 {EM2880_R04_GPO
, 0x0c, 0xff, 10},
118 {EM28XX_R08_GPIO
, 0x7e, 0xff, 10},
122 static struct em28xx_reg_seq em2882_kworld_315u_tuner_gpio
[] = {
123 {EM2880_R04_GPO
, 0x08, 0xff, 10},
124 {EM2880_R04_GPO
, 0x0c, 0xff, 10},
125 {EM2880_R04_GPO
, 0x08, 0xff, 10},
126 {EM2880_R04_GPO
, 0x0c, 0xff, 10},
130 static struct em28xx_reg_seq kworld_330u_analog
[] = {
131 {EM28XX_R08_GPIO
, 0x6d, ~EM_GPIO_4
, 10},
132 {EM2880_R04_GPO
, 0x00, 0xff, 10},
136 static struct em28xx_reg_seq kworld_330u_digital
[] = {
137 {EM28XX_R08_GPIO
, 0x6e, ~EM_GPIO_4
, 10},
138 {EM2880_R04_GPO
, 0x08, 0xff, 10},
143 GPIO0 - Enable digital power (s5h1409) - low to enable
144 GPIO1 - Enable analog power (tvp5150/emp202) - low to enable
148 static struct em28xx_reg_seq evga_indtube_analog
[] = {
149 {EM28XX_R08_GPIO
, 0x79, 0xff, 60},
153 static struct em28xx_reg_seq evga_indtube_digital
[] = {
154 {EM28XX_R08_GPIO
, 0x7a, 0xff, 1},
155 {EM2880_R04_GPO
, 0x04, 0xff, 10},
156 {EM2880_R04_GPO
, 0x0c, 0xff, 1},
160 /* Pinnacle Hybrid Pro eb1a:2881 */
161 static struct em28xx_reg_seq pinnacle_hybrid_pro_analog
[] = {
162 {EM28XX_R08_GPIO
, 0xfd, ~EM_GPIO_4
, 10},
166 static struct em28xx_reg_seq pinnacle_hybrid_pro_digital
[] = {
167 {EM28XX_R08_GPIO
, 0x6e, ~EM_GPIO_4
, 10},
168 {EM2880_R04_GPO
, 0x04, 0xff, 100},/* zl10353 reset */
169 {EM2880_R04_GPO
, 0x0c, 0xff, 1},
174 /* Callback for the most boards */
175 static struct em28xx_reg_seq default_tuner_gpio
[] = {
176 {EM28XX_R08_GPIO
, EM_GPIO_4
, EM_GPIO_4
, 10},
177 {EM28XX_R08_GPIO
, 0, EM_GPIO_4
, 10},
178 {EM28XX_R08_GPIO
, EM_GPIO_4
, EM_GPIO_4
, 10},
183 static struct em28xx_reg_seq compro_unmute_tv_gpio
[] = {
184 {EM28XX_R08_GPIO
, 5, 7, 10},
188 static struct em28xx_reg_seq compro_unmute_svid_gpio
[] = {
189 {EM28XX_R08_GPIO
, 4, 7, 10},
193 static struct em28xx_reg_seq compro_mute_gpio
[] = {
194 {EM28XX_R08_GPIO
, 6, 7, 10},
199 static struct em28xx_reg_seq terratec_av350_mute_gpio
[] = {
200 {EM28XX_R08_GPIO
, 0xff, 0x7f, 10},
204 static struct em28xx_reg_seq terratec_av350_unmute_gpio
[] = {
205 {EM28XX_R08_GPIO
, 0xff, 0xff, 10},
209 static struct em28xx_reg_seq silvercrest_reg_seq
[] = {
210 {EM28XX_R08_GPIO
, 0xff, 0xff, 10},
211 {EM28XX_R08_GPIO
, 0x01, 0xf7, 10},
218 struct em28xx_board em28xx_boards
[] = {
219 [EM2750_BOARD_UNKNOWN
] = {
220 .name
= "EM2710/EM2750/EM2751 webcam grabber",
221 .xclk
= EM28XX_XCLK_FREQUENCY_20MHZ
,
222 .tuner_type
= TUNER_ABSENT
,
225 .type
= EM28XX_VMUX_COMPOSITE1
,
227 .amux
= EM28XX_AMUX_VIDEO
,
228 .gpio
= silvercrest_reg_seq
,
231 [EM2800_BOARD_UNKNOWN
] = {
232 .name
= "Unknown EM2800 video grabber",
234 .tda9887_conf
= TDA9887_PRESENT
,
235 .decoder
= EM28XX_SAA711X
,
236 .tuner_type
= TUNER_ABSENT
,
238 .type
= EM28XX_VMUX_COMPOSITE1
,
239 .vmux
= SAA7115_COMPOSITE0
,
240 .amux
= EM28XX_AMUX_LINE_IN
,
242 .type
= EM28XX_VMUX_SVIDEO
,
243 .vmux
= SAA7115_SVIDEO3
,
244 .amux
= EM28XX_AMUX_LINE_IN
,
247 [EM2820_BOARD_UNKNOWN
] = {
248 .name
= "Unknown EM2750/28xx video grabber",
249 .tuner_type
= TUNER_ABSENT
,
250 .is_webcam
= 1, /* To enable sensor probe */
252 [EM2750_BOARD_DLCW_130
] = {
253 /* Beijing Huaqi Information Digital Technology Co., Ltd */
254 .name
= "Huaqi DLCW-130",
255 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
256 .xclk
= EM28XX_XCLK_FREQUENCY_48MHZ
,
257 .tuner_type
= TUNER_ABSENT
,
260 .type
= EM28XX_VMUX_COMPOSITE1
,
262 .amux
= EM28XX_AMUX_VIDEO
,
265 [EM2820_BOARD_KWORLD_PVRTV2800RF
] = {
266 .name
= "Kworld PVR TV 2800 RF",
267 .tuner_type
= TUNER_TEMIC_PAL
,
268 .tda9887_conf
= TDA9887_PRESENT
,
269 .decoder
= EM28XX_SAA711X
,
271 .type
= EM28XX_VMUX_COMPOSITE1
,
272 .vmux
= SAA7115_COMPOSITE0
,
273 .amux
= EM28XX_AMUX_LINE_IN
,
275 .type
= EM28XX_VMUX_SVIDEO
,
276 .vmux
= SAA7115_SVIDEO3
,
277 .amux
= EM28XX_AMUX_LINE_IN
,
280 [EM2820_BOARD_GADMEI_TVR200
] = {
281 .name
= "Gadmei TVR200",
282 .tuner_type
= TUNER_LG_PAL_NEW_TAPC
,
283 .tda9887_conf
= TDA9887_PRESENT
,
284 .decoder
= EM28XX_SAA711X
,
286 .type
= EM28XX_VMUX_TELEVISION
,
287 .vmux
= SAA7115_COMPOSITE2
,
288 .amux
= EM28XX_AMUX_LINE_IN
,
290 .type
= EM28XX_VMUX_COMPOSITE1
,
291 .vmux
= SAA7115_COMPOSITE0
,
292 .amux
= EM28XX_AMUX_LINE_IN
,
294 .type
= EM28XX_VMUX_SVIDEO
,
295 .vmux
= SAA7115_SVIDEO3
,
296 .amux
= EM28XX_AMUX_LINE_IN
,
299 [EM2820_BOARD_TERRATEC_CINERGY_250
] = {
300 .name
= "Terratec Cinergy 250 USB",
301 .tuner_type
= TUNER_LG_PAL_NEW_TAPC
,
302 .tda9887_conf
= TDA9887_PRESENT
,
303 .decoder
= EM28XX_SAA711X
,
305 .type
= EM28XX_VMUX_TELEVISION
,
306 .vmux
= SAA7115_COMPOSITE2
,
307 .amux
= EM28XX_AMUX_LINE_IN
,
309 .type
= EM28XX_VMUX_COMPOSITE1
,
310 .vmux
= SAA7115_COMPOSITE0
,
311 .amux
= EM28XX_AMUX_LINE_IN
,
313 .type
= EM28XX_VMUX_SVIDEO
,
314 .vmux
= SAA7115_SVIDEO3
,
315 .amux
= EM28XX_AMUX_LINE_IN
,
318 [EM2820_BOARD_PINNACLE_USB_2
] = {
319 .name
= "Pinnacle PCTV USB 2",
320 .tuner_type
= TUNER_LG_PAL_NEW_TAPC
,
321 .tda9887_conf
= TDA9887_PRESENT
,
322 .decoder
= EM28XX_SAA711X
,
324 .type
= EM28XX_VMUX_TELEVISION
,
325 .vmux
= SAA7115_COMPOSITE2
,
326 .amux
= EM28XX_AMUX_VIDEO
,
328 .type
= EM28XX_VMUX_COMPOSITE1
,
329 .vmux
= SAA7115_COMPOSITE0
,
330 .amux
= EM28XX_AMUX_LINE_IN
,
332 .type
= EM28XX_VMUX_SVIDEO
,
333 .vmux
= SAA7115_SVIDEO3
,
334 .amux
= EM28XX_AMUX_LINE_IN
,
337 [EM2820_BOARD_HAUPPAUGE_WINTV_USB_2
] = {
338 .name
= "Hauppauge WinTV USB 2",
339 .tuner_type
= TUNER_PHILIPS_FM1236_MK3
,
340 .tda9887_conf
= TDA9887_PRESENT
|
341 TDA9887_PORT1_ACTIVE
|
342 TDA9887_PORT2_ACTIVE
,
343 .decoder
= EM28XX_TVP5150
,
346 .type
= EM28XX_VMUX_TELEVISION
,
347 .vmux
= TVP5150_COMPOSITE0
,
348 .amux
= MSP_INPUT_DEFAULT
,
350 .type
= EM28XX_VMUX_SVIDEO
,
351 .vmux
= TVP5150_SVIDEO
,
352 .amux
= MSP_INPUT(MSP_IN_SCART1
, MSP_IN_TUNER1
,
353 MSP_DSP_IN_SCART
, MSP_DSP_IN_SCART
),
356 [EM2820_BOARD_DLINK_USB_TV
] = {
357 .name
= "D-Link DUB-T210 TV Tuner",
358 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
359 .tuner_type
= TUNER_LG_PAL_NEW_TAPC
,
360 .tda9887_conf
= TDA9887_PRESENT
,
361 .decoder
= EM28XX_SAA711X
,
363 .type
= EM28XX_VMUX_TELEVISION
,
364 .vmux
= SAA7115_COMPOSITE2
,
365 .amux
= EM28XX_AMUX_LINE_IN
,
367 .type
= EM28XX_VMUX_COMPOSITE1
,
368 .vmux
= SAA7115_COMPOSITE0
,
369 .amux
= EM28XX_AMUX_LINE_IN
,
371 .type
= EM28XX_VMUX_SVIDEO
,
372 .vmux
= SAA7115_SVIDEO3
,
373 .amux
= EM28XX_AMUX_LINE_IN
,
376 [EM2820_BOARD_HERCULES_SMART_TV_USB2
] = {
377 .name
= "Hercules Smart TV USB 2.0",
378 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
379 .tuner_type
= TUNER_LG_PAL_NEW_TAPC
,
380 .tda9887_conf
= TDA9887_PRESENT
,
381 .decoder
= EM28XX_SAA711X
,
383 .type
= EM28XX_VMUX_TELEVISION
,
384 .vmux
= SAA7115_COMPOSITE2
,
385 .amux
= EM28XX_AMUX_LINE_IN
,
387 .type
= EM28XX_VMUX_COMPOSITE1
,
388 .vmux
= SAA7115_COMPOSITE0
,
389 .amux
= EM28XX_AMUX_LINE_IN
,
391 .type
= EM28XX_VMUX_SVIDEO
,
392 .vmux
= SAA7115_SVIDEO3
,
393 .amux
= EM28XX_AMUX_LINE_IN
,
396 [EM2820_BOARD_PINNACLE_USB_2_FM1216ME
] = {
397 .name
= "Pinnacle PCTV USB 2 (Philips FM1216ME)",
398 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
399 .tuner_type
= TUNER_PHILIPS_FM1216ME_MK3
,
400 .tda9887_conf
= TDA9887_PRESENT
,
401 .decoder
= EM28XX_SAA711X
,
403 .type
= EM28XX_VMUX_TELEVISION
,
404 .vmux
= SAA7115_COMPOSITE2
,
405 .amux
= EM28XX_AMUX_VIDEO
,
407 .type
= EM28XX_VMUX_COMPOSITE1
,
408 .vmux
= SAA7115_COMPOSITE0
,
409 .amux
= EM28XX_AMUX_LINE_IN
,
411 .type
= EM28XX_VMUX_SVIDEO
,
412 .vmux
= SAA7115_SVIDEO3
,
413 .amux
= EM28XX_AMUX_LINE_IN
,
416 [EM2820_BOARD_GADMEI_UTV310
] = {
417 .name
= "Gadmei UTV310",
418 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
419 .tuner_type
= TUNER_TNF_5335MF
,
420 .tda9887_conf
= TDA9887_PRESENT
,
421 .decoder
= EM28XX_SAA711X
,
423 .type
= EM28XX_VMUX_TELEVISION
,
424 .vmux
= SAA7115_COMPOSITE1
,
425 .amux
= EM28XX_AMUX_LINE_IN
,
427 .type
= EM28XX_VMUX_COMPOSITE1
,
428 .vmux
= SAA7115_COMPOSITE0
,
429 .amux
= EM28XX_AMUX_LINE_IN
,
431 .type
= EM28XX_VMUX_SVIDEO
,
432 .vmux
= SAA7115_SVIDEO3
,
433 .amux
= EM28XX_AMUX_LINE_IN
,
436 [EM2820_BOARD_LEADTEK_WINFAST_USBII_DELUXE
] = {
437 .name
= "Leadtek Winfast USB II Deluxe",
438 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
439 .tuner_type
= TUNER_PHILIPS_FM1216ME_MK3
,
440 .tda9887_conf
= TDA9887_PRESENT
,
441 .decoder
= EM28XX_SAA711X
,
443 .type
= EM28XX_VMUX_TELEVISION
,
444 .vmux
= SAA7115_COMPOSITE2
,
445 .amux
= EM28XX_AMUX_VIDEO
,
447 .type
= EM28XX_VMUX_COMPOSITE1
,
448 .vmux
= SAA7115_COMPOSITE0
,
449 .amux
= EM28XX_AMUX_LINE_IN
,
451 .type
= EM28XX_VMUX_SVIDEO
,
452 .vmux
= SAA7115_COMPOSITE0
,
453 .amux
= EM28XX_AMUX_LINE_IN
,
456 [EM2820_BOARD_VIDEOLOGY_20K14XUSB
] = {
457 .name
= "Videology 20K14XUSB USB2.0",
458 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
459 .tuner_type
= TUNER_ABSENT
,
462 .type
= EM28XX_VMUX_COMPOSITE1
,
464 .amux
= EM28XX_AMUX_VIDEO
,
467 [EM2820_BOARD_SILVERCREST_WEBCAM
] = {
468 .name
= "Silvercrest Webcam 1.3mpix",
469 .tuner_type
= TUNER_ABSENT
,
472 .type
= EM28XX_VMUX_COMPOSITE1
,
474 .amux
= EM28XX_AMUX_VIDEO
,
475 .gpio
= silvercrest_reg_seq
,
478 [EM2821_BOARD_SUPERCOMP_USB_2
] = {
479 .name
= "Supercomp USB 2.0 TV",
480 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
481 .tuner_type
= TUNER_PHILIPS_FM1236_MK3
,
482 .tda9887_conf
= TDA9887_PRESENT
|
483 TDA9887_PORT1_ACTIVE
|
484 TDA9887_PORT2_ACTIVE
,
485 .decoder
= EM28XX_SAA711X
,
487 .type
= EM28XX_VMUX_TELEVISION
,
488 .vmux
= SAA7115_COMPOSITE2
,
489 .amux
= EM28XX_AMUX_LINE_IN
,
491 .type
= EM28XX_VMUX_COMPOSITE1
,
492 .vmux
= SAA7115_COMPOSITE0
,
493 .amux
= EM28XX_AMUX_VIDEO
,
495 .type
= EM28XX_VMUX_SVIDEO
,
496 .vmux
= SAA7115_SVIDEO3
,
497 .amux
= EM28XX_AMUX_LINE_IN
,
500 [EM2821_BOARD_USBGEAR_VD204
] = {
501 .name
= "Usbgear VD204v9",
502 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
503 .tuner_type
= TUNER_ABSENT
, /* Capture only device */
504 .decoder
= EM28XX_SAA711X
,
506 .type
= EM28XX_VMUX_COMPOSITE1
,
507 .vmux
= SAA7115_COMPOSITE0
,
508 .amux
= EM28XX_AMUX_LINE_IN
,
510 .type
= EM28XX_VMUX_SVIDEO
,
511 .vmux
= SAA7115_SVIDEO3
,
512 .amux
= EM28XX_AMUX_LINE_IN
,
515 [EM2860_BOARD_NETGMBH_CAM
] = {
516 /* Beijing Huaqi Information Digital Technology Co., Ltd */
517 .name
= "NetGMBH Cam",
518 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
519 .tuner_type
= TUNER_ABSENT
,
522 .type
= EM28XX_VMUX_COMPOSITE1
,
524 .amux
= EM28XX_AMUX_VIDEO
,
527 [EM2860_BOARD_TYPHOON_DVD_MAKER
] = {
528 .name
= "Typhoon DVD Maker",
529 .decoder
= EM28XX_SAA711X
,
530 .tuner_type
= TUNER_ABSENT
, /* Capture only device */
532 .type
= EM28XX_VMUX_COMPOSITE1
,
533 .vmux
= SAA7115_COMPOSITE0
,
534 .amux
= EM28XX_AMUX_LINE_IN
,
536 .type
= EM28XX_VMUX_SVIDEO
,
537 .vmux
= SAA7115_SVIDEO3
,
538 .amux
= EM28XX_AMUX_LINE_IN
,
541 [EM2860_BOARD_GADMEI_UTV330
] = {
542 .name
= "Gadmei UTV330",
543 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
544 .tuner_type
= TUNER_TNF_5335MF
,
545 .tda9887_conf
= TDA9887_PRESENT
,
546 .decoder
= EM28XX_SAA711X
,
548 .type
= EM28XX_VMUX_TELEVISION
,
549 .vmux
= SAA7115_COMPOSITE2
,
550 .amux
= EM28XX_AMUX_VIDEO
,
552 .type
= EM28XX_VMUX_COMPOSITE1
,
553 .vmux
= SAA7115_COMPOSITE0
,
554 .amux
= EM28XX_AMUX_LINE_IN
,
556 .type
= EM28XX_VMUX_SVIDEO
,
557 .vmux
= SAA7115_SVIDEO3
,
558 .amux
= EM28XX_AMUX_LINE_IN
,
561 [EM2860_BOARD_TERRATEC_HYBRID_XS
] = {
562 .name
= "Terratec Cinergy A Hybrid XS",
563 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
564 .tuner_type
= TUNER_XC2028
,
565 .tuner_gpio
= default_tuner_gpio
,
566 .decoder
= EM28XX_TVP5150
,
569 .type
= EM28XX_VMUX_TELEVISION
,
570 .vmux
= TVP5150_COMPOSITE0
,
571 .amux
= EM28XX_AMUX_VIDEO
,
572 .gpio
= hauppauge_wintv_hvr_900_analog
,
574 .type
= EM28XX_VMUX_COMPOSITE1
,
575 .vmux
= TVP5150_COMPOSITE1
,
576 .amux
= EM28XX_AMUX_LINE_IN
,
577 .gpio
= hauppauge_wintv_hvr_900_analog
,
579 .type
= EM28XX_VMUX_SVIDEO
,
580 .vmux
= TVP5150_SVIDEO
,
581 .amux
= EM28XX_AMUX_LINE_IN
,
582 .gpio
= hauppauge_wintv_hvr_900_analog
,
585 [EM2861_BOARD_KWORLD_PVRTV_300U
] = {
586 .name
= "KWorld PVRTV 300U",
587 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
588 .tuner_type
= TUNER_XC2028
,
589 .tuner_gpio
= default_tuner_gpio
,
590 .decoder
= EM28XX_TVP5150
,
592 .type
= EM28XX_VMUX_TELEVISION
,
593 .vmux
= TVP5150_COMPOSITE0
,
594 .amux
= EM28XX_AMUX_VIDEO
,
596 .type
= EM28XX_VMUX_COMPOSITE1
,
597 .vmux
= TVP5150_COMPOSITE1
,
598 .amux
= EM28XX_AMUX_LINE_IN
,
600 .type
= EM28XX_VMUX_SVIDEO
,
601 .vmux
= TVP5150_SVIDEO
,
602 .amux
= EM28XX_AMUX_LINE_IN
,
605 [EM2861_BOARD_YAKUMO_MOVIE_MIXER
] = {
606 .name
= "Yakumo MovieMixer",
607 .tuner_type
= TUNER_ABSENT
, /* Capture only device */
608 .decoder
= EM28XX_TVP5150
,
610 .type
= EM28XX_VMUX_TELEVISION
,
611 .vmux
= TVP5150_COMPOSITE0
,
612 .amux
= EM28XX_AMUX_VIDEO
,
614 .type
= EM28XX_VMUX_COMPOSITE1
,
615 .vmux
= TVP5150_COMPOSITE1
,
616 .amux
= EM28XX_AMUX_LINE_IN
,
618 .type
= EM28XX_VMUX_SVIDEO
,
619 .vmux
= TVP5150_SVIDEO
,
620 .amux
= EM28XX_AMUX_LINE_IN
,
623 [EM2861_BOARD_PLEXTOR_PX_TV100U
] = {
624 .name
= "Plextor ConvertX PX-TV100U",
625 .tuner_type
= TUNER_TNF_5335MF
,
626 .xclk
= EM28XX_XCLK_I2S_MSB_TIMING
|
627 EM28XX_XCLK_FREQUENCY_12MHZ
,
628 .tda9887_conf
= TDA9887_PRESENT
,
629 .decoder
= EM28XX_TVP5150
,
632 .type
= EM28XX_VMUX_TELEVISION
,
633 .vmux
= TVP5150_COMPOSITE0
,
634 .amux
= EM28XX_AMUX_LINE_IN
,
635 .gpio
= pinnacle_hybrid_pro_analog
,
637 .type
= EM28XX_VMUX_COMPOSITE1
,
638 .vmux
= TVP5150_COMPOSITE1
,
639 .amux
= EM28XX_AMUX_LINE_IN
,
640 .gpio
= pinnacle_hybrid_pro_analog
,
642 .type
= EM28XX_VMUX_SVIDEO
,
643 .vmux
= TVP5150_SVIDEO
,
644 .amux
= EM28XX_AMUX_LINE_IN
,
645 .gpio
= pinnacle_hybrid_pro_analog
,
649 /* Those boards with em2870 are DVB Only*/
651 [EM2870_BOARD_TERRATEC_XS
] = {
652 .name
= "Terratec Cinergy T XS",
653 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
654 .tuner_type
= TUNER_XC2028
,
655 .tuner_gpio
= default_tuner_gpio
,
657 [EM2870_BOARD_TERRATEC_XS_MT2060
] = {
658 .name
= "Terratec Cinergy T XS (MT2060)",
659 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
660 .tuner_type
= TUNER_ABSENT
, /* MT2060 */
662 [EM2870_BOARD_KWORLD_350U
] = {
663 .name
= "Kworld 350 U DVB-T",
664 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
665 .tuner_type
= TUNER_XC2028
,
666 .tuner_gpio
= default_tuner_gpio
,
668 [EM2870_BOARD_KWORLD_355U
] = {
669 .name
= "Kworld 355 U DVB-T",
670 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
672 [EM2870_BOARD_PINNACLE_PCTV_DVB
] = {
673 .name
= "Pinnacle PCTV DVB-T",
674 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
675 .tuner_type
= TUNER_ABSENT
, /* MT2060 */
676 /* djh - I have serious doubts this is right... */
677 .xclk
= EM28XX_XCLK_IR_RC5_MODE
|
678 EM28XX_XCLK_FREQUENCY_10MHZ
,
680 [EM2870_BOARD_COMPRO_VIDEOMATE
] = {
681 .name
= "Compro, VideoMate U3",
682 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
683 .tuner_type
= TUNER_ABSENT
, /* MT2060 */
686 [EM2880_BOARD_TERRATEC_HYBRID_XS_FR
] = {
687 .name
= "Terratec Hybrid XS Secam",
688 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
690 .tuner_type
= TUNER_XC2028
,
691 .tuner_gpio
= default_tuner_gpio
,
692 .decoder
= EM28XX_TVP5150
,
694 .type
= EM28XX_VMUX_TELEVISION
,
695 .vmux
= TVP5150_COMPOSITE0
,
696 .amux
= EM28XX_AMUX_VIDEO
,
697 .gpio
= default_analog
,
699 .type
= EM28XX_VMUX_COMPOSITE1
,
700 .vmux
= TVP5150_COMPOSITE1
,
701 .amux
= EM28XX_AMUX_LINE_IN
,
702 .gpio
= default_analog
,
704 .type
= EM28XX_VMUX_SVIDEO
,
705 .vmux
= TVP5150_SVIDEO
,
706 .amux
= EM28XX_AMUX_LINE_IN
,
707 .gpio
= default_analog
,
710 [EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900
] = {
711 .name
= "Hauppauge WinTV HVR 900",
712 .tda9887_conf
= TDA9887_PRESENT
,
713 .tuner_type
= TUNER_XC2028
,
714 .tuner_gpio
= default_tuner_gpio
,
717 .dvb_gpio
= hauppauge_wintv_hvr_900_digital
,
718 .ir_codes
= ir_codes_hauppauge_new
,
719 .decoder
= EM28XX_TVP5150
,
721 .type
= EM28XX_VMUX_TELEVISION
,
722 .vmux
= TVP5150_COMPOSITE0
,
723 .amux
= EM28XX_AMUX_VIDEO
,
724 .gpio
= hauppauge_wintv_hvr_900_analog
,
726 .type
= EM28XX_VMUX_COMPOSITE1
,
727 .vmux
= TVP5150_COMPOSITE1
,
728 .amux
= EM28XX_AMUX_LINE_IN
,
729 .gpio
= hauppauge_wintv_hvr_900_analog
,
731 .type
= EM28XX_VMUX_SVIDEO
,
732 .vmux
= TVP5150_SVIDEO
,
733 .amux
= EM28XX_AMUX_LINE_IN
,
734 .gpio
= hauppauge_wintv_hvr_900_analog
,
737 [EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2
] = {
738 .name
= "Hauppauge WinTV HVR 900 (R2)",
739 .tda9887_conf
= TDA9887_PRESENT
,
740 .tuner_type
= TUNER_XC2028
,
741 .tuner_gpio
= default_tuner_gpio
,
743 .ir_codes
= ir_codes_hauppauge_new
,
744 .decoder
= EM28XX_TVP5150
,
746 .type
= EM28XX_VMUX_TELEVISION
,
747 .vmux
= TVP5150_COMPOSITE0
,
748 .amux
= EM28XX_AMUX_VIDEO
,
749 .gpio
= hauppauge_wintv_hvr_900_analog
,
751 .type
= EM28XX_VMUX_COMPOSITE1
,
752 .vmux
= TVP5150_COMPOSITE1
,
753 .amux
= EM28XX_AMUX_LINE_IN
,
754 .gpio
= hauppauge_wintv_hvr_900_analog
,
756 .type
= EM28XX_VMUX_SVIDEO
,
757 .vmux
= TVP5150_SVIDEO
,
758 .amux
= EM28XX_AMUX_LINE_IN
,
759 .gpio
= hauppauge_wintv_hvr_900_analog
,
762 [EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850
] = {
763 .name
= "Hauppauge WinTV HVR 850",
764 .tuner_type
= TUNER_XC2028
,
765 .tuner_gpio
= default_tuner_gpio
,
768 .dvb_gpio
= hauppauge_wintv_hvr_900_digital
,
769 .ir_codes
= ir_codes_hauppauge_new
,
770 .decoder
= EM28XX_TVP5150
,
772 .type
= EM28XX_VMUX_TELEVISION
,
773 .vmux
= TVP5150_COMPOSITE0
,
774 .amux
= EM28XX_AMUX_VIDEO
,
775 .gpio
= hauppauge_wintv_hvr_900_analog
,
777 .type
= EM28XX_VMUX_COMPOSITE1
,
778 .vmux
= TVP5150_COMPOSITE1
,
779 .amux
= EM28XX_AMUX_LINE_IN
,
780 .gpio
= hauppauge_wintv_hvr_900_analog
,
782 .type
= EM28XX_VMUX_SVIDEO
,
783 .vmux
= TVP5150_SVIDEO
,
784 .amux
= EM28XX_AMUX_LINE_IN
,
785 .gpio
= hauppauge_wintv_hvr_900_analog
,
788 [EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950
] = {
789 .name
= "Hauppauge WinTV HVR 950",
790 .tuner_type
= TUNER_XC2028
,
791 .tuner_gpio
= default_tuner_gpio
,
794 .dvb_gpio
= hauppauge_wintv_hvr_900_digital
,
795 .ir_codes
= ir_codes_hauppauge_new
,
796 .decoder
= EM28XX_TVP5150
,
798 .type
= EM28XX_VMUX_TELEVISION
,
799 .vmux
= TVP5150_COMPOSITE0
,
800 .amux
= EM28XX_AMUX_VIDEO
,
801 .gpio
= hauppauge_wintv_hvr_900_analog
,
803 .type
= EM28XX_VMUX_COMPOSITE1
,
804 .vmux
= TVP5150_COMPOSITE1
,
805 .amux
= EM28XX_AMUX_LINE_IN
,
806 .gpio
= hauppauge_wintv_hvr_900_analog
,
808 .type
= EM28XX_VMUX_SVIDEO
,
809 .vmux
= TVP5150_SVIDEO
,
810 .amux
= EM28XX_AMUX_LINE_IN
,
811 .gpio
= hauppauge_wintv_hvr_900_analog
,
814 [EM2880_BOARD_PINNACLE_PCTV_HD_PRO
] = {
815 .name
= "Pinnacle PCTV HD Pro Stick",
816 .tuner_type
= TUNER_XC2028
,
817 .tuner_gpio
= default_tuner_gpio
,
820 .dvb_gpio
= hauppauge_wintv_hvr_900_digital
,
821 .ir_codes
= ir_codes_pinnacle_pctv_hd
,
822 .decoder
= EM28XX_TVP5150
,
824 .type
= EM28XX_VMUX_TELEVISION
,
825 .vmux
= TVP5150_COMPOSITE0
,
826 .amux
= EM28XX_AMUX_VIDEO
,
827 .gpio
= hauppauge_wintv_hvr_900_analog
,
829 .type
= EM28XX_VMUX_COMPOSITE1
,
830 .vmux
= TVP5150_COMPOSITE1
,
831 .amux
= EM28XX_AMUX_LINE_IN
,
832 .gpio
= hauppauge_wintv_hvr_900_analog
,
834 .type
= EM28XX_VMUX_SVIDEO
,
835 .vmux
= TVP5150_SVIDEO
,
836 .amux
= EM28XX_AMUX_LINE_IN
,
837 .gpio
= hauppauge_wintv_hvr_900_analog
,
840 [EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600
] = {
841 .name
= "AMD ATI TV Wonder HD 600",
842 .tuner_type
= TUNER_XC2028
,
843 .tuner_gpio
= default_tuner_gpio
,
846 .dvb_gpio
= hauppauge_wintv_hvr_900_digital
,
847 .ir_codes
= ir_codes_ati_tv_wonder_hd_600
,
848 .decoder
= EM28XX_TVP5150
,
850 .type
= EM28XX_VMUX_TELEVISION
,
851 .vmux
= TVP5150_COMPOSITE0
,
852 .amux
= EM28XX_AMUX_VIDEO
,
853 .gpio
= hauppauge_wintv_hvr_900_analog
,
855 .type
= EM28XX_VMUX_COMPOSITE1
,
856 .vmux
= TVP5150_COMPOSITE1
,
857 .amux
= EM28XX_AMUX_LINE_IN
,
858 .gpio
= hauppauge_wintv_hvr_900_analog
,
860 .type
= EM28XX_VMUX_SVIDEO
,
861 .vmux
= TVP5150_SVIDEO
,
862 .amux
= EM28XX_AMUX_LINE_IN
,
863 .gpio
= hauppauge_wintv_hvr_900_analog
,
866 [EM2880_BOARD_TERRATEC_HYBRID_XS
] = {
867 .name
= "Terratec Hybrid XS",
868 .tuner_type
= TUNER_XC2028
,
869 .tuner_gpio
= default_tuner_gpio
,
870 .decoder
= EM28XX_TVP5150
,
872 .dvb_gpio
= default_digital
,
874 .type
= EM28XX_VMUX_TELEVISION
,
875 .vmux
= TVP5150_COMPOSITE0
,
876 .amux
= EM28XX_AMUX_VIDEO
,
877 .gpio
= default_analog
,
879 .type
= EM28XX_VMUX_COMPOSITE1
,
880 .vmux
= TVP5150_COMPOSITE1
,
881 .amux
= EM28XX_AMUX_LINE_IN
,
882 .gpio
= default_analog
,
884 .type
= EM28XX_VMUX_SVIDEO
,
885 .vmux
= TVP5150_SVIDEO
,
886 .amux
= EM28XX_AMUX_LINE_IN
,
887 .gpio
= default_analog
,
890 /* maybe there's a reason behind it why Terratec sells the Hybrid XS
891 as Prodigy XS with a different PID, let's keep it separated for now
892 maybe we'll need it lateron */
893 [EM2880_BOARD_TERRATEC_PRODIGY_XS
] = {
894 .name
= "Terratec Prodigy XS",
895 .tuner_type
= TUNER_XC2028
,
896 .tuner_gpio
= default_tuner_gpio
,
897 .decoder
= EM28XX_TVP5150
,
899 .type
= EM28XX_VMUX_TELEVISION
,
900 .vmux
= TVP5150_COMPOSITE0
,
901 .amux
= EM28XX_AMUX_VIDEO
,
902 .gpio
= hauppauge_wintv_hvr_900_analog
,
904 .type
= EM28XX_VMUX_COMPOSITE1
,
905 .vmux
= TVP5150_COMPOSITE1
,
906 .amux
= EM28XX_AMUX_LINE_IN
,
907 .gpio
= hauppauge_wintv_hvr_900_analog
,
909 .type
= EM28XX_VMUX_SVIDEO
,
910 .vmux
= TVP5150_SVIDEO
,
911 .amux
= EM28XX_AMUX_LINE_IN
,
912 .gpio
= hauppauge_wintv_hvr_900_analog
,
915 [EM2820_BOARD_MSI_VOX_USB_2
] = {
916 .name
= "MSI VOX USB 2.0",
917 .tuner_type
= TUNER_LG_PAL_NEW_TAPC
,
918 .tda9887_conf
= TDA9887_PRESENT
|
919 TDA9887_PORT1_ACTIVE
|
920 TDA9887_PORT2_ACTIVE
,
921 .max_range_640_480
= 1,
922 .decoder
= EM28XX_SAA711X
,
924 .type
= EM28XX_VMUX_TELEVISION
,
925 .vmux
= SAA7115_COMPOSITE4
,
926 .amux
= EM28XX_AMUX_VIDEO
,
928 .type
= EM28XX_VMUX_COMPOSITE1
,
929 .vmux
= SAA7115_COMPOSITE0
,
930 .amux
= EM28XX_AMUX_LINE_IN
,
932 .type
= EM28XX_VMUX_SVIDEO
,
933 .vmux
= SAA7115_SVIDEO3
,
934 .amux
= EM28XX_AMUX_LINE_IN
,
937 [EM2800_BOARD_TERRATEC_CINERGY_200
] = {
938 .name
= "Terratec Cinergy 200 USB",
940 .tuner_type
= TUNER_LG_PAL_NEW_TAPC
,
941 .tda9887_conf
= TDA9887_PRESENT
,
942 .decoder
= EM28XX_SAA711X
,
944 .type
= EM28XX_VMUX_TELEVISION
,
945 .vmux
= SAA7115_COMPOSITE2
,
946 .amux
= EM28XX_AMUX_VIDEO
,
948 .type
= EM28XX_VMUX_COMPOSITE1
,
949 .vmux
= SAA7115_COMPOSITE0
,
950 .amux
= EM28XX_AMUX_LINE_IN
,
952 .type
= EM28XX_VMUX_SVIDEO
,
953 .vmux
= SAA7115_SVIDEO3
,
954 .amux
= EM28XX_AMUX_LINE_IN
,
957 [EM2800_BOARD_GRABBEEX_USB2800
] = {
958 .name
= "eMPIA Technology, Inc. GrabBeeX+ Video Encoder",
960 .decoder
= EM28XX_SAA711X
,
961 .tuner_type
= TUNER_ABSENT
, /* capture only board */
963 .type
= EM28XX_VMUX_COMPOSITE1
,
964 .vmux
= SAA7115_COMPOSITE0
,
965 .amux
= EM28XX_AMUX_LINE_IN
,
967 .type
= EM28XX_VMUX_SVIDEO
,
968 .vmux
= SAA7115_SVIDEO3
,
969 .amux
= EM28XX_AMUX_LINE_IN
,
972 [EM2800_BOARD_LEADTEK_WINFAST_USBII
] = {
973 .name
= "Leadtek Winfast USB II",
975 .tuner_type
= TUNER_LG_PAL_NEW_TAPC
,
976 .tda9887_conf
= TDA9887_PRESENT
,
977 .decoder
= EM28XX_SAA711X
,
979 .type
= EM28XX_VMUX_TELEVISION
,
980 .vmux
= SAA7115_COMPOSITE2
,
981 .amux
= EM28XX_AMUX_VIDEO
,
983 .type
= EM28XX_VMUX_COMPOSITE1
,
984 .vmux
= SAA7115_COMPOSITE0
,
985 .amux
= EM28XX_AMUX_LINE_IN
,
987 .type
= EM28XX_VMUX_SVIDEO
,
988 .vmux
= SAA7115_SVIDEO3
,
989 .amux
= EM28XX_AMUX_LINE_IN
,
992 [EM2800_BOARD_KWORLD_USB2800
] = {
993 .name
= "Kworld USB2800",
995 .tuner_type
= TUNER_PHILIPS_FCV1236D
,
996 .tda9887_conf
= TDA9887_PRESENT
,
997 .decoder
= EM28XX_SAA711X
,
999 .type
= EM28XX_VMUX_TELEVISION
,
1000 .vmux
= SAA7115_COMPOSITE2
,
1001 .amux
= EM28XX_AMUX_VIDEO
,
1003 .type
= EM28XX_VMUX_COMPOSITE1
,
1004 .vmux
= SAA7115_COMPOSITE0
,
1005 .amux
= EM28XX_AMUX_LINE_IN
,
1007 .type
= EM28XX_VMUX_SVIDEO
,
1008 .vmux
= SAA7115_SVIDEO3
,
1009 .amux
= EM28XX_AMUX_LINE_IN
,
1012 [EM2820_BOARD_PINNACLE_DVC_90
] = {
1013 .name
= "Pinnacle Dazzle DVC 90/100/101/107 / Kaiser Baas Video to DVD maker",
1014 .tuner_type
= TUNER_ABSENT
, /* capture only board */
1015 .decoder
= EM28XX_SAA711X
,
1017 .type
= EM28XX_VMUX_COMPOSITE1
,
1018 .vmux
= SAA7115_COMPOSITE0
,
1019 .amux
= EM28XX_AMUX_LINE_IN
,
1021 .type
= EM28XX_VMUX_SVIDEO
,
1022 .vmux
= SAA7115_SVIDEO3
,
1023 .amux
= EM28XX_AMUX_LINE_IN
,
1026 [EM2800_BOARD_VGEAR_POCKETTV
] = {
1027 .name
= "V-Gear PocketTV",
1029 .tuner_type
= TUNER_LG_PAL_NEW_TAPC
,
1030 .tda9887_conf
= TDA9887_PRESENT
,
1031 .decoder
= EM28XX_SAA711X
,
1033 .type
= EM28XX_VMUX_TELEVISION
,
1034 .vmux
= SAA7115_COMPOSITE2
,
1035 .amux
= EM28XX_AMUX_VIDEO
,
1037 .type
= EM28XX_VMUX_COMPOSITE1
,
1038 .vmux
= SAA7115_COMPOSITE0
,
1039 .amux
= EM28XX_AMUX_LINE_IN
,
1041 .type
= EM28XX_VMUX_SVIDEO
,
1042 .vmux
= SAA7115_SVIDEO3
,
1043 .amux
= EM28XX_AMUX_LINE_IN
,
1046 [EM2820_BOARD_PROLINK_PLAYTV_BOX4_USB2
] = {
1047 .name
= "Pixelview PlayTV Box 4 USB 2.0",
1048 .tda9887_conf
= TDA9887_PRESENT
,
1049 .tuner_type
= TUNER_YMEC_TVF_5533MF
,
1050 .decoder
= EM28XX_SAA711X
,
1052 .type
= EM28XX_VMUX_TELEVISION
,
1053 .vmux
= SAA7115_COMPOSITE2
,
1054 .amux
= EM28XX_AMUX_VIDEO
,
1055 .aout
= EM28XX_AOUT_MONO
| /* I2S */
1056 EM28XX_AOUT_MASTER
, /* Line out pin */
1058 .type
= EM28XX_VMUX_COMPOSITE1
,
1059 .vmux
= SAA7115_COMPOSITE0
,
1060 .amux
= EM28XX_AMUX_LINE_IN
,
1062 .type
= EM28XX_VMUX_SVIDEO
,
1063 .vmux
= SAA7115_SVIDEO3
,
1064 .amux
= EM28XX_AMUX_LINE_IN
,
1067 [EM2820_BOARD_PROLINK_PLAYTV_USB2
] = {
1068 .name
= "SIIG AVTuner-PVR / Pixelview Prolink PlayTV USB 2.0",
1069 .has_snapshot_button
= 1,
1070 .tda9887_conf
= TDA9887_PRESENT
,
1071 .tuner_type
= TUNER_YMEC_TVF_5533MF
,
1072 .decoder
= EM28XX_SAA711X
,
1074 .type
= EM28XX_VMUX_TELEVISION
,
1075 .vmux
= SAA7115_COMPOSITE2
,
1076 .amux
= EM28XX_AMUX_VIDEO
,
1077 .aout
= EM28XX_AOUT_MONO
| /* I2S */
1078 EM28XX_AOUT_MASTER
, /* Line out pin */
1080 .type
= EM28XX_VMUX_COMPOSITE1
,
1081 .vmux
= SAA7115_COMPOSITE0
,
1082 .amux
= EM28XX_AMUX_LINE_IN
,
1084 .type
= EM28XX_VMUX_SVIDEO
,
1085 .vmux
= SAA7115_SVIDEO3
,
1086 .amux
= EM28XX_AMUX_LINE_IN
,
1089 [EM2860_BOARD_SAA711X_REFERENCE_DESIGN
] = {
1090 .name
= "EM2860/SAA711X Reference Design",
1091 .has_snapshot_button
= 1,
1092 .tuner_type
= TUNER_ABSENT
,
1093 .decoder
= EM28XX_SAA711X
,
1095 .type
= EM28XX_VMUX_SVIDEO
,
1096 .vmux
= SAA7115_SVIDEO3
,
1098 .type
= EM28XX_VMUX_COMPOSITE1
,
1099 .vmux
= SAA7115_COMPOSITE0
,
1102 [EM2880_BOARD_MSI_DIGIVOX_AD
] = {
1103 .name
= "MSI DigiVox A/D",
1104 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
1105 .tuner_type
= TUNER_XC2028
,
1106 .tuner_gpio
= default_tuner_gpio
,
1107 .decoder
= EM28XX_TVP5150
,
1109 .type
= EM28XX_VMUX_TELEVISION
,
1110 .vmux
= TVP5150_COMPOSITE0
,
1111 .amux
= EM28XX_AMUX_VIDEO
,
1112 .gpio
= em2880_msi_digivox_ad_analog
,
1114 .type
= EM28XX_VMUX_COMPOSITE1
,
1115 .vmux
= TVP5150_COMPOSITE1
,
1116 .amux
= EM28XX_AMUX_LINE_IN
,
1117 .gpio
= em2880_msi_digivox_ad_analog
,
1119 .type
= EM28XX_VMUX_SVIDEO
,
1120 .vmux
= TVP5150_SVIDEO
,
1121 .amux
= EM28XX_AMUX_LINE_IN
,
1122 .gpio
= em2880_msi_digivox_ad_analog
,
1125 [EM2880_BOARD_MSI_DIGIVOX_AD_II
] = {
1126 .name
= "MSI DigiVox A/D II",
1127 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
1128 .tuner_type
= TUNER_XC2028
,
1129 .tuner_gpio
= default_tuner_gpio
,
1130 .decoder
= EM28XX_TVP5150
,
1132 .type
= EM28XX_VMUX_TELEVISION
,
1133 .vmux
= TVP5150_COMPOSITE0
,
1134 .amux
= EM28XX_AMUX_VIDEO
,
1135 .gpio
= em2880_msi_digivox_ad_analog
,
1137 .type
= EM28XX_VMUX_COMPOSITE1
,
1138 .vmux
= TVP5150_COMPOSITE1
,
1139 .amux
= EM28XX_AMUX_LINE_IN
,
1140 .gpio
= em2880_msi_digivox_ad_analog
,
1142 .type
= EM28XX_VMUX_SVIDEO
,
1143 .vmux
= TVP5150_SVIDEO
,
1144 .amux
= EM28XX_AMUX_LINE_IN
,
1145 .gpio
= em2880_msi_digivox_ad_analog
,
1148 [EM2880_BOARD_KWORLD_DVB_305U
] = {
1149 .name
= "KWorld DVB-T 305U",
1150 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
1151 .tuner_type
= TUNER_XC2028
,
1152 .tuner_gpio
= default_tuner_gpio
,
1153 .decoder
= EM28XX_TVP5150
,
1155 .type
= EM28XX_VMUX_TELEVISION
,
1156 .vmux
= TVP5150_COMPOSITE0
,
1157 .amux
= EM28XX_AMUX_VIDEO
,
1159 .type
= EM28XX_VMUX_COMPOSITE1
,
1160 .vmux
= TVP5150_COMPOSITE1
,
1161 .amux
= EM28XX_AMUX_LINE_IN
,
1163 .type
= EM28XX_VMUX_SVIDEO
,
1164 .vmux
= TVP5150_SVIDEO
,
1165 .amux
= EM28XX_AMUX_LINE_IN
,
1168 [EM2880_BOARD_KWORLD_DVB_310U
] = {
1169 .name
= "KWorld DVB-T 310U",
1170 .tuner_type
= TUNER_XC2028
,
1171 .tuner_gpio
= default_tuner_gpio
,
1173 .dvb_gpio
= default_digital
,
1175 .decoder
= EM28XX_TVP5150
,
1177 .type
= EM28XX_VMUX_TELEVISION
,
1178 .vmux
= TVP5150_COMPOSITE0
,
1179 .amux
= EM28XX_AMUX_VIDEO
,
1180 .gpio
= default_analog
,
1182 .type
= EM28XX_VMUX_COMPOSITE1
,
1183 .vmux
= TVP5150_COMPOSITE1
,
1184 .amux
= EM28XX_AMUX_LINE_IN
,
1185 .gpio
= default_analog
,
1186 }, { /* S-video has not been tested yet */
1187 .type
= EM28XX_VMUX_SVIDEO
,
1188 .vmux
= TVP5150_SVIDEO
,
1189 .amux
= EM28XX_AMUX_LINE_IN
,
1190 .gpio
= default_analog
,
1193 [EM2882_BOARD_KWORLD_ATSC_315U
] = {
1194 .name
= "KWorld ATSC 315U HDTV TV Box",
1195 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
1196 .tuner_type
= TUNER_THOMSON_DTT761X
,
1197 .tuner_gpio
= em2882_kworld_315u_tuner_gpio
,
1198 .tda9887_conf
= TDA9887_PRESENT
,
1199 .decoder
= EM28XX_SAA711X
,
1201 .dvb_gpio
= em2882_kworld_315u_digital
,
1202 .xclk
= EM28XX_XCLK_FREQUENCY_12MHZ
,
1203 .i2c_speed
= EM28XX_I2C_CLK_WAIT_ENABLE
,
1204 /* Analog mode - still not ready */
1206 .type = EM28XX_VMUX_TELEVISION,
1207 .vmux = SAA7115_COMPOSITE2,
1208 .amux = EM28XX_AMUX_VIDEO,
1209 .gpio = em2882_kworld_315u_analog,
1210 .aout = EM28XX_AOUT_PCM_IN | EM28XX_AOUT_PCM_STEREO,
1212 .type = EM28XX_VMUX_COMPOSITE1,
1213 .vmux = SAA7115_COMPOSITE0,
1214 .amux = EM28XX_AMUX_LINE_IN,
1215 .gpio = em2882_kworld_315u_analog1,
1216 .aout = EM28XX_AOUT_PCM_IN | EM28XX_AOUT_PCM_STEREO,
1218 .type = EM28XX_VMUX_SVIDEO,
1219 .vmux = SAA7115_SVIDEO3,
1220 .amux = EM28XX_AMUX_LINE_IN,
1221 .gpio = em2882_kworld_315u_analog1,
1222 .aout = EM28XX_AOUT_PCM_IN | EM28XX_AOUT_PCM_STEREO,
1225 [EM2880_BOARD_EMPIRE_DUAL_TV
] = {
1226 .name
= "Empire dual TV",
1227 .tuner_type
= TUNER_XC2028
,
1228 .tuner_gpio
= default_tuner_gpio
,
1230 .dvb_gpio
= default_digital
,
1232 .decoder
= EM28XX_TVP5150
,
1234 .type
= EM28XX_VMUX_TELEVISION
,
1235 .vmux
= TVP5150_COMPOSITE0
,
1236 .amux
= EM28XX_AMUX_VIDEO
,
1237 .gpio
= default_analog
,
1239 .type
= EM28XX_VMUX_COMPOSITE1
,
1240 .vmux
= TVP5150_COMPOSITE1
,
1241 .amux
= EM28XX_AMUX_LINE_IN
,
1242 .gpio
= default_analog
,
1244 .type
= EM28XX_VMUX_SVIDEO
,
1245 .vmux
= TVP5150_SVIDEO
,
1246 .amux
= EM28XX_AMUX_LINE_IN
,
1247 .gpio
= default_analog
,
1250 [EM2881_BOARD_DNT_DA2_HYBRID
] = {
1251 .name
= "DNT DA2 Hybrid",
1252 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
1253 .tuner_type
= TUNER_XC2028
,
1254 .tuner_gpio
= default_tuner_gpio
,
1255 .decoder
= EM28XX_TVP5150
,
1257 .type
= EM28XX_VMUX_TELEVISION
,
1258 .vmux
= TVP5150_COMPOSITE0
,
1259 .amux
= EM28XX_AMUX_VIDEO
,
1260 .gpio
= default_analog
,
1262 .type
= EM28XX_VMUX_COMPOSITE1
,
1263 .vmux
= TVP5150_COMPOSITE1
,
1264 .amux
= EM28XX_AMUX_LINE_IN
,
1265 .gpio
= default_analog
,
1267 .type
= EM28XX_VMUX_SVIDEO
,
1268 .vmux
= TVP5150_SVIDEO
,
1269 .amux
= EM28XX_AMUX_LINE_IN
,
1270 .gpio
= default_analog
,
1273 [EM2881_BOARD_PINNACLE_HYBRID_PRO
] = {
1274 .name
= "Pinnacle Hybrid Pro",
1275 .tuner_type
= TUNER_XC2028
,
1276 .tuner_gpio
= default_tuner_gpio
,
1277 .decoder
= EM28XX_TVP5150
,
1279 .dvb_gpio
= pinnacle_hybrid_pro_digital
,
1281 .type
= EM28XX_VMUX_TELEVISION
,
1282 .vmux
= TVP5150_COMPOSITE0
,
1283 .amux
= EM28XX_AMUX_VIDEO
,
1284 .gpio
= pinnacle_hybrid_pro_analog
,
1286 .type
= EM28XX_VMUX_COMPOSITE1
,
1287 .vmux
= TVP5150_COMPOSITE1
,
1288 .amux
= EM28XX_AMUX_LINE_IN
,
1289 .gpio
= pinnacle_hybrid_pro_analog
,
1291 .type
= EM28XX_VMUX_SVIDEO
,
1292 .vmux
= TVP5150_SVIDEO
,
1293 .amux
= EM28XX_AMUX_LINE_IN
,
1294 .gpio
= pinnacle_hybrid_pro_analog
,
1297 [EM2882_BOARD_PINNACLE_HYBRID_PRO
] = {
1298 .name
= "Pinnacle Hybrid Pro (2)",
1299 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
1300 .tuner_type
= TUNER_XC2028
,
1301 .tuner_gpio
= default_tuner_gpio
,
1303 .decoder
= EM28XX_TVP5150
,
1305 .type
= EM28XX_VMUX_TELEVISION
,
1306 .vmux
= TVP5150_COMPOSITE0
,
1307 .amux
= EM28XX_AMUX_VIDEO
,
1308 .gpio
= hauppauge_wintv_hvr_900_analog
,
1310 .type
= EM28XX_VMUX_COMPOSITE1
,
1311 .vmux
= TVP5150_COMPOSITE1
,
1312 .amux
= EM28XX_AMUX_LINE_IN
,
1313 .gpio
= hauppauge_wintv_hvr_900_analog
,
1315 .type
= EM28XX_VMUX_SVIDEO
,
1316 .vmux
= TVP5150_SVIDEO
,
1317 .amux
= EM28XX_AMUX_LINE_IN
,
1318 .gpio
= hauppauge_wintv_hvr_900_analog
,
1321 [EM2882_BOARD_KWORLD_VS_DVBT
] = {
1322 .name
= "Kworld VS-DVB-T 323UR",
1323 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
1324 .tuner_type
= TUNER_XC2028
,
1325 .tuner_gpio
= default_tuner_gpio
,
1326 .decoder
= EM28XX_TVP5150
,
1328 .type
= EM28XX_VMUX_TELEVISION
,
1329 .vmux
= TVP5150_COMPOSITE0
,
1330 .amux
= EM28XX_AMUX_VIDEO
,
1332 .type
= EM28XX_VMUX_COMPOSITE1
,
1333 .vmux
= TVP5150_COMPOSITE1
,
1334 .amux
= EM28XX_AMUX_LINE_IN
,
1336 .type
= EM28XX_VMUX_SVIDEO
,
1337 .vmux
= TVP5150_SVIDEO
,
1338 .amux
= EM28XX_AMUX_LINE_IN
,
1341 [EM2882_BOARD_TERRATEC_HYBRID_XS
] = {
1342 .name
= "Terratec Hybrid XS (em2882)",
1343 .valid
= EM28XX_BOARD_NOT_VALIDATED
,
1344 .tuner_type
= TUNER_XC2028
,
1345 .tuner_gpio
= default_tuner_gpio
,
1346 .decoder
= EM28XX_TVP5150
,
1348 .type
= EM28XX_VMUX_TELEVISION
,
1349 .vmux
= TVP5150_COMPOSITE0
,
1350 .amux
= EM28XX_AMUX_VIDEO
,
1351 .gpio
= hauppauge_wintv_hvr_900_analog
,
1353 .type
= EM28XX_VMUX_COMPOSITE1
,
1354 .vmux
= TVP5150_COMPOSITE1
,
1355 .amux
= EM28XX_AMUX_LINE_IN
,
1356 .gpio
= hauppauge_wintv_hvr_900_analog
,
1358 .type
= EM28XX_VMUX_SVIDEO
,
1359 .vmux
= TVP5150_SVIDEO
,
1360 .amux
= EM28XX_AMUX_LINE_IN
,
1361 .gpio
= hauppauge_wintv_hvr_900_analog
,
1364 [EM2883_BOARD_KWORLD_HYBRID_330U
] = {
1365 .name
= "Kworld PlusTV HD Hybrid 330",
1366 .tuner_type
= TUNER_XC2028
,
1367 .tuner_gpio
= default_tuner_gpio
,
1368 .decoder
= EM28XX_TVP5150
,
1371 .dvb_gpio
= kworld_330u_digital
,
1372 .xclk
= EM28XX_XCLK_FREQUENCY_12MHZ
,
1373 .i2c_speed
= EM28XX_I2C_CLK_WAIT_ENABLE
|
1374 EM28XX_I2C_EEPROM_ON_BOARD
|
1375 EM28XX_I2C_EEPROM_KEY_VALID
,
1377 .type
= EM28XX_VMUX_TELEVISION
,
1378 .vmux
= TVP5150_COMPOSITE0
,
1379 .amux
= EM28XX_AMUX_VIDEO
,
1380 .gpio
= kworld_330u_analog
,
1381 .aout
= EM28XX_AOUT_PCM_IN
| EM28XX_AOUT_PCM_STEREO
,
1383 .type
= EM28XX_VMUX_COMPOSITE1
,
1384 .vmux
= TVP5150_COMPOSITE1
,
1385 .amux
= EM28XX_AMUX_LINE_IN
,
1386 .gpio
= kworld_330u_analog
,
1387 .aout
= EM28XX_AOUT_PCM_IN
| EM28XX_AOUT_PCM_STEREO
,
1389 .type
= EM28XX_VMUX_SVIDEO
,
1390 .vmux
= TVP5150_SVIDEO
,
1391 .amux
= EM28XX_AMUX_LINE_IN
,
1392 .gpio
= kworld_330u_analog
,
1395 [EM2820_BOARD_COMPRO_VIDEOMATE_FORYOU
] = {
1396 .name
= "Compro VideoMate ForYou/Stereo",
1397 .tuner_type
= TUNER_LG_PAL_NEW_TAPC
,
1398 .tvaudio_addr
= 0xb0,
1399 .tda9887_conf
= TDA9887_PRESENT
,
1400 .decoder
= EM28XX_TVP5150
,
1401 .adecoder
= EM28XX_TVAUDIO
,
1402 .mute_gpio
= compro_mute_gpio
,
1404 .type
= EM28XX_VMUX_TELEVISION
,
1405 .vmux
= TVP5150_COMPOSITE0
,
1406 .amux
= EM28XX_AMUX_VIDEO
,
1407 .gpio
= compro_unmute_tv_gpio
,
1409 .type
= EM28XX_VMUX_SVIDEO
,
1410 .vmux
= TVP5150_SVIDEO
,
1411 .amux
= EM28XX_AMUX_LINE_IN
,
1412 .gpio
= compro_unmute_svid_gpio
,
1415 [EM2860_BOARD_KAIOMY_TVNPC_U2
] = {
1416 .name
= "Kaiomy TVnPC U2",
1418 .tuner_type
= TUNER_XC2028
,
1421 .decoder
= EM28XX_TVP5150
,
1422 .tuner_gpio
= default_tuner_gpio
,
1423 .ir_codes
= ir_codes_kaiomy
,
1425 .type
= EM28XX_VMUX_TELEVISION
,
1426 .vmux
= TVP5150_COMPOSITE0
,
1427 .amux
= EM28XX_AMUX_VIDEO
,
1430 .type
= EM28XX_VMUX_COMPOSITE1
,
1431 .vmux
= TVP5150_COMPOSITE1
,
1432 .amux
= EM28XX_AMUX_LINE_IN
,
1434 .type
= EM28XX_VMUX_SVIDEO
,
1435 .vmux
= TVP5150_SVIDEO
,
1436 .amux
= EM28XX_AMUX_LINE_IN
,
1439 .type
= EM28XX_RADIO
,
1440 .amux
= EM28XX_AMUX_LINE_IN
,
1443 [EM2860_BOARD_EASYCAP
] = {
1444 .name
= "Easy Cap Capture DC-60",
1446 .tuner_type
= TUNER_ABSENT
,
1447 .decoder
= EM28XX_SAA711X
,
1449 .type
= EM28XX_VMUX_COMPOSITE1
,
1450 .vmux
= SAA7115_COMPOSITE0
,
1451 .amux
= EM28XX_AMUX_LINE_IN
,
1453 .type
= EM28XX_VMUX_SVIDEO
,
1454 .vmux
= SAA7115_SVIDEO3
,
1455 .amux
= EM28XX_AMUX_LINE_IN
,
1458 [EM2820_BOARD_IODATA_GVMVP_SZ
] = {
1459 .name
= "IO-DATA GV-MVP/SZ",
1460 .tuner_type
= TUNER_PHILIPS_FM1236_MK3
,
1461 .tuner_gpio
= default_tuner_gpio
,
1462 .tda9887_conf
= TDA9887_PRESENT
,
1463 .decoder
= EM28XX_TVP5150
,
1465 .type
= EM28XX_VMUX_TELEVISION
,
1466 .vmux
= TVP5150_COMPOSITE0
,
1467 .amux
= EM28XX_AMUX_VIDEO
,
1468 }, { /* Composite has not been tested yet */
1469 .type
= EM28XX_VMUX_COMPOSITE1
,
1470 .vmux
= TVP5150_COMPOSITE1
,
1471 .amux
= EM28XX_AMUX_VIDEO
,
1472 }, { /* S-video has not been tested yet */
1473 .type
= EM28XX_VMUX_SVIDEO
,
1474 .vmux
= TVP5150_SVIDEO
,
1475 .amux
= EM28XX_AMUX_VIDEO
,
1478 [EM2860_BOARD_TERRATEC_GRABBY
] = {
1479 .name
= "Terratec Grabby",
1481 .tuner_type
= TUNER_ABSENT
,
1482 .decoder
= EM28XX_SAA711X
,
1483 .xclk
= EM28XX_XCLK_FREQUENCY_12MHZ
,
1485 .type
= EM28XX_VMUX_COMPOSITE1
,
1486 .vmux
= SAA7115_COMPOSITE0
,
1487 .amux
= EM28XX_AMUX_VIDEO2
,
1489 .type
= EM28XX_VMUX_SVIDEO
,
1490 .vmux
= SAA7115_SVIDEO3
,
1491 .amux
= EM28XX_AMUX_VIDEO2
,
1494 [EM2860_BOARD_TERRATEC_AV350
] = {
1495 .name
= "Terratec AV350",
1497 .tuner_type
= TUNER_ABSENT
,
1498 .decoder
= EM28XX_TVP5150
,
1499 .xclk
= EM28XX_XCLK_FREQUENCY_12MHZ
,
1500 .mute_gpio
= terratec_av350_mute_gpio
,
1502 .type
= EM28XX_VMUX_COMPOSITE1
,
1503 .vmux
= TVP5150_COMPOSITE1
,
1504 .amux
= EM28XX_AUDIO_SRC_LINE
,
1505 .gpio
= terratec_av350_unmute_gpio
,
1508 .type
= EM28XX_VMUX_SVIDEO
,
1509 .vmux
= TVP5150_SVIDEO
,
1510 .amux
= EM28XX_AUDIO_SRC_LINE
,
1511 .gpio
= terratec_av350_unmute_gpio
,
1514 [EM2882_BOARD_EVGA_INDTUBE
] = {
1515 .name
= "Evga inDtube",
1516 .tuner_type
= TUNER_XC2028
,
1517 .tuner_gpio
= default_tuner_gpio
,
1518 .decoder
= EM28XX_TVP5150
,
1519 .xclk
= EM28XX_XCLK_FREQUENCY_12MHZ
, /* NEC IR */
1522 .dvb_gpio
= evga_indtube_digital
,
1523 .ir_codes
= ir_codes_evga_indtube
,
1525 .type
= EM28XX_VMUX_TELEVISION
,
1526 .vmux
= TVP5150_COMPOSITE0
,
1527 .amux
= EM28XX_AMUX_VIDEO
,
1528 .gpio
= evga_indtube_analog
,
1530 .type
= EM28XX_VMUX_COMPOSITE1
,
1531 .vmux
= TVP5150_COMPOSITE1
,
1532 .amux
= EM28XX_AMUX_LINE_IN
,
1533 .gpio
= evga_indtube_analog
,
1535 .type
= EM28XX_VMUX_SVIDEO
,
1536 .vmux
= TVP5150_SVIDEO
,
1537 .amux
= EM28XX_AMUX_LINE_IN
,
1538 .gpio
= evga_indtube_analog
,
1542 const unsigned int em28xx_bcount
= ARRAY_SIZE(em28xx_boards
);
1544 /* table of devices that work with this driver */
1545 struct usb_device_id em28xx_id_table
[] = {
1546 { USB_DEVICE(0xeb1a, 0x2750),
1547 .driver_info
= EM2750_BOARD_UNKNOWN
},
1548 { USB_DEVICE(0xeb1a, 0x2751),
1549 .driver_info
= EM2750_BOARD_UNKNOWN
},
1550 { USB_DEVICE(0xeb1a, 0x2800),
1551 .driver_info
= EM2800_BOARD_UNKNOWN
},
1552 { USB_DEVICE(0xeb1a, 0x2710),
1553 .driver_info
= EM2820_BOARD_UNKNOWN
},
1554 { USB_DEVICE(0xeb1a, 0x2820),
1555 .driver_info
= EM2820_BOARD_UNKNOWN
},
1556 { USB_DEVICE(0xeb1a, 0x2821),
1557 .driver_info
= EM2820_BOARD_UNKNOWN
},
1558 { USB_DEVICE(0xeb1a, 0x2860),
1559 .driver_info
= EM2820_BOARD_UNKNOWN
},
1560 { USB_DEVICE(0xeb1a, 0x2861),
1561 .driver_info
= EM2820_BOARD_UNKNOWN
},
1562 { USB_DEVICE(0xeb1a, 0x2870),
1563 .driver_info
= EM2820_BOARD_UNKNOWN
},
1564 { USB_DEVICE(0xeb1a, 0x2881),
1565 .driver_info
= EM2820_BOARD_UNKNOWN
},
1566 { USB_DEVICE(0xeb1a, 0x2883),
1567 .driver_info
= EM2820_BOARD_UNKNOWN
},
1568 { USB_DEVICE(0xeb1a, 0xe300),
1569 .driver_info
= EM2861_BOARD_KWORLD_PVRTV_300U
},
1570 { USB_DEVICE(0xeb1a, 0xe303),
1571 .driver_info
= EM2860_BOARD_KAIOMY_TVNPC_U2
},
1572 { USB_DEVICE(0xeb1a, 0xe305),
1573 .driver_info
= EM2880_BOARD_KWORLD_DVB_305U
},
1574 { USB_DEVICE(0xeb1a, 0xe310),
1575 .driver_info
= EM2880_BOARD_MSI_DIGIVOX_AD
},
1576 { USB_DEVICE(0xeb1a, 0xa313),
1577 .driver_info
= EM2882_BOARD_KWORLD_ATSC_315U
},
1578 { USB_DEVICE(0xeb1a, 0xa316),
1579 .driver_info
= EM2883_BOARD_KWORLD_HYBRID_330U
},
1580 { USB_DEVICE(0xeb1a, 0xe320),
1581 .driver_info
= EM2880_BOARD_MSI_DIGIVOX_AD_II
},
1582 { USB_DEVICE(0xeb1a, 0xe323),
1583 .driver_info
= EM2882_BOARD_KWORLD_VS_DVBT
},
1584 { USB_DEVICE(0xeb1a, 0xe350),
1585 .driver_info
= EM2870_BOARD_KWORLD_350U
},
1586 { USB_DEVICE(0xeb1a, 0xe355),
1587 .driver_info
= EM2870_BOARD_KWORLD_355U
},
1588 { USB_DEVICE(0xeb1a, 0x2801),
1589 .driver_info
= EM2800_BOARD_GRABBEEX_USB2800
},
1590 { USB_DEVICE(0xeb1a, 0xe357),
1591 .driver_info
= EM2870_BOARD_KWORLD_355U
},
1592 { USB_DEVICE(0x1b80, 0xe302),
1593 .driver_info
= EM2820_BOARD_PINNACLE_DVC_90
}, /* Kaiser Baas Video to DVD maker */
1594 { USB_DEVICE(0x0ccd, 0x0036),
1595 .driver_info
= EM2820_BOARD_TERRATEC_CINERGY_250
},
1596 { USB_DEVICE(0x0ccd, 0x004c),
1597 .driver_info
= EM2880_BOARD_TERRATEC_HYBRID_XS_FR
},
1598 { USB_DEVICE(0x0ccd, 0x004f),
1599 .driver_info
= EM2860_BOARD_TERRATEC_HYBRID_XS
},
1600 { USB_DEVICE(0x0ccd, 0x005e),
1601 .driver_info
= EM2882_BOARD_TERRATEC_HYBRID_XS
},
1602 { USB_DEVICE(0x0ccd, 0x0042),
1603 .driver_info
= EM2880_BOARD_TERRATEC_HYBRID_XS
},
1604 { USB_DEVICE(0x0ccd, 0x0043),
1605 .driver_info
= EM2870_BOARD_TERRATEC_XS
},
1606 { USB_DEVICE(0x0ccd, 0x0047),
1607 .driver_info
= EM2880_BOARD_TERRATEC_PRODIGY_XS
},
1608 { USB_DEVICE(0x0ccd, 0x0084),
1609 .driver_info
= EM2860_BOARD_TERRATEC_AV350
},
1610 { USB_DEVICE(0x0ccd, 0x0096),
1611 .driver_info
= EM2860_BOARD_TERRATEC_GRABBY
},
1612 { USB_DEVICE(0x185b, 0x2870),
1613 .driver_info
= EM2870_BOARD_COMPRO_VIDEOMATE
},
1614 { USB_DEVICE(0x185b, 0x2041),
1615 .driver_info
= EM2820_BOARD_COMPRO_VIDEOMATE_FORYOU
},
1616 { USB_DEVICE(0x2040, 0x4200),
1617 .driver_info
= EM2820_BOARD_HAUPPAUGE_WINTV_USB_2
},
1618 { USB_DEVICE(0x2040, 0x4201),
1619 .driver_info
= EM2820_BOARD_HAUPPAUGE_WINTV_USB_2
},
1620 { USB_DEVICE(0x2040, 0x6500),
1621 .driver_info
= EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900
},
1622 { USB_DEVICE(0x2040, 0x6502),
1623 .driver_info
= EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2
},
1624 { USB_DEVICE(0x2040, 0x6513), /* HCW HVR-980 */
1625 .driver_info
= EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950
},
1626 { USB_DEVICE(0x2040, 0x6517), /* HP HVR-950 */
1627 .driver_info
= EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950
},
1628 { USB_DEVICE(0x2040, 0x651b), /* RP HVR-950 */
1629 .driver_info
= EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950
},
1630 { USB_DEVICE(0x2040, 0x651f),
1631 .driver_info
= EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850
},
1632 { USB_DEVICE(0x0438, 0xb002),
1633 .driver_info
= EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600
},
1634 { USB_DEVICE(0x2001, 0xf112),
1635 .driver_info
= EM2820_BOARD_DLINK_USB_TV
},
1636 { USB_DEVICE(0x2304, 0x0207),
1637 .driver_info
= EM2820_BOARD_PINNACLE_DVC_90
},
1638 { USB_DEVICE(0x2304, 0x0208),
1639 .driver_info
= EM2820_BOARD_PINNACLE_USB_2
},
1640 { USB_DEVICE(0x2304, 0x021a),
1641 .driver_info
= EM2820_BOARD_PINNACLE_DVC_90
},
1642 { USB_DEVICE(0x2304, 0x0226),
1643 .driver_info
= EM2882_BOARD_PINNACLE_HYBRID_PRO
},
1644 { USB_DEVICE(0x2304, 0x0227),
1645 .driver_info
= EM2880_BOARD_PINNACLE_PCTV_HD_PRO
},
1646 { USB_DEVICE(0x0413, 0x6023),
1647 .driver_info
= EM2800_BOARD_LEADTEK_WINFAST_USBII
},
1648 { USB_DEVICE(0x093b, 0xa005),
1649 .driver_info
= EM2861_BOARD_PLEXTOR_PX_TV100U
},
1650 { USB_DEVICE(0x04bb, 0x0515),
1651 .driver_info
= EM2820_BOARD_IODATA_GVMVP_SZ
},
1654 MODULE_DEVICE_TABLE(usb
, em28xx_id_table
);
1657 * EEPROM hash table for devices with generic USB IDs
1659 static struct em28xx_hash_table em28xx_eeprom_hash
[] = {
1660 /* P/N: SA 60002070465 Tuner: TVF7533-MF */
1661 {0x6ce05a8f, EM2820_BOARD_PROLINK_PLAYTV_USB2
, TUNER_YMEC_TVF_5533MF
},
1662 {0x72cc5a8b, EM2820_BOARD_PROLINK_PLAYTV_BOX4_USB2
, TUNER_YMEC_TVF_5533MF
},
1663 {0x966a0441, EM2880_BOARD_KWORLD_DVB_310U
, TUNER_XC2028
},
1664 {0x9567eb1a, EM2880_BOARD_EMPIRE_DUAL_TV
, TUNER_XC2028
},
1665 {0xcee44a99, EM2882_BOARD_EVGA_INDTUBE
, TUNER_XC2028
},
1666 {0xb8846b20, EM2881_BOARD_PINNACLE_HYBRID_PRO
, TUNER_XC2028
},
1669 /* I2C devicelist hash table for devices with generic USB IDs */
1670 static struct em28xx_hash_table em28xx_i2c_hash
[] = {
1671 {0xb06a32c3, EM2800_BOARD_TERRATEC_CINERGY_200
, TUNER_LG_PAL_NEW_TAPC
},
1672 {0xf51200e3, EM2800_BOARD_VGEAR_POCKETTV
, TUNER_LG_PAL_NEW_TAPC
},
1673 {0x1ba50080, EM2860_BOARD_SAA711X_REFERENCE_DESIGN
, TUNER_ABSENT
},
1674 {0xc51200e3, EM2820_BOARD_GADMEI_TVR200
, TUNER_LG_PAL_NEW_TAPC
},
1677 /* I2C possible address to saa7115, tvp5150, msp3400, tvaudio */
1678 static unsigned short saa711x_addrs
[] = {
1679 0x4a >> 1, 0x48 >> 1, /* SAA7111, SAA7111A and SAA7113 */
1680 0x42 >> 1, 0x40 >> 1, /* SAA7114, SAA7115 and SAA7118 */
1683 static unsigned short tvp5150_addrs
[] = {
1689 static unsigned short mt9v011_addrs
[] = {
1694 static unsigned short msp3400_addrs
[] = {
1700 int em28xx_tuner_callback(void *ptr
, int component
, int command
, int arg
)
1703 struct em28xx
*dev
= ptr
;
1705 if (dev
->tuner_type
!= TUNER_XC2028
)
1708 if (command
!= XC2028_TUNER_RESET
)
1711 rc
= em28xx_gpio_set(dev
, dev
->board
.tuner_gpio
);
1715 EXPORT_SYMBOL_GPL(em28xx_tuner_callback
);
1717 static inline void em28xx_set_model(struct em28xx
*dev
)
1719 memcpy(&dev
->board
, &em28xx_boards
[dev
->model
], sizeof(dev
->board
));
1721 /* Those are the default values for the majority of boards
1722 Use those values if not specified otherwise at boards entry
1724 if (!dev
->board
.xclk
)
1725 dev
->board
.xclk
= EM28XX_XCLK_IR_RC5_MODE
|
1726 EM28XX_XCLK_FREQUENCY_12MHZ
;
1728 if (!dev
->board
.i2c_speed
)
1729 dev
->board
.i2c_speed
= EM28XX_I2C_CLK_WAIT_ENABLE
|
1730 EM28XX_I2C_FREQ_100_KHZ
;
1734 /* FIXME: Should be replaced by a proper mt9m111 driver */
1735 static int em28xx_initialize_mt9m111(struct em28xx
*dev
)
1738 unsigned char regs
[][3] = {
1739 { 0x0d, 0x00, 0x01, }, /* reset and use defaults */
1740 { 0x0d, 0x00, 0x00, },
1741 { 0x0a, 0x00, 0x21, },
1742 { 0x21, 0x04, 0x00, }, /* full readout speed, no row/col skipping */
1745 for (i
= 0; i
< ARRAY_SIZE(regs
); i
++)
1746 i2c_master_send(&dev
->i2c_client
, ®s
[i
][0], 3);
1752 /* FIXME: Should be replaced by a proper mt9m001 driver */
1753 static int em28xx_initialize_mt9m001(struct em28xx
*dev
)
1756 unsigned char regs
[][3] = {
1757 { 0x0d, 0x00, 0x01, },
1758 { 0x0d, 0x00, 0x00, },
1759 { 0x04, 0x05, 0x00, }, /* hres = 1280 */
1760 { 0x03, 0x04, 0x00, }, /* vres = 1024 */
1761 { 0x20, 0x11, 0x00, },
1762 { 0x06, 0x00, 0x10, },
1763 { 0x2b, 0x00, 0x24, },
1764 { 0x2e, 0x00, 0x24, },
1765 { 0x35, 0x00, 0x24, },
1766 { 0x2d, 0x00, 0x20, },
1767 { 0x2c, 0x00, 0x20, },
1768 { 0x09, 0x0a, 0xd4, },
1769 { 0x35, 0x00, 0x57, },
1772 for (i
= 0; i
< ARRAY_SIZE(regs
); i
++)
1773 i2c_master_send(&dev
->i2c_client
, ®s
[i
][0], 3);
1778 /* HINT method: webcam I2C chips
1780 * This method works for webcams with Micron sensors
1782 static int em28xx_hint_sensor(struct em28xx
*dev
)
1790 /* Micron sensor detection */
1791 dev
->i2c_client
.addr
= 0xba >> 1;
1793 i2c_master_send(&dev
->i2c_client
, &cmd
, 1);
1794 rc
= i2c_master_recv(&dev
->i2c_client
, (char *)&version_be
, 2);
1798 version
= be16_to_cpu(version_be
);
1800 case 0x8232: /* mt9v011 640x480 1.3 Mpix sensor */
1801 case 0x8243: /* mt9v011 rev B 640x480 1.3 Mpix sensor */
1802 dev
->model
= EM2820_BOARD_SILVERCREST_WEBCAM
;
1803 em28xx_set_model(dev
);
1805 sensor_name
= "mt9v011";
1806 dev
->em28xx_sensor
= EM28XX_MT9V011
;
1807 dev
->sensor_xres
= 640;
1808 dev
->sensor_yres
= 480;
1810 * FIXME: mt9v011 uses I2S speed as xtal clk - at least with
1811 * the Silvercrest cam I have here for testing - for higher
1812 * resolutions, a high clock cause horizontal artifacts, so we
1813 * need to use a lower xclk frequency.
1814 * Yet, it would be possible to adjust xclk depending on the
1815 * desired resolution, since this affects directly the
1818 dev
->board
.xclk
= EM28XX_XCLK_FREQUENCY_4_3MHZ
;
1819 dev
->sensor_xtal
= 4300000;
1821 /* probably means GRGB 16 bit bayer */
1822 dev
->vinmode
= 0x0d;
1827 case 0x143a: /* MT9M111 as found in the ECS G200 */
1828 dev
->model
= EM2750_BOARD_UNKNOWN
;
1829 em28xx_set_model(dev
);
1831 sensor_name
= "mt9m111";
1832 dev
->board
.xclk
= EM28XX_XCLK_FREQUENCY_48MHZ
;
1833 dev
->em28xx_sensor
= EM28XX_MT9M111
;
1834 em28xx_initialize_mt9m111(dev
);
1835 dev
->sensor_xres
= 640;
1836 dev
->sensor_yres
= 512;
1838 dev
->vinmode
= 0x0a;
1844 dev
->model
= EM2750_BOARD_UNKNOWN
;
1845 em28xx_set_model(dev
);
1847 sensor_name
= "mt9m001";
1848 dev
->em28xx_sensor
= EM28XX_MT9M001
;
1849 em28xx_initialize_mt9m001(dev
);
1850 dev
->sensor_xres
= 1280;
1851 dev
->sensor_yres
= 1024;
1853 /* probably means BGGR 16 bit bayer */
1854 dev
->vinmode
= 0x0c;
1859 printk("Unknown Micron Sensor 0x%04x\n", version
);
1863 /* Setup webcam defaults */
1864 em28xx_pre_card_setup(dev
);
1866 em28xx_errdev("Sensor is %s, using model %s entry.\n",
1867 sensor_name
, em28xx_boards
[dev
->model
].name
);
1872 /* Since em28xx_pre_card_setup() requires a proper dev->model,
1873 * this won't work for boards with generic PCI IDs
1875 void em28xx_pre_card_setup(struct em28xx
*dev
)
1877 /* Set the initial XCLK and I2C clock values based on the board
1879 em28xx_write_reg(dev
, EM28XX_R0F_XCLK
, dev
->board
.xclk
& 0x7f);
1880 em28xx_write_reg(dev
, EM28XX_R06_I2C_CLK
, dev
->board
.i2c_speed
);
1883 /* request some modules */
1884 switch (dev
->model
) {
1885 case EM2861_BOARD_PLEXTOR_PX_TV100U
:
1886 /* Sets the msp34xx I2S speed */
1887 dev
->i2s_speed
= 2048000;
1889 case EM2861_BOARD_KWORLD_PVRTV_300U
:
1890 case EM2880_BOARD_KWORLD_DVB_305U
:
1891 em28xx_write_reg(dev
, EM28XX_R08_GPIO
, 0x6d);
1893 em28xx_write_reg(dev
, EM28XX_R08_GPIO
, 0x7d);
1896 case EM2870_BOARD_COMPRO_VIDEOMATE
:
1897 /* TODO: someone can do some cleanup here...
1898 not everything's needed */
1899 em28xx_write_reg(dev
, EM2880_R04_GPO
, 0x00);
1901 em28xx_write_reg(dev
, EM2880_R04_GPO
, 0x01);
1903 em28xx_write_reg(dev
, EM28XX_R08_GPIO
, 0xfd);
1905 em28xx_write_reg(dev
, EM28XX_R08_GPIO
, 0xfc);
1907 em28xx_write_reg(dev
, EM28XX_R08_GPIO
, 0xdc);
1909 em28xx_write_reg(dev
, EM28XX_R08_GPIO
, 0xfc);
1912 case EM2870_BOARD_TERRATEC_XS_MT2060
:
1913 /* this device needs some gpio writes to get the DVB-T
1915 em28xx_write_reg(dev
, EM28XX_R08_GPIO
, 0xfe);
1917 em28xx_write_reg(dev
, EM28XX_R08_GPIO
, 0xde);
1919 em28xx_write_reg(dev
, EM28XX_R08_GPIO
, 0xfe);
1922 case EM2870_BOARD_PINNACLE_PCTV_DVB
:
1923 /* this device needs some gpio writes to get the
1925 em28xx_write_reg(dev
, EM28XX_R08_GPIO
, 0xfe);
1927 em28xx_write_reg(dev
, EM28XX_R08_GPIO
, 0xde);
1929 em28xx_write_reg(dev
, EM28XX_R08_GPIO
, 0xfe);
1932 case EM2820_BOARD_GADMEI_UTV310
:
1933 case EM2820_BOARD_MSI_VOX_USB_2
:
1934 /* enables audio for that devices */
1935 em28xx_write_reg(dev
, EM28XX_R08_GPIO
, 0xfd);
1938 case EM2882_BOARD_KWORLD_ATSC_315U
:
1939 em28xx_write_reg(dev
, EM28XX_R08_GPIO
, 0xff);
1941 em28xx_write_reg(dev
, EM28XX_R08_GPIO
, 0xfe);
1943 em28xx_write_reg(dev
, EM2880_R04_GPO
, 0x00);
1945 em28xx_write_reg(dev
, EM2880_R04_GPO
, 0x08);
1949 case EM2860_BOARD_KAIOMY_TVNPC_U2
:
1950 em28xx_write_regs(dev
, EM28XX_R0F_XCLK
, "\x07", 1);
1951 em28xx_write_regs(dev
, EM28XX_R06_I2C_CLK
, "\x40", 1);
1952 em28xx_write_regs(dev
, 0x0d, "\x42", 1);
1953 em28xx_write_regs(dev
, 0x08, "\xfd", 1);
1955 em28xx_write_regs(dev
, 0x08, "\xff", 1);
1957 em28xx_write_regs(dev
, 0x08, "\x7f", 1);
1959 em28xx_write_regs(dev
, 0x08, "\x6b", 1);
1962 case EM2860_BOARD_EASYCAP
:
1963 em28xx_write_regs(dev
, 0x08, "\xf8", 1);
1966 case EM2820_BOARD_IODATA_GVMVP_SZ
:
1967 em28xx_write_reg(dev
, EM28XX_R08_GPIO
, 0xff);
1969 em28xx_write_reg(dev
, EM28XX_R08_GPIO
, 0xf7);
1971 em28xx_write_reg(dev
, EM28XX_R08_GPIO
, 0xfe);
1973 em28xx_write_reg(dev
, EM28XX_R08_GPIO
, 0xfd);
1978 em28xx_gpio_set(dev
, dev
->board
.tuner_gpio
);
1979 em28xx_set_mode(dev
, EM28XX_ANALOG_MODE
);
1982 em28xx_set_mode(dev
, EM28XX_SUSPEND
);
1985 static void em28xx_setup_xc3028(struct em28xx
*dev
, struct xc2028_ctrl
*ctl
)
1987 memset(ctl
, 0, sizeof(*ctl
));
1989 ctl
->fname
= XC2028_DEFAULT_FIRMWARE
;
1991 ctl
->mts
= em28xx_boards
[dev
->model
].mts_firmware
;
1993 switch (dev
->model
) {
1994 case EM2880_BOARD_EMPIRE_DUAL_TV
:
1995 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900
:
1996 ctl
->demod
= XC3028_FE_ZARLINK456
;
1998 case EM2880_BOARD_TERRATEC_HYBRID_XS
:
1999 case EM2881_BOARD_PINNACLE_HYBRID_PRO
:
2000 ctl
->demod
= XC3028_FE_ZARLINK456
;
2002 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2
:
2003 /* djh - Not sure which demod we need here */
2004 ctl
->demod
= XC3028_FE_DEFAULT
;
2006 case EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600
:
2007 ctl
->demod
= XC3028_FE_DEFAULT
;
2008 ctl
->fname
= XC3028L_DEFAULT_FIRMWARE
;
2010 case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850
:
2011 case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950
:
2012 case EM2880_BOARD_PINNACLE_PCTV_HD_PRO
:
2013 /* FIXME: Better to specify the needed IF */
2014 ctl
->demod
= XC3028_FE_DEFAULT
;
2016 case EM2883_BOARD_KWORLD_HYBRID_330U
:
2017 ctl
->demod
= XC3028_FE_CHINA
;
2018 ctl
->fname
= XC2028_DEFAULT_FIRMWARE
;
2020 case EM2882_BOARD_EVGA_INDTUBE
:
2021 ctl
->demod
= XC3028_FE_CHINA
;
2022 ctl
->fname
= XC3028L_DEFAULT_FIRMWARE
;
2025 ctl
->demod
= XC3028_FE_OREN538
;
2029 static void em28xx_tuner_setup(struct em28xx
*dev
)
2031 struct tuner_setup tun_setup
;
2032 struct v4l2_frequency f
;
2034 if (dev
->tuner_type
== TUNER_ABSENT
)
2037 memset(&tun_setup
, 0, sizeof(tun_setup
));
2039 tun_setup
.mode_mask
= T_ANALOG_TV
| T_RADIO
;
2040 tun_setup
.tuner_callback
= em28xx_tuner_callback
;
2042 if (dev
->board
.radio
.type
) {
2043 tun_setup
.type
= dev
->board
.radio
.type
;
2044 tun_setup
.addr
= dev
->board
.radio_addr
;
2046 v4l2_device_call_all(&dev
->v4l2_dev
, 0, tuner
, s_type_addr
, &tun_setup
);
2049 if ((dev
->tuner_type
!= TUNER_ABSENT
) && (dev
->tuner_type
)) {
2050 tun_setup
.type
= dev
->tuner_type
;
2051 tun_setup
.addr
= dev
->tuner_addr
;
2053 v4l2_device_call_all(&dev
->v4l2_dev
, 0, tuner
, s_type_addr
, &tun_setup
);
2056 if (dev
->tda9887_conf
) {
2057 struct v4l2_priv_tun_config tda9887_cfg
;
2059 tda9887_cfg
.tuner
= TUNER_TDA9887
;
2060 tda9887_cfg
.priv
= &dev
->tda9887_conf
;
2062 v4l2_device_call_all(&dev
->v4l2_dev
, 0, tuner
, s_config
, &tda9887_cfg
);
2065 if (dev
->tuner_type
== TUNER_XC2028
) {
2066 struct v4l2_priv_tun_config xc2028_cfg
;
2067 struct xc2028_ctrl ctl
;
2069 memset(&xc2028_cfg
, 0, sizeof(xc2028_cfg
));
2070 memset(&ctl
, 0, sizeof(ctl
));
2072 em28xx_setup_xc3028(dev
, &ctl
);
2074 xc2028_cfg
.tuner
= TUNER_XC2028
;
2075 xc2028_cfg
.priv
= &ctl
;
2077 v4l2_device_call_all(&dev
->v4l2_dev
, 0, tuner
, s_config
, &xc2028_cfg
);
2080 /* configure tuner */
2082 f
.type
= V4L2_TUNER_ANALOG_TV
;
2083 f
.frequency
= 9076; /* just a magic number */
2084 dev
->ctl_freq
= f
.frequency
;
2085 v4l2_device_call_all(&dev
->v4l2_dev
, 0, tuner
, s_frequency
, &f
);
2088 static int em28xx_hint_board(struct em28xx
*dev
)
2092 /* HINT method: EEPROM
2094 * This method works only for boards with eeprom.
2095 * Uses a hash of all eeprom bytes. The hash should be
2096 * unique for a vendor/tuner pair.
2097 * There are a high chance that tuners for different
2098 * video standards produce different hashes.
2100 for (i
= 0; i
< ARRAY_SIZE(em28xx_eeprom_hash
); i
++) {
2101 if (dev
->hash
== em28xx_eeprom_hash
[i
].hash
) {
2102 dev
->model
= em28xx_eeprom_hash
[i
].model
;
2103 dev
->tuner_type
= em28xx_eeprom_hash
[i
].tuner
;
2105 em28xx_errdev("Your board has no unique USB ID.\n");
2106 em28xx_errdev("A hint were successfully done, "
2107 "based on eeprom hash.\n");
2108 em28xx_errdev("This method is not 100%% failproof.\n");
2109 em28xx_errdev("If the board were missdetected, "
2110 "please email this log to:\n");
2111 em28xx_errdev("\tV4L Mailing List "
2112 " <linux-media@vger.kernel.org>\n");
2113 em28xx_errdev("Board detected as %s\n",
2114 em28xx_boards
[dev
->model
].name
);
2120 /* HINT method: I2C attached devices
2122 * This method works for all boards.
2123 * Uses a hash of i2c scanned devices.
2124 * Devices with the same i2c attached chips will
2125 * be considered equal.
2126 * This method is less precise than the eeprom one.
2129 /* user did not request i2c scanning => do it now */
2131 em28xx_do_i2c_scan(dev
);
2133 for (i
= 0; i
< ARRAY_SIZE(em28xx_i2c_hash
); i
++) {
2134 if (dev
->i2c_hash
== em28xx_i2c_hash
[i
].hash
) {
2135 dev
->model
= em28xx_i2c_hash
[i
].model
;
2136 dev
->tuner_type
= em28xx_i2c_hash
[i
].tuner
;
2137 em28xx_errdev("Your board has no unique USB ID.\n");
2138 em28xx_errdev("A hint were successfully done, "
2139 "based on i2c devicelist hash.\n");
2140 em28xx_errdev("This method is not 100%% failproof.\n");
2141 em28xx_errdev("If the board were missdetected, "
2142 "please email this log to:\n");
2143 em28xx_errdev("\tV4L Mailing List "
2144 " <linux-media@vger.kernel.org>\n");
2145 em28xx_errdev("Board detected as %s\n",
2146 em28xx_boards
[dev
->model
].name
);
2152 em28xx_errdev("Your board has no unique USB ID and thus need a "
2153 "hint to be detected.\n");
2154 em28xx_errdev("You may try to use card=<n> insmod option to "
2155 "workaround that.\n");
2156 em28xx_errdev("Please send an email with this log to:\n");
2157 em28xx_errdev("\tV4L Mailing List <linux-media@vger.kernel.org>\n");
2158 em28xx_errdev("Board eeprom hash is 0x%08lx\n", dev
->hash
);
2159 em28xx_errdev("Board i2c devicelist hash is 0x%08lx\n", dev
->i2c_hash
);
2161 em28xx_errdev("Here is a list of valid choices for the card=<n>"
2162 " insmod option:\n");
2163 for (i
= 0; i
< em28xx_bcount
; i
++) {
2164 em28xx_errdev(" card=%d -> %s\n",
2165 i
, em28xx_boards
[i
].name
);
2170 /* ----------------------------------------------------------------------- */
2171 void em28xx_register_i2c_ir(struct em28xx
*dev
)
2173 struct i2c_board_info info
;
2174 struct IR_i2c_init_data init_data
;
2175 const unsigned short addr_list
[] = {
2176 0x30, 0x47, I2C_CLIENT_END
2182 memset(&info
, 0, sizeof(struct i2c_board_info
));
2183 memset(&init_data
, 0, sizeof(struct IR_i2c_init_data
));
2184 strlcpy(info
.type
, "ir_video", I2C_NAME_SIZE
);
2186 /* detect & configure */
2187 switch (dev
->model
) {
2188 case (EM2800_BOARD_UNKNOWN
):
2190 case (EM2820_BOARD_UNKNOWN
):
2192 case (EM2800_BOARD_TERRATEC_CINERGY_200
):
2193 case (EM2820_BOARD_TERRATEC_CINERGY_250
):
2194 init_data
.ir_codes
= ir_codes_em_terratec
;
2195 init_data
.get_key
= em28xx_get_key_terratec
;
2196 init_data
.name
= "i2c IR (EM28XX Terratec)";
2198 case (EM2820_BOARD_PINNACLE_USB_2
):
2199 init_data
.ir_codes
= ir_codes_pinnacle_grey
;
2200 init_data
.get_key
= em28xx_get_key_pinnacle_usb_grey
;
2201 init_data
.name
= "i2c IR (EM28XX Pinnacle PCTV)";
2203 case (EM2820_BOARD_HAUPPAUGE_WINTV_USB_2
):
2204 init_data
.ir_codes
= ir_codes_hauppauge_new
;
2205 init_data
.get_key
= em28xx_get_key_em_haup
;
2206 init_data
.name
= "i2c IR (EM2840 Hauppauge)";
2208 case (EM2820_BOARD_MSI_VOX_USB_2
):
2210 case (EM2800_BOARD_LEADTEK_WINFAST_USBII
):
2212 case (EM2800_BOARD_KWORLD_USB2800
):
2214 case (EM2800_BOARD_GRABBEEX_USB2800
):
2219 info
.platform_data
= &init_data
;
2220 i2c_new_probed_device(&dev
->i2c_adap
, &info
, addr_list
);
2223 void em28xx_card_setup(struct em28xx
*dev
)
2226 * If the device can be a webcam, seek for a sensor.
2227 * If sensor is not found, then it isn't a webcam.
2229 if (dev
->board
.is_webcam
) {
2230 if (em28xx_hint_sensor(dev
) < 0)
2231 dev
->board
.is_webcam
= 0;
2233 dev
->progressive
= 1;
2235 em28xx_set_model(dev
);
2237 em28xx_info("Identified as %s (card=%d)\n",
2238 dev
->board
.name
, dev
->model
);
2240 dev
->tuner_type
= em28xx_boards
[dev
->model
].tuner_type
;
2241 if (em28xx_boards
[dev
->model
].tuner_addr
)
2242 dev
->tuner_addr
= em28xx_boards
[dev
->model
].tuner_addr
;
2244 if (em28xx_boards
[dev
->model
].tda9887_conf
)
2245 dev
->tda9887_conf
= em28xx_boards
[dev
->model
].tda9887_conf
;
2247 /* request some modules */
2248 switch (dev
->model
) {
2249 case EM2820_BOARD_HAUPPAUGE_WINTV_USB_2
:
2250 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900
:
2251 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2
:
2252 case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850
:
2253 case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950
:
2256 #ifdef CONFIG_MODULES
2257 request_module("tveeprom");
2259 /* Call first TVeeprom */
2261 dev
->i2c_client
.addr
= 0xa0 >> 1;
2262 tveeprom_hauppauge_analog(&dev
->i2c_client
, &tv
, dev
->eedata
);
2264 dev
->tuner_type
= tv
.tuner_type
;
2266 if (tv
.audio_processor
== V4L2_IDENT_MSPX4XX
) {
2267 dev
->i2s_speed
= 2048000;
2268 dev
->board
.has_msp34xx
= 1;
2270 #ifdef CONFIG_MODULES
2272 request_module("ir-kbd-i2c");
2276 case EM2882_BOARD_KWORLD_ATSC_315U
:
2277 em28xx_write_reg(dev
, 0x0d, 0x42);
2279 em28xx_write_reg(dev
, EM28XX_R08_GPIO
, 0xfd);
2282 case EM2820_BOARD_KWORLD_PVRTV2800RF
:
2283 /* GPIO enables sound on KWORLD PVR TV 2800RF */
2284 em28xx_write_reg(dev
, EM28XX_R08_GPIO
, 0xf9);
2286 case EM2820_BOARD_UNKNOWN
:
2287 case EM2800_BOARD_UNKNOWN
:
2289 * The K-WORLD DVB-T 310U is detected as an MSI Digivox AD.
2291 * This occurs because they share identical USB vendor and
2294 * What we do here is look up the EEPROM hash of the K-WORLD
2295 * and if it is found then we decide that we do not have
2296 * a DIGIVOX and reset the device to the K-WORLD instead.
2298 * This solution is only valid if they do not share eeprom
2299 * hash identities which has not been determined as yet.
2301 case EM2880_BOARD_MSI_DIGIVOX_AD
:
2302 if (!em28xx_hint_board(dev
))
2303 em28xx_set_model(dev
);
2305 /* In cases where we had to use a board hint, the call to
2306 em28xx_set_mode() in em28xx_pre_card_setup() was a no-op,
2307 so make the call now so the analog GPIOs are set properly
2308 before probing the i2c bus. */
2309 em28xx_gpio_set(dev
, dev
->board
.tuner_gpio
);
2310 em28xx_set_mode(dev
, EM28XX_ANALOG_MODE
);
2314 if (dev
->board
.has_snapshot_button
)
2315 em28xx_register_snapshot_button(dev
);
2317 if (dev
->board
.valid
== EM28XX_BOARD_NOT_VALIDATED
) {
2318 em28xx_errdev("\n\n");
2319 em28xx_errdev("The support for this board weren't "
2321 em28xx_errdev("Please send a report of having this working\n");
2322 em28xx_errdev("not to V4L mailing list (and/or to other "
2326 /* Allow override tuner type by a module parameter */
2328 dev
->tuner_type
= tuner
;
2330 /* request some modules */
2331 if (dev
->board
.has_msp34xx
)
2332 v4l2_i2c_new_probed_subdev(&dev
->v4l2_dev
, &dev
->i2c_adap
,
2333 "msp3400", "msp3400", msp3400_addrs
);
2335 if (dev
->board
.decoder
== EM28XX_SAA711X
)
2336 v4l2_i2c_new_probed_subdev(&dev
->v4l2_dev
, &dev
->i2c_adap
,
2337 "saa7115", "saa7115_auto", saa711x_addrs
);
2339 if (dev
->board
.decoder
== EM28XX_TVP5150
)
2340 v4l2_i2c_new_probed_subdev(&dev
->v4l2_dev
, &dev
->i2c_adap
,
2341 "tvp5150", "tvp5150", tvp5150_addrs
);
2343 if (dev
->em28xx_sensor
== EM28XX_MT9V011
) {
2344 struct v4l2_subdev
*sd
;
2346 sd
= v4l2_i2c_new_probed_subdev(&dev
->v4l2_dev
,
2347 &dev
->i2c_adap
, "mt9v011", "mt9v011", mt9v011_addrs
);
2348 v4l2_subdev_call(sd
, core
, s_config
, 0, &dev
->sensor_xtal
);
2352 if (dev
->board
.adecoder
== EM28XX_TVAUDIO
)
2353 v4l2_i2c_new_subdev(&dev
->v4l2_dev
, &dev
->i2c_adap
,
2354 "tvaudio", "tvaudio", dev
->board
.tvaudio_addr
);
2356 if (dev
->board
.tuner_type
!= TUNER_ABSENT
) {
2357 int has_demod
= (dev
->tda9887_conf
& TDA9887_PRESENT
);
2359 if (dev
->board
.radio
.type
)
2360 v4l2_i2c_new_subdev(&dev
->v4l2_dev
, &dev
->i2c_adap
,
2361 "tuner", "tuner", dev
->board
.radio_addr
);
2364 v4l2_i2c_new_probed_subdev(&dev
->v4l2_dev
,
2365 &dev
->i2c_adap
, "tuner", "tuner",
2366 v4l2_i2c_tuner_addrs(ADDRS_DEMOD
));
2367 if (dev
->tuner_addr
== 0) {
2368 enum v4l2_i2c_tuner_type type
=
2369 has_demod
? ADDRS_TV_WITH_DEMOD
: ADDRS_TV
;
2370 struct v4l2_subdev
*sd
;
2372 sd
= v4l2_i2c_new_probed_subdev(&dev
->v4l2_dev
,
2373 &dev
->i2c_adap
, "tuner", "tuner",
2374 v4l2_i2c_tuner_addrs(type
));
2377 dev
->tuner_addr
= v4l2_i2c_subdev_addr(sd
);
2379 v4l2_i2c_new_subdev(&dev
->v4l2_dev
, &dev
->i2c_adap
,
2380 "tuner", "tuner", dev
->tuner_addr
);
2384 em28xx_tuner_setup(dev
);
2387 em28xx_ir_init(dev
);
2391 #if defined(CONFIG_MODULES) && defined(MODULE)
2392 static void request_module_async(struct work_struct
*work
)
2394 struct em28xx
*dev
= container_of(work
,
2395 struct em28xx
, request_module_wk
);
2397 if (dev
->has_audio_class
)
2398 request_module("snd-usb-audio");
2399 else if (dev
->has_alsa_audio
)
2400 request_module("em28xx-alsa");
2402 if (dev
->board
.has_dvb
)
2403 request_module("em28xx-dvb");
2406 static void request_modules(struct em28xx
*dev
)
2408 INIT_WORK(&dev
->request_module_wk
, request_module_async
);
2409 schedule_work(&dev
->request_module_wk
);
2412 #define request_modules(dev)
2413 #endif /* CONFIG_MODULES */
2416 * em28xx_realease_resources()
2417 * unregisters the v4l2,i2c and usb devices
2418 * called when the device gets disconected or at module unload
2420 void em28xx_release_resources(struct em28xx
*dev
)
2422 if (dev
->sbutton_input_dev
)
2423 em28xx_deregister_snapshot_button(dev
);
2426 em28xx_ir_fini(dev
);
2428 /*FIXME: I2C IR should be disconnected */
2430 em28xx_release_analog_resources(dev
);
2432 em28xx_remove_from_devlist(dev
);
2434 em28xx_i2c_unregister(dev
);
2436 v4l2_device_unregister(&dev
->v4l2_dev
);
2438 usb_put_dev(dev
->udev
);
2440 /* Mark device as unused */
2441 em28xx_devused
&= ~(1 << dev
->devno
);
2446 * allocates and inits the device structs, registers i2c bus and v4l device
2448 static int em28xx_init_dev(struct em28xx
**devhandle
, struct usb_device
*udev
,
2449 struct usb_interface
*interface
,
2452 struct em28xx
*dev
= *devhandle
;
2457 mutex_init(&dev
->ctrl_urb_lock
);
2458 spin_lock_init(&dev
->slock
);
2459 init_waitqueue_head(&dev
->open
);
2460 init_waitqueue_head(&dev
->wait_frame
);
2461 init_waitqueue_head(&dev
->wait_stream
);
2463 dev
->em28xx_write_regs
= em28xx_write_regs
;
2464 dev
->em28xx_read_reg
= em28xx_read_reg
;
2465 dev
->em28xx_read_reg_req_len
= em28xx_read_reg_req_len
;
2466 dev
->em28xx_write_regs_req
= em28xx_write_regs_req
;
2467 dev
->em28xx_read_reg_req
= em28xx_read_reg_req
;
2468 dev
->board
.is_em2800
= em28xx_boards
[dev
->model
].is_em2800
;
2470 em28xx_set_model(dev
);
2472 /* Set the default GPO/GPIO for legacy devices */
2473 dev
->reg_gpo_num
= EM2880_R04_GPO
;
2474 dev
->reg_gpio_num
= EM28XX_R08_GPIO
;
2476 dev
->wait_after_write
= 5;
2478 /* Based on the Chip ID, set the device configuration */
2479 retval
= em28xx_read_reg(dev
, EM28XX_R0A_CHIPID
);
2481 dev
->chip_id
= retval
;
2483 switch (dev
->chip_id
) {
2484 case CHIP_ID_EM2710
:
2485 em28xx_info("chip ID is em2710\n");
2487 case CHIP_ID_EM2750
:
2488 em28xx_info("chip ID is em2750\n");
2490 case CHIP_ID_EM2820
:
2491 em28xx_info("chip ID is em2820 (or em2710)\n");
2493 case CHIP_ID_EM2840
:
2494 em28xx_info("chip ID is em2840\n");
2496 case CHIP_ID_EM2860
:
2497 em28xx_info("chip ID is em2860\n");
2499 case CHIP_ID_EM2870
:
2500 em28xx_info("chip ID is em2870\n");
2501 dev
->wait_after_write
= 0;
2503 case CHIP_ID_EM2874
:
2504 em28xx_info("chip ID is em2874\n");
2505 dev
->reg_gpio_num
= EM2874_R80_GPIO
;
2506 dev
->wait_after_write
= 0;
2508 case CHIP_ID_EM2883
:
2509 em28xx_info("chip ID is em2882/em2883\n");
2510 dev
->wait_after_write
= 0;
2513 em28xx_info("em28xx chip ID = %d\n", dev
->chip_id
);
2517 /* Prepopulate cached GPO register content */
2518 retval
= em28xx_read_reg(dev
, dev
->reg_gpo_num
);
2520 dev
->reg_gpo
= retval
;
2522 em28xx_pre_card_setup(dev
);
2524 if (!dev
->board
.is_em2800
) {
2525 /* Sets I2C speed to 100 KHz */
2526 retval
= em28xx_write_reg(dev
, EM28XX_R06_I2C_CLK
, 0x40);
2528 em28xx_errdev("%s: em28xx_write_regs_req failed!"
2535 retval
= v4l2_device_register(&interface
->dev
, &dev
->v4l2_dev
);
2537 em28xx_errdev("Call to v4l2_device_register() failed!\n");
2541 /* register i2c bus */
2542 errCode
= em28xx_i2c_register(dev
);
2544 v4l2_device_unregister(&dev
->v4l2_dev
);
2545 em28xx_errdev("%s: em28xx_i2c_register - errCode [%d]!\n",
2551 * Default format, used for tvp5150 or saa711x output formats
2553 dev
->vinmode
= 0x10;
2556 /* Do board specific init and eeprom reading */
2557 em28xx_card_setup(dev
);
2559 /* Configure audio */
2560 errCode
= em28xx_audio_setup(dev
);
2562 v4l2_device_unregister(&dev
->v4l2_dev
);
2563 em28xx_errdev("%s: Error while setting audio - errCode [%d]!\n",
2567 /* wake i2c devices */
2568 em28xx_wake_i2c(dev
);
2570 /* init video dma queues */
2571 INIT_LIST_HEAD(&dev
->vidq
.active
);
2572 INIT_LIST_HEAD(&dev
->vidq
.queued
);
2575 if (dev
->board
.has_msp34xx
) {
2576 /* Send a reset to other chips via gpio */
2577 errCode
= em28xx_write_reg(dev
, EM28XX_R08_GPIO
, 0xf7);
2579 em28xx_errdev("%s: em28xx_write_regs_req - "
2580 "msp34xx(1) failed! errCode [%d]\n",
2586 errCode
= em28xx_write_reg(dev
, EM28XX_R08_GPIO
, 0xff);
2588 em28xx_errdev("%s: em28xx_write_regs_req - "
2589 "msp34xx(2) failed! errCode [%d]\n",
2596 em28xx_add_into_devlist(dev
);
2598 retval
= em28xx_register_analog_devices(dev
);
2600 em28xx_release_resources(dev
);
2601 goto fail_reg_devices
;
2604 em28xx_init_extension(dev
);
2606 /* Save some power by putting tuner to sleep */
2607 v4l2_device_call_all(&dev
->v4l2_dev
, 0, tuner
, s_standby
);
2616 * em28xx_usb_probe()
2617 * checks for supported devices
2619 static int em28xx_usb_probe(struct usb_interface
*interface
,
2620 const struct usb_device_id
*id
)
2622 const struct usb_endpoint_descriptor
*endpoint
;
2623 struct usb_device
*udev
;
2624 struct usb_interface
*uif
;
2625 struct em28xx
*dev
= NULL
;
2627 int i
, nr
, ifnum
, isoc_pipe
;
2629 char descr
[255] = "";
2631 udev
= usb_get_dev(interface_to_usbdev(interface
));
2632 ifnum
= interface
->altsetting
[0].desc
.bInterfaceNumber
;
2634 /* Check to see next free device and mark as used */
2635 nr
= find_first_zero_bit(&em28xx_devused
, EM28XX_MAXBOARDS
);
2636 em28xx_devused
|= 1<<nr
;
2638 /* Don't register audio interfaces */
2639 if (interface
->altsetting
[0].desc
.bInterfaceClass
== USB_CLASS_AUDIO
) {
2640 em28xx_err(DRIVER_NAME
" audio device (%04x:%04x): "
2641 "interface %i, class %i\n",
2642 le16_to_cpu(udev
->descriptor
.idVendor
),
2643 le16_to_cpu(udev
->descriptor
.idProduct
),
2645 interface
->altsetting
[0].desc
.bInterfaceClass
);
2647 em28xx_devused
&= ~(1<<nr
);
2652 endpoint
= &interface
->cur_altsetting
->endpoint
[0].desc
;
2654 /* check if the device has the iso in endpoint at the correct place */
2655 if (usb_endpoint_xfer_isoc(endpoint
)
2657 (interface
->altsetting
[1].endpoint
[0].desc
.wMaxPacketSize
== 940)) {
2658 /* It's a newer em2874/em2875 device */
2661 int check_interface
= 1;
2663 endpoint
= &interface
->cur_altsetting
->endpoint
[1].desc
;
2664 if (!usb_endpoint_xfer_isoc(endpoint
))
2665 check_interface
= 0;
2667 if (usb_endpoint_dir_out(endpoint
))
2668 check_interface
= 0;
2670 if (!check_interface
) {
2671 em28xx_err(DRIVER_NAME
" video device (%04x:%04x): "
2672 "interface %i, class %i found.\n",
2673 le16_to_cpu(udev
->descriptor
.idVendor
),
2674 le16_to_cpu(udev
->descriptor
.idProduct
),
2676 interface
->altsetting
[0].desc
.bInterfaceClass
);
2678 em28xx_err(DRIVER_NAME
" This is an anciliary "
2679 "interface not used by the driver\n");
2681 em28xx_devused
&= ~(1<<nr
);
2687 switch (udev
->speed
) {
2691 case USB_SPEED_UNKNOWN
:
2692 case USB_SPEED_FULL
:
2695 case USB_SPEED_HIGH
:
2702 if (udev
->manufacturer
)
2703 strlcpy(descr
, udev
->manufacturer
, sizeof(descr
));
2705 if (udev
->product
) {
2707 strlcat(descr
, " ", sizeof(descr
));
2708 strlcat(descr
, udev
->product
, sizeof(descr
));
2711 strlcat(descr
, " ", sizeof(descr
));
2713 printk(DRIVER_NAME
": New device %s@ %s Mbps "
2714 "(%04x:%04x, interface %d, class %d)\n",
2717 le16_to_cpu(udev
->descriptor
.idVendor
),
2718 le16_to_cpu(udev
->descriptor
.idProduct
),
2720 interface
->altsetting
->desc
.bInterfaceNumber
);
2723 * Make sure we have 480 Mbps of bandwidth, otherwise things like
2724 * video stream wouldn't likely work, since 12 Mbps is generally
2725 * not enough even for most Digital TV streams.
2727 if (udev
->speed
!= USB_SPEED_HIGH
&& disable_usb_speed_check
== 0) {
2728 printk(DRIVER_NAME
": Device initialization failed.\n");
2729 printk(DRIVER_NAME
": Device must be connected to a high-speed"
2730 " USB 2.0 port.\n");
2731 em28xx_devused
&= ~(1<<nr
);
2736 if (nr
>= EM28XX_MAXBOARDS
) {
2737 printk(DRIVER_NAME
": Supports only %i em28xx boards.\n",
2739 em28xx_devused
&= ~(1<<nr
);
2744 /* allocate memory for our device state and initialize it */
2745 dev
= kzalloc(sizeof(*dev
), GFP_KERNEL
);
2747 em28xx_err(DRIVER_NAME
": out of memory!\n");
2748 em28xx_devused
&= ~(1<<nr
);
2753 snprintf(dev
->name
, 29, "em28xx #%d", nr
);
2755 dev
->model
= id
->driver_info
;
2758 /* Checks if audio is provided by some interface */
2759 for (i
= 0; i
< udev
->config
->desc
.bNumInterfaces
; i
++) {
2760 uif
= udev
->config
->interface
[i
];
2761 if (uif
->altsetting
[0].desc
.bInterfaceClass
== USB_CLASS_AUDIO
) {
2762 dev
->has_audio_class
= 1;
2767 /* compute alternate max packet sizes */
2768 uif
= udev
->actconfig
->interface
[0];
2770 dev
->num_alt
= uif
->num_altsetting
;
2771 dev
->alt_max_pkt_size
= kmalloc(32 * dev
->num_alt
, GFP_KERNEL
);
2773 if (dev
->alt_max_pkt_size
== NULL
) {
2774 em28xx_errdev("out of memory!\n");
2775 em28xx_devused
&= ~(1<<nr
);
2781 for (i
= 0; i
< dev
->num_alt
; i
++) {
2782 u16 tmp
= le16_to_cpu(uif
->altsetting
[i
].endpoint
[isoc_pipe
].desc
.wMaxPacketSize
);
2783 dev
->alt_max_pkt_size
[i
] =
2784 (tmp
& 0x07ff) * (((tmp
& 0x1800) >> 11) + 1);
2787 if ((card
[nr
] >= 0) && (card
[nr
] < em28xx_bcount
))
2788 dev
->model
= card
[nr
];
2790 /* allocate device struct */
2791 mutex_init(&dev
->lock
);
2792 mutex_lock(&dev
->lock
);
2793 retval
= em28xx_init_dev(&dev
, udev
, interface
, nr
);
2795 em28xx_devused
&= ~(1<<dev
->devno
);
2796 mutex_unlock(&dev
->lock
);
2801 /* save our data pointer in this interface device */
2802 usb_set_intfdata(interface
, dev
);
2804 request_modules(dev
);
2806 /* Should be the last thing to do, to avoid newer udev's to
2807 open the device before fully initializing it
2809 mutex_unlock(&dev
->lock
);
2818 * em28xx_usb_disconnect()
2819 * called when the device gets diconencted
2820 * video device will be unregistered on v4l2_close in case it is still open
2822 static void em28xx_usb_disconnect(struct usb_interface
*interface
)
2826 dev
= usb_get_intfdata(interface
);
2827 usb_set_intfdata(interface
, NULL
);
2832 em28xx_info("disconnecting %s\n", dev
->vdev
->name
);
2834 /* wait until all current v4l2 io is finished then deallocate
2836 mutex_lock(&dev
->lock
);
2838 wake_up_interruptible_all(&dev
->open
);
2840 v4l2_device_disconnect(&dev
->v4l2_dev
);
2844 ("device /dev/video%d is open! Deregistration and memory "
2845 "deallocation are deferred on close.\n",
2848 dev
->state
|= DEV_MISCONFIGURED
;
2849 em28xx_uninit_isoc(dev
);
2850 dev
->state
|= DEV_DISCONNECTED
;
2851 wake_up_interruptible(&dev
->wait_frame
);
2852 wake_up_interruptible(&dev
->wait_stream
);
2854 dev
->state
|= DEV_DISCONNECTED
;
2855 em28xx_release_resources(dev
);
2858 em28xx_close_extension(dev
);
2860 mutex_unlock(&dev
->lock
);
2863 kfree(dev
->alt_max_pkt_size
);
2868 static struct usb_driver em28xx_usb_driver
= {
2870 .probe
= em28xx_usb_probe
,
2871 .disconnect
= em28xx_usb_disconnect
,
2872 .id_table
= em28xx_id_table
,
2875 static int __init
em28xx_module_init(void)
2879 /* register this driver with the USB subsystem */
2880 result
= usb_register(&em28xx_usb_driver
);
2882 em28xx_err(DRIVER_NAME
2883 " usb_register failed. Error number %d.\n", result
);
2885 printk(KERN_INFO DRIVER_NAME
" driver loaded\n");
2890 static void __exit
em28xx_module_exit(void)
2892 /* deregister this driver with the USB subsystem */
2893 usb_deregister(&em28xx_usb_driver
);
2896 module_init(em28xx_module_init
);
2897 module_exit(em28xx_module_exit
);