aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/em28xx/em28xx-cards.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-07-28 17:32:00 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-28 17:32:00 -0400
commit9e3ee1c39c0cc71222f9980ccbf87fe072897eef (patch)
tree99462000e6f0d4f907cb2fc690f19d4d441ba0f3 /drivers/media/video/em28xx/em28xx-cards.c
parente56b3bc7942982ac2589c942fb345e38bc7a341a (diff)
parentf934fb19ef34730263e6afc01e8ec27a8a71470f (diff)
Merge branch 'linus' into cpus4096
Conflicts: kernel/stop_machine.c Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-cards.c')
-rw-r--r--drivers/media/video/em28xx/em28xx-cards.c977
1 files changed, 949 insertions, 28 deletions
diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c
index 05f0d5a15058..476ae44a62d2 100644
--- a/drivers/media/video/em28xx/em28xx-cards.c
+++ b/drivers/media/video/em28xx/em28xx-cards.c
@@ -32,8 +32,8 @@
32#include <media/saa7115.h> 32#include <media/saa7115.h>
33#include <media/tvp5150.h> 33#include <media/tvp5150.h>
34#include <media/tveeprom.h> 34#include <media/tveeprom.h>
35#include <media/audiochip.h>
36#include <media/v4l2-common.h> 35#include <media/v4l2-common.h>
36#include <media/v4l2-chip-ident.h>
37 37
38#include "em28xx.h" 38#include "em28xx.h"
39 39
@@ -52,6 +52,15 @@ struct em28xx_hash_table {
52}; 52};
53 53
54struct em28xx_board em28xx_boards[] = { 54struct em28xx_board em28xx_boards[] = {
55 [EM2750_BOARD_UNKNOWN] = {
56 .name = "Unknown EM2750/EM2751 webcam grabber",
57 .vchannels = 1,
58 .input = { {
59 .type = EM28XX_VMUX_COMPOSITE1,
60 .vmux = 0,
61 .amux = 0,
62 } },
63 },
55 [EM2800_BOARD_UNKNOWN] = { 64 [EM2800_BOARD_UNKNOWN] = {
56 .name = "Unknown EM2800 video grabber", 65 .name = "Unknown EM2800 video grabber",
57 .is_em2800 = 1, 66 .is_em2800 = 1,
@@ -73,6 +82,39 @@ struct em28xx_board em28xx_boards[] = {
73 .is_em2800 = 0, 82 .is_em2800 = 0,
74 .tuner_type = TUNER_ABSENT, 83 .tuner_type = TUNER_ABSENT,
75 }, 84 },
85 [EM2750_BOARD_DLCW_130] = {
86 /* Beijing Huaqi Information Digital Technology Co., Ltd */
87 .name = "Huaqi DLCW-130",
88 .valid = EM28XX_BOARD_NOT_VALIDATED,
89 .vchannels = 1,
90 .input = { {
91 .type = EM28XX_VMUX_COMPOSITE1,
92 .vmux = 0,
93 .amux = 0,
94 } },
95 },
96 [EM2800_BOARD_KWORLD_USB2800] = {
97 .name = "Kworld USB2800",
98 .valid = EM28XX_BOARD_NOT_VALIDATED,
99 .is_em2800 = 1,
100 .vchannels = 3,
101 .tuner_type = TUNER_PHILIPS_FCV1236D,
102 .tda9887_conf = TDA9887_PRESENT,
103 .decoder = EM28XX_SAA7113,
104 .input = { {
105 .type = EM28XX_VMUX_TELEVISION,
106 .vmux = SAA7115_COMPOSITE2,
107 .amux = 0,
108 }, {
109 .type = EM28XX_VMUX_COMPOSITE1,
110 .vmux = SAA7115_COMPOSITE0,
111 .amux = 1,
112 }, {
113 .type = EM28XX_VMUX_SVIDEO,
114 .vmux = SAA7115_SVIDEO3,
115 .amux = 1,
116 } },
117 },
76 [EM2820_BOARD_KWORLD_PVRTV2800RF] = { 118 [EM2820_BOARD_KWORLD_PVRTV2800RF] = {
77 .name = "Kworld PVR TV 2800 RF", 119 .name = "Kworld PVR TV 2800 RF",
78 .is_em2800 = 0, 120 .is_em2800 = 0,
@@ -151,6 +193,376 @@ struct em28xx_board em28xx_boards[] = {
151 MSP_DSP_IN_SCART, MSP_DSP_IN_SCART), 193 MSP_DSP_IN_SCART, MSP_DSP_IN_SCART),
152 } }, 194 } },
153 }, 195 },
196 [EM2820_BOARD_DLINK_USB_TV] = {
197 .name = "D-Link DUB-T210 TV Tuner",
198 .valid = EM28XX_BOARD_NOT_VALIDATED,
199 .vchannels = 3,
200 .is_em2800 = 0,
201 .tuner_type = TUNER_LG_PAL_NEW_TAPC,
202 .tda9887_conf = TDA9887_PRESENT,
203 .decoder = EM28XX_SAA7113,
204 .input = { {
205 .type = EM28XX_VMUX_TELEVISION,
206 .vmux = SAA7115_COMPOSITE2,
207 .amux = 1,
208 }, {
209 .type = EM28XX_VMUX_COMPOSITE1,
210 .vmux = SAA7115_COMPOSITE0,
211 .amux = 1,
212 }, {
213 .type = EM28XX_VMUX_SVIDEO,
214 .vmux = SAA7115_SVIDEO3,
215 .amux = 1,
216 } },
217 },
218 [EM2820_BOARD_HERCULES_SMART_TV_USB2] = {
219 .name = "Hercules Smart TV USB 2.0",
220 .valid = EM28XX_BOARD_NOT_VALIDATED,
221 .vchannels = 3,
222 .tuner_type = TUNER_LG_PAL_NEW_TAPC,
223 .tda9887_conf = TDA9887_PRESENT,
224 .decoder = EM28XX_SAA7113,
225 .input = { {
226 .type = EM28XX_VMUX_TELEVISION,
227 .vmux = SAA7115_COMPOSITE2,
228 .amux = 1,
229 }, {
230 .type = EM28XX_VMUX_COMPOSITE1,
231 .vmux = SAA7115_COMPOSITE0,
232 .amux = 1,
233 }, {
234 .type = EM28XX_VMUX_SVIDEO,
235 .vmux = SAA7115_SVIDEO3,
236 .amux = 1,
237 } },
238 },
239 [EM2820_BOARD_PINNACLE_USB_2_FM1216ME] = {
240 .name = "Pinnacle PCTV USB 2 (Philips FM1216ME)",
241 .valid = EM28XX_BOARD_NOT_VALIDATED,
242 .vchannels = 3,
243 .is_em2800 = 0,
244 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
245 .tda9887_conf = TDA9887_PRESENT,
246 .decoder = EM28XX_SAA7113,
247 .input = { {
248 .type = EM28XX_VMUX_TELEVISION,
249 .vmux = SAA7115_COMPOSITE2,
250 .amux = 0,
251 }, {
252 .type = EM28XX_VMUX_COMPOSITE1,
253 .vmux = SAA7115_COMPOSITE0,
254 .amux = 1,
255 }, {
256 .type = EM28XX_VMUX_SVIDEO,
257 .vmux = SAA7115_SVIDEO3,
258 .amux = 1,
259 } },
260 },
261 [EM2820_BOARD_GADMEI_UTV310] = {
262 .name = "Gadmei UTV310",
263 .valid = EM28XX_BOARD_NOT_VALIDATED,
264 .vchannels = 3,
265 .tuner_type = TUNER_TNF_5335MF,
266 .tda9887_conf = TDA9887_PRESENT,
267 .decoder = EM28XX_SAA7113,
268 .input = { {
269 .type = EM28XX_VMUX_TELEVISION,
270 .vmux = SAA7115_COMPOSITE1,
271 .amux = 1,
272 }, {
273 .type = EM28XX_VMUX_COMPOSITE1,
274 .vmux = SAA7115_COMPOSITE0,
275 .amux = 1,
276 }, {
277 .type = EM28XX_VMUX_SVIDEO,
278 .vmux = SAA7115_SVIDEO3,
279 .amux = 1,
280 } },
281 },
282 [EM2820_BOARD_LEADTEK_WINFAST_USBII_DELUXE] = {
283 .name = "Leadtek Winfast USB II Deluxe",
284 .valid = EM28XX_BOARD_NOT_VALIDATED,
285 .vchannels = 3,
286 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
287 .tda9887_conf = TDA9887_PRESENT,
288 .decoder = EM28XX_SAA7114,
289 .input = { {
290 .type = EM28XX_VMUX_TELEVISION,
291 .vmux = 2,
292 .amux = 0,
293 }, {
294 .type = EM28XX_VMUX_COMPOSITE1,
295 .vmux = 0,
296 .amux = 1,
297 }, {
298 .type = EM28XX_VMUX_SVIDEO,
299 .vmux = 9,
300 .amux = 1,
301 } },
302 },
303 [EM2820_BOARD_PINNACLE_DVC_100] = {
304 .name = "Pinnacle Dazzle DVC 100",
305 .valid = EM28XX_BOARD_NOT_VALIDATED,
306 .vchannels = 3,
307 .decoder = EM28XX_SAA7113,
308 .input = { {
309 .type = EM28XX_VMUX_COMPOSITE1,
310 .vmux = SAA7115_COMPOSITE0,
311 .amux = 1,
312 }, {
313 .type = EM28XX_VMUX_SVIDEO,
314 .vmux = SAA7115_SVIDEO3,
315 .amux = 1,
316 } },
317 },
318 [EM2820_BOARD_VIDEOLOGY_20K14XUSB] = {
319 .name = "Videology 20K14XUSB USB2.0",
320 .valid = EM28XX_BOARD_NOT_VALIDATED,
321 .vchannels = 1,
322 .input = { {
323 .type = EM28XX_VMUX_COMPOSITE1,
324 .vmux = 0,
325 .amux = 0,
326 } },
327 },
328 [EM2821_BOARD_PROLINK_PLAYTV_USB2] = {
329 .name = "SIIG AVTuner-PVR/Prolink PlayTV USB 2.0",
330 .valid = EM28XX_BOARD_NOT_VALIDATED,
331 .vchannels = 3,
332 .is_em2800 = 0,
333 .tuner_type = TUNER_LG_PAL_NEW_TAPC, /* unknown? */
334 .tda9887_conf = TDA9887_PRESENT, /* unknown? */
335 .decoder = EM28XX_SAA7113,
336 .input = { {
337 .type = EM28XX_VMUX_TELEVISION,
338 .vmux = SAA7115_COMPOSITE2,
339 .amux = 1,
340 }, {
341 .type = EM28XX_VMUX_COMPOSITE1,
342 .vmux = SAA7115_COMPOSITE0,
343 .amux = 1,
344 }, {
345 .type = EM28XX_VMUX_SVIDEO,
346 .vmux = SAA7115_SVIDEO3,
347 .amux = 1,
348 } },
349 },
350 [EM2821_BOARD_SUPERCOMP_USB_2] = {
351 .name = "Supercomp USB 2.0 TV",
352 .valid = EM28XX_BOARD_NOT_VALIDATED,
353 .vchannels = 3,
354 .is_em2800 = 0,
355 .tuner_type = TUNER_PHILIPS_FM1236_MK3,
356 .tda9887_conf = TDA9887_PRESENT |
357 TDA9887_PORT1_ACTIVE |
358 TDA9887_PORT2_ACTIVE,
359 .decoder = EM28XX_SAA7113,
360 .input = { {
361 .type = EM28XX_VMUX_TELEVISION,
362 .vmux = SAA7115_COMPOSITE2,
363 .amux = 1,
364 }, {
365 .type = EM28XX_VMUX_COMPOSITE1,
366 .vmux = SAA7115_COMPOSITE0,
367 .amux = 0,
368 }, {
369 .type = EM28XX_VMUX_SVIDEO,
370 .vmux = SAA7115_SVIDEO3,
371 .amux = 1,
372 } },
373 },
374 [EM2821_BOARD_USBGEAR_VD204] = {
375 .name = "Usbgear VD204v9",
376 .valid = EM28XX_BOARD_NOT_VALIDATED,
377 .vchannels = 2,
378 .decoder = EM28XX_SAA7113,
379 .input = { {
380 .type = EM28XX_VMUX_COMPOSITE1,
381 .vmux = SAA7115_COMPOSITE0,
382 .amux = 1,
383 }, {
384 .type = EM28XX_VMUX_SVIDEO,
385 .vmux = SAA7115_SVIDEO3,
386 .amux = 1,
387 } },
388 },
389 [EM2860_BOARD_NETGMBH_CAM] = {
390 /* Beijing Huaqi Information Digital Technology Co., Ltd */
391 .name = "NetGMBH Cam",
392 .valid = EM28XX_BOARD_NOT_VALIDATED,
393 .vchannels = 1,
394 .input = { {
395 .type = EM28XX_VMUX_COMPOSITE1,
396 .vmux = 0,
397 .amux = 0,
398 } },
399 },
400 [EM2860_BOARD_TYPHOON_DVD_MAKER] = {
401 .name = "Typhoon DVD Maker",
402 .valid = EM28XX_BOARD_NOT_VALIDATED,
403 .vchannels = 2,
404 .decoder = EM28XX_SAA7113,
405 .input = { {
406 .type = EM28XX_VMUX_COMPOSITE1,
407 .vmux = SAA7115_COMPOSITE0,
408 .amux = 1,
409 }, {
410 .type = EM28XX_VMUX_SVIDEO,
411 .vmux = SAA7115_SVIDEO3,
412 .amux = 1,
413 } },
414 },
415 [EM2860_BOARD_GADMEI_UTV330] = {
416 .name = "Gadmei UTV330",
417 .valid = EM28XX_BOARD_NOT_VALIDATED,
418 .vchannels = 3,
419 .tuner_type = TUNER_TNF_5335MF,
420 .tda9887_conf = TDA9887_PRESENT,
421 .decoder = EM28XX_SAA7113,
422 .input = { {
423 .type = EM28XX_VMUX_TELEVISION,
424 .vmux = SAA7115_COMPOSITE2,
425 .amux = 0,
426 }, {
427 .type = EM28XX_VMUX_COMPOSITE1,
428 .vmux = SAA7115_COMPOSITE0,
429 .amux = 1,
430 }, {
431 .type = EM28XX_VMUX_SVIDEO,
432 .vmux = SAA7115_SVIDEO3,
433 .amux = 1,
434 } },
435 },
436 [EM2860_BOARD_TERRATEC_HYBRID_XS] = {
437 .name = "Terratec Cinergy A Hybrid XS",
438 .valid = EM28XX_BOARD_NOT_VALIDATED,
439 .vchannels = 3,
440 .tuner_type = TUNER_XC2028,
441 .decoder = EM28XX_TVP5150,
442 .input = { {
443 .type = EM28XX_VMUX_TELEVISION,
444 .vmux = TVP5150_COMPOSITE0,
445 .amux = 0,
446 }, {
447 .type = EM28XX_VMUX_COMPOSITE1,
448 .vmux = TVP5150_COMPOSITE1,
449 .amux = 1,
450 }, {
451 .type = EM28XX_VMUX_SVIDEO,
452 .vmux = TVP5150_SVIDEO,
453 .amux = 1,
454 } },
455 },
456 [EM2861_BOARD_KWORLD_PVRTV_300U] = {
457 .name = "KWorld PVRTV 300U",
458 .valid = EM28XX_BOARD_NOT_VALIDATED,
459 .vchannels = 3,
460 .tuner_type = TUNER_XC2028,
461 .decoder = EM28XX_TVP5150,
462 .input = { {
463 .type = EM28XX_VMUX_TELEVISION,
464 .vmux = TVP5150_COMPOSITE0,
465 .amux = 0,
466 }, {
467 .type = EM28XX_VMUX_COMPOSITE1,
468 .vmux = TVP5150_COMPOSITE1,
469 .amux = 1,
470 }, {
471 .type = EM28XX_VMUX_SVIDEO,
472 .vmux = TVP5150_SVIDEO,
473 .amux = 1,
474 } },
475 },
476 [EM2861_BOARD_YAKUMO_MOVIE_MIXER] = {
477 .name = "Yakumo MovieMixer",
478 .valid = EM28XX_BOARD_NOT_VALIDATED,
479 .vchannels = 1,
480 .decoder = EM28XX_TVP5150,
481 .input = { {
482 .type = EM28XX_VMUX_TELEVISION,
483 .vmux = TVP5150_COMPOSITE0,
484 .amux = 0,
485 }, {
486 .type = EM28XX_VMUX_COMPOSITE1,
487 .vmux = TVP5150_COMPOSITE1,
488 .amux = 1,
489 }, {
490 .type = EM28XX_VMUX_SVIDEO,
491 .vmux = TVP5150_SVIDEO,
492 .amux = 1,
493 } },
494 },
495 [EM2861_BOARD_PLEXTOR_PX_TV100U] = {
496 .name = "Plextor ConvertX PX-TV100U",
497 .valid = EM28XX_BOARD_NOT_VALIDATED,
498 .vchannels = 3,
499 .tuner_type = TUNER_TNF_5335MF,
500 .tda9887_conf = TDA9887_PRESENT,
501 .decoder = EM28XX_TVP5150,
502 .input = { {
503 .type = EM28XX_VMUX_TELEVISION,
504 .vmux = TVP5150_COMPOSITE0,
505 .amux = 1,
506 }, {
507 .type = EM28XX_VMUX_COMPOSITE1,
508 .vmux = TVP5150_COMPOSITE1,
509 .amux = 1,
510 }, {
511 .type = EM28XX_VMUX_SVIDEO,
512 .vmux = TVP5150_SVIDEO,
513 .amux = 1,
514 } },
515 },
516 [EM2870_BOARD_TERRATEC_XS] = {
517 .name = "Terratec Cinergy T XS",
518 .valid = EM28XX_BOARD_NOT_VALIDATED,
519 .tuner_type = TUNER_XC2028,
520 },
521 [EM2870_BOARD_TERRATEC_XS_MT2060] = {
522 .name = "Terratec Cinergy T XS (MT2060)",
523 .valid = EM28XX_BOARD_NOT_VALIDATED,
524 .tuner_type = TUNER_ABSENT, /* MT2060 */
525 },
526 [EM2870_BOARD_KWORLD_350U] = {
527 .name = "Kworld 350 U DVB-T",
528 .valid = EM28XX_BOARD_NOT_VALIDATED,
529 .tuner_type = TUNER_XC2028,
530 },
531 [EM2870_BOARD_KWORLD_355U] = {
532 .name = "Kworld 355 U DVB-T",
533 .valid = EM28XX_BOARD_NOT_VALIDATED,
534 },
535 [EM2870_BOARD_PINNACLE_PCTV_DVB] = {
536 .name = "Pinnacle PCTV DVB-T",
537 .valid = EM28XX_BOARD_NOT_VALIDATED,
538 .tuner_type = TUNER_ABSENT, /* MT2060 */
539 },
540 [EM2870_BOARD_COMPRO_VIDEOMATE] = {
541 .name = "Compro, VideoMate U3",
542 .valid = EM28XX_BOARD_NOT_VALIDATED,
543 .tuner_type = TUNER_ABSENT, /* MT2060 */
544 },
545 [EM2880_BOARD_TERRATEC_HYBRID_XS_FR] = {
546 .name = "Terratec Hybrid XS Secam",
547 .valid = EM28XX_BOARD_NOT_VALIDATED,
548 .vchannels = 3,
549 .has_msp34xx = 1,
550 .tuner_type = TUNER_XC2028,
551 .decoder = EM28XX_TVP5150,
552 .input = { {
553 .type = EM28XX_VMUX_TELEVISION,
554 .vmux = TVP5150_COMPOSITE0,
555 .amux = 0,
556 }, {
557 .type = EM28XX_VMUX_COMPOSITE1,
558 .vmux = TVP5150_COMPOSITE1,
559 .amux = 1,
560 }, {
561 .type = EM28XX_VMUX_SVIDEO,
562 .vmux = TVP5150_SVIDEO,
563 .amux = 1,
564 } },
565 },
154 [EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900] = { 566 [EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900] = {
155 .name = "Hauppauge WinTV HVR 900", 567 .name = "Hauppauge WinTV HVR 900",
156 .vchannels = 3, 568 .vchannels = 3,
@@ -194,7 +606,7 @@ struct em28xx_board em28xx_boards[] = {
194 .amux = 1, 606 .amux = 1,
195 } }, 607 } },
196 }, 608 },
197 [EM2880_BOARD_HAUPPAUGE_WINTV_HVR_950] = { 609 [EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950] = {
198 .name = "Hauppauge WinTV HVR 950", 610 .name = "Hauppauge WinTV HVR 950",
199 .vchannels = 3, 611 .vchannels = 3,
200 .tda9887_conf = TDA9887_PRESENT, 612 .tda9887_conf = TDA9887_PRESENT,
@@ -240,12 +652,36 @@ struct em28xx_board em28xx_boards[] = {
240 .amux = 1, 652 .amux = 1,
241 } }, 653 } },
242 }, 654 },
655 [EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600] = {
656 .name = "AMD ATI TV Wonder HD 600",
657 .vchannels = 3,
658 .tda9887_conf = TDA9887_PRESENT,
659 .tuner_type = TUNER_XC2028,
660 .mts_firmware = 1,
661 .has_12mhz_i2s = 1,
662 .has_dvb = 1,
663 .decoder = EM28XX_TVP5150,
664 .input = { {
665 .type = EM28XX_VMUX_TELEVISION,
666 .vmux = TVP5150_COMPOSITE0,
667 .amux = 0,
668 }, {
669 .type = EM28XX_VMUX_COMPOSITE1,
670 .vmux = TVP5150_COMPOSITE1,
671 .amux = 1,
672 }, {
673 .type = EM28XX_VMUX_SVIDEO,
674 .vmux = TVP5150_SVIDEO,
675 .amux = 1,
676 } },
677 },
243 [EM2880_BOARD_TERRATEC_HYBRID_XS] = { 678 [EM2880_BOARD_TERRATEC_HYBRID_XS] = {
244 .name = "Terratec Hybrid XS", 679 .name = "Terratec Hybrid XS",
245 .vchannels = 3, 680 .vchannels = 3,
246 .tda9887_conf = TDA9887_PRESENT, 681 .tda9887_conf = TDA9887_PRESENT,
247 .tuner_type = TUNER_XC2028, 682 .tuner_type = TUNER_XC2028,
248 .decoder = EM28XX_TVP5150, 683 .decoder = EM28XX_TVP5150,
684 .has_dvb = 1,
249 .input = { { 685 .input = { {
250 .type = EM28XX_VMUX_TELEVISION, 686 .type = EM28XX_VMUX_TELEVISION,
251 .vmux = TVP5150_COMPOSITE0, 687 .vmux = TVP5150_COMPOSITE0,
@@ -328,6 +764,21 @@ struct em28xx_board em28xx_boards[] = {
328 .amux = 1, 764 .amux = 1,
329 } }, 765 } },
330 }, 766 },
767 [EM2800_BOARD_GRABBEEX_USB2800] = {
768 .name = "eMPIA Technology, Inc. GrabBeeX+ Video Encoder",
769 .is_em2800 = 1,
770 .vchannels = 2,
771 .decoder = EM28XX_SAA7113,
772 .input = { {
773 .type = EM28XX_VMUX_COMPOSITE1,
774 .vmux = SAA7115_COMPOSITE0,
775 .amux = 1,
776 }, {
777 .type = EM28XX_VMUX_SVIDEO,
778 .vmux = SAA7115_SVIDEO3,
779 .amux = 1,
780 } },
781 },
331 [EM2800_BOARD_LEADTEK_WINFAST_USBII] = { 782 [EM2800_BOARD_LEADTEK_WINFAST_USBII] = {
332 .name = "Leadtek Winfast USB II", 783 .name = "Leadtek Winfast USB II",
333 .is_em2800 = 1, 784 .is_em2800 = 1,
@@ -439,13 +890,232 @@ struct em28xx_board em28xx_boards[] = {
439 .amux = 0, 890 .amux = 0,
440 } }, 891 } },
441 }, 892 },
893 [EM2880_BOARD_MSI_DIGIVOX_AD] = {
894 .name = "MSI DigiVox A/D",
895 .valid = EM28XX_BOARD_NOT_VALIDATED,
896 .vchannels = 3,
897 .tuner_type = TUNER_XC2028,
898 .decoder = EM28XX_TVP5150,
899 .input = { {
900 .type = EM28XX_VMUX_TELEVISION,
901 .vmux = TVP5150_COMPOSITE0,
902 .amux = 0,
903 }, {
904 .type = EM28XX_VMUX_COMPOSITE1,
905 .vmux = TVP5150_COMPOSITE1,
906 .amux = 1,
907 }, {
908 .type = EM28XX_VMUX_SVIDEO,
909 .vmux = TVP5150_SVIDEO,
910 .amux = 1,
911 } },
912 },
913 [EM2880_BOARD_MSI_DIGIVOX_AD_II] = {
914 .name = "MSI DigiVox A/D II",
915 .valid = EM28XX_BOARD_NOT_VALIDATED,
916 .vchannels = 3,
917 .tuner_type = TUNER_XC2028,
918 .decoder = EM28XX_TVP5150,
919 .input = { {
920 .type = EM28XX_VMUX_TELEVISION,
921 .vmux = TVP5150_COMPOSITE0,
922 .amux = 0,
923 }, {
924 .type = EM28XX_VMUX_COMPOSITE1,
925 .vmux = TVP5150_COMPOSITE1,
926 .amux = 1,
927 }, {
928 .type = EM28XX_VMUX_SVIDEO,
929 .vmux = TVP5150_SVIDEO,
930 .amux = 1,
931 } },
932 },
933 [EM2880_BOARD_KWORLD_DVB_305U] = {
934 .name = "KWorld DVB-T 305U",
935 .valid = EM28XX_BOARD_NOT_VALIDATED,
936 .vchannels = 3,
937 .tuner_type = TUNER_XC2028,
938 .decoder = EM28XX_TVP5150,
939 .input = { {
940 .type = EM28XX_VMUX_TELEVISION,
941 .vmux = TVP5150_COMPOSITE0,
942 .amux = 0,
943 }, {
944 .type = EM28XX_VMUX_COMPOSITE1,
945 .vmux = TVP5150_COMPOSITE1,
946 .amux = 1,
947 }, {
948 .type = EM28XX_VMUX_SVIDEO,
949 .vmux = TVP5150_SVIDEO,
950 .amux = 1,
951 } },
952 },
953 [EM2880_BOARD_KWORLD_DVB_310U] = {
954 .name = "KWorld DVB-T 310U",
955 .valid = EM28XX_BOARD_NOT_VALIDATED,
956 .vchannels = 3,
957 .tuner_type = TUNER_XC2028,
958 .decoder = EM28XX_TVP5150,
959 .input = { {
960 .type = EM28XX_VMUX_TELEVISION,
961 .vmux = TVP5150_COMPOSITE0,
962 .amux = 0,
963 }, {
964 .type = EM28XX_VMUX_COMPOSITE1,
965 .vmux = TVP5150_COMPOSITE1,
966 .amux = 1,
967 }, {
968 .type = EM28XX_VMUX_SVIDEO,
969 .vmux = TVP5150_SVIDEO,
970 .amux = 1,
971 } },
972 },
973 [EM2881_BOARD_DNT_DA2_HYBRID] = {
974 .name = "DNT DA2 Hybrid",
975 .valid = EM28XX_BOARD_NOT_VALIDATED,
976 .vchannels = 3,
977 .tuner_type = TUNER_XC2028,
978 .decoder = EM28XX_TVP5150,
979 .input = { {
980 .type = EM28XX_VMUX_TELEVISION,
981 .vmux = TVP5150_COMPOSITE0,
982 .amux = 0,
983 }, {
984 .type = EM28XX_VMUX_COMPOSITE1,
985 .vmux = TVP5150_COMPOSITE1,
986 .amux = 1,
987 }, {
988 .type = EM28XX_VMUX_SVIDEO,
989 .vmux = TVP5150_SVIDEO,
990 .amux = 1,
991 } },
992 },
993 [EM2881_BOARD_PINNACLE_HYBRID_PRO] = {
994 .name = "Pinnacle Hybrid Pro",
995 .valid = EM28XX_BOARD_NOT_VALIDATED,
996 .vchannels = 3,
997 .tuner_type = TUNER_XC2028,
998 .decoder = EM28XX_TVP5150,
999 .input = { {
1000 .type = EM28XX_VMUX_TELEVISION,
1001 .vmux = TVP5150_COMPOSITE0,
1002 .amux = 0,
1003 }, {
1004 .type = EM28XX_VMUX_COMPOSITE1,
1005 .vmux = TVP5150_COMPOSITE1,
1006 .amux = 1,
1007 }, {
1008 .type = EM28XX_VMUX_SVIDEO,
1009 .vmux = TVP5150_SVIDEO,
1010 .amux = 1,
1011 } },
1012 },
1013 [EM2882_BOARD_PINNACLE_HYBRID_PRO] = {
1014 .name = "Pinnacle Hybrid Pro (2)",
1015 .valid = EM28XX_BOARD_NOT_VALIDATED,
1016 .vchannels = 3,
1017 .tuner_type = TUNER_XC2028,
1018 .decoder = EM28XX_TVP5150,
1019 .input = { {
1020 .type = EM28XX_VMUX_TELEVISION,
1021 .vmux = TVP5150_COMPOSITE0,
1022 .amux = 0,
1023 }, {
1024 .type = EM28XX_VMUX_COMPOSITE1,
1025 .vmux = TVP5150_COMPOSITE1,
1026 .amux = 1,
1027 }, {
1028 .type = EM28XX_VMUX_SVIDEO,
1029 .vmux = TVP5150_SVIDEO,
1030 .amux = 1,
1031 } },
1032 },
1033 [EM2882_BOARD_KWORLD_VS_DVBT] = {
1034 .name = "Kworld VS-DVB-T 323UR",
1035 .valid = EM28XX_BOARD_NOT_VALIDATED,
1036 .vchannels = 3,
1037 .tuner_type = TUNER_XC2028,
1038 .decoder = EM28XX_TVP5150,
1039 .input = { {
1040 .type = EM28XX_VMUX_TELEVISION,
1041 .vmux = TVP5150_COMPOSITE0,
1042 .amux = 0,
1043 }, {
1044 .type = EM28XX_VMUX_COMPOSITE1,
1045 .vmux = TVP5150_COMPOSITE1,
1046 .amux = 1,
1047 }, {
1048 .type = EM28XX_VMUX_SVIDEO,
1049 .vmux = TVP5150_SVIDEO,
1050 .amux = 1,
1051 } },
1052 },
1053 [EM2882_BOARD_TERRATEC_HYBRID_XS] = {
1054 .name = "Terratec Hybrid XS (em2882)",
1055 .valid = EM28XX_BOARD_NOT_VALIDATED,
1056 .vchannels = 3,
1057 .tuner_type = TUNER_XC2028,
1058 .decoder = EM28XX_TVP5150,
1059 .input = { {
1060 .type = EM28XX_VMUX_TELEVISION,
1061 .vmux = TVP5150_COMPOSITE0,
1062 .amux = 0,
1063 }, {
1064 .type = EM28XX_VMUX_COMPOSITE1,
1065 .vmux = TVP5150_COMPOSITE1,
1066 .amux = 1,
1067 }, {
1068 .type = EM28XX_VMUX_SVIDEO,
1069 .vmux = TVP5150_SVIDEO,
1070 .amux = 1,
1071 } },
1072 },
1073 [EM2883_BOARD_KWORLD_HYBRID_A316] = {
1074 .name = "Kworld PlusTV HD Hybrid 330",
1075 .valid = EM28XX_BOARD_NOT_VALIDATED,
1076 .vchannels = 3,
1077 .is_em2800 = 0,
1078 .tuner_type = TUNER_XC2028,
1079 .decoder = EM28XX_TVP5150,
1080 .input = { {
1081 .type = EM28XX_VMUX_TELEVISION,
1082 .vmux = TVP5150_COMPOSITE0,
1083 .amux = 0,
1084 }, {
1085 .type = EM28XX_VMUX_COMPOSITE1,
1086 .vmux = TVP5150_COMPOSITE1,
1087 .amux = 1,
1088 }, {
1089 .type = EM28XX_VMUX_SVIDEO,
1090 .vmux = TVP5150_SVIDEO,
1091 .amux = 1,
1092 } },
1093 },
1094 [EM2820_BOARD_COMPRO_VIDEOMATE_FORYOU] = {
1095 .name = "Compro VideoMate ForYou/Stereo",
1096 .vchannels = 2,
1097 .tuner_type = TUNER_LG_PAL_NEW_TAPC,
1098 .tda9887_conf = TDA9887_PRESENT,
1099 .decoder = EM28XX_TVP5150,
1100 .input = { {
1101 .type = EM28XX_VMUX_TELEVISION,
1102 .vmux = TVP5150_COMPOSITE0,
1103 .amux = EM28XX_AMUX_LINE_IN,
1104 }, {
1105 .type = EM28XX_VMUX_SVIDEO,
1106 .vmux = TVP5150_SVIDEO,
1107 .amux = EM28XX_AMUX_LINE_IN,
1108 } },
1109 },
442}; 1110};
443const unsigned int em28xx_bcount = ARRAY_SIZE(em28xx_boards); 1111const unsigned int em28xx_bcount = ARRAY_SIZE(em28xx_boards);
444 1112
445/* table of devices that work with this driver */ 1113/* table of devices that work with this driver */
446struct usb_device_id em28xx_id_table [] = { 1114struct usb_device_id em28xx_id_table [] = {
447 { USB_DEVICE(0xeb1a, 0x2750), 1115 { USB_DEVICE(0xeb1a, 0x2750),
448 .driver_info = EM2820_BOARD_UNKNOWN }, 1116 .driver_info = EM2750_BOARD_UNKNOWN },
1117 { USB_DEVICE(0xeb1a, 0x2751),
1118 .driver_info = EM2750_BOARD_UNKNOWN },
449 { USB_DEVICE(0xeb1a, 0x2800), 1119 { USB_DEVICE(0xeb1a, 0x2800),
450 .driver_info = EM2800_BOARD_UNKNOWN }, 1120 .driver_info = EM2800_BOARD_UNKNOWN },
451 { USB_DEVICE(0xeb1a, 0x2820), 1121 { USB_DEVICE(0xeb1a, 0x2820),
@@ -462,36 +1132,78 @@ struct usb_device_id em28xx_id_table [] = {
462 .driver_info = EM2820_BOARD_UNKNOWN }, 1132 .driver_info = EM2820_BOARD_UNKNOWN },
463 { USB_DEVICE(0xeb1a, 0x2883), 1133 { USB_DEVICE(0xeb1a, 0x2883),
464 .driver_info = EM2820_BOARD_UNKNOWN }, 1134 .driver_info = EM2820_BOARD_UNKNOWN },
1135 { USB_DEVICE(0xeb1a, 0xe300),
1136 .driver_info = EM2861_BOARD_KWORLD_PVRTV_300U },
1137 { USB_DEVICE(0xeb1a, 0xe305),
1138 .driver_info = EM2880_BOARD_KWORLD_DVB_305U },
1139 { USB_DEVICE(0xeb1a, 0xe310),
1140 .driver_info = EM2880_BOARD_MSI_DIGIVOX_AD },
1141 { USB_DEVICE(0xeb1a, 0xa316),
1142 .driver_info = EM2883_BOARD_KWORLD_HYBRID_A316 },
1143 { USB_DEVICE(0xeb1a, 0xe320),
1144 .driver_info = EM2880_BOARD_MSI_DIGIVOX_AD_II },
1145 { USB_DEVICE(0xeb1a, 0xe323),
1146 .driver_info = EM2882_BOARD_KWORLD_VS_DVBT },
1147 { USB_DEVICE(0xeb1a, 0xe350),
1148 .driver_info = EM2870_BOARD_KWORLD_350U },
1149 { USB_DEVICE(0xeb1a, 0xe355),
1150 .driver_info = EM2870_BOARD_KWORLD_355U },
1151 { USB_DEVICE(0xeb1a, 0x2801),
1152 .driver_info = EM2800_BOARD_GRABBEEX_USB2800 },
1153 { USB_DEVICE(0xeb1a, 0xe357),
1154 .driver_info = EM2870_BOARD_KWORLD_355U },
465 { USB_DEVICE(0x0ccd, 0x0036), 1155 { USB_DEVICE(0x0ccd, 0x0036),
466 .driver_info = EM2820_BOARD_TERRATEC_CINERGY_250 }, 1156 .driver_info = EM2820_BOARD_TERRATEC_CINERGY_250 },
467 { USB_DEVICE(0x2304, 0x0208), 1157 { USB_DEVICE(0x0ccd, 0x004c),
468 .driver_info = EM2820_BOARD_PINNACLE_USB_2 }, 1158 .driver_info = EM2880_BOARD_TERRATEC_HYBRID_XS_FR },
1159 { USB_DEVICE(0x0ccd, 0x004f),
1160 .driver_info = EM2860_BOARD_TERRATEC_HYBRID_XS },
1161 { USB_DEVICE(0x0ccd, 0x005e),
1162 .driver_info = EM2882_BOARD_TERRATEC_HYBRID_XS },
1163 { USB_DEVICE(0x0ccd, 0x0042),
1164 .driver_info = EM2880_BOARD_TERRATEC_HYBRID_XS },
1165 { USB_DEVICE(0x0ccd, 0x0043),
1166 .driver_info = EM2870_BOARD_TERRATEC_XS },
1167 { USB_DEVICE(0x0ccd, 0x0047),
1168 .driver_info = EM2880_BOARD_TERRATEC_PRODIGY_XS },
1169 { USB_DEVICE(0x185b, 0x2870),
1170 .driver_info = EM2870_BOARD_COMPRO_VIDEOMATE },
1171 { USB_DEVICE(0x185b, 0x2041),
1172 .driver_info = EM2820_BOARD_COMPRO_VIDEOMATE_FORYOU },
469 { USB_DEVICE(0x2040, 0x4200), 1173 { USB_DEVICE(0x2040, 0x4200),
470 .driver_info = EM2820_BOARD_HAUPPAUGE_WINTV_USB_2 }, 1174 .driver_info = EM2820_BOARD_HAUPPAUGE_WINTV_USB_2 },
471 { USB_DEVICE(0x2040, 0x4201), 1175 { USB_DEVICE(0x2040, 0x4201),
472 .driver_info = EM2820_BOARD_HAUPPAUGE_WINTV_USB_2 }, 1176 .driver_info = EM2820_BOARD_HAUPPAUGE_WINTV_USB_2 },
473 { USB_DEVICE(0x2304, 0x0207),
474 .driver_info = EM2820_BOARD_PINNACLE_DVC_90 },
475 { USB_DEVICE(0x2304, 0x021a),
476 .driver_info = EM2820_BOARD_PINNACLE_DVC_90 },
477 { USB_DEVICE(0x2304, 0x0227),
478 .driver_info = EM2880_BOARD_PINNACLE_PCTV_HD_PRO },
479 { USB_DEVICE(0x2040, 0x6500), 1177 { USB_DEVICE(0x2040, 0x6500),
480 .driver_info = EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900 }, 1178 .driver_info = EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900 },
481 { USB_DEVICE(0x2040, 0x6502), 1179 { USB_DEVICE(0x2040, 0x6502),
482 .driver_info = EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2 }, 1180 .driver_info = EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2 },
483 { USB_DEVICE(0x2040, 0x6513), /* HCW HVR-980 */ 1181 { USB_DEVICE(0x2040, 0x6513), /* HCW HVR-980 */
484 .driver_info = EM2880_BOARD_HAUPPAUGE_WINTV_HVR_950 }, 1182 .driver_info = EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950 },
485 { USB_DEVICE(0x2040, 0x6517), /* HP HVR-950 */ 1183 { USB_DEVICE(0x2040, 0x6517), /* HP HVR-950 */
486 .driver_info = EM2880_BOARD_HAUPPAUGE_WINTV_HVR_950 }, 1184 .driver_info = EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950 },
487 { USB_DEVICE(0x2040, 0x651b), /* RP HVR-950 */ 1185 { USB_DEVICE(0x2040, 0x651b), /* RP HVR-950 */
488 .driver_info = EM2880_BOARD_HAUPPAUGE_WINTV_HVR_950 }, 1186 .driver_info = EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950 },
489 { USB_DEVICE(0x2040, 0x651f), /* HCW HVR-850 */ 1187 { USB_DEVICE(0x2040, 0x651f), /* HCW HVR-850 */
490 .driver_info = EM2880_BOARD_HAUPPAUGE_WINTV_HVR_950 }, 1188 .driver_info = EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950 },
491 { USB_DEVICE(0x0ccd, 0x0042), 1189 { USB_DEVICE(0x0438, 0xb002),
492 .driver_info = EM2880_BOARD_TERRATEC_HYBRID_XS }, 1190 .driver_info = EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600 },
493 { USB_DEVICE(0x0ccd, 0x0047), 1191 { USB_DEVICE(0x2001, 0xf112),
494 .driver_info = EM2880_BOARD_TERRATEC_PRODIGY_XS }, 1192 .driver_info = EM2820_BOARD_DLINK_USB_TV },
1193 { USB_DEVICE(0x2304, 0x0207),
1194 .driver_info = EM2820_BOARD_PINNACLE_DVC_90 },
1195 { USB_DEVICE(0x2304, 0x0208),
1196 .driver_info = EM2820_BOARD_PINNACLE_USB_2 },
1197 { USB_DEVICE(0x2304, 0x021a),
1198 .driver_info = EM2820_BOARD_PINNACLE_DVC_90 },
1199 { USB_DEVICE(0x2304, 0x0226),
1200 .driver_info = EM2882_BOARD_PINNACLE_HYBRID_PRO },
1201 { USB_DEVICE(0x2304, 0x0227),
1202 .driver_info = EM2880_BOARD_PINNACLE_PCTV_HD_PRO },
1203 { USB_DEVICE(0x0413, 0x6023),
1204 .driver_info = EM2800_BOARD_LEADTEK_WINFAST_USBII },
1205 { USB_DEVICE(0x093b, 0xa005),
1206 .driver_info = EM2861_BOARD_PLEXTOR_PX_TV100U },
495 { }, 1207 { },
496}; 1208};
497MODULE_DEVICE_TABLE(usb, em28xx_id_table); 1209MODULE_DEVICE_TABLE(usb, em28xx_id_table);
@@ -500,6 +1212,18 @@ MODULE_DEVICE_TABLE(usb, em28xx_id_table);
500 * Reset sequences for analog/digital modes 1212 * Reset sequences for analog/digital modes
501 */ 1213 */
502 1214
1215/* Reset for the most [analog] boards */
1216static struct em28xx_reg_seq default_analog[] = {
1217 {EM28XX_R08_GPIO, 0x6d, ~EM_GPIO_4, 10},
1218 { -1, -1, -1, -1},
1219};
1220
1221/* Reset for the most [digital] boards */
1222static struct em28xx_reg_seq default_digital[] = {
1223 {EM28XX_R08_GPIO, 0x6e, ~EM_GPIO_4, 10},
1224 { -1, -1, -1, -1},
1225};
1226
503/* Board Hauppauge WinTV HVR 900 analog */ 1227/* Board Hauppauge WinTV HVR 900 analog */
504static struct em28xx_reg_seq hauppauge_wintv_hvr_900_analog[] = { 1228static struct em28xx_reg_seq hauppauge_wintv_hvr_900_analog[] = {
505 {EM28XX_R08_GPIO, 0x2d, ~EM_GPIO_4, 10}, 1229 {EM28XX_R08_GPIO, 0x2d, ~EM_GPIO_4, 10},
@@ -515,14 +1239,42 @@ static struct em28xx_reg_seq hauppauge_wintv_hvr_900_digital[] = {
515 { -1, -1, -1, -1}, 1239 { -1, -1, -1, -1},
516}; 1240};
517 1241
518/* Board Hauppauge WinTV HVR 900 tuner_callback */ 1242/* Boards - EM2880 MSI DIGIVOX AD and EM2880_BOARD_MSI_DIGIVOX_AD_II */
519static struct em28xx_reg_seq hauppauge_wintv_hvr_900_tuner_callback[] = { 1243static struct em28xx_reg_seq em2880_msi_digivox_ad_analog[] = {
1244 {EM28XX_R08_GPIO, 0x69, ~EM_GPIO_4, 10},
1245 { -1, -1, -1, -1},
1246};
1247
1248/* Boards - EM2880 MSI DIGIVOX AD and EM2880_BOARD_MSI_DIGIVOX_AD_II */
1249static struct em28xx_reg_seq em2880_msi_digivox_ad_digital[] = {
1250 {EM28XX_R08_GPIO, 0x6a, ~EM_GPIO_4, 10},
1251 { -1, -1, -1, -1},
1252};
1253
1254/* Board - EM2870 Kworld 355u
1255 Analog - No input analog */
1256static struct em28xx_reg_seq em2870_kworld_355u_digital[] = {
1257 {EM2880_R04_GPO, 0x01, 0xff, 10},
1258 { -1, -1, -1, -1},
1259};
1260
1261/* Callback for the most boards */
1262static struct em28xx_reg_seq default_callback[] = {
520 {EM28XX_R08_GPIO, EM_GPIO_4, EM_GPIO_4, 10}, 1263 {EM28XX_R08_GPIO, EM_GPIO_4, EM_GPIO_4, 10},
521 {EM28XX_R08_GPIO, 0, EM_GPIO_4, 10}, 1264 {EM28XX_R08_GPIO, 0, EM_GPIO_4, 10},
522 {EM28XX_R08_GPIO, EM_GPIO_4, EM_GPIO_4, 10}, 1265 {EM28XX_R08_GPIO, EM_GPIO_4, EM_GPIO_4, 10},
523 { -1, -1, -1, -1}, 1266 { -1, -1, -1, -1},
524}; 1267};
525 1268
1269/* Callback for EM2882 TERRATEC HYBRID XS */
1270static struct em28xx_reg_seq em2882_terratec_hybrid_xs_digital[] = {
1271 {EM28XX_R08_GPIO, 0x2e, 0xff, 6},
1272 {EM28XX_R08_GPIO, 0x3e, ~EM_GPIO_4, 6},
1273 {EM2880_R04_GPO, 0x04, 0xff, 10},
1274 {EM2880_R04_GPO, 0x0c, 0xff, 10},
1275 { -1, -1, -1, -1},
1276};
1277
526/* 1278/*
527 * EEPROM hash table for devices with generic USB IDs 1279 * EEPROM hash table for devices with generic USB IDs
528 */ 1280 */
@@ -569,6 +1321,7 @@ static void em28xx_set_model(struct em28xx *dev)
569 dev->max_range_640_480 = em28xx_boards[dev->model].max_range_640_480; 1321 dev->max_range_640_480 = em28xx_boards[dev->model].max_range_640_480;
570 dev->has_dvb = em28xx_boards[dev->model].has_dvb; 1322 dev->has_dvb = em28xx_boards[dev->model].has_dvb;
571 dev->has_snapshot_button = em28xx_boards[dev->model].has_snapshot_button; 1323 dev->has_snapshot_button = em28xx_boards[dev->model].has_snapshot_button;
1324 dev->valid = em28xx_boards[dev->model].valid;
572} 1325}
573 1326
574/* Since em28xx_pre_card_setup() requires a proper dev->model, 1327/* Since em28xx_pre_card_setup() requires a proper dev->model,
@@ -604,19 +1357,171 @@ void em28xx_pre_card_setup(struct em28xx *dev)
604 case EM2880_BOARD_TERRATEC_PRODIGY_XS: 1357 case EM2880_BOARD_TERRATEC_PRODIGY_XS:
605 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900: 1358 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900:
606 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2: 1359 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2:
607 case EM2880_BOARD_TERRATEC_HYBRID_XS: 1360 case EM2860_BOARD_TERRATEC_HYBRID_XS:
608 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_950: 1361 case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950:
609 case EM2880_BOARD_PINNACLE_PCTV_HD_PRO: 1362 case EM2880_BOARD_PINNACLE_PCTV_HD_PRO:
1363 case EM2882_BOARD_PINNACLE_HYBRID_PRO:
1364 case EM2883_BOARD_KWORLD_HYBRID_A316:
1365 case EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600:
1366 em28xx_write_regs(dev, EM28XX_R0F_XCLK, "\x27", 1);
1367 em28xx_write_regs(dev, EM28XX_R06_I2C_CLK, "\x40", 1);
1368 msleep(50);
1369
1370 /* Sets GPO/GPIO sequences for this device */
1371 dev->analog_gpio = hauppauge_wintv_hvr_900_analog;
1372 dev->digital_gpio = hauppauge_wintv_hvr_900_digital;
1373 dev->tun_analog_gpio = default_callback;
1374 dev->tun_digital_gpio = default_callback;
1375 break;
1376
1377 case EM2882_BOARD_TERRATEC_HYBRID_XS:
610 em28xx_write_regs(dev, EM28XX_R0F_XCLK, "\x27", 1); 1378 em28xx_write_regs(dev, EM28XX_R0F_XCLK, "\x27", 1);
611 em28xx_write_regs(dev, EM28XX_R06_I2C_CLK, "\x40", 1); 1379 em28xx_write_regs(dev, EM28XX_R06_I2C_CLK, "\x40", 1);
612 msleep(50); 1380 msleep(50);
613 1381
1382 /* should be added ir_codes here */
1383
614 /* Sets GPO/GPIO sequences for this device */ 1384 /* Sets GPO/GPIO sequences for this device */
615 dev->analog_gpio = hauppauge_wintv_hvr_900_analog; 1385 dev->analog_gpio = hauppauge_wintv_hvr_900_analog;
616 dev->digital_gpio = hauppauge_wintv_hvr_900_digital; 1386 dev->digital_gpio = hauppauge_wintv_hvr_900_digital;
617 dev->tun_analog_gpio = hauppauge_wintv_hvr_900_tuner_callback; 1387 dev->tun_analog_gpio = default_callback;
618 dev->tun_digital_gpio = hauppauge_wintv_hvr_900_tuner_callback; 1388 dev->tun_digital_gpio = em2882_terratec_hybrid_xs_digital;
1389 break;
1390
1391 case EM2880_BOARD_TERRATEC_HYBRID_XS_FR:
1392 case EM2880_BOARD_TERRATEC_HYBRID_XS:
1393 case EM2870_BOARD_TERRATEC_XS:
1394 case EM2881_BOARD_PINNACLE_HYBRID_PRO:
1395 case EM2880_BOARD_KWORLD_DVB_310U:
1396 case EM2870_BOARD_KWORLD_350U:
1397 case EM2881_BOARD_DNT_DA2_HYBRID:
1398 em28xx_write_regs(dev, EM28XX_R0F_XCLK, "\x27", 1);
1399 em28xx_write_regs(dev, EM28XX_R06_I2C_CLK, "\x40", 1);
1400 msleep(50);
1401
1402 /* NOTE: EM2881_DNT_DA2_HYBRID spend 140 msleep for digital
1403 and analog commands. If this commands doesn't work,
1404 add this timer. */
619 1405
1406 /* Sets GPO/GPIO sequences for this device */
1407 dev->analog_gpio = default_analog;
1408 dev->digital_gpio = default_digital;
1409 dev->tun_analog_gpio = default_callback;
1410 dev->tun_digital_gpio = default_callback;
1411 break;
1412
1413 case EM2880_BOARD_MSI_DIGIVOX_AD:
1414 case EM2880_BOARD_MSI_DIGIVOX_AD_II:
1415 em28xx_write_regs(dev, EM28XX_R0F_XCLK, "\x27", 1);
1416 em28xx_write_regs(dev, EM28XX_R06_I2C_CLK, "\x40", 1);
1417 msleep(50);
1418
1419 /* Sets GPO/GPIO sequences for this device */
1420 dev->analog_gpio = em2880_msi_digivox_ad_analog;
1421 dev->digital_gpio = em2880_msi_digivox_ad_digital;
1422 dev->tun_analog_gpio = default_callback;
1423 dev->tun_digital_gpio = default_callback;
1424 break;
1425
1426 case EM2750_BOARD_UNKNOWN:
1427 case EM2750_BOARD_DLCW_130:
1428 em28xx_write_regs(dev, EM28XX_R0F_XCLK, "\x0a", 1);
1429 break;
1430
1431 case EM2861_BOARD_PLEXTOR_PX_TV100U:
1432 em28xx_write_regs(dev, EM28XX_R0F_XCLK, "\x27", 1);
1433 em28xx_write_regs(dev, EM28XX_R06_I2C_CLK, "\x40", 1);
1434 /* FIXME guess */
1435 /* Turn on analog audio output */
1436 em28xx_write_regs_req(dev, 0x00, 0x08, "\xfd", 1);
1437 break;
1438
1439 case EM2861_BOARD_KWORLD_PVRTV_300U:
1440 case EM2880_BOARD_KWORLD_DVB_305U:
1441 em28xx_write_regs(dev, EM28XX_R0F_XCLK, "\x27", 1);
1442 em28xx_write_regs(dev, EM28XX_R06_I2C_CLK, "\x4c", 1);
1443 msleep(10);
1444 em28xx_write_regs(dev, 0x08, "\x6d", 1);
1445 msleep(10);
1446 em28xx_write_regs(dev, 0x08, "\x7d", 1);
1447 msleep(10);
1448 break;
1449
1450 case EM2870_BOARD_KWORLD_355U:
1451 em28xx_write_regs(dev, EM28XX_R0F_XCLK, "\x27", 1);
1452 em28xx_write_regs(dev, EM28XX_R06_I2C_CLK, "\x40", 1);
1453 msleep(50);
1454
1455 /* Sets GPO/GPIO sequences for this device */
1456 dev->digital_gpio = em2870_kworld_355u_digital;
1457 break;
1458
1459 case EM2870_BOARD_COMPRO_VIDEOMATE:
1460 em28xx_write_regs(dev, EM28XX_R0F_XCLK, "\x27", 1);
1461 em28xx_write_regs(dev, EM28XX_R06_I2C_CLK, "\x40", 1);
1462 /* TODO: someone can do some cleanup here...
1463 not everything's needed */
1464 em28xx_write_regs(dev, 0x04, "\x00", 1);
1465 msleep(10);
1466 em28xx_write_regs(dev, 0x04, "\x01", 1);
1467 msleep(10);
1468 em28xx_write_regs(dev, 0x08, "\xfd", 1);
1469 mdelay(70);
1470 em28xx_write_regs(dev, 0x08, "\xfc", 1);
1471 mdelay(70);
1472 em28xx_write_regs(dev, 0x08, "\xdc", 1);
1473 mdelay(70);
1474 em28xx_write_regs(dev, 0x08, "\xfc", 1);
1475 mdelay(70);
1476 break;
1477
1478 case EM2870_BOARD_TERRATEC_XS_MT2060:
1479 em28xx_write_regs(dev, EM28XX_R0F_XCLK, "\x27", 1);
1480 em28xx_write_regs(dev, EM28XX_R06_I2C_CLK, "\x40", 1);
1481 /* this device needs some gpio writes to get the DVB-T
1482 demod work */
1483 em28xx_write_regs(dev, 0x08, "\xfe", 1);
1484 mdelay(70);
1485 em28xx_write_regs(dev, 0x08, "\xde", 1);
1486 mdelay(70);
1487 dev->em28xx_write_regs(dev, 0x08, "\xfe", 1);
1488 mdelay(70);
1489 break;
1490
1491 case EM2870_BOARD_PINNACLE_PCTV_DVB:
1492 em28xx_write_regs(dev, EM28XX_R06_I2C_CLK, "\x40", 1);
1493 /* this device needs some gpio writes to get the
1494 DVB-T demod work */
1495 em28xx_write_regs(dev, 0x08, "\xfe", 1);
1496 mdelay(70);
1497 em28xx_write_regs(dev, 0x08, "\xde", 1);
1498 mdelay(70);
1499 em28xx_write_regs(dev, 0x08, "\xfe", 1);
1500 mdelay(70);
1501 /* switch em2880 rc protocol */
1502 em28xx_write_regs(dev, EM28XX_R0F_XCLK, "\x22", 1);
1503 /* should be added ir_codes here */
1504 break;
1505
1506 case EM2820_BOARD_GADMEI_UTV310:
1507 em28xx_write_regs(dev, EM28XX_R0F_XCLK, "\x27", 1);
1508 em28xx_write_regs(dev, EM28XX_R06_I2C_CLK, "\x40", 1);
1509 /* Turn on analog audio output */
1510 em28xx_write_regs_req(dev, 0x00, 0x08, "\xfd", 1);
1511 break;
1512
1513 case EM2860_BOARD_GADMEI_UTV330:
1514 /* Turn on IR */
1515 em28xx_write_regs(dev, EM28XX_R0F_XCLK, "\x07", 1);
1516 em28xx_write_regs(dev, EM28XX_R06_I2C_CLK, "\x40", 1);
1517 /* should be added ir_codes here */
1518 break;
1519
1520 case EM2820_BOARD_MSI_VOX_USB_2:
1521 em28xx_write_regs(dev, EM28XX_R0F_XCLK, "\x27", 1);
1522 em28xx_write_regs(dev, EM28XX_R06_I2C_CLK, "\x40", 1);
1523 /* enables audio for that device */
1524 em28xx_write_regs_req(dev, 0x00, 0x08, "\xfd", 1);
620 break; 1525 break;
621 } 1526 }
622 1527
@@ -639,12 +1544,16 @@ static void em28xx_setup_xc3028(struct em28xx *dev, struct xc2028_ctrl *ctl)
639 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900: 1544 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900:
640 ctl->demod = XC3028_FE_ZARLINK456; 1545 ctl->demod = XC3028_FE_ZARLINK456;
641 break; 1546 break;
1547 case EM2880_BOARD_TERRATEC_HYBRID_XS:
1548 ctl->demod = XC3028_FE_ZARLINK456;
1549 break;
642 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2: 1550 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2:
643 /* djh - Not sure which demod we need here */ 1551 /* djh - Not sure which demod we need here */
644 ctl->demod = XC3028_FE_DEFAULT; 1552 ctl->demod = XC3028_FE_DEFAULT;
645 break; 1553 break;
646 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_950: 1554 case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950:
647 case EM2880_BOARD_PINNACLE_PCTV_HD_PRO: 1555 case EM2880_BOARD_PINNACLE_PCTV_HD_PRO:
1556 case EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600:
648 /* FIXME: Better to specify the needed IF */ 1557 /* FIXME: Better to specify the needed IF */
649 ctl->demod = XC3028_FE_DEFAULT; 1558 ctl->demod = XC3028_FE_DEFAULT;
650 break; 1559 break;
@@ -809,6 +1718,8 @@ void em28xx_set_ir(struct em28xx *dev, struct IR_i2c *ir)
809 break; 1718 break;
810 case (EM2800_BOARD_KWORLD_USB2800): 1719 case (EM2800_BOARD_KWORLD_USB2800):
811 break; 1720 break;
1721 case (EM2800_BOARD_GRABBEEX_USB2800):
1722 break;
812 } 1723 }
813} 1724}
814 1725
@@ -823,7 +1734,7 @@ void em28xx_card_setup(struct em28xx *dev)
823 case EM2820_BOARD_HAUPPAUGE_WINTV_USB_2: 1734 case EM2820_BOARD_HAUPPAUGE_WINTV_USB_2:
824 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900: 1735 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900:
825 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2: 1736 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2:
826 case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_950: 1737 case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950:
827 { 1738 {
828 struct tveeprom tv; 1739 struct tveeprom tv;
829#ifdef CONFIG_MODULES 1740#ifdef CONFIG_MODULES
@@ -836,7 +1747,7 @@ void em28xx_card_setup(struct em28xx *dev)
836 1747
837 dev->tuner_type = tv.tuner_type; 1748 dev->tuner_type = tv.tuner_type;
838 1749
839 if (tv.audio_processor == AUDIO_CHIP_MSP34XX) { 1750 if (tv.audio_processor == V4L2_IDENT_MSPX4XX) {
840 dev->i2s_speed = 2048000; 1751 dev->i2s_speed = 2048000;
841 dev->has_msp34xx = 1; 1752 dev->has_msp34xx = 1;
842 } 1753 }
@@ -854,11 +1765,21 @@ void em28xx_card_setup(struct em28xx *dev)
854 case EM2800_BOARD_UNKNOWN: 1765 case EM2800_BOARD_UNKNOWN:
855 if (!em28xx_hint_board(dev)) 1766 if (!em28xx_hint_board(dev))
856 em28xx_set_model(dev); 1767 em28xx_set_model(dev);
1768 break;
857 } 1769 }
858 1770
859 if (dev->has_snapshot_button) 1771 if (dev->has_snapshot_button)
860 em28xx_register_snapshot_button(dev); 1772 em28xx_register_snapshot_button(dev);
861 1773
1774 if (dev->valid == EM28XX_BOARD_NOT_VALIDATED) {
1775 em28xx_errdev("\n\n");
1776 em28xx_errdev("The support for this board weren't "
1777 "valid yet.\n");
1778 em28xx_errdev("Please send a report of having this working\n");
1779 em28xx_errdev("not to V4L mailing list (and/or to other "
1780 "addresses)\n\n");
1781 }
1782
862 /* Allow override tuner type by a module parameter */ 1783 /* Allow override tuner type by a module parameter */
863 if (tuner >= 0) 1784 if (tuner >= 0)
864 dev->tuner_type = tuner; 1785 dev->tuner_type = tuner;