3 * device driver for Conexant 2388x based TV cards
6 * (c) 2003 Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 #include <linux/init.h>
24 #include <linux/module.h>
25 #include <linux/pci.h>
26 #include <linux/delay.h>
31 static unsigned int tuner[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET };
32 static unsigned int radio[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET };
33 static unsigned int card[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET };
35 module_param_array(tuner, int, NULL, 0444);
36 module_param_array(radio, int, NULL, 0444);
37 module_param_array(card, int, NULL, 0444);
39 MODULE_PARM_DESC(tuner,"tuner type");
40 MODULE_PARM_DESC(radio,"radio tuner type");
41 MODULE_PARM_DESC(card,"card type");
43 static unsigned int latency = UNSET;
44 module_param(latency,int,0444);
45 MODULE_PARM_DESC(latency,"pci latency timer");
47 #define info_printk(core, fmt, arg...) \
48 printk(KERN_INFO "%s: " fmt, core->name , ## arg)
50 #define warn_printk(core, fmt, arg...) \
51 printk(KERN_WARNING "%s: " fmt, core->name , ## arg)
53 #define err_printk(core, fmt, arg...) \
54 printk(KERN_ERR "%s: " fmt, core->name , ## arg)
57 /* ------------------------------------------------------------------ */
58 /* board config info */
60 /* If radio_type !=UNSET, radio_addr should be specified
63 static const struct cx88_board cx88_boards[] = {
64 [CX88_BOARD_UNKNOWN] = {
65 .name = "UNKNOWN/GENERIC",
68 .tuner_addr = ADDR_UNSET,
69 .radio_addr = ADDR_UNSET,
71 .type = CX88_VMUX_COMPOSITE1,
74 .type = CX88_VMUX_COMPOSITE2,
77 .type = CX88_VMUX_COMPOSITE3,
80 .type = CX88_VMUX_COMPOSITE4,
84 [CX88_BOARD_HAUPPAUGE] = {
85 .name = "Hauppauge WinTV 34xxx models",
88 .tuner_addr = ADDR_UNSET,
89 .radio_addr = ADDR_UNSET,
90 .tda9887_conf = TDA9887_PRESENT,
92 .type = CX88_VMUX_TELEVISION,
94 .gpio0 = 0xff00, // internal decoder
96 .type = CX88_VMUX_DEBUG,
98 .gpio0 = 0xff01, // mono from tuner chip
100 .type = CX88_VMUX_COMPOSITE1,
104 .type = CX88_VMUX_SVIDEO,
114 .name = "GDI Black Gold",
117 .tuner_addr = ADDR_UNSET,
118 .radio_addr = ADDR_UNSET,
120 .type = CX88_VMUX_TELEVISION,
123 .type = CX88_VMUX_SVIDEO,
127 [CX88_BOARD_PIXELVIEW] = {
129 .tuner_type = TUNER_PHILIPS_PAL,
131 .tuner_addr = ADDR_UNSET,
132 .radio_addr = ADDR_UNSET,
134 .type = CX88_VMUX_TELEVISION,
136 .gpio0 = 0xff00, // internal decoder
138 .type = CX88_VMUX_COMPOSITE1,
141 .type = CX88_VMUX_SVIDEO,
149 [CX88_BOARD_ATI_WONDER_PRO] = {
150 .name = "ATI TV Wonder Pro",
151 .tuner_type = TUNER_PHILIPS_4IN1,
153 .tuner_addr = ADDR_UNSET,
154 .radio_addr = ADDR_UNSET,
155 .tda9887_conf = TDA9887_PRESENT | TDA9887_INTERCARRIER,
157 .type = CX88_VMUX_TELEVISION,
161 .type = CX88_VMUX_COMPOSITE1,
165 .type = CX88_VMUX_SVIDEO,
170 [CX88_BOARD_WINFAST2000XP_EXPERT] = {
171 .name = "Leadtek Winfast 2000XP Expert",
172 .tuner_type = TUNER_PHILIPS_4IN1,
174 .tuner_addr = ADDR_UNSET,
175 .radio_addr = ADDR_UNSET,
176 .tda9887_conf = TDA9887_PRESENT,
178 .type = CX88_VMUX_TELEVISION,
185 .type = CX88_VMUX_COMPOSITE1,
192 .type = CX88_VMUX_SVIDEO,
207 [CX88_BOARD_AVERTV_STUDIO_303] = {
208 .name = "AverTV Studio 303 (M126)",
209 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
211 .tuner_addr = ADDR_UNSET,
212 .radio_addr = ADDR_UNSET,
213 .tda9887_conf = TDA9887_PRESENT,
215 .type = CX88_VMUX_TELEVISION,
219 .type = CX88_VMUX_COMPOSITE1,
223 .type = CX88_VMUX_SVIDEO,
232 [CX88_BOARD_MSI_TVANYWHERE_MASTER] = {
233 // added gpio values thanks to Michal
234 // values for PAL from DScaler
235 .name = "MSI TV-@nywhere Master",
236 .tuner_type = TUNER_MT2032,
238 .tuner_addr = ADDR_UNSET,
239 .radio_addr = ADDR_UNSET,
240 .tda9887_conf = TDA9887_PRESENT | TDA9887_INTERCARRIER_NTSC,
242 .type = CX88_VMUX_TELEVISION,
248 .type = CX88_VMUX_COMPOSITE1,
254 .type = CX88_VMUX_SVIDEO,
268 [CX88_BOARD_WINFAST_DV2000] = {
269 .name = "Leadtek Winfast DV2000",
270 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
272 .tuner_addr = ADDR_UNSET,
273 .radio_addr = ADDR_UNSET,
274 .tda9887_conf = TDA9887_PRESENT,
276 .type = CX88_VMUX_TELEVISION,
284 .type = CX88_VMUX_COMPOSITE1,
291 .type = CX88_VMUX_SVIDEO,
306 [CX88_BOARD_LEADTEK_PVR2000] = {
307 // gpio values for PAL version from regspy by DScaler
308 .name = "Leadtek PVR 2000",
309 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
311 .tuner_addr = ADDR_UNSET,
312 .radio_addr = ADDR_UNSET,
313 .tda9887_conf = TDA9887_PRESENT,
315 .type = CX88_VMUX_TELEVISION,
320 .type = CX88_VMUX_COMPOSITE1,
325 .type = CX88_VMUX_SVIDEO,
335 .mpeg = CX88_MPEG_BLACKBIRD,
337 [CX88_BOARD_IODATA_GVVCP3PCI] = {
338 .name = "IODATA GV-VCP3/PCI",
339 .tuner_type = TUNER_ABSENT,
341 .tuner_addr = ADDR_UNSET,
342 .radio_addr = ADDR_UNSET,
344 .type = CX88_VMUX_COMPOSITE1,
347 .type = CX88_VMUX_COMPOSITE2,
350 .type = CX88_VMUX_SVIDEO,
354 [CX88_BOARD_PROLINK_PLAYTVPVR] = {
355 .name = "Prolink PlayTV PVR",
356 .tuner_type = TUNER_PHILIPS_FM1236_MK3,
358 .tuner_addr = ADDR_UNSET,
359 .radio_addr = ADDR_UNSET,
360 .tda9887_conf = TDA9887_PRESENT,
362 .type = CX88_VMUX_TELEVISION,
366 .type = CX88_VMUX_COMPOSITE1,
370 .type = CX88_VMUX_SVIDEO,
379 [CX88_BOARD_ASUS_PVR_416] = {
380 .name = "ASUS PVR-416",
381 .tuner_type = TUNER_PHILIPS_FM1236_MK3,
383 .tuner_addr = ADDR_UNSET,
384 .radio_addr = ADDR_UNSET,
385 .tda9887_conf = TDA9887_PRESENT,
387 .type = CX88_VMUX_TELEVISION,
391 .type = CX88_VMUX_SVIDEO,
393 .gpio0 = 0x0000fde6, // 0x0000fda6 L,R RCA audio in?
400 .mpeg = CX88_MPEG_BLACKBIRD,
402 [CX88_BOARD_MSI_TVANYWHERE] = {
403 .name = "MSI TV-@nywhere",
404 .tuner_type = TUNER_MT2032,
406 .tuner_addr = ADDR_UNSET,
407 .radio_addr = ADDR_UNSET,
408 .tda9887_conf = TDA9887_PRESENT,
410 .type = CX88_VMUX_TELEVISION,
415 .type = CX88_VMUX_COMPOSITE1,
420 .type = CX88_VMUX_SVIDEO,
426 [CX88_BOARD_KWORLD_DVB_T] = {
427 .name = "KWorld/VStream XPert DVB-T",
428 .tuner_type = TUNER_ABSENT,
430 .tuner_addr = ADDR_UNSET,
431 .radio_addr = ADDR_UNSET,
433 .type = CX88_VMUX_COMPOSITE1,
438 .type = CX88_VMUX_SVIDEO,
443 .mpeg = CX88_MPEG_DVB,
445 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1] = {
446 .name = "DViCO FusionHDTV DVB-T1",
447 .tuner_type = TUNER_ABSENT, /* No analog tuner */
449 .tuner_addr = ADDR_UNSET,
450 .radio_addr = ADDR_UNSET,
452 .type = CX88_VMUX_COMPOSITE1,
456 .type = CX88_VMUX_SVIDEO,
460 .mpeg = CX88_MPEG_DVB,
462 [CX88_BOARD_KWORLD_LTV883] = {
463 .name = "KWorld LTV883RF",
464 .tuner_type = TUNER_TNF_8831BGFF,
466 .tuner_addr = ADDR_UNSET,
467 .radio_addr = ADDR_UNSET,
469 .type = CX88_VMUX_TELEVISION,
473 .type = CX88_VMUX_DEBUG,
475 .gpio0 = 0x07f9, // mono from tuner chip
477 .type = CX88_VMUX_COMPOSITE1,
481 .type = CX88_VMUX_SVIDEO,
490 [CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q] = {
491 .name = "DViCO FusionHDTV 3 Gold-Q",
492 .tuner_type = TUNER_MICROTUNE_4042FI5,
494 .tuner_addr = ADDR_UNSET,
495 .radio_addr = ADDR_UNSET,
497 GPIO[0] resets DT3302 DTV receiver
500 GPIO[1] mutes analog audio output connector
501 0 - enable selected source
503 GPIO[2] selects source for analog audio output connector
504 0 - analog audio input connector on tab
505 1 - analog DAC output from CX23881 chip
506 GPIO[3] selects RF input connector on tuner module
507 0 - RF connector labeled CABLE
508 1 - RF connector labeled ANT
509 GPIO[4] selects high RF for QAM256 mode
514 .type = CX88_VMUX_TELEVISION,
518 .type = CX88_VMUX_CABLE,
522 .type = CX88_VMUX_COMPOSITE1,
526 .type = CX88_VMUX_SVIDEO,
530 .mpeg = CX88_MPEG_DVB,
532 [CX88_BOARD_HAUPPAUGE_DVB_T1] = {
533 .name = "Hauppauge Nova-T DVB-T",
534 .tuner_type = TUNER_ABSENT,
536 .tuner_addr = ADDR_UNSET,
537 .radio_addr = ADDR_UNSET,
539 .type = CX88_VMUX_DVB,
542 .mpeg = CX88_MPEG_DVB,
544 [CX88_BOARD_CONEXANT_DVB_T1] = {
545 .name = "Conexant DVB-T reference design",
546 .tuner_type = TUNER_ABSENT,
548 .tuner_addr = ADDR_UNSET,
549 .radio_addr = ADDR_UNSET,
551 .type = CX88_VMUX_DVB,
554 .mpeg = CX88_MPEG_DVB,
556 [CX88_BOARD_PROVIDEO_PV259] = {
557 .name = "Provideo PV259",
558 .tuner_type = TUNER_PHILIPS_FQ1216ME,
560 .tuner_addr = ADDR_UNSET,
561 .radio_addr = ADDR_UNSET,
563 .type = CX88_VMUX_TELEVISION,
567 .mpeg = CX88_MPEG_BLACKBIRD,
569 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS] = {
570 .name = "DViCO FusionHDTV DVB-T Plus",
571 .tuner_type = TUNER_ABSENT, /* No analog tuner */
573 .tuner_addr = ADDR_UNSET,
574 .radio_addr = ADDR_UNSET,
576 .type = CX88_VMUX_COMPOSITE1,
580 .type = CX88_VMUX_SVIDEO,
584 .mpeg = CX88_MPEG_DVB,
586 [CX88_BOARD_DNTV_LIVE_DVB_T] = {
587 .name = "digitalnow DNTV Live! DVB-T",
588 .tuner_type = TUNER_ABSENT,
590 .tuner_addr = ADDR_UNSET,
591 .radio_addr = ADDR_UNSET,
593 .type = CX88_VMUX_COMPOSITE1,
598 .type = CX88_VMUX_SVIDEO,
603 .mpeg = CX88_MPEG_DVB,
605 [CX88_BOARD_PCHDTV_HD3000] = {
606 .name = "pcHDTV HD3000 HDTV",
607 .tuner_type = TUNER_THOMSON_DTT761X,
609 .tuner_addr = ADDR_UNSET,
610 .radio_addr = ADDR_UNSET,
611 .tda9887_conf = TDA9887_PRESENT,
612 /* GPIO[2] = audio source for analog audio out connector
613 * 0 = analog audio input connector
614 * 1 = CX88 audio DACs
616 * GPIO[7] = input to CX88's audio/chroma ADC
618 * 1 = Sound 4.5 MHz IF
620 * GPIO[1,5,6] = Oren 51132 pins 27,35,28 respectively
622 * GPIO[16] = Remote control input
625 .type = CX88_VMUX_TELEVISION,
629 .type = CX88_VMUX_COMPOSITE1,
633 .type = CX88_VMUX_SVIDEO,
641 .mpeg = CX88_MPEG_DVB,
643 [CX88_BOARD_HAUPPAUGE_ROSLYN] = {
644 // entry added by Kaustubh D. Bhalerao <bhalerao.1@osu.edu>
645 // GPIO values obtained from regspy, courtesy Sean Covel
646 .name = "Hauppauge WinTV 28xxx (Roslyn) models",
649 .tuner_addr = ADDR_UNSET,
650 .radio_addr = ADDR_UNSET,
652 .type = CX88_VMUX_TELEVISION,
657 .type = CX88_VMUX_DEBUG,
661 .type = CX88_VMUX_COMPOSITE1,
665 .type = CX88_VMUX_SVIDEO,
675 .mpeg = CX88_MPEG_BLACKBIRD,
677 [CX88_BOARD_DIGITALLOGIC_MEC] = {
678 .name = "Digital-Logic MICROSPACE Entertainment Center (MEC)",
679 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
681 .tuner_addr = ADDR_UNSET,
682 .radio_addr = ADDR_UNSET,
683 .tda9887_conf = TDA9887_PRESENT,
685 .type = CX88_VMUX_TELEVISION,
690 .type = CX88_VMUX_COMPOSITE1,
695 .type = CX88_VMUX_SVIDEO,
705 .mpeg = CX88_MPEG_BLACKBIRD,
707 [CX88_BOARD_IODATA_GVBCTV7E] = {
708 .name = "IODATA GV/BCTV7E",
709 .tuner_type = TUNER_PHILIPS_FQ1286,
711 .tuner_addr = ADDR_UNSET,
712 .radio_addr = ADDR_UNSET,
713 .tda9887_conf = TDA9887_PRESENT,
715 .type = CX88_VMUX_TELEVISION,
719 .type = CX88_VMUX_COMPOSITE1,
723 .type = CX88_VMUX_SVIDEO,
728 [CX88_BOARD_PIXELVIEW_PLAYTV_ULTRA_PRO] = {
729 .name = "PixelView PlayTV Ultra Pro (Stereo)",
730 /* May be also TUNER_YMEC_TVF_5533MF for NTSC/M or PAL/M */
731 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
733 .tuner_addr = ADDR_UNSET,
734 .radio_addr = ADDR_UNSET,
736 .type = CX88_VMUX_TELEVISION,
738 .gpio0 = 0xbf61, /* internal decoder */
740 .type = CX88_VMUX_COMPOSITE1,
744 .type = CX88_VMUX_SVIDEO,
753 [CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T] = {
754 .name = "DViCO FusionHDTV 3 Gold-T",
755 .tuner_type = TUNER_THOMSON_DTT761X,
757 .tuner_addr = ADDR_UNSET,
758 .radio_addr = ADDR_UNSET,
759 .tda9887_conf = TDA9887_PRESENT,
761 .type = CX88_VMUX_TELEVISION,
765 .type = CX88_VMUX_COMPOSITE1,
769 .type = CX88_VMUX_SVIDEO,
773 .mpeg = CX88_MPEG_DVB,
775 [CX88_BOARD_ADSTECH_DVB_T_PCI] = {
776 .name = "ADS Tech Instant TV DVB-T PCI",
777 .tuner_type = TUNER_ABSENT,
779 .tuner_addr = ADDR_UNSET,
780 .radio_addr = ADDR_UNSET,
782 .type = CX88_VMUX_COMPOSITE1,
787 .type = CX88_VMUX_SVIDEO,
792 .mpeg = CX88_MPEG_DVB,
794 [CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1] = {
795 .name = "TerraTec Cinergy 1400 DVB-T",
796 .tuner_type = TUNER_ABSENT,
798 .type = CX88_VMUX_DVB,
801 .type = CX88_VMUX_COMPOSITE1,
804 .type = CX88_VMUX_SVIDEO,
807 .mpeg = CX88_MPEG_DVB,
809 [CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD] = {
810 .name = "DViCO FusionHDTV 5 Gold",
811 .tuner_type = TUNER_LG_TDVS_H06XF, /* TDVS-H062F */
813 .tuner_addr = ADDR_UNSET,
814 .radio_addr = ADDR_UNSET,
815 .tda9887_conf = TDA9887_PRESENT,
817 .type = CX88_VMUX_TELEVISION,
821 .type = CX88_VMUX_COMPOSITE1,
825 .type = CX88_VMUX_SVIDEO,
829 .mpeg = CX88_MPEG_DVB,
831 [CX88_BOARD_AVERMEDIA_ULTRATV_MC_550] = {
832 .name = "AverMedia UltraTV Media Center PCI 550",
833 .tuner_type = TUNER_PHILIPS_FM1236_MK3,
835 .tuner_addr = ADDR_UNSET,
836 .radio_addr = ADDR_UNSET,
837 .tda9887_conf = TDA9887_PRESENT,
839 .type = CX88_VMUX_COMPOSITE1,
844 .type = CX88_VMUX_SVIDEO,
849 .type = CX88_VMUX_TELEVISION,
860 .mpeg = CX88_MPEG_BLACKBIRD,
862 [CX88_BOARD_KWORLD_VSTREAM_EXPERT_DVD] = {
863 /* Alexander Wold <awold@bigfoot.com> */
864 .name = "Kworld V-Stream Xpert DVD",
867 .type = CX88_VMUX_COMPOSITE1,
874 .type = CX88_VMUX_SVIDEO,
882 [CX88_BOARD_ATI_HDTVWONDER] = {
883 .name = "ATI HDTV Wonder",
884 .tuner_type = TUNER_PHILIPS_TUV1236D,
886 .tuner_addr = ADDR_UNSET,
887 .radio_addr = ADDR_UNSET,
889 .type = CX88_VMUX_TELEVISION,
896 .type = CX88_VMUX_COMPOSITE1,
903 .type = CX88_VMUX_SVIDEO,
910 .mpeg = CX88_MPEG_DVB,
912 [CX88_BOARD_WINFAST_DTV1000] = {
913 .name = "WinFast DTV1000-T",
914 .tuner_type = TUNER_ABSENT,
916 .tuner_addr = ADDR_UNSET,
917 .radio_addr = ADDR_UNSET,
919 .type = CX88_VMUX_DVB,
922 .type = CX88_VMUX_COMPOSITE1,
925 .type = CX88_VMUX_SVIDEO,
928 .mpeg = CX88_MPEG_DVB,
930 [CX88_BOARD_AVERTV_303] = {
931 .name = "AVerTV 303 (M126)",
932 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
934 .tuner_addr = ADDR_UNSET,
935 .radio_addr = ADDR_UNSET,
936 .tda9887_conf = TDA9887_PRESENT,
938 .type = CX88_VMUX_TELEVISION,
945 .type = CX88_VMUX_COMPOSITE1,
952 .type = CX88_VMUX_SVIDEO,
960 [CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1] = {
961 .name = "Hauppauge Nova-S-Plus DVB-S",
962 .tuner_type = TUNER_ABSENT,
964 .tuner_addr = ADDR_UNSET,
965 .radio_addr = ADDR_UNSET,
967 .type = CX88_VMUX_DVB,
970 .type = CX88_VMUX_COMPOSITE1,
973 .type = CX88_VMUX_SVIDEO,
976 .mpeg = CX88_MPEG_DVB,
978 [CX88_BOARD_HAUPPAUGE_NOVASE2_S1] = {
979 .name = "Hauppauge Nova-SE2 DVB-S",
980 .tuner_type = TUNER_ABSENT,
982 .tuner_addr = ADDR_UNSET,
983 .radio_addr = ADDR_UNSET,
985 .type = CX88_VMUX_DVB,
988 .mpeg = CX88_MPEG_DVB,
990 [CX88_BOARD_KWORLD_DVBS_100] = {
991 .name = "KWorld DVB-S 100",
992 .tuner_type = TUNER_ABSENT,
994 .tuner_addr = ADDR_UNSET,
995 .radio_addr = ADDR_UNSET,
997 .type = CX88_VMUX_DVB,
1000 .type = CX88_VMUX_COMPOSITE1,
1003 .type = CX88_VMUX_SVIDEO,
1006 .mpeg = CX88_MPEG_DVB,
1008 [CX88_BOARD_HAUPPAUGE_HVR1100] = {
1009 .name = "Hauppauge WinTV-HVR1100 DVB-T/Hybrid",
1010 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1011 .radio_type = UNSET,
1012 .tuner_addr = ADDR_UNSET,
1013 .radio_addr = ADDR_UNSET,
1014 .tda9887_conf = TDA9887_PRESENT,
1016 .type = CX88_VMUX_TELEVISION,
1019 .type = CX88_VMUX_COMPOSITE1,
1022 .type = CX88_VMUX_SVIDEO,
1025 /* fixme: Add radio support */
1026 .mpeg = CX88_MPEG_DVB,
1028 [CX88_BOARD_HAUPPAUGE_HVR1100LP] = {
1029 .name = "Hauppauge WinTV-HVR1100 DVB-T/Hybrid (Low Profile)",
1030 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1031 .radio_type = UNSET,
1032 .tuner_addr = ADDR_UNSET,
1033 .radio_addr = ADDR_UNSET,
1034 .tda9887_conf = TDA9887_PRESENT,
1036 .type = CX88_VMUX_TELEVISION,
1039 .type = CX88_VMUX_COMPOSITE1,
1042 /* fixme: Add radio support */
1043 .mpeg = CX88_MPEG_DVB,
1045 [CX88_BOARD_DNTV_LIVE_DVB_T_PRO] = {
1046 .name = "digitalnow DNTV Live! DVB-T Pro",
1047 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1048 .radio_type = UNSET,
1049 .tuner_addr = ADDR_UNSET,
1050 .radio_addr = ADDR_UNSET,
1051 .tda9887_conf = TDA9887_PRESENT | TDA9887_PORT1_ACTIVE |
1052 TDA9887_PORT2_ACTIVE,
1054 .type = CX88_VMUX_TELEVISION,
1058 .type = CX88_VMUX_COMPOSITE1,
1062 .type = CX88_VMUX_SVIDEO,
1070 .mpeg = CX88_MPEG_DVB,
1072 [CX88_BOARD_KWORLD_DVB_T_CX22702] = {
1073 /* Kworld V-stream Xpert DVB-T with Thomson tuner */
1074 /* DTT 7579 Conexant CX22702-19 Conexant CX2388x */
1075 /* Manenti Marco <marco_manenti@colman.it> */
1076 .name = "KWorld/VStream XPert DVB-T with cx22702",
1077 .tuner_type = TUNER_ABSENT,
1078 .radio_type = UNSET,
1079 .tuner_addr = ADDR_UNSET,
1080 .radio_addr = ADDR_UNSET,
1082 .type = CX88_VMUX_COMPOSITE1,
1087 .type = CX88_VMUX_SVIDEO,
1092 .mpeg = CX88_MPEG_DVB,
1094 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL] = {
1095 .name = "DViCO FusionHDTV DVB-T Dual Digital",
1096 .tuner_type = TUNER_ABSENT, /* No analog tuner */
1097 .radio_type = UNSET,
1098 .tuner_addr = ADDR_UNSET,
1099 .radio_addr = ADDR_UNSET,
1101 .type = CX88_VMUX_COMPOSITE1,
1103 .gpio0 = 0x000067df,
1105 .type = CX88_VMUX_SVIDEO,
1107 .gpio0 = 0x000067df,
1109 .mpeg = CX88_MPEG_DVB,
1111 [CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT] = {
1112 .name = "KWorld HardwareMpegTV XPert",
1113 .tuner_type = TUNER_PHILIPS_TDA8290,
1114 .radio_type = UNSET,
1115 .tuner_addr = ADDR_UNSET,
1116 .radio_addr = ADDR_UNSET,
1118 .type = CX88_VMUX_TELEVISION,
1123 .type = CX88_VMUX_COMPOSITE1,
1128 .type = CX88_VMUX_SVIDEO,
1138 .mpeg = CX88_MPEG_BLACKBIRD,
1140 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID] = {
1141 .name = "DViCO FusionHDTV DVB-T Hybrid",
1142 .tuner_type = TUNER_THOMSON_FE6600,
1143 .radio_type = UNSET,
1144 .tuner_addr = ADDR_UNSET,
1145 .radio_addr = ADDR_UNSET,
1147 .type = CX88_VMUX_TELEVISION,
1149 .gpio0 = 0x0000a75f,
1151 .type = CX88_VMUX_COMPOSITE1,
1153 .gpio0 = 0x0000a75b,
1155 .type = CX88_VMUX_SVIDEO,
1157 .gpio0 = 0x0000a75b,
1159 .mpeg = CX88_MPEG_DVB,
1161 [CX88_BOARD_PCHDTV_HD5500] = {
1162 .name = "pcHDTV HD5500 HDTV",
1163 .tuner_type = TUNER_LG_TDVS_H06XF, /* TDVS-H064F */
1164 .radio_type = UNSET,
1165 .tuner_addr = ADDR_UNSET,
1166 .radio_addr = ADDR_UNSET,
1167 .tda9887_conf = TDA9887_PRESENT,
1169 .type = CX88_VMUX_TELEVISION,
1173 .type = CX88_VMUX_COMPOSITE1,
1177 .type = CX88_VMUX_SVIDEO,
1181 .mpeg = CX88_MPEG_DVB,
1183 [CX88_BOARD_KWORLD_MCE200_DELUXE] = {
1184 /* FIXME: tested TV input only, disabled composite,
1185 svideo and radio until they can be tested also. */
1186 .name = "Kworld MCE 200 Deluxe",
1187 .tuner_type = TUNER_TENA_9533_DI,
1188 .radio_type = UNSET,
1189 .tda9887_conf = TDA9887_PRESENT,
1190 .tuner_addr = ADDR_UNSET,
1191 .radio_addr = ADDR_UNSET,
1193 .type = CX88_VMUX_TELEVISION,
1197 .mpeg = CX88_MPEG_BLACKBIRD,
1199 [CX88_BOARD_PIXELVIEW_PLAYTV_P7000] = {
1200 /* FIXME: SVideo, Composite and FM inputs are untested */
1201 .name = "PixelView PlayTV P7000",
1202 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
1203 .radio_type = UNSET,
1204 .tuner_addr = ADDR_UNSET,
1205 .radio_addr = ADDR_UNSET,
1206 .tda9887_conf = TDA9887_PRESENT | TDA9887_PORT1_ACTIVE |
1207 TDA9887_PORT2_ACTIVE,
1209 .type = CX88_VMUX_TELEVISION,
1213 .mpeg = CX88_MPEG_BLACKBIRD,
1215 [CX88_BOARD_NPGTECH_REALTV_TOP10FM] = {
1216 .name = "NPG Tech Real TV FM Top 10",
1217 .tuner_type = TUNER_TNF_5335MF, /* Actually a TNF9535 */
1218 .radio_type = UNSET,
1219 .tuner_addr = ADDR_UNSET,
1220 .radio_addr = ADDR_UNSET,
1222 .type = CX88_VMUX_TELEVISION,
1226 .type = CX88_VMUX_COMPOSITE1,
1230 .type = CX88_VMUX_SVIDEO,
1239 [CX88_BOARD_WINFAST_DTV2000H] = {
1240 .name = "WinFast DTV2000 H",
1241 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1242 .radio_type = UNSET,
1243 .tuner_addr = ADDR_UNSET,
1244 .radio_addr = ADDR_UNSET,
1245 .tda9887_conf = TDA9887_PRESENT,
1247 .type = CX88_VMUX_TELEVISION,
1249 .gpio0 = 0x00017304,
1250 .gpio1 = 0x00008203,
1251 .gpio2 = 0x00017304,
1252 .gpio3 = 0x02000000,
1254 .type = CX88_VMUX_COMPOSITE1,
1256 .gpio0 = 0x0001d701,
1257 .gpio1 = 0x0000b207,
1258 .gpio2 = 0x0001d701,
1259 .gpio3 = 0x02000000,
1261 .type = CX88_VMUX_COMPOSITE2,
1263 .gpio0 = 0x0001d503,
1264 .gpio1 = 0x0000b207,
1265 .gpio2 = 0x0001d503,
1266 .gpio3 = 0x02000000,
1268 .type = CX88_VMUX_SVIDEO,
1270 .gpio0 = 0x0001d701,
1271 .gpio1 = 0x0000b207,
1272 .gpio2 = 0x0001d701,
1273 .gpio3 = 0x02000000,
1277 .gpio0 = 0x00015702,
1278 .gpio1 = 0x0000f207,
1279 .gpio2 = 0x00015702,
1280 .gpio3 = 0x02000000,
1282 .mpeg = CX88_MPEG_DVB,
1284 [CX88_BOARD_GENIATECH_DVBS] = {
1285 .name = "Geniatech DVB-S",
1286 .tuner_type = TUNER_ABSENT,
1287 .radio_type = UNSET,
1288 .tuner_addr = ADDR_UNSET,
1289 .radio_addr = ADDR_UNSET,
1291 .type = CX88_VMUX_DVB,
1294 .type = CX88_VMUX_COMPOSITE1,
1297 .mpeg = CX88_MPEG_DVB,
1299 [CX88_BOARD_HAUPPAUGE_HVR3000] = {
1300 .name = "Hauppauge WinTV-HVR3000 TriMode Analog/DVB-S/DVB-T",
1301 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1302 .radio_type = UNSET,
1303 .tuner_addr = ADDR_UNSET,
1304 .radio_addr = ADDR_UNSET,
1305 .tda9887_conf = TDA9887_PRESENT,
1306 .audio_chip = V4L2_IDENT_WM8775,
1308 .type = CX88_VMUX_TELEVISION,
1311 /* 1: TV Audio / FM Mono */
1314 .type = CX88_VMUX_COMPOSITE1,
1320 .type = CX88_VMUX_SVIDEO,
1329 /* 4: FM Stereo (untested) */
1332 .mpeg = CX88_MPEG_DVB,
1335 [CX88_BOARD_NORWOOD_MICRO] = {
1336 .name = "Norwood Micro TV Tuner",
1337 .tuner_type = TUNER_TNF_5335MF,
1338 .radio_type = UNSET,
1339 .tuner_addr = ADDR_UNSET,
1340 .radio_addr = ADDR_UNSET,
1342 .type = CX88_VMUX_TELEVISION,
1346 .type = CX88_VMUX_COMPOSITE1,
1350 .type = CX88_VMUX_SVIDEO,
1355 [CX88_BOARD_TE_DTV_250_OEM_SWANN] = {
1356 .name = "Shenzhen Tungsten Ages Tech TE-DTV-250 / Swann OEM",
1357 .tuner_type = TUNER_LG_PAL_NEW_TAPC,
1358 .radio_type = UNSET,
1359 .tuner_addr = ADDR_UNSET,
1360 .radio_addr = ADDR_UNSET,
1362 .type = CX88_VMUX_TELEVISION,
1364 .gpio0 = 0x003fffff,
1365 .gpio1 = 0x00e00000,
1366 .gpio2 = 0x003fffff,
1367 .gpio3 = 0x02000000,
1369 .type = CX88_VMUX_COMPOSITE1,
1371 .gpio0 = 0x003fffff,
1372 .gpio1 = 0x00e00000,
1373 .gpio2 = 0x003fffff,
1374 .gpio3 = 0x02000000,
1376 .type = CX88_VMUX_SVIDEO,
1378 .gpio0 = 0x003fffff,
1379 .gpio1 = 0x00e00000,
1380 .gpio2 = 0x003fffff,
1381 .gpio3 = 0x02000000,
1384 [CX88_BOARD_HAUPPAUGE_HVR1300] = {
1385 .name = "Hauppauge WinTV-HVR1300 DVB-T/Hybrid MPEG Encoder",
1386 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1387 .radio_type = UNSET,
1388 .tuner_addr = ADDR_UNSET,
1389 .radio_addr = ADDR_UNSET,
1390 .tda9887_conf = TDA9887_PRESENT,
1391 .audio_chip = V4L2_IDENT_WM8775,
1393 * gpio0 as reported by Mike Crash <mike AT mikecrash.com>
1396 .type = CX88_VMUX_TELEVISION,
1399 /* 1: TV Audio / FM Mono */
1402 .type = CX88_VMUX_COMPOSITE1,
1408 .type = CX88_VMUX_SVIDEO,
1414 .mpeg = CX88_MPEG_DVB | CX88_MPEG_BLACKBIRD,
1418 /* 4: FM Stereo (untested) */
1422 [CX88_BOARD_ADSTECH_PTV_390] = {
1423 .name = "ADS Tech Instant Video PCI",
1424 .tuner_type = TUNER_ABSENT,
1425 .radio_type = UNSET,
1426 .tuner_addr = ADDR_UNSET,
1427 .radio_addr = ADDR_UNSET,
1429 .type = CX88_VMUX_DEBUG,
1433 .type = CX88_VMUX_COMPOSITE1,
1437 .type = CX88_VMUX_SVIDEO,
1442 [CX88_BOARD_PINNACLE_PCTV_HD_800i] = {
1443 .name = "Pinnacle PCTV HD 800i",
1444 .tuner_type = TUNER_XC5000,
1445 .radio_type = UNSET,
1446 .tuner_addr = ADDR_UNSET,
1447 .radio_addr = ADDR_UNSET,
1449 .type = CX88_VMUX_TELEVISION,
1454 .type = CX88_VMUX_COMPOSITE1,
1460 .type = CX88_VMUX_SVIDEO,
1466 .mpeg = CX88_MPEG_DVB,
1468 [CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO] = {
1469 .name = "DViCO FusionHDTV 5 PCI nano",
1470 /* xc3008 tuner, digital only for now */
1471 .tuner_type = TUNER_ABSENT,
1472 .radio_type = UNSET,
1473 .tuner_addr = ADDR_UNSET,
1474 .radio_addr = ADDR_UNSET,
1476 .type = CX88_VMUX_TELEVISION,
1478 .gpio0 = 0x000027df, /* Unconfirmed */
1480 .type = CX88_VMUX_COMPOSITE1,
1482 .gpio0 = 0x000027df, /* Unconfirmed */
1485 .type = CX88_VMUX_SVIDEO,
1487 .gpio0 = 0x000027df, /* Unconfirmed */
1490 .mpeg = CX88_MPEG_DVB,
1492 [CX88_BOARD_PINNACLE_HYBRID_PCTV] = {
1493 .name = "Pinnacle Hybrid PCTV",
1494 .tuner_type = TUNER_XC2028,
1496 .radio_type = TUNER_XC2028,
1499 .type = CX88_VMUX_TELEVISION,
1505 .type = CX88_VMUX_COMPOSITE1,
1511 .type = CX88_VMUX_SVIDEO,
1523 .mpeg = CX88_MPEG_DVB,
1525 [CX88_BOARD_WINFAST_TV2000_XP_GLOBAL] = {
1526 .name = "Winfast TV2000 XP Global",
1527 .tuner_type = TUNER_XC2028,
1530 .type = CX88_VMUX_TELEVISION,
1532 .gpio0 = 0x0400, /* pin 2:mute = 0 (off?) */
1534 .gpio2 = 0x0800, /* pin 19:audio = 0 (tv) */
1537 .type = CX88_VMUX_COMPOSITE1,
1539 .gpio0 = 0x0400, /* probably? or 0x0404 to turn mute on */
1541 .gpio2 = 0x0808, /* pin 19:audio = 1 (line) */
1544 .type = CX88_VMUX_SVIDEO,
1554 [CX88_BOARD_POWERCOLOR_REAL_ANGEL] = {
1555 .name = "PowerColor RA330", /* Long names may confuse LIRC. */
1556 .tuner_type = TUNER_XC2028,
1559 .type = CX88_VMUX_DEBUG,
1560 .vmux = 3, /* Due to the way the cx88 driver is written, */
1561 .gpio0 = 0x00ff, /* there is no way to deactivate audio pass- */
1562 .gpio1 = 0xf39d, /* through without this entry. Furthermore, if */
1563 .gpio3 = 0x0000, /* the TV mux entry is first, you get audio */
1564 }, { /* from the tuner on boot for a little while. */
1565 .type = CX88_VMUX_TELEVISION,
1571 .type = CX88_VMUX_COMPOSITE1,
1577 .type = CX88_VMUX_SVIDEO,
1590 [CX88_BOARD_GENIATECH_X8000_MT] = {
1591 /* Also PowerColor Real Angel 330 and Geniatech X800 OEM */
1592 .name = "Geniatech X8000-MT DVBT",
1593 .tuner_type = TUNER_XC2028,
1596 .type = CX88_VMUX_TELEVISION,
1598 .gpio0 = 0x00000000,
1599 .gpio1 = 0x00e3e341,
1600 .gpio2 = 0x00000000,
1601 .gpio3 = 0x00000000,
1603 .type = CX88_VMUX_COMPOSITE1,
1605 .gpio0 = 0x00000000,
1606 .gpio1 = 0x00e3e361,
1607 .gpio2 = 0x00000000,
1608 .gpio3 = 0x00000000,
1610 .type = CX88_VMUX_SVIDEO,
1612 .gpio0 = 0x00000000,
1613 .gpio1 = 0x00e3e361,
1614 .gpio2 = 0x00000000,
1615 .gpio3 = 0x00000000,
1619 .gpio0 = 0x00000000,
1620 .gpio1 = 0x00e3e341,
1621 .gpio2 = 0x00000000,
1622 .gpio3 = 0x00000000,
1624 .mpeg = CX88_MPEG_DVB,
1626 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO] = {
1627 .name = "DViCO FusionHDTV DVB-T PRO",
1628 .tuner_type = TUNER_XC2028,
1630 .radio_type = UNSET,
1631 .radio_addr = ADDR_UNSET,
1633 .type = CX88_VMUX_COMPOSITE1,
1635 .gpio0 = 0x000067df,
1637 .type = CX88_VMUX_SVIDEO,
1639 .gpio0 = 0x000067df,
1641 .mpeg = CX88_MPEG_DVB,
1643 [CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD] = {
1644 .name = "DViCO FusionHDTV 7 Gold",
1645 .tuner_type = TUNER_XC5000,
1646 .radio_type = UNSET,
1647 .tuner_addr = ADDR_UNSET,
1648 .radio_addr = ADDR_UNSET,
1650 .type = CX88_VMUX_TELEVISION,
1654 .type = CX88_VMUX_COMPOSITE1,
1658 .type = CX88_VMUX_SVIDEO,
1662 .mpeg = CX88_MPEG_DVB,
1664 [CX88_BOARD_PROLINK_PV_8000GT] = {
1665 .name = "Prolink Pixelview MPEG 8000GT",
1666 .tuner_type = TUNER_XC2028,
1669 .type = CX88_VMUX_TELEVISION,
1674 .type = CX88_VMUX_COMPOSITE1,
1678 .type = CX88_VMUX_SVIDEO,
1687 [CX88_BOARD_PROLINK_PV_GLOBAL_XTREME] = {
1688 .name = "Prolink Pixelview Global Extreme",
1689 .tuner_type = TUNER_XC2028,
1692 .type = CX88_VMUX_TELEVISION,
1698 .type = CX88_VMUX_COMPOSITE1,
1704 .type = CX88_VMUX_SVIDEO,
1717 /* Both radio, analog and ATSC work with this board.
1718 However, for analog to work, s5h1409 gate should be open,
1719 otherwise, tuner-xc3028 won't be detected.
1720 A proper fix require using the newer i2c methods to add
1721 tuner-xc3028 without doing an i2c probe.
1723 [CX88_BOARD_KWORLD_ATSC_120] = {
1724 .name = "Kworld PlusTV HD PCI 120 (ATSC 120)",
1725 .tuner_type = TUNER_XC2028,
1726 .radio_type = UNSET,
1727 .tuner_addr = ADDR_UNSET,
1728 .radio_addr = ADDR_UNSET,
1730 .type = CX88_VMUX_TELEVISION,
1732 .gpio0 = 0x000000ff,
1733 .gpio1 = 0x0000f35d,
1734 .gpio2 = 0x00000000,
1736 .type = CX88_VMUX_COMPOSITE1,
1738 .gpio0 = 0x000000ff,
1739 .gpio1 = 0x0000f37e,
1740 .gpio2 = 0x00000000,
1742 .type = CX88_VMUX_SVIDEO,
1744 .gpio0 = 0x000000ff,
1745 .gpio1 = 0x0000f37e,
1746 .gpio2 = 0x00000000,
1750 .gpio0 = 0x000000ff,
1751 .gpio1 = 0x0000f35d,
1752 .gpio2 = 0x00000000,
1754 .mpeg = CX88_MPEG_DVB,
1756 [CX88_BOARD_HAUPPAUGE_HVR4000] = {
1757 .name = "Hauppauge WinTV-HVR4000 DVB-S/S2/T/Hybrid",
1758 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1759 .radio_type = UNSET,
1760 .tuner_addr = ADDR_UNSET,
1761 .radio_addr = ADDR_UNSET,
1762 .tda9887_conf = TDA9887_PRESENT,
1763 .audio_chip = V4L2_IDENT_WM8775,
1767 * Analogue SAT DVB-T
1768 * Antenna 0xc4bf 0xc4bb
1769 * Composite 0xc4bf 0xc4bb
1770 * S-Video 0xc4bf 0xc4bb
1771 * Composite1 0xc4ff 0xc4fb
1772 * S-Video1 0xc4ff 0xc4fb
1774 * BIT VALUE FUNCTION GP{x}_IO
1777 * 2 1 O:MPEG PORT 0=DVB-T 1=DVB-S
1781 * 6 0 O:INPUT SELECTOR 0=INTERNAL 1=EXPANSION
1782 * 7 1 O:DVB-T DEMOD RESET LOW
1784 * BIT VALUE FUNCTION GP{x}_OE
1796 * 1: TV Audio / FM Mono
1798 * 3: Line-In Expansion
1802 .type = CX88_VMUX_TELEVISION,
1805 /* 1: TV Audio / FM Mono */
1808 .type = CX88_VMUX_COMPOSITE1,
1814 .type = CX88_VMUX_SVIDEO,
1826 .mpeg = CX88_MPEG_DVB,
1829 [CX88_BOARD_HAUPPAUGE_HVR4000LITE] = {
1830 .name = "Hauppauge WinTV-HVR4000(Lite) DVB-S/S2",
1831 .tuner_type = UNSET,
1832 .radio_type = UNSET,
1833 .tuner_addr = ADDR_UNSET,
1834 .radio_addr = ADDR_UNSET,
1836 .type = CX88_VMUX_DVB,
1839 .mpeg = CX88_MPEG_DVB,
1841 [CX88_BOARD_TEVII_S420] = {
1842 .name = "TeVii S420 DVB-S",
1843 .tuner_type = UNSET,
1844 .radio_type = UNSET,
1845 .tuner_addr = ADDR_UNSET,
1846 .radio_addr = ADDR_UNSET,
1848 .type = CX88_VMUX_DVB,
1851 .mpeg = CX88_MPEG_DVB,
1853 [CX88_BOARD_TEVII_S460] = {
1854 .name = "TeVii S460 DVB-S/S2",
1855 .tuner_type = UNSET,
1856 .radio_type = UNSET,
1857 .tuner_addr = ADDR_UNSET,
1858 .radio_addr = ADDR_UNSET,
1860 .type = CX88_VMUX_DVB,
1863 .mpeg = CX88_MPEG_DVB,
1865 [CX88_BOARD_OMICOM_SS4_PCI] = {
1866 .name = "Omicom SS4 DVB-S/S2 PCI",
1867 .tuner_type = UNSET,
1868 .radio_type = UNSET,
1869 .tuner_addr = ADDR_UNSET,
1870 .radio_addr = ADDR_UNSET,
1872 .type = CX88_VMUX_DVB,
1875 .mpeg = CX88_MPEG_DVB,
1877 [CX88_BOARD_TBS_8910] = {
1878 .name = "TBS 8910 DVB-S",
1879 .tuner_type = UNSET,
1880 .radio_type = UNSET,
1881 .tuner_addr = ADDR_UNSET,
1882 .radio_addr = ADDR_UNSET,
1884 .type = CX88_VMUX_DVB,
1887 .mpeg = CX88_MPEG_DVB,
1889 [CX88_BOARD_TBS_8920] = {
1890 .name = "TBS 8920 DVB-S/S2",
1891 .tuner_type = TUNER_ABSENT,
1892 .radio_type = UNSET,
1893 .tuner_addr = ADDR_UNSET,
1894 .radio_addr = ADDR_UNSET,
1896 .type = CX88_VMUX_DVB,
1899 .mpeg = CX88_MPEG_DVB,
1901 [CX88_BOARD_PROF_6200] = {
1902 .name = "Prof 6200 DVB-S",
1903 .tuner_type = UNSET,
1904 .radio_type = UNSET,
1905 .tuner_addr = ADDR_UNSET,
1906 .radio_addr = ADDR_UNSET,
1908 .type = CX88_VMUX_DVB,
1911 .mpeg = CX88_MPEG_DVB,
1913 [CX88_BOARD_PROF_7300] = {
1914 .name = "PROF 7300 DVB-S/S2",
1915 .tuner_type = UNSET,
1916 .radio_type = UNSET,
1917 .tuner_addr = ADDR_UNSET,
1918 .radio_addr = ADDR_UNSET,
1920 .type = CX88_VMUX_DVB,
1923 .mpeg = CX88_MPEG_DVB,
1925 [CX88_BOARD_SATTRADE_ST4200] = {
1926 .name = "SATTRADE ST4200 DVB-S/S2",
1927 .tuner_type = UNSET,
1928 .radio_type = UNSET,
1929 .tuner_addr = ADDR_UNSET,
1930 .radio_addr = ADDR_UNSET,
1932 .type = CX88_VMUX_DVB,
1935 .mpeg = CX88_MPEG_DVB,
1937 [CX88_BOARD_TERRATEC_CINERGY_HT_PCI_MKII] = {
1938 .name = "Terratec Cinergy HT PCI MKII",
1939 .tuner_type = TUNER_XC2028,
1941 .radio_type = TUNER_XC2028,
1944 .type = CX88_VMUX_TELEVISION,
1950 .type = CX88_VMUX_COMPOSITE1,
1956 .type = CX88_VMUX_SVIDEO,
1968 .mpeg = CX88_MPEG_DVB,
1972 /* ------------------------------------------------------------------ */
1973 /* PCI subsystem IDs */
1975 static const struct cx88_subid cx88_subids[] = {
1977 .subvendor = 0x0070,
1978 .subdevice = 0x3400,
1979 .card = CX88_BOARD_HAUPPAUGE,
1981 .subvendor = 0x0070,
1982 .subdevice = 0x3401,
1983 .card = CX88_BOARD_HAUPPAUGE,
1985 .subvendor = 0x14c7,
1986 .subdevice = 0x0106,
1987 .card = CX88_BOARD_GDI,
1989 .subvendor = 0x14c7,
1990 .subdevice = 0x0107, /* with mpeg encoder */
1991 .card = CX88_BOARD_GDI,
1993 .subvendor = PCI_VENDOR_ID_ATI,
1994 .subdevice = 0x00f8,
1995 .card = CX88_BOARD_ATI_WONDER_PRO,
1997 .subvendor = PCI_VENDOR_ID_ATI,
1998 .subdevice = 0x00f9,
1999 .card = CX88_BOARD_ATI_WONDER_PRO,
2001 .subvendor = 0x107d,
2002 .subdevice = 0x6611,
2003 .card = CX88_BOARD_WINFAST2000XP_EXPERT,
2005 .subvendor = 0x107d,
2006 .subdevice = 0x6613, /* NTSC */
2007 .card = CX88_BOARD_WINFAST2000XP_EXPERT,
2009 .subvendor = 0x107d,
2010 .subdevice = 0x6620,
2011 .card = CX88_BOARD_WINFAST_DV2000,
2013 .subvendor = 0x107d,
2014 .subdevice = 0x663b,
2015 .card = CX88_BOARD_LEADTEK_PVR2000,
2017 .subvendor = 0x107d,
2018 .subdevice = 0x663c,
2019 .card = CX88_BOARD_LEADTEK_PVR2000,
2021 .subvendor = 0x1461,
2022 .subdevice = 0x000b,
2023 .card = CX88_BOARD_AVERTV_STUDIO_303,
2025 .subvendor = 0x1462,
2026 .subdevice = 0x8606,
2027 .card = CX88_BOARD_MSI_TVANYWHERE_MASTER,
2029 .subvendor = 0x10fc,
2030 .subdevice = 0xd003,
2031 .card = CX88_BOARD_IODATA_GVVCP3PCI,
2033 .subvendor = 0x1043,
2034 .subdevice = 0x4823, /* with mpeg encoder */
2035 .card = CX88_BOARD_ASUS_PVR_416,
2037 .subvendor = 0x17de,
2038 .subdevice = 0x08a6,
2039 .card = CX88_BOARD_KWORLD_DVB_T,
2041 .subvendor = 0x18ac,
2042 .subdevice = 0xd810,
2043 .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q,
2045 .subvendor = 0x18ac,
2046 .subdevice = 0xd820,
2047 .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T,
2049 .subvendor = 0x18ac,
2050 .subdevice = 0xdb00,
2051 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1,
2053 .subvendor = 0x0070,
2054 .subdevice = 0x9002,
2055 .card = CX88_BOARD_HAUPPAUGE_DVB_T1,
2057 .subvendor = 0x14f1,
2058 .subdevice = 0x0187,
2059 .card = CX88_BOARD_CONEXANT_DVB_T1,
2061 .subvendor = 0x1540,
2062 .subdevice = 0x2580,
2063 .card = CX88_BOARD_PROVIDEO_PV259,
2065 .subvendor = 0x18ac,
2066 .subdevice = 0xdb10,
2067 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS,
2069 .subvendor = 0x1554,
2070 .subdevice = 0x4811,
2071 .card = CX88_BOARD_PIXELVIEW,
2073 .subvendor = 0x7063,
2074 .subdevice = 0x3000, /* HD-3000 card */
2075 .card = CX88_BOARD_PCHDTV_HD3000,
2077 .subvendor = 0x17de,
2078 .subdevice = 0xa8a6,
2079 .card = CX88_BOARD_DNTV_LIVE_DVB_T,
2081 .subvendor = 0x0070,
2082 .subdevice = 0x2801,
2083 .card = CX88_BOARD_HAUPPAUGE_ROSLYN,
2085 .subvendor = 0x14f1,
2086 .subdevice = 0x0342,
2087 .card = CX88_BOARD_DIGITALLOGIC_MEC,
2089 .subvendor = 0x10fc,
2090 .subdevice = 0xd035,
2091 .card = CX88_BOARD_IODATA_GVBCTV7E,
2093 .subvendor = 0x1421,
2094 .subdevice = 0x0334,
2095 .card = CX88_BOARD_ADSTECH_DVB_T_PCI,
2097 .subvendor = 0x153b,
2098 .subdevice = 0x1166,
2099 .card = CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1,
2101 .subvendor = 0x18ac,
2102 .subdevice = 0xd500,
2103 .card = CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD,
2105 .subvendor = 0x1461,
2106 .subdevice = 0x8011,
2107 .card = CX88_BOARD_AVERMEDIA_ULTRATV_MC_550,
2109 .subvendor = PCI_VENDOR_ID_ATI,
2110 .subdevice = 0xa101,
2111 .card = CX88_BOARD_ATI_HDTVWONDER,
2113 .subvendor = 0x107d,
2114 .subdevice = 0x665f,
2115 .card = CX88_BOARD_WINFAST_DTV1000,
2117 .subvendor = 0x1461,
2118 .subdevice = 0x000a,
2119 .card = CX88_BOARD_AVERTV_303,
2121 .subvendor = 0x0070,
2122 .subdevice = 0x9200,
2123 .card = CX88_BOARD_HAUPPAUGE_NOVASE2_S1,
2125 .subvendor = 0x0070,
2126 .subdevice = 0x9201,
2127 .card = CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1,
2129 .subvendor = 0x0070,
2130 .subdevice = 0x9202,
2131 .card = CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1,
2133 .subvendor = 0x17de,
2134 .subdevice = 0x08b2,
2135 .card = CX88_BOARD_KWORLD_DVBS_100,
2137 .subvendor = 0x0070,
2138 .subdevice = 0x9400,
2139 .card = CX88_BOARD_HAUPPAUGE_HVR1100,
2141 .subvendor = 0x0070,
2142 .subdevice = 0x9402,
2143 .card = CX88_BOARD_HAUPPAUGE_HVR1100,
2145 .subvendor = 0x0070,
2146 .subdevice = 0x9800,
2147 .card = CX88_BOARD_HAUPPAUGE_HVR1100LP,
2149 .subvendor = 0x0070,
2150 .subdevice = 0x9802,
2151 .card = CX88_BOARD_HAUPPAUGE_HVR1100LP,
2153 .subvendor = 0x0070,
2154 .subdevice = 0x9001,
2155 .card = CX88_BOARD_HAUPPAUGE_DVB_T1,
2157 .subvendor = 0x1822,
2158 .subdevice = 0x0025,
2159 .card = CX88_BOARD_DNTV_LIVE_DVB_T_PRO,
2161 .subvendor = 0x17de,
2162 .subdevice = 0x08a1,
2163 .card = CX88_BOARD_KWORLD_DVB_T_CX22702,
2165 .subvendor = 0x18ac,
2166 .subdevice = 0xdb50,
2167 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL,
2169 .subvendor = 0x18ac,
2170 .subdevice = 0xdb54,
2171 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL,
2172 /* Re-branded DViCO: DigitalNow DVB-T Dual */
2174 .subvendor = 0x18ac,
2175 .subdevice = 0xdb11,
2176 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS,
2177 /* Re-branded DViCO: UltraView DVB-T Plus */
2179 .subvendor = 0x18ac,
2180 .subdevice = 0xdb30,
2181 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO,
2183 .subvendor = 0x17de,
2184 .subdevice = 0x0840,
2185 .card = CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT,
2187 .subvendor = 0x1421,
2188 .subdevice = 0x0305,
2189 .card = CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT,
2191 .subvendor = 0x18ac,
2192 .subdevice = 0xdb40,
2193 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID,
2195 .subvendor = 0x18ac,
2196 .subdevice = 0xdb44,
2197 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID,
2199 .subvendor = 0x7063,
2200 .subdevice = 0x5500,
2201 .card = CX88_BOARD_PCHDTV_HD5500,
2203 .subvendor = 0x17de,
2204 .subdevice = 0x0841,
2205 .card = CX88_BOARD_KWORLD_MCE200_DELUXE,
2207 .subvendor = 0x1822,
2208 .subdevice = 0x0019,
2209 .card = CX88_BOARD_DNTV_LIVE_DVB_T_PRO,
2211 .subvendor = 0x1554,
2212 .subdevice = 0x4813,
2213 .card = CX88_BOARD_PIXELVIEW_PLAYTV_P7000,
2215 .subvendor = 0x14f1,
2216 .subdevice = 0x0842,
2217 .card = CX88_BOARD_NPGTECH_REALTV_TOP10FM,
2219 .subvendor = 0x107d,
2220 .subdevice = 0x665e,
2221 .card = CX88_BOARD_WINFAST_DTV2000H,
2223 .subvendor = 0x18ac,
2224 .subdevice = 0xd800, /* FusionHDTV 3 Gold (original revision) */
2225 .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q,
2227 .subvendor = 0x14f1,
2228 .subdevice = 0x0084,
2229 .card = CX88_BOARD_GENIATECH_DVBS,
2231 .subvendor = 0x0070,
2232 .subdevice = 0x1404,
2233 .card = CX88_BOARD_HAUPPAUGE_HVR3000,
2235 .subvendor = 0x1461,
2236 .subdevice = 0xc111, /* AverMedia M150-D */
2237 /* This board is known to work with the ASUS PVR416 config */
2238 .card = CX88_BOARD_ASUS_PVR_416,
2240 .subvendor = 0xc180,
2241 .subdevice = 0xc980,
2242 .card = CX88_BOARD_TE_DTV_250_OEM_SWANN,
2244 .subvendor = 0x0070,
2245 .subdevice = 0x9600,
2246 .card = CX88_BOARD_HAUPPAUGE_HVR1300,
2248 .subvendor = 0x0070,
2249 .subdevice = 0x9601,
2250 .card = CX88_BOARD_HAUPPAUGE_HVR1300,
2252 .subvendor = 0x0070,
2253 .subdevice = 0x9602,
2254 .card = CX88_BOARD_HAUPPAUGE_HVR1300,
2256 .subvendor = 0x107d,
2257 .subdevice = 0x6632,
2258 .card = CX88_BOARD_LEADTEK_PVR2000,
2260 .subvendor = 0x12ab,
2261 .subdevice = 0x2300, /* Club3D Zap TV2100 */
2262 .card = CX88_BOARD_KWORLD_DVB_T_CX22702,
2264 .subvendor = 0x0070,
2265 .subdevice = 0x9000,
2266 .card = CX88_BOARD_HAUPPAUGE_DVB_T1,
2268 .subvendor = 0x0070,
2269 .subdevice = 0x1400,
2270 .card = CX88_BOARD_HAUPPAUGE_HVR3000,
2272 .subvendor = 0x0070,
2273 .subdevice = 0x1401,
2274 .card = CX88_BOARD_HAUPPAUGE_HVR3000,
2276 .subvendor = 0x0070,
2277 .subdevice = 0x1402,
2278 .card = CX88_BOARD_HAUPPAUGE_HVR3000,
2280 .subvendor = 0x1421,
2281 .subdevice = 0x0341, /* ADS Tech InstantTV DVB-S */
2282 .card = CX88_BOARD_KWORLD_DVBS_100,
2284 .subvendor = 0x1421,
2285 .subdevice = 0x0390,
2286 .card = CX88_BOARD_ADSTECH_PTV_390,
2288 .subvendor = 0x11bd,
2289 .subdevice = 0x0051,
2290 .card = CX88_BOARD_PINNACLE_PCTV_HD_800i,
2292 .subvendor = 0x18ac,
2293 .subdevice = 0xd530,
2294 .card = CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO,
2296 .subvendor = 0x12ab,
2297 .subdevice = 0x1788,
2298 .card = CX88_BOARD_PINNACLE_HYBRID_PCTV,
2300 .subvendor = 0x14f1,
2301 .subdevice = 0xea3d,
2302 .card = CX88_BOARD_POWERCOLOR_REAL_ANGEL,
2304 .subvendor = 0x107d,
2305 .subdevice = 0x6f18,
2306 .card = CX88_BOARD_WINFAST_TV2000_XP_GLOBAL,
2308 .subvendor = 0x14f1,
2309 .subdevice = 0x8852,
2310 .card = CX88_BOARD_GENIATECH_X8000_MT,
2312 .subvendor = 0x18ac,
2313 .subdevice = 0xd610,
2314 .card = CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD,
2316 .subvendor = 0x1554,
2317 .subdevice = 0x4935,
2318 .card = CX88_BOARD_PROLINK_PV_8000GT,
2320 .subvendor = 0x1554,
2321 .subdevice = 0x4976,
2322 .card = CX88_BOARD_PROLINK_PV_GLOBAL_XTREME,
2324 .subvendor = 0x17de,
2325 .subdevice = 0x08c1,
2326 .card = CX88_BOARD_KWORLD_ATSC_120,
2328 .subvendor = 0x0070,
2329 .subdevice = 0x6900,
2330 .card = CX88_BOARD_HAUPPAUGE_HVR4000,
2332 .subvendor = 0x0070,
2333 .subdevice = 0x6904,
2334 .card = CX88_BOARD_HAUPPAUGE_HVR4000,
2336 .subvendor = 0x0070,
2337 .subdevice = 0x6902,
2338 .card = CX88_BOARD_HAUPPAUGE_HVR4000,
2340 .subvendor = 0x0070,
2341 .subdevice = 0x6905,
2342 .card = CX88_BOARD_HAUPPAUGE_HVR4000LITE,
2344 .subvendor = 0x0070,
2345 .subdevice = 0x6906,
2346 .card = CX88_BOARD_HAUPPAUGE_HVR4000LITE,
2348 .subvendor = 0xd420,
2349 .subdevice = 0x9022,
2350 .card = CX88_BOARD_TEVII_S420,
2352 .subvendor = 0xd460,
2353 .subdevice = 0x9022,
2354 .card = CX88_BOARD_TEVII_S460,
2356 .subvendor = 0xA044,
2357 .subdevice = 0x2011,
2358 .card = CX88_BOARD_OMICOM_SS4_PCI,
2360 .subvendor = 0x8910,
2361 .subdevice = 0x8888,
2362 .card = CX88_BOARD_TBS_8910,
2364 .subvendor = 0x8920,
2365 .subdevice = 0x8888,
2366 .card = CX88_BOARD_TBS_8920,
2368 .subvendor = 0xb022,
2369 .subdevice = 0x3022,
2370 .card = CX88_BOARD_PROF_6200,
2372 .subvendor = 0xB033,
2373 .subdevice = 0x3033,
2374 .card = CX88_BOARD_PROF_7300,
2376 .subvendor = 0xb200,
2377 .subdevice = 0x4200,
2378 .card = CX88_BOARD_SATTRADE_ST4200,
2380 .subvendor = 0x153b,
2381 .subdevice = 0x1177,
2382 .card = CX88_BOARD_TERRATEC_CINERGY_HT_PCI_MKII,
2386 /* ----------------------------------------------------------------------- */
2387 /* some leadtek specific stuff */
2389 static void leadtek_eeprom(struct cx88_core *core, u8 *eeprom_data)
2391 /* This is just for the "Winfast 2000XP Expert" board ATM; I don't have data on
2394 * Byte 0 is 1 on the NTSC board.
2397 if (eeprom_data[4] != 0x7d ||
2398 eeprom_data[5] != 0x10 ||
2399 eeprom_data[7] != 0x66) {
2400 warn_printk(core, "Leadtek eeprom invalid.\n");
2404 core->board.tuner_type = (eeprom_data[6] == 0x13) ?
2405 TUNER_PHILIPS_FM1236_MK3 : TUNER_PHILIPS_FM1216ME_MK3;
2407 info_printk(core, "Leadtek Winfast 2000XP Expert config: "
2408 "tuner=%d, eeprom[0]=0x%02x\n",
2409 core->board.tuner_type, eeprom_data[0]);
2412 static void hauppauge_eeprom(struct cx88_core *core, u8 *eeprom_data)
2416 tveeprom_hauppauge_analog(&core->i2c_client, &tv, eeprom_data);
2417 core->board.tuner_type = tv.tuner_type;
2418 core->tuner_formats = tv.tuner_formats;
2419 core->board.radio.type = tv.has_radio ? CX88_RADIO : 0;
2421 /* Make sure we support the board model */
2424 case 14009: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in) */
2425 case 14019: /* WinTV-HVR3000 (Retail, IR Blaster, b/panel video, 3.5mm audio in) */
2426 case 14029: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - 880 bridge) */
2427 case 14109: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - low profile) */
2428 case 14129: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - 880 bridge - LP) */
2429 case 14559: /* WinTV-HVR3000 (OEM, no IR, b/panel video, 3.5mm audio in) */
2430 case 14569: /* WinTV-HVR3000 (OEM, no IR, no back panel video) */
2431 case 14659: /* WinTV-HVR3000 (OEM, no IR, b/panel video, RCA audio in - Low profile) */
2432 case 14669: /* WinTV-HVR3000 (OEM, no IR, no b/panel video - Low profile) */
2433 case 28552: /* WinTV-PVR 'Roslyn' (No IR) */
2434 case 34519: /* WinTV-PCI-FM */
2436 /* WinTV-HVR4000 (DVBS/S2/T, Video and IR, back panel inputs) */
2437 case 69100: /* WinTV-HVR4000LITE (DVBS/S2, IR) */
2438 case 69500: /* WinTV-HVR4000LITE (DVBS/S2, No IR) */
2440 /* WinTV-HVR4000 (DVBS/S2/T, Video no IR, back panel inputs) */
2441 case 69569: /* WinTV-HVR4000 (DVBS/S2/T, Video no IR) */
2442 case 90002: /* Nova-T-PCI (9002) */
2443 case 92001: /* Nova-S-Plus (Video and IR) */
2444 case 92002: /* Nova-S-Plus (Video and IR) */
2445 case 90003: /* Nova-T-PCI (9002 No RF out) */
2446 case 90500: /* Nova-T-PCI (oem) */
2447 case 90501: /* Nova-T-PCI (oem/IR) */
2448 case 92000: /* Nova-SE2 (OEM, No Video or IR) */
2449 case 94009: /* WinTV-HVR1100 (Video and IR Retail) */
2450 case 94501: /* WinTV-HVR1100 (Video and IR OEM) */
2451 case 96009: /* WinTV-HVR1300 (PAL Video, MPEG Video and IR RX) */
2452 case 96019: /* WinTV-HVR1300 (PAL Video, MPEG Video and IR RX/TX) */
2453 case 96559: /* WinTV-HVR1300 (PAL Video, MPEG Video no IR) */
2454 case 96569: /* WinTV-HVR1300 () */
2455 case 96659: /* WinTV-HVR1300 () */
2456 case 98559: /* WinTV-HVR1100LP (Video no IR, Retail - Low Profile) */
2460 warn_printk(core, "warning: unknown hauppauge model #%d\n",
2465 info_printk(core, "hauppauge eeprom: model=%d\n", tv.model);
2468 /* ----------------------------------------------------------------------- */
2469 /* some GDI (was: Modular Technology) specific stuff */
2476 [ 0x01 ] = { .id = TUNER_ABSENT,
2478 [ 0x02 ] = { .id = TUNER_ABSENT,
2480 [ 0x03 ] = { .id = TUNER_ABSENT,
2482 [ 0x04 ] = { .id = TUNER_ABSENT,
2484 [ 0x05 ] = { .id = TUNER_ABSENT,
2487 [ 0x10 ] = { .id = TUNER_ABSENT,
2489 .name = "TEMIC_4049" },
2490 [ 0x11 ] = { .id = TUNER_TEMIC_4136FY5,
2491 .name = "TEMIC_4136" },
2492 [ 0x12 ] = { .id = TUNER_ABSENT,
2493 .name = "TEMIC_4146" },
2495 [ 0x20 ] = { .id = TUNER_PHILIPS_FQ1216ME,
2497 .name = "PHILIPS_FQ1216_MK3" },
2498 [ 0x21 ] = { .id = TUNER_ABSENT, .fm = 1,
2499 .name = "PHILIPS_FQ1236_MK3" },
2500 [ 0x22 ] = { .id = TUNER_ABSENT,
2501 .name = "PHILIPS_FI1236_MK3" },
2502 [ 0x23 ] = { .id = TUNER_ABSENT,
2503 .name = "PHILIPS_FI1216_MK3" },
2506 static void gdi_eeprom(struct cx88_core *core, u8 *eeprom_data)
2508 char *name = (eeprom_data[0x0d] < ARRAY_SIZE(gdi_tuner))
2509 ? gdi_tuner[eeprom_data[0x0d]].name : NULL;
2511 info_printk(core, "GDI: tuner=%s\n", name ? name : "unknown");
2514 core->board.tuner_type = gdi_tuner[eeprom_data[0x0d]].id;
2515 core->board.radio.type = gdi_tuner[eeprom_data[0x0d]].fm ?
2519 /* ------------------------------------------------------------------- */
2520 /* some Divco specific stuff */
2521 static int cx88_dvico_xc2028_callback(struct cx88_core *core,
2522 int command, int arg)
2525 case XC2028_TUNER_RESET:
2526 switch (core->boardnr) {
2527 case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO:
2528 /* GPIO-4 xc3028 tuner */
2530 cx_set(MO_GP0_IO, 0x00001000);
2531 cx_clear(MO_GP0_IO, 0x00000010);
2533 cx_set(MO_GP0_IO, 0x00000010);
2537 cx_write(MO_GP0_IO, 0x101000);
2539 cx_set(MO_GP0_IO, 0x101010);
2550 /* ----------------------------------------------------------------------- */
2551 /* some Geniatech specific stuff */
2553 static int cx88_xc3028_geniatech_tuner_callback(struct cx88_core *core,
2554 int command, int mode)
2557 case XC2028_TUNER_RESET:
2558 switch (INPUT(core->input).type) {
2562 cx_write(MO_GP1_IO, 0x030302);
2566 cx_write(MO_GP1_IO, 0x030301);
2569 cx_write(MO_GP1_IO, 0x101010);
2571 cx_write(MO_GP1_IO, 0x101000);
2573 cx_write(MO_GP1_IO, 0x101010);
2580 /* ------------------------------------------------------------------- */
2581 /* some Divco specific stuff */
2582 static int cx88_pv_8000gt_callback(struct cx88_core *core,
2583 int command, int arg)
2586 case XC2028_TUNER_RESET:
2587 cx_write(MO_GP2_IO, 0xcf7);
2589 cx_write(MO_GP2_IO, 0xef5);
2591 cx_write(MO_GP2_IO, 0xcf7);
2600 /* ----------------------------------------------------------------------- */
2601 /* some DViCO specific stuff */
2603 static void dvico_fusionhdtv_hybrid_init(struct cx88_core *core)
2605 struct i2c_msg msg = { .addr = 0x45, .flags = 0 };
2607 static u8 init_bufs[13][5] = {
2608 { 0x10, 0x00, 0x20, 0x01, 0x03 },
2609 { 0x10, 0x10, 0x01, 0x00, 0x21 },
2610 { 0x10, 0x10, 0x10, 0x00, 0xCA },
2611 { 0x10, 0x10, 0x12, 0x00, 0x08 },
2612 { 0x10, 0x10, 0x13, 0x00, 0x0A },
2613 { 0x10, 0x10, 0x16, 0x01, 0xC0 },
2614 { 0x10, 0x10, 0x22, 0x01, 0x3D },
2615 { 0x10, 0x10, 0x73, 0x01, 0x2E },
2616 { 0x10, 0x10, 0x72, 0x00, 0xC5 },
2617 { 0x10, 0x10, 0x71, 0x01, 0x97 },
2618 { 0x10, 0x10, 0x70, 0x00, 0x0F },
2619 { 0x10, 0x10, 0xB0, 0x00, 0x01 },
2623 for (i = 0; i < ARRAY_SIZE(init_bufs); i++) {
2624 msg.buf = init_bufs[i];
2625 msg.len = (i != 12 ? 5 : 2);
2626 err = i2c_transfer(&core->i2c_adap, &msg, 1);
2628 warn_printk(core, "dvico_fusionhdtv_hybrid_init buf %d "
2629 "failed (err = %d)!\n", i, err);
2635 static int cx88_xc2028_tuner_callback(struct cx88_core *core,
2636 int command, int arg)
2638 /* Board-specific callbacks */
2639 switch (core->boardnr) {
2640 case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL:
2641 case CX88_BOARD_POWERCOLOR_REAL_ANGEL:
2642 case CX88_BOARD_GENIATECH_X8000_MT:
2643 case CX88_BOARD_KWORLD_ATSC_120:
2644 return cx88_xc3028_geniatech_tuner_callback(core,
2646 case CX88_BOARD_PROLINK_PV_8000GT:
2647 case CX88_BOARD_PROLINK_PV_GLOBAL_XTREME:
2648 return cx88_pv_8000gt_callback(core, command, arg);
2649 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO:
2650 case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO:
2651 return cx88_dvico_xc2028_callback(core, command, arg);
2655 case XC2028_TUNER_RESET:
2656 switch (INPUT(core->input).type) {
2658 info_printk(core, "setting GPIO to radio!\n");
2659 cx_write(MO_GP0_IO, 0x4ff);
2661 cx_write(MO_GP2_IO, 0xff);
2664 case CX88_VMUX_DVB: /* Digital TV*/
2665 default: /* Analog TV */
2666 info_printk(core, "setting GPIO to TV!\n");
2669 cx_write(MO_GP1_IO, 0x101010);
2671 cx_write(MO_GP1_IO, 0x101000);
2673 cx_write(MO_GP1_IO, 0x101010);
2680 /* ----------------------------------------------------------------------- */
2681 /* Tuner callback function. Currently only needed for the Pinnacle *
2682 * PCTV HD 800i with an xc5000 sillicon tuner. This is used for both *
2683 * analog tuner attach (tuner-core.c) and dvb tuner attach (cx88-dvb.c) */
2685 static int cx88_xc5000_tuner_callback(struct cx88_core *core,
2686 int command, int arg)
2688 switch (core->boardnr) {
2689 case CX88_BOARD_PINNACLE_PCTV_HD_800i:
2690 if (command == 0) { /* This is the reset command from xc5000 */
2691 /* Reset XC5000 tuner via SYS_RSTO_pin */
2692 cx_write(MO_SRST_IO, 0);
2694 cx_write(MO_SRST_IO, 1);
2697 err_printk(core, "xc5000: unknown tuner "
2698 "callback command.\n");
2702 case CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD:
2703 if (command == 0) { /* This is the reset command from xc5000 */
2704 cx_clear(MO_GP0_IO, 0x00000010);
2706 cx_set(MO_GP0_IO, 0x00000010);
2710 "xc5000: unknown tuner callback command.\n");
2715 return 0; /* Should never be here */
2718 int cx88_tuner_callback(void *priv, int component, int command, int arg)
2720 struct i2c_algo_bit_data *i2c_algo = priv;
2721 struct cx88_core *core;
2724 printk(KERN_ERR "cx88: Error - i2c private data undefined.\n");
2728 core = i2c_algo->data;
2731 printk(KERN_ERR "cx88: Error - device struct undefined.\n");
2735 if (component != DVB_FRONTEND_COMPONENT_TUNER)
2738 switch (core->board.tuner_type) {
2740 info_printk(core, "Calling XC2028/3028 callback\n");
2741 return cx88_xc2028_tuner_callback(core, command, arg);
2743 info_printk(core, "Calling XC5000 callback\n");
2744 return cx88_xc5000_tuner_callback(core, command, arg);
2746 err_printk(core, "Error: Calling callback for tuner %d\n",
2747 core->board.tuner_type);
2750 EXPORT_SYMBOL(cx88_tuner_callback);
2752 /* ----------------------------------------------------------------------- */
2754 static void cx88_card_list(struct cx88_core *core, struct pci_dev *pci)
2758 if (0 == pci->subsystem_vendor &&
2759 0 == pci->subsystem_device) {
2761 "%s: Your board has no valid PCI Subsystem ID and thus can't\n"
2762 "%s: be autodetected. Please pass card=<n> insmod option to\n"
2763 "%s: workaround that. Redirect complaints to the vendor of\n"
2764 "%s: the TV card. Best regards,\n"
2766 core->name,core->name,core->name,core->name,core->name);
2769 "%s: Your board isn't known (yet) to the driver. You can\n"
2770 "%s: try to pick one of the existing card configs via\n"
2771 "%s: card=<n> insmod option. Updating to the latest\n"
2772 "%s: version might help as well.\n",
2773 core->name,core->name,core->name,core->name);
2775 err_printk(core, "Here is a list of valid choices for the card=<n> "
2776 "insmod option:\n");
2777 for (i = 0; i < ARRAY_SIZE(cx88_boards); i++)
2778 printk(KERN_ERR "%s: card=%d -> %s\n",
2779 core->name, i, cx88_boards[i].name);
2782 static void cx88_card_setup_pre_i2c(struct cx88_core *core)
2784 switch (core->boardnr) {
2785 case CX88_BOARD_HAUPPAUGE_HVR1300:
2787 * Bring the 702 demod up before i2c scanning/attach or devices are hidden
2788 * We leave here with the 702 on the bus
2790 * "reset the IR receiver on GPIO[3]"
2791 * Reported by Mike Crash <mike AT mikecrash.com>
2793 cx_write(MO_GP0_IO, 0x0000ef88);
2795 cx_clear(MO_GP0_IO, 0x00000088);
2797 cx_set(MO_GP0_IO, 0x00000088); /* 702 out of reset */
2801 case CX88_BOARD_PROLINK_PV_GLOBAL_XTREME:
2802 case CX88_BOARD_PROLINK_PV_8000GT:
2803 cx_write(MO_GP2_IO, 0xcf7);
2805 cx_write(MO_GP2_IO, 0xef5);
2807 cx_write(MO_GP2_IO, 0xcf7);
2811 case CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD:
2812 /* Enable the xc5000 tuner */
2813 cx_set(MO_GP0_IO, 0x00001010);
2816 case CX88_BOARD_HAUPPAUGE_HVR3000:
2817 case CX88_BOARD_HAUPPAUGE_HVR4000:
2819 cx_write(MO_GP0_IO, core->board.input[0].gpio0);
2821 cx_clear(MO_GP0_IO, 0x00000080);
2823 cx_set(MO_GP0_IO, 0x00000080); /* 702 out of reset */
2830 * Sets board-dependent xc3028 configuration
2832 void cx88_setup_xc3028(struct cx88_core *core, struct xc2028_ctrl *ctl)
2834 memset(ctl, 0, sizeof(*ctl));
2836 ctl->fname = XC2028_DEFAULT_FIRMWARE;
2839 switch (core->boardnr) {
2840 case CX88_BOARD_POWERCOLOR_REAL_ANGEL:
2841 /* Now works with firmware version 2.7 */
2842 if (core->i2c_algo.udelay < 16)
2843 core->i2c_algo.udelay = 16;
2845 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO:
2846 ctl->demod = XC3028_FE_ZARLINK456;
2848 case CX88_BOARD_KWORLD_ATSC_120:
2849 case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO:
2850 ctl->demod = XC3028_FE_OREN538;
2852 case CX88_BOARD_PROLINK_PV_GLOBAL_XTREME:
2853 case CX88_BOARD_PROLINK_PV_8000GT:
2855 * Those boards uses non-MTS firmware
2858 case CX88_BOARD_PINNACLE_HYBRID_PCTV:
2859 case CX88_BOARD_TERRATEC_CINERGY_HT_PCI_MKII:
2860 ctl->demod = XC3028_FE_ZARLINK456;
2864 ctl->demod = XC3028_FE_OREN538;
2868 EXPORT_SYMBOL_GPL(cx88_setup_xc3028);
2870 static void cx88_card_setup(struct cx88_core *core)
2872 static u8 eeprom[256];
2873 struct tuner_setup tun_setup;
2874 unsigned int mode_mask = T_RADIO |
2878 memset(&tun_setup, 0, sizeof(tun_setup));
2880 if (0 == core->i2c_rc) {
2881 core->i2c_client.addr = 0xa0 >> 1;
2882 tveeprom_read(&core->i2c_client, eeprom, sizeof(eeprom));
2885 switch (core->boardnr) {
2886 case CX88_BOARD_HAUPPAUGE:
2887 case CX88_BOARD_HAUPPAUGE_ROSLYN:
2888 if (0 == core->i2c_rc)
2889 hauppauge_eeprom(core, eeprom+8);
2891 case CX88_BOARD_GDI:
2892 if (0 == core->i2c_rc)
2893 gdi_eeprom(core, eeprom);
2895 case CX88_BOARD_WINFAST2000XP_EXPERT:
2896 if (0 == core->i2c_rc)
2897 leadtek_eeprom(core, eeprom);
2899 case CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1:
2900 case CX88_BOARD_HAUPPAUGE_NOVASE2_S1:
2901 case CX88_BOARD_HAUPPAUGE_DVB_T1:
2902 case CX88_BOARD_HAUPPAUGE_HVR1100:
2903 case CX88_BOARD_HAUPPAUGE_HVR1100LP:
2904 case CX88_BOARD_HAUPPAUGE_HVR3000:
2905 case CX88_BOARD_HAUPPAUGE_HVR1300:
2906 case CX88_BOARD_HAUPPAUGE_HVR4000:
2907 case CX88_BOARD_HAUPPAUGE_HVR4000LITE:
2908 if (0 == core->i2c_rc)
2909 hauppauge_eeprom(core, eeprom);
2911 case CX88_BOARD_KWORLD_DVBS_100:
2912 cx_write(MO_GP0_IO, 0x000007f8);
2913 cx_write(MO_GP1_IO, 0x00000001);
2915 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO:
2916 /* GPIO0:0 is hooked to demod reset */
2917 /* GPIO0:4 is hooked to xc3028 reset */
2918 cx_write(MO_GP0_IO, 0x00111100);
2920 cx_write(MO_GP0_IO, 0x00111111);
2922 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL:
2923 /* GPIO0:6 is hooked to FX2 reset pin */
2924 cx_set(MO_GP0_IO, 0x00004040);
2925 cx_clear(MO_GP0_IO, 0x00000040);
2927 cx_set(MO_GP0_IO, 0x00004040);
2929 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1:
2930 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS:
2931 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID:
2932 /* GPIO0:0 is hooked to mt352 reset pin */
2933 cx_set(MO_GP0_IO, 0x00000101);
2934 cx_clear(MO_GP0_IO, 0x00000001);
2936 cx_set(MO_GP0_IO, 0x00000101);
2937 if (0 == core->i2c_rc &&
2938 core->boardnr == CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID)
2939 dvico_fusionhdtv_hybrid_init(core);
2941 case CX88_BOARD_KWORLD_DVB_T:
2942 case CX88_BOARD_DNTV_LIVE_DVB_T:
2943 cx_set(MO_GP0_IO, 0x00000707);
2944 cx_set(MO_GP2_IO, 0x00000101);
2945 cx_clear(MO_GP2_IO, 0x00000001);
2947 cx_clear(MO_GP0_IO, 0x00000007);
2948 cx_set(MO_GP2_IO, 0x00000101);
2950 case CX88_BOARD_DNTV_LIVE_DVB_T_PRO:
2951 cx_write(MO_GP0_IO, 0x00080808);
2953 case CX88_BOARD_ATI_HDTVWONDER:
2954 if (0 == core->i2c_rc) {
2957 static const u8 buffer [][2] = {
2964 core->i2c_client.addr = 0x0a;
2966 for (i = 0; i < ARRAY_SIZE(buffer); i++)
2967 if (2 != i2c_master_send(&core->i2c_client,
2969 warn_printk(core, "Unable to enable "
2973 case CX88_BOARD_MSI_TVANYWHERE_MASTER:
2975 struct v4l2_priv_tun_config tea5767_cfg;
2976 struct tea5767_ctrl ctl;
2978 memset(&ctl, 0, sizeof(ctl));
2983 ctl.xtal_freq = TEA5767_HIGH_LO_13MHz;
2985 tea5767_cfg.tuner = TUNER_TEA5767;
2986 tea5767_cfg.priv = &ctl;
2988 cx88_call_i2c_clients(core, TUNER_SET_CONFIG, &tea5767_cfg);
2991 case CX88_BOARD_TEVII_S420:
2992 case CX88_BOARD_TEVII_S460:
2993 case CX88_BOARD_OMICOM_SS4_PCI:
2994 case CX88_BOARD_TBS_8910:
2995 case CX88_BOARD_TBS_8920:
2996 case CX88_BOARD_PROF_6200:
2997 case CX88_BOARD_PROF_7300:
2998 case CX88_BOARD_SATTRADE_ST4200:
2999 cx_write(MO_SRST_IO, 0);
3001 cx_write(MO_SRST_IO, 1);
3008 if ((core->board.radio_type != UNSET)) {
3009 tun_setup.mode_mask = T_RADIO;
3010 tun_setup.type = core->board.radio_type;
3011 tun_setup.addr = core->board.radio_addr;
3012 tun_setup.tuner_callback = cx88_tuner_callback;
3013 cx88_call_i2c_clients(core, TUNER_SET_TYPE_ADDR, &tun_setup);
3014 mode_mask &= ~T_RADIO;
3017 if (core->board.tuner_type != TUNER_ABSENT) {
3018 tun_setup.mode_mask = mode_mask;
3019 tun_setup.type = core->board.tuner_type;
3020 tun_setup.addr = core->board.tuner_addr;
3021 tun_setup.tuner_callback = cx88_tuner_callback;
3023 cx88_call_i2c_clients(core, TUNER_SET_TYPE_ADDR, &tun_setup);
3026 if (core->board.tda9887_conf) {
3027 struct v4l2_priv_tun_config tda9887_cfg;
3029 tda9887_cfg.tuner = TUNER_TDA9887;
3030 tda9887_cfg.priv = &core->board.tda9887_conf;
3032 cx88_call_i2c_clients(core, TUNER_SET_CONFIG, &tda9887_cfg);
3035 if (core->board.tuner_type == TUNER_XC2028) {
3036 struct v4l2_priv_tun_config xc2028_cfg;
3037 struct xc2028_ctrl ctl;
3039 /* Fills device-dependent initialization parameters */
3040 cx88_setup_xc3028(core, &ctl);
3042 /* Sends parameters to xc2028/3028 tuner */
3043 memset(&xc2028_cfg, 0, sizeof(xc2028_cfg));
3044 xc2028_cfg.tuner = TUNER_XC2028;
3045 xc2028_cfg.priv = &ctl;
3046 info_printk(core, "Asking xc2028/3028 to load firmware %s\n",
3048 cx88_call_i2c_clients(core, TUNER_SET_CONFIG, &xc2028_cfg);
3050 cx88_call_i2c_clients (core, TUNER_SET_STANDBY, NULL);
3053 /* ------------------------------------------------------------------ */
3055 static int cx88_pci_quirks(const char *name, struct pci_dev *pci)
3057 unsigned int lat = UNSET;
3061 /* check pci quirks */
3062 if (pci_pci_problems & PCIPCI_TRITON) {
3063 printk(KERN_INFO "%s: quirk: PCIPCI_TRITON -- set TBFX\n",
3065 ctrl |= CX88X_EN_TBFX;
3067 if (pci_pci_problems & PCIPCI_NATOMA) {
3068 printk(KERN_INFO "%s: quirk: PCIPCI_NATOMA -- set TBFX\n",
3070 ctrl |= CX88X_EN_TBFX;
3072 if (pci_pci_problems & PCIPCI_VIAETBF) {
3073 printk(KERN_INFO "%s: quirk: PCIPCI_VIAETBF -- set TBFX\n",
3075 ctrl |= CX88X_EN_TBFX;
3077 if (pci_pci_problems & PCIPCI_VSFX) {
3078 printk(KERN_INFO "%s: quirk: PCIPCI_VSFX -- set VSFX\n",
3080 ctrl |= CX88X_EN_VSFX;
3082 #ifdef PCIPCI_ALIMAGIK
3083 if (pci_pci_problems & PCIPCI_ALIMAGIK) {
3084 printk(KERN_INFO "%s: quirk: PCIPCI_ALIMAGIK -- latency fixup\n",
3090 /* check insmod options */
3091 if (UNSET != latency)
3096 pci_read_config_byte(pci, CX88X_DEVCTRL, &value);
3098 pci_write_config_byte(pci, CX88X_DEVCTRL, value);
3101 printk(KERN_INFO "%s: setting pci latency timer to %d\n",
3103 pci_write_config_byte(pci, PCI_LATENCY_TIMER, latency);
3108 int cx88_get_resources(const struct cx88_core *core, struct pci_dev *pci)
3110 if (request_mem_region(pci_resource_start(pci,0),
3111 pci_resource_len(pci,0),
3115 "%s/%d: Can't get MMIO memory @ 0x%llx, subsystem: %04x:%04x\n",
3116 core->name, PCI_FUNC(pci->devfn),
3117 (unsigned long long)pci_resource_start(pci, 0),
3118 pci->subsystem_vendor, pci->subsystem_device);
3122 /* Allocate and initialize the cx88 core struct. One should hold the
3123 * devlist mutex before calling this. */
3124 struct cx88_core *cx88_core_create(struct pci_dev *pci, int nr)
3126 struct cx88_core *core;
3129 core = kzalloc(sizeof(*core), GFP_KERNEL);
3131 atomic_inc(&core->refcount);
3132 core->pci_bus = pci->bus->number;
3133 core->pci_slot = PCI_SLOT(pci->devfn);
3134 core->pci_irqmask = PCI_INT_RISC_RD_BERRINT | PCI_INT_RISC_WR_BERRINT |
3135 PCI_INT_BRDG_BERRINT | PCI_INT_SRC_DMA_BERRINT |
3136 PCI_INT_DST_DMA_BERRINT | PCI_INT_IPB_DMA_BERRINT;
3137 mutex_init(&core->lock);
3140 sprintf(core->name, "cx88[%d]", core->nr);
3142 strcpy(core->v4l2_dev.name, core->name);
3143 if (v4l2_device_register(NULL, &core->v4l2_dev)) {
3148 if (0 != cx88_get_resources(core, pci)) {
3149 v4l2_device_unregister(&core->v4l2_dev);
3155 cx88_pci_quirks(core->name, pci);
3156 core->lmmio = ioremap(pci_resource_start(pci, 0),
3157 pci_resource_len(pci, 0));
3158 core->bmmio = (u8 __iomem *)core->lmmio;
3161 core->boardnr = UNSET;
3162 if (card[core->nr] < ARRAY_SIZE(cx88_boards))
3163 core->boardnr = card[core->nr];
3164 for (i = 0; UNSET == core->boardnr && i < ARRAY_SIZE(cx88_subids); i++)
3165 if (pci->subsystem_vendor == cx88_subids[i].subvendor &&
3166 pci->subsystem_device == cx88_subids[i].subdevice)
3167 core->boardnr = cx88_subids[i].card;
3168 if (UNSET == core->boardnr) {
3169 core->boardnr = CX88_BOARD_UNKNOWN;
3170 cx88_card_list(core, pci);
3173 memcpy(&core->board, &cx88_boards[core->boardnr], sizeof(core->board));
3175 if (!core->board.num_frontends && (core->board.mpeg & CX88_MPEG_DVB))
3176 core->board.num_frontends = 1;
3178 info_printk(core, "subsystem: %04x:%04x, board: %s [card=%d,%s], frontend(s): %d\n",
3179 pci->subsystem_vendor, pci->subsystem_device, core->board.name,
3180 core->boardnr, card[core->nr] == core->boardnr ?
3181 "insmod option" : "autodetected",
3182 core->board.num_frontends);
3184 if (tuner[core->nr] != UNSET)
3185 core->board.tuner_type = tuner[core->nr];
3186 if (radio[core->nr] != UNSET)
3187 core->board.radio_type = radio[core->nr];
3189 info_printk(core, "TV tuner type %d, Radio tuner type %d\n",
3190 core->board.tuner_type, core->board.radio_type);
3194 cx88_card_setup_pre_i2c(core);
3195 cx88_i2c_init(core, pci);
3197 /* load tuner module, if needed */
3198 if (TUNER_ABSENT != core->board.tuner_type)
3199 request_module("tuner");
3201 cx88_card_setup(core);
3202 cx88_ir_init(core, pci);