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>
27 #include <linux/slab.h>
32 static unsigned int tuner[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET };
33 static unsigned int radio[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET };
34 static unsigned int card[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET };
36 module_param_array(tuner, int, NULL, 0444);
37 module_param_array(radio, int, NULL, 0444);
38 module_param_array(card, int, NULL, 0444);
40 MODULE_PARM_DESC(tuner,"tuner type");
41 MODULE_PARM_DESC(radio,"radio tuner type");
42 MODULE_PARM_DESC(card,"card type");
44 static unsigned int latency = UNSET;
45 module_param(latency,int,0444);
46 MODULE_PARM_DESC(latency,"pci latency timer");
48 static int disable_ir;
49 module_param(disable_ir, int, 0444);
50 MODULE_PARM_DESC(latency, "Disable IR support");
52 #define info_printk(core, fmt, arg...) \
53 printk(KERN_INFO "%s: " fmt, core->name , ## arg)
55 #define warn_printk(core, fmt, arg...) \
56 printk(KERN_WARNING "%s: " fmt, core->name , ## arg)
58 #define err_printk(core, fmt, arg...) \
59 printk(KERN_ERR "%s: " fmt, core->name , ## arg)
62 /* ------------------------------------------------------------------ */
63 /* board config info */
65 /* If radio_type !=UNSET, radio_addr should be specified
68 static const struct cx88_board cx88_boards[] = {
69 [CX88_BOARD_UNKNOWN] = {
70 .name = "UNKNOWN/GENERIC",
73 .tuner_addr = ADDR_UNSET,
74 .radio_addr = ADDR_UNSET,
76 .type = CX88_VMUX_COMPOSITE1,
79 .type = CX88_VMUX_COMPOSITE2,
82 .type = CX88_VMUX_COMPOSITE3,
85 .type = CX88_VMUX_COMPOSITE4,
89 [CX88_BOARD_HAUPPAUGE] = {
90 .name = "Hauppauge WinTV 34xxx models",
93 .tuner_addr = ADDR_UNSET,
94 .radio_addr = ADDR_UNSET,
95 .tda9887_conf = TDA9887_PRESENT,
97 .type = CX88_VMUX_TELEVISION,
99 .gpio0 = 0xff00, // internal decoder
101 .type = CX88_VMUX_DEBUG,
103 .gpio0 = 0xff01, // mono from tuner chip
105 .type = CX88_VMUX_COMPOSITE1,
109 .type = CX88_VMUX_SVIDEO,
119 .name = "GDI Black Gold",
122 .tuner_addr = ADDR_UNSET,
123 .radio_addr = ADDR_UNSET,
125 .type = CX88_VMUX_TELEVISION,
128 .type = CX88_VMUX_SVIDEO,
132 [CX88_BOARD_PIXELVIEW] = {
134 .tuner_type = TUNER_PHILIPS_PAL,
136 .tuner_addr = ADDR_UNSET,
137 .radio_addr = ADDR_UNSET,
139 .type = CX88_VMUX_TELEVISION,
141 .gpio0 = 0xff00, // internal decoder
143 .type = CX88_VMUX_COMPOSITE1,
146 .type = CX88_VMUX_SVIDEO,
154 [CX88_BOARD_ATI_WONDER_PRO] = {
155 .name = "ATI TV Wonder Pro",
156 .tuner_type = TUNER_PHILIPS_4IN1,
158 .tuner_addr = ADDR_UNSET,
159 .radio_addr = ADDR_UNSET,
160 .tda9887_conf = TDA9887_PRESENT | TDA9887_INTERCARRIER,
162 .type = CX88_VMUX_TELEVISION,
166 .type = CX88_VMUX_COMPOSITE1,
170 .type = CX88_VMUX_SVIDEO,
175 [CX88_BOARD_WINFAST2000XP_EXPERT] = {
176 .name = "Leadtek Winfast 2000XP Expert",
177 .tuner_type = TUNER_PHILIPS_4IN1,
179 .tuner_addr = ADDR_UNSET,
180 .radio_addr = ADDR_UNSET,
181 .tda9887_conf = TDA9887_PRESENT,
183 .type = CX88_VMUX_TELEVISION,
190 .type = CX88_VMUX_COMPOSITE1,
197 .type = CX88_VMUX_SVIDEO,
212 [CX88_BOARD_AVERTV_STUDIO_303] = {
213 .name = "AverTV Studio 303 (M126)",
214 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
216 .tuner_addr = ADDR_UNSET,
217 .radio_addr = ADDR_UNSET,
218 .tda9887_conf = TDA9887_PRESENT,
220 .type = CX88_VMUX_TELEVISION,
224 .type = CX88_VMUX_COMPOSITE1,
228 .type = CX88_VMUX_SVIDEO,
237 [CX88_BOARD_MSI_TVANYWHERE_MASTER] = {
238 // added gpio values thanks to Michal
239 // values for PAL from DScaler
240 .name = "MSI TV-@nywhere Master",
241 .tuner_type = TUNER_MT2032,
243 .tuner_addr = ADDR_UNSET,
244 .radio_addr = ADDR_UNSET,
245 .tda9887_conf = TDA9887_PRESENT | TDA9887_INTERCARRIER_NTSC,
247 .type = CX88_VMUX_TELEVISION,
253 .type = CX88_VMUX_COMPOSITE1,
259 .type = CX88_VMUX_SVIDEO,
273 [CX88_BOARD_WINFAST_DV2000] = {
274 .name = "Leadtek Winfast DV2000",
275 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
277 .tuner_addr = ADDR_UNSET,
278 .radio_addr = ADDR_UNSET,
279 .tda9887_conf = TDA9887_PRESENT,
281 .type = CX88_VMUX_TELEVISION,
289 .type = CX88_VMUX_COMPOSITE1,
296 .type = CX88_VMUX_SVIDEO,
311 [CX88_BOARD_LEADTEK_PVR2000] = {
312 // gpio values for PAL version from regspy by DScaler
313 .name = "Leadtek PVR 2000",
314 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
316 .tuner_addr = ADDR_UNSET,
317 .radio_addr = ADDR_UNSET,
318 .tda9887_conf = TDA9887_PRESENT,
320 .type = CX88_VMUX_TELEVISION,
325 .type = CX88_VMUX_COMPOSITE1,
330 .type = CX88_VMUX_SVIDEO,
340 .mpeg = CX88_MPEG_BLACKBIRD,
342 [CX88_BOARD_IODATA_GVVCP3PCI] = {
343 .name = "IODATA GV-VCP3/PCI",
344 .tuner_type = TUNER_ABSENT,
346 .tuner_addr = ADDR_UNSET,
347 .radio_addr = ADDR_UNSET,
349 .type = CX88_VMUX_COMPOSITE1,
352 .type = CX88_VMUX_COMPOSITE2,
355 .type = CX88_VMUX_SVIDEO,
359 [CX88_BOARD_PROLINK_PLAYTVPVR] = {
360 .name = "Prolink PlayTV PVR",
361 .tuner_type = TUNER_PHILIPS_FM1236_MK3,
363 .tuner_addr = ADDR_UNSET,
364 .radio_addr = ADDR_UNSET,
365 .tda9887_conf = TDA9887_PRESENT,
367 .type = CX88_VMUX_TELEVISION,
371 .type = CX88_VMUX_COMPOSITE1,
375 .type = CX88_VMUX_SVIDEO,
384 [CX88_BOARD_ASUS_PVR_416] = {
385 .name = "ASUS PVR-416",
386 .tuner_type = TUNER_PHILIPS_FM1236_MK3,
388 .tuner_addr = ADDR_UNSET,
389 .radio_addr = ADDR_UNSET,
390 .tda9887_conf = TDA9887_PRESENT,
392 .type = CX88_VMUX_TELEVISION,
396 .type = CX88_VMUX_SVIDEO,
398 .gpio0 = 0x0000fde6, // 0x0000fda6 L,R RCA audio in?
405 .mpeg = CX88_MPEG_BLACKBIRD,
407 [CX88_BOARD_MSI_TVANYWHERE] = {
408 .name = "MSI TV-@nywhere",
409 .tuner_type = TUNER_MT2032,
411 .tuner_addr = ADDR_UNSET,
412 .radio_addr = ADDR_UNSET,
413 .tda9887_conf = TDA9887_PRESENT,
415 .type = CX88_VMUX_TELEVISION,
420 .type = CX88_VMUX_COMPOSITE1,
425 .type = CX88_VMUX_SVIDEO,
431 [CX88_BOARD_KWORLD_DVB_T] = {
432 .name = "KWorld/VStream XPert DVB-T",
433 .tuner_type = TUNER_ABSENT,
435 .tuner_addr = ADDR_UNSET,
436 .radio_addr = ADDR_UNSET,
438 .type = CX88_VMUX_COMPOSITE1,
443 .type = CX88_VMUX_SVIDEO,
448 .mpeg = CX88_MPEG_DVB,
450 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1] = {
451 .name = "DViCO FusionHDTV DVB-T1",
452 .tuner_type = TUNER_ABSENT, /* No analog tuner */
454 .tuner_addr = ADDR_UNSET,
455 .radio_addr = ADDR_UNSET,
457 .type = CX88_VMUX_COMPOSITE1,
461 .type = CX88_VMUX_SVIDEO,
465 .mpeg = CX88_MPEG_DVB,
467 [CX88_BOARD_KWORLD_LTV883] = {
468 .name = "KWorld LTV883RF",
469 .tuner_type = TUNER_TNF_8831BGFF,
471 .tuner_addr = ADDR_UNSET,
472 .radio_addr = ADDR_UNSET,
474 .type = CX88_VMUX_TELEVISION,
478 .type = CX88_VMUX_DEBUG,
480 .gpio0 = 0x07f9, // mono from tuner chip
482 .type = CX88_VMUX_COMPOSITE1,
486 .type = CX88_VMUX_SVIDEO,
495 [CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q] = {
496 .name = "DViCO FusionHDTV 3 Gold-Q",
497 .tuner_type = TUNER_MICROTUNE_4042FI5,
499 .tuner_addr = ADDR_UNSET,
500 .radio_addr = ADDR_UNSET,
502 GPIO[0] resets DT3302 DTV receiver
505 GPIO[1] mutes analog audio output connector
506 0 - enable selected source
508 GPIO[2] selects source for analog audio output connector
509 0 - analog audio input connector on tab
510 1 - analog DAC output from CX23881 chip
511 GPIO[3] selects RF input connector on tuner module
512 0 - RF connector labeled CABLE
513 1 - RF connector labeled ANT
514 GPIO[4] selects high RF for QAM256 mode
519 .type = CX88_VMUX_TELEVISION,
523 .type = CX88_VMUX_CABLE,
527 .type = CX88_VMUX_COMPOSITE1,
531 .type = CX88_VMUX_SVIDEO,
535 .mpeg = CX88_MPEG_DVB,
537 [CX88_BOARD_HAUPPAUGE_DVB_T1] = {
538 .name = "Hauppauge Nova-T DVB-T",
539 .tuner_type = TUNER_ABSENT,
541 .tuner_addr = ADDR_UNSET,
542 .radio_addr = ADDR_UNSET,
544 .type = CX88_VMUX_DVB,
547 .mpeg = CX88_MPEG_DVB,
549 [CX88_BOARD_CONEXANT_DVB_T1] = {
550 .name = "Conexant DVB-T reference design",
551 .tuner_type = TUNER_ABSENT,
553 .tuner_addr = ADDR_UNSET,
554 .radio_addr = ADDR_UNSET,
556 .type = CX88_VMUX_DVB,
559 .mpeg = CX88_MPEG_DVB,
561 [CX88_BOARD_PROVIDEO_PV259] = {
562 .name = "Provideo PV259",
563 .tuner_type = TUNER_PHILIPS_FQ1216ME,
565 .tuner_addr = ADDR_UNSET,
566 .radio_addr = ADDR_UNSET,
568 .type = CX88_VMUX_TELEVISION,
572 .mpeg = CX88_MPEG_BLACKBIRD,
574 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS] = {
575 .name = "DViCO FusionHDTV DVB-T Plus",
576 .tuner_type = TUNER_ABSENT, /* No analog tuner */
578 .tuner_addr = ADDR_UNSET,
579 .radio_addr = ADDR_UNSET,
581 .type = CX88_VMUX_COMPOSITE1,
585 .type = CX88_VMUX_SVIDEO,
589 .mpeg = CX88_MPEG_DVB,
591 [CX88_BOARD_DNTV_LIVE_DVB_T] = {
592 .name = "digitalnow DNTV Live! DVB-T",
593 .tuner_type = TUNER_ABSENT,
595 .tuner_addr = ADDR_UNSET,
596 .radio_addr = ADDR_UNSET,
598 .type = CX88_VMUX_COMPOSITE1,
603 .type = CX88_VMUX_SVIDEO,
608 .mpeg = CX88_MPEG_DVB,
610 [CX88_BOARD_PCHDTV_HD3000] = {
611 .name = "pcHDTV HD3000 HDTV",
612 .tuner_type = TUNER_THOMSON_DTT761X,
614 .tuner_addr = ADDR_UNSET,
615 .radio_addr = ADDR_UNSET,
616 .tda9887_conf = TDA9887_PRESENT,
617 /* GPIO[2] = audio source for analog audio out connector
618 * 0 = analog audio input connector
619 * 1 = CX88 audio DACs
621 * GPIO[7] = input to CX88's audio/chroma ADC
623 * 1 = Sound 4.5 MHz IF
625 * GPIO[1,5,6] = Oren 51132 pins 27,35,28 respectively
627 * GPIO[16] = Remote control input
630 .type = CX88_VMUX_TELEVISION,
634 .type = CX88_VMUX_COMPOSITE1,
638 .type = CX88_VMUX_SVIDEO,
646 .mpeg = CX88_MPEG_DVB,
648 [CX88_BOARD_HAUPPAUGE_ROSLYN] = {
649 // entry added by Kaustubh D. Bhalerao <bhalerao.1@osu.edu>
650 // GPIO values obtained from regspy, courtesy Sean Covel
651 .name = "Hauppauge WinTV 28xxx (Roslyn) models",
654 .tuner_addr = ADDR_UNSET,
655 .radio_addr = ADDR_UNSET,
657 .type = CX88_VMUX_TELEVISION,
662 .type = CX88_VMUX_DEBUG,
666 .type = CX88_VMUX_COMPOSITE1,
670 .type = CX88_VMUX_SVIDEO,
680 .mpeg = CX88_MPEG_BLACKBIRD,
682 [CX88_BOARD_DIGITALLOGIC_MEC] = {
683 .name = "Digital-Logic MICROSPACE Entertainment Center (MEC)",
684 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
686 .tuner_addr = ADDR_UNSET,
687 .radio_addr = ADDR_UNSET,
688 .tda9887_conf = TDA9887_PRESENT,
690 .type = CX88_VMUX_TELEVISION,
695 .type = CX88_VMUX_COMPOSITE1,
700 .type = CX88_VMUX_SVIDEO,
710 .mpeg = CX88_MPEG_BLACKBIRD,
712 [CX88_BOARD_IODATA_GVBCTV7E] = {
713 .name = "IODATA GV/BCTV7E",
714 .tuner_type = TUNER_PHILIPS_FQ1286,
716 .tuner_addr = ADDR_UNSET,
717 .radio_addr = ADDR_UNSET,
718 .tda9887_conf = TDA9887_PRESENT,
720 .type = CX88_VMUX_TELEVISION,
724 .type = CX88_VMUX_COMPOSITE1,
728 .type = CX88_VMUX_SVIDEO,
733 [CX88_BOARD_PIXELVIEW_PLAYTV_ULTRA_PRO] = {
734 .name = "PixelView PlayTV Ultra Pro (Stereo)",
735 /* May be also TUNER_YMEC_TVF_5533MF for NTSC/M or PAL/M */
736 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
738 .tuner_addr = ADDR_UNSET,
739 .radio_addr = ADDR_UNSET,
740 /* Some variants use a tda9874 and so need the tvaudio module. */
741 .audio_chip = V4L2_IDENT_TVAUDIO,
743 .type = CX88_VMUX_TELEVISION,
745 .gpio0 = 0xbf61, /* internal decoder */
747 .type = CX88_VMUX_COMPOSITE1,
751 .type = CX88_VMUX_SVIDEO,
760 [CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T] = {
761 .name = "DViCO FusionHDTV 3 Gold-T",
762 .tuner_type = TUNER_THOMSON_DTT761X,
764 .tuner_addr = ADDR_UNSET,
765 .radio_addr = ADDR_UNSET,
766 .tda9887_conf = TDA9887_PRESENT,
768 .type = CX88_VMUX_TELEVISION,
772 .type = CX88_VMUX_COMPOSITE1,
776 .type = CX88_VMUX_SVIDEO,
780 .mpeg = CX88_MPEG_DVB,
782 [CX88_BOARD_ADSTECH_DVB_T_PCI] = {
783 .name = "ADS Tech Instant TV DVB-T PCI",
784 .tuner_type = TUNER_ABSENT,
786 .tuner_addr = ADDR_UNSET,
787 .radio_addr = ADDR_UNSET,
789 .type = CX88_VMUX_COMPOSITE1,
794 .type = CX88_VMUX_SVIDEO,
799 .mpeg = CX88_MPEG_DVB,
801 [CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1] = {
802 .name = "TerraTec Cinergy 1400 DVB-T",
803 .tuner_type = TUNER_ABSENT,
805 .type = CX88_VMUX_DVB,
808 .type = CX88_VMUX_COMPOSITE1,
811 .type = CX88_VMUX_SVIDEO,
814 .mpeg = CX88_MPEG_DVB,
816 [CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD] = {
817 .name = "DViCO FusionHDTV 5 Gold",
818 .tuner_type = TUNER_LG_TDVS_H06XF, /* TDVS-H062F */
820 .tuner_addr = ADDR_UNSET,
821 .radio_addr = ADDR_UNSET,
822 .tda9887_conf = TDA9887_PRESENT,
824 .type = CX88_VMUX_TELEVISION,
828 .type = CX88_VMUX_COMPOSITE1,
832 .type = CX88_VMUX_SVIDEO,
836 .mpeg = CX88_MPEG_DVB,
838 [CX88_BOARD_AVERMEDIA_ULTRATV_MC_550] = {
839 .name = "AverMedia UltraTV Media Center PCI 550",
840 .tuner_type = TUNER_PHILIPS_FM1236_MK3,
842 .tuner_addr = ADDR_UNSET,
843 .radio_addr = ADDR_UNSET,
844 .tda9887_conf = TDA9887_PRESENT,
846 .type = CX88_VMUX_COMPOSITE1,
851 .type = CX88_VMUX_SVIDEO,
856 .type = CX88_VMUX_TELEVISION,
867 .mpeg = CX88_MPEG_BLACKBIRD,
869 [CX88_BOARD_KWORLD_VSTREAM_EXPERT_DVD] = {
870 /* Alexander Wold <awold@bigfoot.com> */
871 .name = "Kworld V-Stream Xpert DVD",
874 .type = CX88_VMUX_COMPOSITE1,
881 .type = CX88_VMUX_SVIDEO,
889 [CX88_BOARD_ATI_HDTVWONDER] = {
890 .name = "ATI HDTV Wonder",
891 .tuner_type = TUNER_PHILIPS_TUV1236D,
893 .tuner_addr = ADDR_UNSET,
894 .radio_addr = ADDR_UNSET,
896 .type = CX88_VMUX_TELEVISION,
903 .type = CX88_VMUX_COMPOSITE1,
910 .type = CX88_VMUX_SVIDEO,
917 .mpeg = CX88_MPEG_DVB,
919 [CX88_BOARD_WINFAST_DTV1000] = {
920 .name = "WinFast DTV1000-T",
921 .tuner_type = TUNER_ABSENT,
923 .tuner_addr = ADDR_UNSET,
924 .radio_addr = ADDR_UNSET,
926 .type = CX88_VMUX_DVB,
929 .type = CX88_VMUX_COMPOSITE1,
932 .type = CX88_VMUX_SVIDEO,
935 .mpeg = CX88_MPEG_DVB,
937 [CX88_BOARD_AVERTV_303] = {
938 .name = "AVerTV 303 (M126)",
939 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
941 .tuner_addr = ADDR_UNSET,
942 .radio_addr = ADDR_UNSET,
943 .tda9887_conf = TDA9887_PRESENT,
945 .type = CX88_VMUX_TELEVISION,
952 .type = CX88_VMUX_COMPOSITE1,
959 .type = CX88_VMUX_SVIDEO,
967 [CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1] = {
968 .name = "Hauppauge Nova-S-Plus DVB-S",
969 .tuner_type = TUNER_ABSENT,
971 .tuner_addr = ADDR_UNSET,
972 .radio_addr = ADDR_UNSET,
973 .audio_chip = V4L2_IDENT_WM8775,
975 .type = CX88_VMUX_DVB,
980 .type = CX88_VMUX_COMPOSITE1,
985 .type = CX88_VMUX_SVIDEO,
990 .mpeg = CX88_MPEG_DVB,
992 [CX88_BOARD_HAUPPAUGE_NOVASE2_S1] = {
993 .name = "Hauppauge Nova-SE2 DVB-S",
994 .tuner_type = TUNER_ABSENT,
996 .tuner_addr = ADDR_UNSET,
997 .radio_addr = ADDR_UNSET,
999 .type = CX88_VMUX_DVB,
1002 .mpeg = CX88_MPEG_DVB,
1004 [CX88_BOARD_KWORLD_DVBS_100] = {
1005 .name = "KWorld DVB-S 100",
1006 .tuner_type = TUNER_ABSENT,
1007 .radio_type = UNSET,
1008 .tuner_addr = ADDR_UNSET,
1009 .radio_addr = ADDR_UNSET,
1011 .type = CX88_VMUX_DVB,
1014 .type = CX88_VMUX_COMPOSITE1,
1017 .type = CX88_VMUX_SVIDEO,
1020 .mpeg = CX88_MPEG_DVB,
1022 [CX88_BOARD_HAUPPAUGE_HVR1100] = {
1023 .name = "Hauppauge WinTV-HVR1100 DVB-T/Hybrid",
1024 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1025 .radio_type = UNSET,
1026 .tuner_addr = ADDR_UNSET,
1027 .radio_addr = ADDR_UNSET,
1028 .tda9887_conf = TDA9887_PRESENT,
1030 .type = CX88_VMUX_TELEVISION,
1033 .type = CX88_VMUX_COMPOSITE1,
1036 .type = CX88_VMUX_SVIDEO,
1039 /* fixme: Add radio support */
1040 .mpeg = CX88_MPEG_DVB,
1042 [CX88_BOARD_HAUPPAUGE_HVR1100LP] = {
1043 .name = "Hauppauge WinTV-HVR1100 DVB-T/Hybrid (Low Profile)",
1044 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1045 .radio_type = UNSET,
1046 .tuner_addr = ADDR_UNSET,
1047 .radio_addr = ADDR_UNSET,
1048 .tda9887_conf = TDA9887_PRESENT,
1050 .type = CX88_VMUX_TELEVISION,
1053 .type = CX88_VMUX_COMPOSITE1,
1056 /* fixme: Add radio support */
1057 .mpeg = CX88_MPEG_DVB,
1059 [CX88_BOARD_DNTV_LIVE_DVB_T_PRO] = {
1060 .name = "digitalnow DNTV Live! DVB-T Pro",
1061 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1062 .radio_type = UNSET,
1063 .tuner_addr = ADDR_UNSET,
1064 .radio_addr = ADDR_UNSET,
1065 .tda9887_conf = TDA9887_PRESENT | TDA9887_PORT1_ACTIVE |
1066 TDA9887_PORT2_ACTIVE,
1068 .type = CX88_VMUX_TELEVISION,
1072 .type = CX88_VMUX_COMPOSITE1,
1076 .type = CX88_VMUX_SVIDEO,
1084 .mpeg = CX88_MPEG_DVB,
1086 [CX88_BOARD_KWORLD_DVB_T_CX22702] = {
1087 /* Kworld V-stream Xpert DVB-T with Thomson tuner */
1088 /* DTT 7579 Conexant CX22702-19 Conexant CX2388x */
1089 /* Manenti Marco <marco_manenti@colman.it> */
1090 .name = "KWorld/VStream XPert DVB-T with cx22702",
1091 .tuner_type = TUNER_ABSENT,
1092 .radio_type = UNSET,
1093 .tuner_addr = ADDR_UNSET,
1094 .radio_addr = ADDR_UNSET,
1096 .type = CX88_VMUX_COMPOSITE1,
1101 .type = CX88_VMUX_SVIDEO,
1106 .mpeg = CX88_MPEG_DVB,
1108 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL] = {
1109 .name = "DViCO FusionHDTV DVB-T Dual Digital",
1110 .tuner_type = TUNER_ABSENT, /* No analog tuner */
1111 .radio_type = UNSET,
1112 .tuner_addr = ADDR_UNSET,
1113 .radio_addr = ADDR_UNSET,
1115 .type = CX88_VMUX_COMPOSITE1,
1117 .gpio0 = 0x000067df,
1119 .type = CX88_VMUX_SVIDEO,
1121 .gpio0 = 0x000067df,
1123 .mpeg = CX88_MPEG_DVB,
1125 [CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT] = {
1126 .name = "KWorld HardwareMpegTV XPert",
1127 .tuner_type = TUNER_PHILIPS_TDA8290,
1128 .radio_type = UNSET,
1129 .tuner_addr = ADDR_UNSET,
1130 .radio_addr = ADDR_UNSET,
1132 .type = CX88_VMUX_TELEVISION,
1137 .type = CX88_VMUX_COMPOSITE1,
1142 .type = CX88_VMUX_SVIDEO,
1152 .mpeg = CX88_MPEG_BLACKBIRD,
1154 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID] = {
1155 .name = "DViCO FusionHDTV DVB-T Hybrid",
1156 .tuner_type = TUNER_THOMSON_FE6600,
1157 .radio_type = UNSET,
1158 .tuner_addr = ADDR_UNSET,
1159 .radio_addr = ADDR_UNSET,
1161 .type = CX88_VMUX_TELEVISION,
1163 .gpio0 = 0x0000a75f,
1165 .type = CX88_VMUX_COMPOSITE1,
1167 .gpio0 = 0x0000a75b,
1169 .type = CX88_VMUX_SVIDEO,
1171 .gpio0 = 0x0000a75b,
1173 .mpeg = CX88_MPEG_DVB,
1175 [CX88_BOARD_PCHDTV_HD5500] = {
1176 .name = "pcHDTV HD5500 HDTV",
1177 .tuner_type = TUNER_LG_TDVS_H06XF, /* TDVS-H064F */
1178 .radio_type = UNSET,
1179 .tuner_addr = ADDR_UNSET,
1180 .radio_addr = ADDR_UNSET,
1181 .tda9887_conf = TDA9887_PRESENT,
1183 .type = CX88_VMUX_TELEVISION,
1187 .type = CX88_VMUX_COMPOSITE1,
1191 .type = CX88_VMUX_SVIDEO,
1195 .mpeg = CX88_MPEG_DVB,
1197 [CX88_BOARD_KWORLD_MCE200_DELUXE] = {
1198 /* FIXME: tested TV input only, disabled composite,
1199 svideo and radio until they can be tested also. */
1200 .name = "Kworld MCE 200 Deluxe",
1201 .tuner_type = TUNER_TENA_9533_DI,
1202 .radio_type = UNSET,
1203 .tda9887_conf = TDA9887_PRESENT,
1204 .tuner_addr = ADDR_UNSET,
1205 .radio_addr = ADDR_UNSET,
1207 .type = CX88_VMUX_TELEVISION,
1211 .mpeg = CX88_MPEG_BLACKBIRD,
1213 [CX88_BOARD_PIXELVIEW_PLAYTV_P7000] = {
1214 /* FIXME: SVideo, Composite and FM inputs are untested */
1215 .name = "PixelView PlayTV P7000",
1216 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
1217 .radio_type = UNSET,
1218 .tuner_addr = ADDR_UNSET,
1219 .radio_addr = ADDR_UNSET,
1220 .tda9887_conf = TDA9887_PRESENT | TDA9887_PORT1_ACTIVE |
1221 TDA9887_PORT2_ACTIVE,
1223 .type = CX88_VMUX_TELEVISION,
1227 .mpeg = CX88_MPEG_BLACKBIRD,
1229 [CX88_BOARD_NPGTECH_REALTV_TOP10FM] = {
1230 .name = "NPG Tech Real TV FM Top 10",
1231 .tuner_type = TUNER_TNF_5335MF, /* Actually a TNF9535 */
1232 .radio_type = UNSET,
1233 .tuner_addr = ADDR_UNSET,
1234 .radio_addr = ADDR_UNSET,
1236 .type = CX88_VMUX_TELEVISION,
1240 .type = CX88_VMUX_COMPOSITE1,
1244 .type = CX88_VMUX_SVIDEO,
1253 [CX88_BOARD_WINFAST_DTV2000H] = {
1254 .name = "WinFast DTV2000 H",
1255 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1256 .radio_type = UNSET,
1257 .tuner_addr = ADDR_UNSET,
1258 .radio_addr = ADDR_UNSET,
1259 .tda9887_conf = TDA9887_PRESENT,
1261 .type = CX88_VMUX_TELEVISION,
1263 .gpio0 = 0x00017304,
1264 .gpio1 = 0x00008203,
1265 .gpio2 = 0x00017304,
1266 .gpio3 = 0x02000000,
1268 .type = CX88_VMUX_COMPOSITE1,
1270 .gpio0 = 0x0001d701,
1271 .gpio1 = 0x0000b207,
1272 .gpio2 = 0x0001d701,
1273 .gpio3 = 0x02000000,
1275 .type = CX88_VMUX_COMPOSITE2,
1277 .gpio0 = 0x0001d503,
1278 .gpio1 = 0x0000b207,
1279 .gpio2 = 0x0001d503,
1280 .gpio3 = 0x02000000,
1282 .type = CX88_VMUX_SVIDEO,
1284 .gpio0 = 0x0001d701,
1285 .gpio1 = 0x0000b207,
1286 .gpio2 = 0x0001d701,
1287 .gpio3 = 0x02000000,
1291 .gpio0 = 0x00015702,
1292 .gpio1 = 0x0000f207,
1293 .gpio2 = 0x00015702,
1294 .gpio3 = 0x02000000,
1296 .mpeg = CX88_MPEG_DVB,
1298 [CX88_BOARD_WINFAST_DTV2000H_J] = {
1299 .name = "WinFast DTV2000 H rev. J",
1300 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1301 .radio_type = UNSET,
1302 .tuner_addr = ADDR_UNSET,
1303 .radio_addr = ADDR_UNSET,
1304 .tda9887_conf = TDA9887_PRESENT,
1306 .type = CX88_VMUX_TELEVISION,
1308 .gpio0 = 0x00017300,
1309 .gpio1 = 0x00008207,
1310 .gpio2 = 0x00000000,
1311 .gpio3 = 0x02000000,
1313 .type = CX88_VMUX_TELEVISION,
1315 .gpio0 = 0x00018300,
1316 .gpio1 = 0x0000f207,
1317 .gpio2 = 0x00017304,
1318 .gpio3 = 0x02000000,
1320 .type = CX88_VMUX_COMPOSITE1,
1322 .gpio0 = 0x00018301,
1323 .gpio1 = 0x0000f207,
1324 .gpio2 = 0x00017304,
1325 .gpio3 = 0x02000000,
1327 .type = CX88_VMUX_SVIDEO,
1329 .gpio0 = 0x00018301,
1330 .gpio1 = 0x0000f207,
1331 .gpio2 = 0x00017304,
1332 .gpio3 = 0x02000000,
1336 .gpio0 = 0x00015702,
1337 .gpio1 = 0x0000f207,
1338 .gpio2 = 0x00015702,
1339 .gpio3 = 0x02000000,
1341 .mpeg = CX88_MPEG_DVB,
1343 [CX88_BOARD_GENIATECH_DVBS] = {
1344 .name = "Geniatech DVB-S",
1345 .tuner_type = TUNER_ABSENT,
1346 .radio_type = UNSET,
1347 .tuner_addr = ADDR_UNSET,
1348 .radio_addr = ADDR_UNSET,
1350 .type = CX88_VMUX_DVB,
1353 .type = CX88_VMUX_COMPOSITE1,
1356 .mpeg = CX88_MPEG_DVB,
1358 [CX88_BOARD_HAUPPAUGE_HVR3000] = {
1359 .name = "Hauppauge WinTV-HVR3000 TriMode Analog/DVB-S/DVB-T",
1360 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1361 .radio_type = UNSET,
1362 .tuner_addr = ADDR_UNSET,
1363 .radio_addr = ADDR_UNSET,
1364 .tda9887_conf = TDA9887_PRESENT,
1365 .audio_chip = V4L2_IDENT_WM8775,
1367 .type = CX88_VMUX_TELEVISION,
1370 /* 1: TV Audio / FM Mono */
1373 .type = CX88_VMUX_COMPOSITE1,
1379 .type = CX88_VMUX_SVIDEO,
1388 /* 4: FM Stereo (untested) */
1391 .mpeg = CX88_MPEG_DVB,
1394 [CX88_BOARD_NORWOOD_MICRO] = {
1395 .name = "Norwood Micro TV Tuner",
1396 .tuner_type = TUNER_TNF_5335MF,
1397 .radio_type = UNSET,
1398 .tuner_addr = ADDR_UNSET,
1399 .radio_addr = ADDR_UNSET,
1401 .type = CX88_VMUX_TELEVISION,
1405 .type = CX88_VMUX_COMPOSITE1,
1409 .type = CX88_VMUX_SVIDEO,
1414 [CX88_BOARD_TE_DTV_250_OEM_SWANN] = {
1415 .name = "Shenzhen Tungsten Ages Tech TE-DTV-250 / Swann OEM",
1416 .tuner_type = TUNER_LG_PAL_NEW_TAPC,
1417 .radio_type = UNSET,
1418 .tuner_addr = ADDR_UNSET,
1419 .radio_addr = ADDR_UNSET,
1421 .type = CX88_VMUX_TELEVISION,
1423 .gpio0 = 0x003fffff,
1424 .gpio1 = 0x00e00000,
1425 .gpio2 = 0x003fffff,
1426 .gpio3 = 0x02000000,
1428 .type = CX88_VMUX_COMPOSITE1,
1430 .gpio0 = 0x003fffff,
1431 .gpio1 = 0x00e00000,
1432 .gpio2 = 0x003fffff,
1433 .gpio3 = 0x02000000,
1435 .type = CX88_VMUX_SVIDEO,
1437 .gpio0 = 0x003fffff,
1438 .gpio1 = 0x00e00000,
1439 .gpio2 = 0x003fffff,
1440 .gpio3 = 0x02000000,
1443 [CX88_BOARD_HAUPPAUGE_HVR1300] = {
1444 .name = "Hauppauge WinTV-HVR1300 DVB-T/Hybrid MPEG Encoder",
1445 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1446 .radio_type = UNSET,
1447 .tuner_addr = ADDR_UNSET,
1448 .radio_addr = ADDR_UNSET,
1449 .tda9887_conf = TDA9887_PRESENT,
1450 .audio_chip = V4L2_IDENT_WM8775,
1452 * gpio0 as reported by Mike Crash <mike AT mikecrash.com>
1455 .type = CX88_VMUX_TELEVISION,
1458 /* 1: TV Audio / FM Mono */
1461 .type = CX88_VMUX_COMPOSITE1,
1467 .type = CX88_VMUX_SVIDEO,
1473 .mpeg = CX88_MPEG_DVB | CX88_MPEG_BLACKBIRD,
1477 /* 4: FM Stereo (untested) */
1481 [CX88_BOARD_SAMSUNG_SMT_7020] = {
1482 .name = "Samsung SMT 7020 DVB-S",
1483 .tuner_type = TUNER_ABSENT,
1484 .radio_type = UNSET,
1485 .tuner_addr = ADDR_UNSET,
1486 .radio_addr = ADDR_UNSET,
1488 .type = CX88_VMUX_DVB,
1491 .mpeg = CX88_MPEG_DVB,
1493 [CX88_BOARD_ADSTECH_PTV_390] = {
1494 .name = "ADS Tech Instant Video PCI",
1495 .tuner_type = TUNER_ABSENT,
1496 .radio_type = UNSET,
1497 .tuner_addr = ADDR_UNSET,
1498 .radio_addr = ADDR_UNSET,
1500 .type = CX88_VMUX_DEBUG,
1504 .type = CX88_VMUX_COMPOSITE1,
1508 .type = CX88_VMUX_SVIDEO,
1513 [CX88_BOARD_PINNACLE_PCTV_HD_800i] = {
1514 .name = "Pinnacle PCTV HD 800i",
1515 .tuner_type = TUNER_XC5000,
1516 .radio_type = UNSET,
1517 .tuner_addr = ADDR_UNSET,
1518 .radio_addr = ADDR_UNSET,
1520 .type = CX88_VMUX_TELEVISION,
1525 .type = CX88_VMUX_COMPOSITE1,
1531 .type = CX88_VMUX_SVIDEO,
1537 .mpeg = CX88_MPEG_DVB,
1539 [CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO] = {
1540 .name = "DViCO FusionHDTV 5 PCI nano",
1541 /* xc3008 tuner, digital only for now */
1542 .tuner_type = TUNER_ABSENT,
1543 .radio_type = UNSET,
1544 .tuner_addr = ADDR_UNSET,
1545 .radio_addr = ADDR_UNSET,
1547 .type = CX88_VMUX_TELEVISION,
1549 .gpio0 = 0x000027df, /* Unconfirmed */
1551 .type = CX88_VMUX_COMPOSITE1,
1553 .gpio0 = 0x000027df, /* Unconfirmed */
1556 .type = CX88_VMUX_SVIDEO,
1558 .gpio0 = 0x000027df, /* Unconfirmed */
1561 .mpeg = CX88_MPEG_DVB,
1563 [CX88_BOARD_PINNACLE_HYBRID_PCTV] = {
1564 .name = "Pinnacle Hybrid PCTV",
1565 .tuner_type = TUNER_XC2028,
1567 .radio_type = TUNER_XC2028,
1570 .type = CX88_VMUX_TELEVISION,
1576 .type = CX88_VMUX_COMPOSITE1,
1582 .type = CX88_VMUX_SVIDEO,
1594 .mpeg = CX88_MPEG_DVB,
1596 /* Terry Wu <terrywu2009@gmail.com> */
1597 /* TV Audio : set GPIO 2, 18, 19 value to 0, 1, 0 */
1598 /* FM Audio : set GPIO 2, 18, 19 value to 0, 0, 0 */
1599 /* Line-in Audio : set GPIO 2, 18, 19 value to 0, 1, 1 */
1600 /* Mute Audio : set GPIO 2 value to 1 */
1601 [CX88_BOARD_WINFAST_TV2000_XP_GLOBAL] = {
1602 .name = "Leadtek TV2000 XP Global",
1603 .tuner_type = TUNER_XC2028,
1605 .radio_type = TUNER_XC2028,
1608 .type = CX88_VMUX_TELEVISION,
1610 .gpio0 = 0x0400, /* pin 2 = 0 */
1612 .gpio2 = 0x0C04, /* pin 18 = 1, pin 19 = 0 */
1615 .type = CX88_VMUX_COMPOSITE1,
1617 .gpio0 = 0x0400, /* pin 2 = 0 */
1619 .gpio2 = 0x0C0C, /* pin 18 = 1, pin 19 = 1 */
1622 .type = CX88_VMUX_SVIDEO,
1624 .gpio0 = 0x0400, /* pin 2 = 0 */
1626 .gpio2 = 0x0C0C, /* pin 18 = 1, pin 19 = 1 */
1631 .gpio0 = 0x0400, /* pin 2 = 0 */
1633 .gpio2 = 0x0C00, /* pin 18 = 0, pin 19 = 0 */
1637 [CX88_BOARD_POWERCOLOR_REAL_ANGEL] = {
1638 .name = "PowerColor RA330", /* Long names may confuse LIRC. */
1639 .tuner_type = TUNER_XC2028,
1642 .type = CX88_VMUX_DEBUG,
1643 .vmux = 3, /* Due to the way the cx88 driver is written, */
1644 .gpio0 = 0x00ff, /* there is no way to deactivate audio pass- */
1645 .gpio1 = 0xf39d, /* through without this entry. Furthermore, if */
1646 .gpio3 = 0x0000, /* the TV mux entry is first, you get audio */
1647 }, { /* from the tuner on boot for a little while. */
1648 .type = CX88_VMUX_TELEVISION,
1654 .type = CX88_VMUX_COMPOSITE1,
1660 .type = CX88_VMUX_SVIDEO,
1673 [CX88_BOARD_GENIATECH_X8000_MT] = {
1674 /* Also PowerColor Real Angel 330 and Geniatech X800 OEM */
1675 .name = "Geniatech X8000-MT DVBT",
1676 .tuner_type = TUNER_XC2028,
1679 .type = CX88_VMUX_TELEVISION,
1681 .gpio0 = 0x00000000,
1682 .gpio1 = 0x00e3e341,
1683 .gpio2 = 0x00000000,
1684 .gpio3 = 0x00000000,
1686 .type = CX88_VMUX_COMPOSITE1,
1688 .gpio0 = 0x00000000,
1689 .gpio1 = 0x00e3e361,
1690 .gpio2 = 0x00000000,
1691 .gpio3 = 0x00000000,
1693 .type = CX88_VMUX_SVIDEO,
1695 .gpio0 = 0x00000000,
1696 .gpio1 = 0x00e3e361,
1697 .gpio2 = 0x00000000,
1698 .gpio3 = 0x00000000,
1702 .gpio0 = 0x00000000,
1703 .gpio1 = 0x00e3e341,
1704 .gpio2 = 0x00000000,
1705 .gpio3 = 0x00000000,
1707 .mpeg = CX88_MPEG_DVB,
1709 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO] = {
1710 .name = "DViCO FusionHDTV DVB-T PRO",
1711 .tuner_type = TUNER_XC2028,
1713 .radio_type = UNSET,
1714 .radio_addr = ADDR_UNSET,
1716 .type = CX88_VMUX_COMPOSITE1,
1718 .gpio0 = 0x000067df,
1720 .type = CX88_VMUX_SVIDEO,
1722 .gpio0 = 0x000067df,
1724 .mpeg = CX88_MPEG_DVB,
1726 [CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD] = {
1727 .name = "DViCO FusionHDTV 7 Gold",
1728 .tuner_type = TUNER_XC5000,
1729 .radio_type = UNSET,
1730 .tuner_addr = ADDR_UNSET,
1731 .radio_addr = ADDR_UNSET,
1733 .type = CX88_VMUX_TELEVISION,
1737 .type = CX88_VMUX_COMPOSITE1,
1741 .type = CX88_VMUX_SVIDEO,
1745 .mpeg = CX88_MPEG_DVB,
1747 [CX88_BOARD_PROLINK_PV_8000GT] = {
1748 .name = "Prolink Pixelview MPEG 8000GT",
1749 .tuner_type = TUNER_XC2028,
1752 .type = CX88_VMUX_TELEVISION,
1757 .type = CX88_VMUX_COMPOSITE1,
1761 .type = CX88_VMUX_SVIDEO,
1770 [CX88_BOARD_PROLINK_PV_GLOBAL_XTREME] = {
1771 .name = "Prolink Pixelview Global Extreme",
1772 .tuner_type = TUNER_XC2028,
1775 .type = CX88_VMUX_TELEVISION,
1781 .type = CX88_VMUX_COMPOSITE1,
1787 .type = CX88_VMUX_SVIDEO,
1800 /* Both radio, analog and ATSC work with this board.
1801 However, for analog to work, s5h1409 gate should be open,
1802 otherwise, tuner-xc3028 won't be detected.
1803 A proper fix require using the newer i2c methods to add
1804 tuner-xc3028 without doing an i2c probe.
1806 [CX88_BOARD_KWORLD_ATSC_120] = {
1807 .name = "Kworld PlusTV HD PCI 120 (ATSC 120)",
1808 .tuner_type = TUNER_XC2028,
1809 .radio_type = UNSET,
1810 .tuner_addr = ADDR_UNSET,
1811 .radio_addr = ADDR_UNSET,
1813 .type = CX88_VMUX_TELEVISION,
1815 .gpio0 = 0x000000ff,
1816 .gpio1 = 0x0000f35d,
1817 .gpio2 = 0x00000000,
1819 .type = CX88_VMUX_COMPOSITE1,
1821 .gpio0 = 0x000000ff,
1822 .gpio1 = 0x0000f37e,
1823 .gpio2 = 0x00000000,
1825 .type = CX88_VMUX_SVIDEO,
1827 .gpio0 = 0x000000ff,
1828 .gpio1 = 0x0000f37e,
1829 .gpio2 = 0x00000000,
1833 .gpio0 = 0x000000ff,
1834 .gpio1 = 0x0000f35d,
1835 .gpio2 = 0x00000000,
1837 .mpeg = CX88_MPEG_DVB,
1839 [CX88_BOARD_HAUPPAUGE_HVR4000] = {
1840 .name = "Hauppauge WinTV-HVR4000 DVB-S/S2/T/Hybrid",
1841 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1842 .radio_type = UNSET,
1843 .tuner_addr = ADDR_UNSET,
1844 .radio_addr = ADDR_UNSET,
1845 .tda9887_conf = TDA9887_PRESENT,
1846 .audio_chip = V4L2_IDENT_WM8775,
1850 * Analogue SAT DVB-T
1851 * Antenna 0xc4bf 0xc4bb
1852 * Composite 0xc4bf 0xc4bb
1853 * S-Video 0xc4bf 0xc4bb
1854 * Composite1 0xc4ff 0xc4fb
1855 * S-Video1 0xc4ff 0xc4fb
1857 * BIT VALUE FUNCTION GP{x}_IO
1860 * 2 1 O:MPEG PORT 0=DVB-T 1=DVB-S
1864 * 6 0 O:INPUT SELECTOR 0=INTERNAL 1=EXPANSION
1865 * 7 1 O:DVB-T DEMOD RESET LOW
1867 * BIT VALUE FUNCTION GP{x}_OE
1879 * 1: TV Audio / FM Mono
1881 * 3: Line-In Expansion
1885 .type = CX88_VMUX_TELEVISION,
1888 /* 1: TV Audio / FM Mono */
1891 .type = CX88_VMUX_COMPOSITE1,
1897 .type = CX88_VMUX_SVIDEO,
1909 .mpeg = CX88_MPEG_DVB,
1912 [CX88_BOARD_HAUPPAUGE_HVR4000LITE] = {
1913 .name = "Hauppauge WinTV-HVR4000(Lite) DVB-S/S2",
1914 .tuner_type = UNSET,
1915 .radio_type = UNSET,
1916 .tuner_addr = ADDR_UNSET,
1917 .radio_addr = ADDR_UNSET,
1919 .type = CX88_VMUX_DVB,
1922 .mpeg = CX88_MPEG_DVB,
1924 [CX88_BOARD_TEVII_S420] = {
1925 .name = "TeVii S420 DVB-S",
1926 .tuner_type = UNSET,
1927 .radio_type = UNSET,
1928 .tuner_addr = ADDR_UNSET,
1929 .radio_addr = ADDR_UNSET,
1931 .type = CX88_VMUX_DVB,
1934 .mpeg = CX88_MPEG_DVB,
1936 [CX88_BOARD_TEVII_S460] = {
1937 .name = "TeVii S460 DVB-S/S2",
1938 .tuner_type = UNSET,
1939 .radio_type = UNSET,
1940 .tuner_addr = ADDR_UNSET,
1941 .radio_addr = ADDR_UNSET,
1943 .type = CX88_VMUX_DVB,
1946 .mpeg = CX88_MPEG_DVB,
1948 [CX88_BOARD_OMICOM_SS4_PCI] = {
1949 .name = "Omicom SS4 DVB-S/S2 PCI",
1950 .tuner_type = UNSET,
1951 .radio_type = UNSET,
1952 .tuner_addr = ADDR_UNSET,
1953 .radio_addr = ADDR_UNSET,
1955 .type = CX88_VMUX_DVB,
1958 .mpeg = CX88_MPEG_DVB,
1960 [CX88_BOARD_TBS_8910] = {
1961 .name = "TBS 8910 DVB-S",
1962 .tuner_type = UNSET,
1963 .radio_type = UNSET,
1964 .tuner_addr = ADDR_UNSET,
1965 .radio_addr = ADDR_UNSET,
1967 .type = CX88_VMUX_DVB,
1970 .mpeg = CX88_MPEG_DVB,
1972 [CX88_BOARD_TBS_8920] = {
1973 .name = "TBS 8920 DVB-S/S2",
1974 .tuner_type = TUNER_ABSENT,
1975 .radio_type = UNSET,
1976 .tuner_addr = ADDR_UNSET,
1977 .radio_addr = ADDR_UNSET,
1979 .type = CX88_VMUX_DVB,
1983 .mpeg = CX88_MPEG_DVB,
1985 [CX88_BOARD_PROF_6200] = {
1986 .name = "Prof 6200 DVB-S",
1987 .tuner_type = UNSET,
1988 .radio_type = UNSET,
1989 .tuner_addr = ADDR_UNSET,
1990 .radio_addr = ADDR_UNSET,
1992 .type = CX88_VMUX_DVB,
1995 .mpeg = CX88_MPEG_DVB,
1997 [CX88_BOARD_PROF_7300] = {
1998 .name = "PROF 7300 DVB-S/S2",
1999 .tuner_type = UNSET,
2000 .radio_type = UNSET,
2001 .tuner_addr = ADDR_UNSET,
2002 .radio_addr = ADDR_UNSET,
2004 .type = CX88_VMUX_DVB,
2007 .mpeg = CX88_MPEG_DVB,
2009 [CX88_BOARD_SATTRADE_ST4200] = {
2010 .name = "SATTRADE ST4200 DVB-S/S2",
2011 .tuner_type = UNSET,
2012 .radio_type = UNSET,
2013 .tuner_addr = ADDR_UNSET,
2014 .radio_addr = ADDR_UNSET,
2016 .type = CX88_VMUX_DVB,
2019 .mpeg = CX88_MPEG_DVB,
2021 [CX88_BOARD_TERRATEC_CINERGY_HT_PCI_MKII] = {
2022 .name = "Terratec Cinergy HT PCI MKII",
2023 .tuner_type = TUNER_XC2028,
2025 .radio_type = TUNER_XC2028,
2028 .type = CX88_VMUX_TELEVISION,
2034 .type = CX88_VMUX_COMPOSITE1,
2040 .type = CX88_VMUX_SVIDEO,
2052 .mpeg = CX88_MPEG_DVB,
2054 [CX88_BOARD_HAUPPAUGE_IRONLY] = {
2055 .name = "Hauppauge WinTV-IR Only",
2056 .tuner_type = UNSET,
2057 .radio_type = UNSET,
2058 .tuner_addr = ADDR_UNSET,
2059 .radio_addr = ADDR_UNSET,
2061 [CX88_BOARD_WINFAST_DTV1800H] = {
2062 .name = "Leadtek WinFast DTV1800 Hybrid",
2063 .tuner_type = TUNER_XC2028,
2064 .radio_type = TUNER_XC2028,
2070 * 2: mute (0=off,1=on)
2071 * 12: tuner reset pin
2072 * 13: audio source (0=tuner audio,1=line in)
2073 * 14: FM (0=on,1=off ???)
2076 .type = CX88_VMUX_TELEVISION,
2078 .gpio0 = 0x0400, /* pin 2 = 0 */
2079 .gpio1 = 0x6040, /* pin 13 = 0, pin 14 = 1 */
2082 .type = CX88_VMUX_COMPOSITE1,
2084 .gpio0 = 0x0400, /* pin 2 = 0 */
2085 .gpio1 = 0x6060, /* pin 13 = 1, pin 14 = 1 */
2088 .type = CX88_VMUX_SVIDEO,
2090 .gpio0 = 0x0400, /* pin 2 = 0 */
2091 .gpio1 = 0x6060, /* pin 13 = 1, pin 14 = 1 */
2096 .gpio0 = 0x0400, /* pin 2 = 0 */
2097 .gpio1 = 0x6000, /* pin 13 = 0, pin 14 = 0 */
2100 .mpeg = CX88_MPEG_DVB,
2102 [CX88_BOARD_PROF_7301] = {
2103 .name = "Prof 7301 DVB-S/S2",
2104 .tuner_type = UNSET,
2105 .radio_type = UNSET,
2106 .tuner_addr = ADDR_UNSET,
2107 .radio_addr = ADDR_UNSET,
2109 .type = CX88_VMUX_DVB,
2112 .mpeg = CX88_MPEG_DVB,
2114 [CX88_BOARD_TWINHAN_VP1027_DVBS] = {
2115 .name = "Twinhan VP-1027 DVB-S",
2116 .tuner_type = TUNER_ABSENT,
2117 .radio_type = UNSET,
2118 .tuner_addr = ADDR_UNSET,
2119 .radio_addr = ADDR_UNSET,
2121 .type = CX88_VMUX_DVB,
2124 .mpeg = CX88_MPEG_DVB,
2128 /* ------------------------------------------------------------------ */
2129 /* PCI subsystem IDs */
2131 static const struct cx88_subid cx88_subids[] = {
2133 .subvendor = 0x0070,
2134 .subdevice = 0x3400,
2135 .card = CX88_BOARD_HAUPPAUGE,
2137 .subvendor = 0x0070,
2138 .subdevice = 0x3401,
2139 .card = CX88_BOARD_HAUPPAUGE,
2141 .subvendor = 0x14c7,
2142 .subdevice = 0x0106,
2143 .card = CX88_BOARD_GDI,
2145 .subvendor = 0x14c7,
2146 .subdevice = 0x0107, /* with mpeg encoder */
2147 .card = CX88_BOARD_GDI,
2149 .subvendor = PCI_VENDOR_ID_ATI,
2150 .subdevice = 0x00f8,
2151 .card = CX88_BOARD_ATI_WONDER_PRO,
2153 .subvendor = PCI_VENDOR_ID_ATI,
2154 .subdevice = 0x00f9,
2155 .card = CX88_BOARD_ATI_WONDER_PRO,
2157 .subvendor = 0x107d,
2158 .subdevice = 0x6611,
2159 .card = CX88_BOARD_WINFAST2000XP_EXPERT,
2161 .subvendor = 0x107d,
2162 .subdevice = 0x6613, /* NTSC */
2163 .card = CX88_BOARD_WINFAST2000XP_EXPERT,
2165 .subvendor = 0x107d,
2166 .subdevice = 0x6620,
2167 .card = CX88_BOARD_WINFAST_DV2000,
2169 .subvendor = 0x107d,
2170 .subdevice = 0x663b,
2171 .card = CX88_BOARD_LEADTEK_PVR2000,
2173 .subvendor = 0x107d,
2174 .subdevice = 0x663c,
2175 .card = CX88_BOARD_LEADTEK_PVR2000,
2177 .subvendor = 0x1461,
2178 .subdevice = 0x000b,
2179 .card = CX88_BOARD_AVERTV_STUDIO_303,
2181 .subvendor = 0x1462,
2182 .subdevice = 0x8606,
2183 .card = CX88_BOARD_MSI_TVANYWHERE_MASTER,
2185 .subvendor = 0x10fc,
2186 .subdevice = 0xd003,
2187 .card = CX88_BOARD_IODATA_GVVCP3PCI,
2189 .subvendor = 0x1043,
2190 .subdevice = 0x4823, /* with mpeg encoder */
2191 .card = CX88_BOARD_ASUS_PVR_416,
2193 .subvendor = 0x17de,
2194 .subdevice = 0x08a6,
2195 .card = CX88_BOARD_KWORLD_DVB_T,
2197 .subvendor = 0x18ac,
2198 .subdevice = 0xd810,
2199 .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q,
2201 .subvendor = 0x18ac,
2202 .subdevice = 0xd820,
2203 .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T,
2205 .subvendor = 0x18ac,
2206 .subdevice = 0xdb00,
2207 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1,
2209 .subvendor = 0x0070,
2210 .subdevice = 0x9002,
2211 .card = CX88_BOARD_HAUPPAUGE_DVB_T1,
2213 .subvendor = 0x14f1,
2214 .subdevice = 0x0187,
2215 .card = CX88_BOARD_CONEXANT_DVB_T1,
2217 .subvendor = 0x1540,
2218 .subdevice = 0x2580,
2219 .card = CX88_BOARD_PROVIDEO_PV259,
2221 .subvendor = 0x18ac,
2222 .subdevice = 0xdb10,
2223 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS,
2225 .subvendor = 0x1554,
2226 .subdevice = 0x4811,
2227 .card = CX88_BOARD_PIXELVIEW,
2229 .subvendor = 0x7063,
2230 .subdevice = 0x3000, /* HD-3000 card */
2231 .card = CX88_BOARD_PCHDTV_HD3000,
2233 .subvendor = 0x17de,
2234 .subdevice = 0xa8a6,
2235 .card = CX88_BOARD_DNTV_LIVE_DVB_T,
2237 .subvendor = 0x0070,
2238 .subdevice = 0x2801,
2239 .card = CX88_BOARD_HAUPPAUGE_ROSLYN,
2241 .subvendor = 0x14f1,
2242 .subdevice = 0x0342,
2243 .card = CX88_BOARD_DIGITALLOGIC_MEC,
2245 .subvendor = 0x10fc,
2246 .subdevice = 0xd035,
2247 .card = CX88_BOARD_IODATA_GVBCTV7E,
2249 .subvendor = 0x1421,
2250 .subdevice = 0x0334,
2251 .card = CX88_BOARD_ADSTECH_DVB_T_PCI,
2253 .subvendor = 0x153b,
2254 .subdevice = 0x1166,
2255 .card = CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1,
2257 .subvendor = 0x18ac,
2258 .subdevice = 0xd500,
2259 .card = CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD,
2261 .subvendor = 0x1461,
2262 .subdevice = 0x8011,
2263 .card = CX88_BOARD_AVERMEDIA_ULTRATV_MC_550,
2265 .subvendor = PCI_VENDOR_ID_ATI,
2266 .subdevice = 0xa101,
2267 .card = CX88_BOARD_ATI_HDTVWONDER,
2269 .subvendor = 0x107d,
2270 .subdevice = 0x665f,
2271 .card = CX88_BOARD_WINFAST_DTV1000,
2273 .subvendor = 0x1461,
2274 .subdevice = 0x000a,
2275 .card = CX88_BOARD_AVERTV_303,
2277 .subvendor = 0x0070,
2278 .subdevice = 0x9200,
2279 .card = CX88_BOARD_HAUPPAUGE_NOVASE2_S1,
2281 .subvendor = 0x0070,
2282 .subdevice = 0x9201,
2283 .card = CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1,
2285 .subvendor = 0x0070,
2286 .subdevice = 0x9202,
2287 .card = CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1,
2289 .subvendor = 0x17de,
2290 .subdevice = 0x08b2,
2291 .card = CX88_BOARD_KWORLD_DVBS_100,
2293 .subvendor = 0x0070,
2294 .subdevice = 0x9400,
2295 .card = CX88_BOARD_HAUPPAUGE_HVR1100,
2297 .subvendor = 0x0070,
2298 .subdevice = 0x9402,
2299 .card = CX88_BOARD_HAUPPAUGE_HVR1100,
2301 .subvendor = 0x0070,
2302 .subdevice = 0x9800,
2303 .card = CX88_BOARD_HAUPPAUGE_HVR1100LP,
2305 .subvendor = 0x0070,
2306 .subdevice = 0x9802,
2307 .card = CX88_BOARD_HAUPPAUGE_HVR1100LP,
2309 .subvendor = 0x0070,
2310 .subdevice = 0x9001,
2311 .card = CX88_BOARD_HAUPPAUGE_DVB_T1,
2313 .subvendor = 0x1822,
2314 .subdevice = 0x0025,
2315 .card = CX88_BOARD_DNTV_LIVE_DVB_T_PRO,
2317 .subvendor = 0x17de,
2318 .subdevice = 0x08a1,
2319 .card = CX88_BOARD_KWORLD_DVB_T_CX22702,
2321 .subvendor = 0x18ac,
2322 .subdevice = 0xdb50,
2323 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL,
2325 .subvendor = 0x18ac,
2326 .subdevice = 0xdb54,
2327 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL,
2328 /* Re-branded DViCO: DigitalNow DVB-T Dual */
2330 .subvendor = 0x18ac,
2331 .subdevice = 0xdb11,
2332 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS,
2333 /* Re-branded DViCO: UltraView DVB-T Plus */
2335 .subvendor = 0x18ac,
2336 .subdevice = 0xdb30,
2337 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO,
2339 .subvendor = 0x17de,
2340 .subdevice = 0x0840,
2341 .card = CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT,
2343 .subvendor = 0x1421,
2344 .subdevice = 0x0305,
2345 .card = CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT,
2347 .subvendor = 0x18ac,
2348 .subdevice = 0xdb40,
2349 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID,
2351 .subvendor = 0x18ac,
2352 .subdevice = 0xdb44,
2353 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID,
2355 .subvendor = 0x7063,
2356 .subdevice = 0x5500,
2357 .card = CX88_BOARD_PCHDTV_HD5500,
2359 .subvendor = 0x17de,
2360 .subdevice = 0x0841,
2361 .card = CX88_BOARD_KWORLD_MCE200_DELUXE,
2363 .subvendor = 0x1822,
2364 .subdevice = 0x0019,
2365 .card = CX88_BOARD_DNTV_LIVE_DVB_T_PRO,
2367 .subvendor = 0x1554,
2368 .subdevice = 0x4813,
2369 .card = CX88_BOARD_PIXELVIEW_PLAYTV_P7000,
2371 .subvendor = 0x14f1,
2372 .subdevice = 0x0842,
2373 .card = CX88_BOARD_NPGTECH_REALTV_TOP10FM,
2375 .subvendor = 0x107d,
2376 .subdevice = 0x665e,
2377 .card = CX88_BOARD_WINFAST_DTV2000H,
2379 .subvendor = 0x107d,
2380 .subdevice = 0x6f2b,
2381 .card = CX88_BOARD_WINFAST_DTV2000H_J,
2383 .subvendor = 0x18ac,
2384 .subdevice = 0xd800, /* FusionHDTV 3 Gold (original revision) */
2385 .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q,
2387 .subvendor = 0x14f1,
2388 .subdevice = 0x0084,
2389 .card = CX88_BOARD_GENIATECH_DVBS,
2391 .subvendor = 0x0070,
2392 .subdevice = 0x1404,
2393 .card = CX88_BOARD_HAUPPAUGE_HVR3000,
2395 .subvendor = 0x18ac,
2396 .subdevice = 0xdc00,
2397 .card = CX88_BOARD_SAMSUNG_SMT_7020,
2399 .subvendor = 0x18ac,
2400 .subdevice = 0xdccd,
2401 .card = CX88_BOARD_SAMSUNG_SMT_7020,
2403 .subvendor = 0x1461,
2404 .subdevice = 0xc111, /* AverMedia M150-D */
2405 /* This board is known to work with the ASUS PVR416 config */
2406 .card = CX88_BOARD_ASUS_PVR_416,
2408 .subvendor = 0xc180,
2409 .subdevice = 0xc980,
2410 .card = CX88_BOARD_TE_DTV_250_OEM_SWANN,
2412 .subvendor = 0x0070,
2413 .subdevice = 0x9600,
2414 .card = CX88_BOARD_HAUPPAUGE_HVR1300,
2416 .subvendor = 0x0070,
2417 .subdevice = 0x9601,
2418 .card = CX88_BOARD_HAUPPAUGE_HVR1300,
2420 .subvendor = 0x0070,
2421 .subdevice = 0x9602,
2422 .card = CX88_BOARD_HAUPPAUGE_HVR1300,
2424 .subvendor = 0x107d,
2425 .subdevice = 0x6632,
2426 .card = CX88_BOARD_LEADTEK_PVR2000,
2428 .subvendor = 0x12ab,
2429 .subdevice = 0x2300, /* Club3D Zap TV2100 */
2430 .card = CX88_BOARD_KWORLD_DVB_T_CX22702,
2432 .subvendor = 0x0070,
2433 .subdevice = 0x9000,
2434 .card = CX88_BOARD_HAUPPAUGE_DVB_T1,
2436 .subvendor = 0x0070,
2437 .subdevice = 0x1400,
2438 .card = CX88_BOARD_HAUPPAUGE_HVR3000,
2440 .subvendor = 0x0070,
2441 .subdevice = 0x1401,
2442 .card = CX88_BOARD_HAUPPAUGE_HVR3000,
2444 .subvendor = 0x0070,
2445 .subdevice = 0x1402,
2446 .card = CX88_BOARD_HAUPPAUGE_HVR3000,
2448 .subvendor = 0x1421,
2449 .subdevice = 0x0341, /* ADS Tech InstantTV DVB-S */
2450 .card = CX88_BOARD_KWORLD_DVBS_100,
2452 .subvendor = 0x1421,
2453 .subdevice = 0x0390,
2454 .card = CX88_BOARD_ADSTECH_PTV_390,
2456 .subvendor = 0x11bd,
2457 .subdevice = 0x0051,
2458 .card = CX88_BOARD_PINNACLE_PCTV_HD_800i,
2460 .subvendor = 0x18ac,
2461 .subdevice = 0xd530,
2462 .card = CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO,
2464 .subvendor = 0x12ab,
2465 .subdevice = 0x1788,
2466 .card = CX88_BOARD_PINNACLE_HYBRID_PCTV,
2468 .subvendor = 0x14f1,
2469 .subdevice = 0xea3d,
2470 .card = CX88_BOARD_POWERCOLOR_REAL_ANGEL,
2472 .subvendor = 0x107d,
2473 .subdevice = 0x6f18,
2474 .card = CX88_BOARD_WINFAST_TV2000_XP_GLOBAL,
2476 .subvendor = 0x14f1,
2477 .subdevice = 0x8852,
2478 .card = CX88_BOARD_GENIATECH_X8000_MT,
2480 .subvendor = 0x18ac,
2481 .subdevice = 0xd610,
2482 .card = CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD,
2484 .subvendor = 0x1554,
2485 .subdevice = 0x4935,
2486 .card = CX88_BOARD_PROLINK_PV_8000GT,
2488 .subvendor = 0x1554,
2489 .subdevice = 0x4976,
2490 .card = CX88_BOARD_PROLINK_PV_GLOBAL_XTREME,
2492 .subvendor = 0x17de,
2493 .subdevice = 0x08c1,
2494 .card = CX88_BOARD_KWORLD_ATSC_120,
2496 .subvendor = 0x0070,
2497 .subdevice = 0x6900,
2498 .card = CX88_BOARD_HAUPPAUGE_HVR4000,
2500 .subvendor = 0x0070,
2501 .subdevice = 0x6904,
2502 .card = CX88_BOARD_HAUPPAUGE_HVR4000,
2504 .subvendor = 0x0070,
2505 .subdevice = 0x6902,
2506 .card = CX88_BOARD_HAUPPAUGE_HVR4000,
2508 .subvendor = 0x0070,
2509 .subdevice = 0x6905,
2510 .card = CX88_BOARD_HAUPPAUGE_HVR4000LITE,
2512 .subvendor = 0x0070,
2513 .subdevice = 0x6906,
2514 .card = CX88_BOARD_HAUPPAUGE_HVR4000LITE,
2516 .subvendor = 0xd420,
2517 .subdevice = 0x9022,
2518 .card = CX88_BOARD_TEVII_S420,
2520 .subvendor = 0xd460,
2521 .subdevice = 0x9022,
2522 .card = CX88_BOARD_TEVII_S460,
2524 .subvendor = 0xA044,
2525 .subdevice = 0x2011,
2526 .card = CX88_BOARD_OMICOM_SS4_PCI,
2528 .subvendor = 0x8910,
2529 .subdevice = 0x8888,
2530 .card = CX88_BOARD_TBS_8910,
2532 .subvendor = 0x8920,
2533 .subdevice = 0x8888,
2534 .card = CX88_BOARD_TBS_8920,
2536 .subvendor = 0xb022,
2537 .subdevice = 0x3022,
2538 .card = CX88_BOARD_PROF_6200,
2540 .subvendor = 0xB033,
2541 .subdevice = 0x3033,
2542 .card = CX88_BOARD_PROF_7300,
2544 .subvendor = 0xb200,
2545 .subdevice = 0x4200,
2546 .card = CX88_BOARD_SATTRADE_ST4200,
2548 .subvendor = 0x153b,
2549 .subdevice = 0x1177,
2550 .card = CX88_BOARD_TERRATEC_CINERGY_HT_PCI_MKII,
2552 .subvendor = 0x0070,
2553 .subdevice = 0x9290,
2554 .card = CX88_BOARD_HAUPPAUGE_IRONLY,
2556 .subvendor = 0x107d,
2557 .subdevice = 0x6654,
2558 .card = CX88_BOARD_WINFAST_DTV1800H,
2560 /* PVR2000 PAL Model [107d:6630] */
2561 .subvendor = 0x107d,
2562 .subdevice = 0x6630,
2563 .card = CX88_BOARD_LEADTEK_PVR2000,
2565 /* PVR2000 PAL Model [107d:6638] */
2566 .subvendor = 0x107d,
2567 .subdevice = 0x6638,
2568 .card = CX88_BOARD_LEADTEK_PVR2000,
2570 /* PVR2000 NTSC Model [107d:6631] */
2571 .subvendor = 0x107d,
2572 .subdevice = 0x6631,
2573 .card = CX88_BOARD_LEADTEK_PVR2000,
2575 /* PVR2000 NTSC Model [107d:6637] */
2576 .subvendor = 0x107d,
2577 .subdevice = 0x6637,
2578 .card = CX88_BOARD_LEADTEK_PVR2000,
2580 /* PVR2000 NTSC Model [107d:663d] */
2581 .subvendor = 0x107d,
2582 .subdevice = 0x663d,
2583 .card = CX88_BOARD_LEADTEK_PVR2000,
2585 /* DV2000 NTSC Model [107d:6621] */
2586 .subvendor = 0x107d,
2587 .subdevice = 0x6621,
2588 .card = CX88_BOARD_WINFAST_DV2000,
2590 /* TV2000 XP Global [107d:6618] */
2591 .subvendor = 0x107d,
2592 .subdevice = 0x6618,
2593 .card = CX88_BOARD_WINFAST_TV2000_XP_GLOBAL,
2595 .subvendor = 0xb034,
2596 .subdevice = 0x3034,
2597 .card = CX88_BOARD_PROF_7301,
2599 .subvendor = 0x1822,
2600 .subdevice = 0x0023,
2601 .card = CX88_BOARD_TWINHAN_VP1027_DVBS,
2605 /* ----------------------------------------------------------------------- */
2606 /* some leadtek specific stuff */
2608 static void leadtek_eeprom(struct cx88_core *core, u8 *eeprom_data)
2610 if (eeprom_data[4] != 0x7d ||
2611 eeprom_data[5] != 0x10 ||
2612 eeprom_data[7] != 0x66) {
2613 warn_printk(core, "Leadtek eeprom invalid.\n");
2617 /* Terry Wu <terrywu2009@gmail.com> */
2618 switch (eeprom_data[6]) {
2619 case 0x13: /* SSID 6613 for TV2000 XP Expert NTSC Model */
2620 case 0x21: /* SSID 6621 for DV2000 NTSC Model */
2621 case 0x31: /* SSID 6631 for PVR2000 NTSC Model */
2622 case 0x37: /* SSID 6637 for PVR2000 NTSC Model */
2623 case 0x3d: /* SSID 6637 for PVR2000 NTSC Model */
2624 core->board.tuner_type = TUNER_PHILIPS_FM1236_MK3;
2627 core->board.tuner_type = TUNER_PHILIPS_FM1216ME_MK3;
2631 info_printk(core, "Leadtek Winfast 2000XP Expert config: "
2632 "tuner=%d, eeprom[0]=0x%02x\n",
2633 core->board.tuner_type, eeprom_data[0]);
2636 static void hauppauge_eeprom(struct cx88_core *core, u8 *eeprom_data)
2640 tveeprom_hauppauge_analog(&core->i2c_client, &tv, eeprom_data);
2641 core->board.tuner_type = tv.tuner_type;
2642 core->tuner_formats = tv.tuner_formats;
2643 core->board.radio.type = tv.has_radio ? CX88_RADIO : 0;
2645 /* Make sure we support the board model */
2648 case 14009: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in) */
2649 case 14019: /* WinTV-HVR3000 (Retail, IR Blaster, b/panel video, 3.5mm audio in) */
2650 case 14029: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - 880 bridge) */
2651 case 14109: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - low profile) */
2652 case 14129: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - 880 bridge - LP) */
2653 case 14559: /* WinTV-HVR3000 (OEM, no IR, b/panel video, 3.5mm audio in) */
2654 case 14569: /* WinTV-HVR3000 (OEM, no IR, no back panel video) */
2655 case 14659: /* WinTV-HVR3000 (OEM, no IR, b/panel video, RCA audio in - Low profile) */
2656 case 14669: /* WinTV-HVR3000 (OEM, no IR, no b/panel video - Low profile) */
2657 case 28552: /* WinTV-PVR 'Roslyn' (No IR) */
2658 case 34519: /* WinTV-PCI-FM */
2660 /* WinTV-HVR4000 (DVBS/S2/T, Video and IR, back panel inputs) */
2661 case 69100: /* WinTV-HVR4000LITE (DVBS/S2, IR) */
2662 case 69500: /* WinTV-HVR4000LITE (DVBS/S2, No IR) */
2664 /* WinTV-HVR4000 (DVBS/S2/T, Video no IR, back panel inputs) */
2665 case 69569: /* WinTV-HVR4000 (DVBS/S2/T, Video no IR) */
2666 case 90002: /* Nova-T-PCI (9002) */
2667 case 92001: /* Nova-S-Plus (Video and IR) */
2668 case 92002: /* Nova-S-Plus (Video and IR) */
2669 case 90003: /* Nova-T-PCI (9002 No RF out) */
2670 case 90500: /* Nova-T-PCI (oem) */
2671 case 90501: /* Nova-T-PCI (oem/IR) */
2672 case 92000: /* Nova-SE2 (OEM, No Video or IR) */
2673 case 92900: /* WinTV-IROnly (No analog or digital Video inputs) */
2674 case 94009: /* WinTV-HVR1100 (Video and IR Retail) */
2675 case 94501: /* WinTV-HVR1100 (Video and IR OEM) */
2676 case 96009: /* WinTV-HVR1300 (PAL Video, MPEG Video and IR RX) */
2677 case 96019: /* WinTV-HVR1300 (PAL Video, MPEG Video and IR RX/TX) */
2678 case 96559: /* WinTV-HVR1300 (PAL Video, MPEG Video no IR) */
2679 case 96569: /* WinTV-HVR1300 () */
2680 case 96659: /* WinTV-HVR1300 () */
2681 case 98559: /* WinTV-HVR1100LP (Video no IR, Retail - Low Profile) */
2684 case CX88_BOARD_SAMSUNG_SMT_7020:
2685 cx_set(MO_GP0_IO, 0x008989FF);
2688 warn_printk(core, "warning: unknown hauppauge model #%d\n",
2693 info_printk(core, "hauppauge eeprom: model=%d\n", tv.model);
2696 /* ----------------------------------------------------------------------- */
2697 /* some GDI (was: Modular Technology) specific stuff */
2699 static const struct {
2704 [ 0x01 ] = { .id = TUNER_ABSENT,
2706 [ 0x02 ] = { .id = TUNER_ABSENT,
2708 [ 0x03 ] = { .id = TUNER_ABSENT,
2710 [ 0x04 ] = { .id = TUNER_ABSENT,
2712 [ 0x05 ] = { .id = TUNER_ABSENT,
2715 [ 0x10 ] = { .id = TUNER_ABSENT,
2717 .name = "TEMIC_4049" },
2718 [ 0x11 ] = { .id = TUNER_TEMIC_4136FY5,
2719 .name = "TEMIC_4136" },
2720 [ 0x12 ] = { .id = TUNER_ABSENT,
2721 .name = "TEMIC_4146" },
2723 [ 0x20 ] = { .id = TUNER_PHILIPS_FQ1216ME,
2725 .name = "PHILIPS_FQ1216_MK3" },
2726 [ 0x21 ] = { .id = TUNER_ABSENT, .fm = 1,
2727 .name = "PHILIPS_FQ1236_MK3" },
2728 [ 0x22 ] = { .id = TUNER_ABSENT,
2729 .name = "PHILIPS_FI1236_MK3" },
2730 [ 0x23 ] = { .id = TUNER_ABSENT,
2731 .name = "PHILIPS_FI1216_MK3" },
2734 static void gdi_eeprom(struct cx88_core *core, u8 *eeprom_data)
2736 const char *name = (eeprom_data[0x0d] < ARRAY_SIZE(gdi_tuner))
2737 ? gdi_tuner[eeprom_data[0x0d]].name : NULL;
2739 info_printk(core, "GDI: tuner=%s\n", name ? name : "unknown");
2742 core->board.tuner_type = gdi_tuner[eeprom_data[0x0d]].id;
2743 core->board.radio.type = gdi_tuner[eeprom_data[0x0d]].fm ?
2747 /* ------------------------------------------------------------------- */
2748 /* some Divco specific stuff */
2749 static int cx88_dvico_xc2028_callback(struct cx88_core *core,
2750 int command, int arg)
2753 case XC2028_TUNER_RESET:
2754 switch (core->boardnr) {
2755 case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO:
2756 /* GPIO-4 xc3028 tuner */
2758 cx_set(MO_GP0_IO, 0x00001000);
2759 cx_clear(MO_GP0_IO, 0x00000010);
2761 cx_set(MO_GP0_IO, 0x00000010);
2765 cx_write(MO_GP0_IO, 0x101000);
2767 cx_set(MO_GP0_IO, 0x101010);
2778 /* ----------------------------------------------------------------------- */
2779 /* some Geniatech specific stuff */
2781 static int cx88_xc3028_geniatech_tuner_callback(struct cx88_core *core,
2782 int command, int mode)
2785 case XC2028_TUNER_RESET:
2786 switch (INPUT(core->input).type) {
2790 cx_write(MO_GP1_IO, 0x030302);
2794 cx_write(MO_GP1_IO, 0x030301);
2797 cx_write(MO_GP1_IO, 0x101010);
2799 cx_write(MO_GP1_IO, 0x101000);
2801 cx_write(MO_GP1_IO, 0x101010);
2808 static int cx88_xc3028_winfast1800h_callback(struct cx88_core *core,
2809 int command, int arg)
2812 case XC2028_TUNER_RESET:
2813 /* GPIO 12 (xc3028 tuner reset) */
2814 cx_set(MO_GP1_IO, 0x1010);
2816 cx_clear(MO_GP1_IO, 0x10);
2818 cx_set(MO_GP1_IO, 0x10);
2825 /* ------------------------------------------------------------------- */
2826 /* some Divco specific stuff */
2827 static int cx88_pv_8000gt_callback(struct cx88_core *core,
2828 int command, int arg)
2831 case XC2028_TUNER_RESET:
2832 cx_write(MO_GP2_IO, 0xcf7);
2834 cx_write(MO_GP2_IO, 0xef5);
2836 cx_write(MO_GP2_IO, 0xcf7);
2845 /* ----------------------------------------------------------------------- */
2846 /* some DViCO specific stuff */
2848 static void dvico_fusionhdtv_hybrid_init(struct cx88_core *core)
2850 struct i2c_msg msg = { .addr = 0x45, .flags = 0 };
2852 static u8 init_bufs[13][5] = {
2853 { 0x10, 0x00, 0x20, 0x01, 0x03 },
2854 { 0x10, 0x10, 0x01, 0x00, 0x21 },
2855 { 0x10, 0x10, 0x10, 0x00, 0xCA },
2856 { 0x10, 0x10, 0x12, 0x00, 0x08 },
2857 { 0x10, 0x10, 0x13, 0x00, 0x0A },
2858 { 0x10, 0x10, 0x16, 0x01, 0xC0 },
2859 { 0x10, 0x10, 0x22, 0x01, 0x3D },
2860 { 0x10, 0x10, 0x73, 0x01, 0x2E },
2861 { 0x10, 0x10, 0x72, 0x00, 0xC5 },
2862 { 0x10, 0x10, 0x71, 0x01, 0x97 },
2863 { 0x10, 0x10, 0x70, 0x00, 0x0F },
2864 { 0x10, 0x10, 0xB0, 0x00, 0x01 },
2868 for (i = 0; i < ARRAY_SIZE(init_bufs); i++) {
2869 msg.buf = init_bufs[i];
2870 msg.len = (i != 12 ? 5 : 2);
2871 err = i2c_transfer(&core->i2c_adap, &msg, 1);
2873 warn_printk(core, "dvico_fusionhdtv_hybrid_init buf %d "
2874 "failed (err = %d)!\n", i, err);
2880 static int cx88_xc2028_tuner_callback(struct cx88_core *core,
2881 int command, int arg)
2883 /* Board-specific callbacks */
2884 switch (core->boardnr) {
2885 case CX88_BOARD_POWERCOLOR_REAL_ANGEL:
2886 case CX88_BOARD_GENIATECH_X8000_MT:
2887 case CX88_BOARD_KWORLD_ATSC_120:
2888 return cx88_xc3028_geniatech_tuner_callback(core,
2890 case CX88_BOARD_PROLINK_PV_8000GT:
2891 case CX88_BOARD_PROLINK_PV_GLOBAL_XTREME:
2892 return cx88_pv_8000gt_callback(core, command, arg);
2893 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO:
2894 case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO:
2895 return cx88_dvico_xc2028_callback(core, command, arg);
2896 case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL:
2897 case CX88_BOARD_WINFAST_DTV1800H:
2898 return cx88_xc3028_winfast1800h_callback(core, command, arg);
2902 case XC2028_TUNER_RESET:
2903 switch (INPUT(core->input).type) {
2905 info_printk(core, "setting GPIO to radio!\n");
2906 cx_write(MO_GP0_IO, 0x4ff);
2908 cx_write(MO_GP2_IO, 0xff);
2911 case CX88_VMUX_DVB: /* Digital TV*/
2912 default: /* Analog TV */
2913 info_printk(core, "setting GPIO to TV!\n");
2916 cx_write(MO_GP1_IO, 0x101010);
2918 cx_write(MO_GP1_IO, 0x101000);
2920 cx_write(MO_GP1_IO, 0x101010);
2927 /* ----------------------------------------------------------------------- */
2928 /* Tuner callback function. Currently only needed for the Pinnacle *
2929 * PCTV HD 800i with an xc5000 sillicon tuner. This is used for both *
2930 * analog tuner attach (tuner-core.c) and dvb tuner attach (cx88-dvb.c) */
2932 static int cx88_xc5000_tuner_callback(struct cx88_core *core,
2933 int command, int arg)
2935 switch (core->boardnr) {
2936 case CX88_BOARD_PINNACLE_PCTV_HD_800i:
2937 if (command == 0) { /* This is the reset command from xc5000 */
2939 /* djh - According to the engineer at PCTV Systems,
2940 the xc5000 reset pin is supposed to be on GPIO12.
2941 However, despite three nights of effort, pulling
2942 that GPIO low didn't reset the xc5000. While
2943 pulling MO_SRST_IO low does reset the xc5000, this
2944 also resets in the s5h1409 being reset as well.
2945 This causes tuning to always fail since the internal
2946 state of the s5h1409 does not match the driver's
2947 state. Given that the only two conditions in which
2948 the driver performs a reset is during firmware load
2949 and powering down the chip, I am taking out the
2950 reset. We know that the chip is being reset
2951 when the cx88 comes online, and not being able to
2952 do power management for this board is worse than
2953 not having any tuning at all. */
2956 err_printk(core, "xc5000: unknown tuner "
2957 "callback command.\n");
2961 case CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD:
2962 if (command == 0) { /* This is the reset command from xc5000 */
2963 cx_clear(MO_GP0_IO, 0x00000010);
2965 cx_set(MO_GP0_IO, 0x00000010);
2969 "xc5000: unknown tuner callback command.\n");
2974 return 0; /* Should never be here */
2977 int cx88_tuner_callback(void *priv, int component, int command, int arg)
2979 struct i2c_algo_bit_data *i2c_algo = priv;
2980 struct cx88_core *core;
2983 printk(KERN_ERR "cx88: Error - i2c private data undefined.\n");
2987 core = i2c_algo->data;
2990 printk(KERN_ERR "cx88: Error - device struct undefined.\n");
2994 if (component != DVB_FRONTEND_COMPONENT_TUNER)
2997 switch (core->board.tuner_type) {
2999 info_printk(core, "Calling XC2028/3028 callback\n");
3000 return cx88_xc2028_tuner_callback(core, command, arg);
3002 info_printk(core, "Calling XC5000 callback\n");
3003 return cx88_xc5000_tuner_callback(core, command, arg);
3005 err_printk(core, "Error: Calling callback for tuner %d\n",
3006 core->board.tuner_type);
3009 EXPORT_SYMBOL(cx88_tuner_callback);
3011 /* ----------------------------------------------------------------------- */
3013 static void cx88_card_list(struct cx88_core *core, struct pci_dev *pci)
3017 if (0 == pci->subsystem_vendor &&
3018 0 == pci->subsystem_device) {
3020 "%s: Your board has no valid PCI Subsystem ID and thus can't\n"
3021 "%s: be autodetected. Please pass card=<n> insmod option to\n"
3022 "%s: workaround that. Redirect complaints to the vendor of\n"
3023 "%s: the TV card. Best regards,\n"
3025 core->name,core->name,core->name,core->name,core->name);
3028 "%s: Your board isn't known (yet) to the driver. You can\n"
3029 "%s: try to pick one of the existing card configs via\n"
3030 "%s: card=<n> insmod option. Updating to the latest\n"
3031 "%s: version might help as well.\n",
3032 core->name,core->name,core->name,core->name);
3034 err_printk(core, "Here is a list of valid choices for the card=<n> "
3035 "insmod option:\n");
3036 for (i = 0; i < ARRAY_SIZE(cx88_boards); i++)
3037 printk(KERN_ERR "%s: card=%d -> %s\n",
3038 core->name, i, cx88_boards[i].name);
3041 static void cx88_card_setup_pre_i2c(struct cx88_core *core)
3043 switch (core->boardnr) {
3044 case CX88_BOARD_HAUPPAUGE_HVR1300:
3046 * Bring the 702 demod up before i2c scanning/attach or devices are hidden
3047 * We leave here with the 702 on the bus
3049 * "reset the IR receiver on GPIO[3]"
3050 * Reported by Mike Crash <mike AT mikecrash.com>
3052 cx_write(MO_GP0_IO, 0x0000ef88);
3054 cx_clear(MO_GP0_IO, 0x00000088);
3056 cx_set(MO_GP0_IO, 0x00000088); /* 702 out of reset */
3060 case CX88_BOARD_PROLINK_PV_GLOBAL_XTREME:
3061 case CX88_BOARD_PROLINK_PV_8000GT:
3062 cx_write(MO_GP2_IO, 0xcf7);
3064 cx_write(MO_GP2_IO, 0xef5);
3066 cx_write(MO_GP2_IO, 0xcf7);
3070 case CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD:
3071 /* Enable the xc5000 tuner */
3072 cx_set(MO_GP0_IO, 0x00001010);
3075 case CX88_BOARD_HAUPPAUGE_HVR3000:
3076 case CX88_BOARD_HAUPPAUGE_HVR4000:
3078 cx_write(MO_GP0_IO, core->board.input[0].gpio0);
3080 cx_clear(MO_GP0_IO, 0x00000080);
3082 cx_set(MO_GP0_IO, 0x00000080); /* 702 out of reset */
3086 case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL:
3087 case CX88_BOARD_WINFAST_DTV1800H:
3088 /* GPIO 12 (xc3028 tuner reset) */
3089 cx_set(MO_GP1_IO, 0x1010);
3091 cx_clear(MO_GP1_IO, 0x10);
3093 cx_set(MO_GP1_IO, 0x10);
3097 case CX88_BOARD_TWINHAN_VP1027_DVBS:
3098 cx_write(MO_GP0_IO, 0x00003230);
3099 cx_write(MO_GP0_IO, 0x00003210);
3101 cx_write(MO_GP0_IO, 0x00001230);
3107 * Sets board-dependent xc3028 configuration
3109 void cx88_setup_xc3028(struct cx88_core *core, struct xc2028_ctrl *ctl)
3111 memset(ctl, 0, sizeof(*ctl));
3113 ctl->fname = XC2028_DEFAULT_FIRMWARE;
3116 switch (core->boardnr) {
3117 case CX88_BOARD_POWERCOLOR_REAL_ANGEL:
3118 /* Now works with firmware version 2.7 */
3119 if (core->i2c_algo.udelay < 16)
3120 core->i2c_algo.udelay = 16;
3122 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO:
3123 case CX88_BOARD_WINFAST_DTV1800H:
3124 ctl->demod = XC3028_FE_ZARLINK456;
3126 case CX88_BOARD_KWORLD_ATSC_120:
3127 case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO:
3128 ctl->demod = XC3028_FE_OREN538;
3130 case CX88_BOARD_GENIATECH_X8000_MT:
3131 /* FIXME: For this board, the xc3028 never recovers after being
3132 powered down (the reset GPIO probably is not set properly).
3133 We don't have access to the hardware so we cannot determine
3134 which GPIO is used for xc3028, so just disable power xc3028
3135 power management for now */
3136 ctl->disable_power_mgmt = 1;
3138 case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL:
3139 case CX88_BOARD_PROLINK_PV_GLOBAL_XTREME:
3140 case CX88_BOARD_PROLINK_PV_8000GT:
3142 * Those boards uses non-MTS firmware
3145 case CX88_BOARD_PINNACLE_HYBRID_PCTV:
3146 case CX88_BOARD_TERRATEC_CINERGY_HT_PCI_MKII:
3147 ctl->demod = XC3028_FE_ZARLINK456;
3151 ctl->demod = XC3028_FE_OREN538;
3155 EXPORT_SYMBOL_GPL(cx88_setup_xc3028);
3157 static void cx88_card_setup(struct cx88_core *core)
3159 static u8 eeprom[256];
3160 struct tuner_setup tun_setup;
3161 unsigned int mode_mask = T_RADIO |
3165 memset(&tun_setup, 0, sizeof(tun_setup));
3167 if (0 == core->i2c_rc) {
3168 core->i2c_client.addr = 0xa0 >> 1;
3169 tveeprom_read(&core->i2c_client, eeprom, sizeof(eeprom));
3172 switch (core->boardnr) {
3173 case CX88_BOARD_HAUPPAUGE:
3174 case CX88_BOARD_HAUPPAUGE_ROSLYN:
3175 if (0 == core->i2c_rc)
3176 hauppauge_eeprom(core, eeprom+8);
3178 case CX88_BOARD_GDI:
3179 if (0 == core->i2c_rc)
3180 gdi_eeprom(core, eeprom);
3182 case CX88_BOARD_LEADTEK_PVR2000:
3183 case CX88_BOARD_WINFAST_DV2000:
3184 case CX88_BOARD_WINFAST2000XP_EXPERT:
3185 if (0 == core->i2c_rc)
3186 leadtek_eeprom(core, eeprom);
3188 case CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1:
3189 case CX88_BOARD_HAUPPAUGE_NOVASE2_S1:
3190 case CX88_BOARD_HAUPPAUGE_DVB_T1:
3191 case CX88_BOARD_HAUPPAUGE_HVR1100:
3192 case CX88_BOARD_HAUPPAUGE_HVR1100LP:
3193 case CX88_BOARD_HAUPPAUGE_HVR3000:
3194 case CX88_BOARD_HAUPPAUGE_HVR1300:
3195 case CX88_BOARD_HAUPPAUGE_HVR4000:
3196 case CX88_BOARD_HAUPPAUGE_HVR4000LITE:
3197 case CX88_BOARD_HAUPPAUGE_IRONLY:
3198 if (0 == core->i2c_rc)
3199 hauppauge_eeprom(core, eeprom);
3201 case CX88_BOARD_KWORLD_DVBS_100:
3202 cx_write(MO_GP0_IO, 0x000007f8);
3203 cx_write(MO_GP1_IO, 0x00000001);
3205 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO:
3206 /* GPIO0:0 is hooked to demod reset */
3207 /* GPIO0:4 is hooked to xc3028 reset */
3208 cx_write(MO_GP0_IO, 0x00111100);
3210 cx_write(MO_GP0_IO, 0x00111111);
3212 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL:
3213 /* GPIO0:6 is hooked to FX2 reset pin */
3214 cx_set(MO_GP0_IO, 0x00004040);
3215 cx_clear(MO_GP0_IO, 0x00000040);
3217 cx_set(MO_GP0_IO, 0x00004040);
3219 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1:
3220 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS:
3221 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID:
3222 /* GPIO0:0 is hooked to mt352 reset pin */
3223 cx_set(MO_GP0_IO, 0x00000101);
3224 cx_clear(MO_GP0_IO, 0x00000001);
3226 cx_set(MO_GP0_IO, 0x00000101);
3227 if (0 == core->i2c_rc &&
3228 core->boardnr == CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID)
3229 dvico_fusionhdtv_hybrid_init(core);
3231 case CX88_BOARD_KWORLD_DVB_T:
3232 case CX88_BOARD_DNTV_LIVE_DVB_T:
3233 cx_set(MO_GP0_IO, 0x00000707);
3234 cx_set(MO_GP2_IO, 0x00000101);
3235 cx_clear(MO_GP2_IO, 0x00000001);
3237 cx_clear(MO_GP0_IO, 0x00000007);
3238 cx_set(MO_GP2_IO, 0x00000101);
3240 case CX88_BOARD_DNTV_LIVE_DVB_T_PRO:
3241 cx_write(MO_GP0_IO, 0x00080808);
3243 case CX88_BOARD_ATI_HDTVWONDER:
3244 if (0 == core->i2c_rc) {
3247 static const u8 buffer [][2] = {
3254 core->i2c_client.addr = 0x0a;
3256 for (i = 0; i < ARRAY_SIZE(buffer); i++)
3257 if (2 != i2c_master_send(&core->i2c_client,
3259 warn_printk(core, "Unable to enable "
3263 case CX88_BOARD_MSI_TVANYWHERE_MASTER:
3265 struct v4l2_priv_tun_config tea5767_cfg;
3266 struct tea5767_ctrl ctl;
3268 memset(&ctl, 0, sizeof(ctl));
3273 ctl.xtal_freq = TEA5767_HIGH_LO_13MHz;
3275 tea5767_cfg.tuner = TUNER_TEA5767;
3276 tea5767_cfg.priv = &ctl;
3278 call_all(core, tuner, s_config, &tea5767_cfg);
3281 case CX88_BOARD_TEVII_S420:
3282 case CX88_BOARD_TEVII_S460:
3283 case CX88_BOARD_OMICOM_SS4_PCI:
3284 case CX88_BOARD_TBS_8910:
3285 case CX88_BOARD_TBS_8920:
3286 case CX88_BOARD_PROF_6200:
3287 case CX88_BOARD_PROF_7300:
3288 case CX88_BOARD_PROF_7301:
3289 case CX88_BOARD_SATTRADE_ST4200:
3290 cx_write(MO_GP0_IO, 0x8000);
3292 cx_write(MO_SRST_IO, 0);
3294 cx_write(MO_GP0_IO, 0x8080);
3296 cx_write(MO_SRST_IO, 1);
3303 if ((core->board.radio_type != UNSET)) {
3304 tun_setup.mode_mask = T_RADIO;
3305 tun_setup.type = core->board.radio_type;
3306 tun_setup.addr = core->board.radio_addr;
3307 tun_setup.tuner_callback = cx88_tuner_callback;
3308 call_all(core, tuner, s_type_addr, &tun_setup);
3309 mode_mask &= ~T_RADIO;
3312 if (core->board.tuner_type != TUNER_ABSENT) {
3313 tun_setup.mode_mask = mode_mask;
3314 tun_setup.type = core->board.tuner_type;
3315 tun_setup.addr = core->board.tuner_addr;
3316 tun_setup.tuner_callback = cx88_tuner_callback;
3318 call_all(core, tuner, s_type_addr, &tun_setup);
3321 if (core->board.tda9887_conf) {
3322 struct v4l2_priv_tun_config tda9887_cfg;
3324 tda9887_cfg.tuner = TUNER_TDA9887;
3325 tda9887_cfg.priv = &core->board.tda9887_conf;
3327 call_all(core, tuner, s_config, &tda9887_cfg);
3330 if (core->board.tuner_type == TUNER_XC2028) {
3331 struct v4l2_priv_tun_config xc2028_cfg;
3332 struct xc2028_ctrl ctl;
3334 /* Fills device-dependent initialization parameters */
3335 cx88_setup_xc3028(core, &ctl);
3337 /* Sends parameters to xc2028/3028 tuner */
3338 memset(&xc2028_cfg, 0, sizeof(xc2028_cfg));
3339 xc2028_cfg.tuner = TUNER_XC2028;
3340 xc2028_cfg.priv = &ctl;
3341 info_printk(core, "Asking xc2028/3028 to load firmware %s\n",
3343 call_all(core, tuner, s_config, &xc2028_cfg);
3345 call_all(core, core, s_power, 0);
3348 /* ------------------------------------------------------------------ */
3350 static int cx88_pci_quirks(const char *name, struct pci_dev *pci)
3352 unsigned int lat = UNSET;
3356 /* check pci quirks */
3357 if (pci_pci_problems & PCIPCI_TRITON) {
3358 printk(KERN_INFO "%s: quirk: PCIPCI_TRITON -- set TBFX\n",
3360 ctrl |= CX88X_EN_TBFX;
3362 if (pci_pci_problems & PCIPCI_NATOMA) {
3363 printk(KERN_INFO "%s: quirk: PCIPCI_NATOMA -- set TBFX\n",
3365 ctrl |= CX88X_EN_TBFX;
3367 if (pci_pci_problems & PCIPCI_VIAETBF) {
3368 printk(KERN_INFO "%s: quirk: PCIPCI_VIAETBF -- set TBFX\n",
3370 ctrl |= CX88X_EN_TBFX;
3372 if (pci_pci_problems & PCIPCI_VSFX) {
3373 printk(KERN_INFO "%s: quirk: PCIPCI_VSFX -- set VSFX\n",
3375 ctrl |= CX88X_EN_VSFX;
3377 #ifdef PCIPCI_ALIMAGIK
3378 if (pci_pci_problems & PCIPCI_ALIMAGIK) {
3379 printk(KERN_INFO "%s: quirk: PCIPCI_ALIMAGIK -- latency fixup\n",
3385 /* check insmod options */
3386 if (UNSET != latency)
3391 pci_read_config_byte(pci, CX88X_DEVCTRL, &value);
3393 pci_write_config_byte(pci, CX88X_DEVCTRL, value);
3396 printk(KERN_INFO "%s: setting pci latency timer to %d\n",
3398 pci_write_config_byte(pci, PCI_LATENCY_TIMER, latency);
3403 int cx88_get_resources(const struct cx88_core *core, struct pci_dev *pci)
3405 if (request_mem_region(pci_resource_start(pci,0),
3406 pci_resource_len(pci,0),
3410 "%s/%d: Can't get MMIO memory @ 0x%llx, subsystem: %04x:%04x\n",
3411 core->name, PCI_FUNC(pci->devfn),
3412 (unsigned long long)pci_resource_start(pci, 0),
3413 pci->subsystem_vendor, pci->subsystem_device);
3417 /* Allocate and initialize the cx88 core struct. One should hold the
3418 * devlist mutex before calling this. */
3419 struct cx88_core *cx88_core_create(struct pci_dev *pci, int nr)
3421 struct cx88_core *core;
3424 core = kzalloc(sizeof(*core), GFP_KERNEL);
3428 atomic_inc(&core->refcount);
3429 core->pci_bus = pci->bus->number;
3430 core->pci_slot = PCI_SLOT(pci->devfn);
3431 core->pci_irqmask = PCI_INT_RISC_RD_BERRINT | PCI_INT_RISC_WR_BERRINT |
3432 PCI_INT_BRDG_BERRINT | PCI_INT_SRC_DMA_BERRINT |
3433 PCI_INT_DST_DMA_BERRINT | PCI_INT_IPB_DMA_BERRINT;
3434 mutex_init(&core->lock);
3437 sprintf(core->name, "cx88[%d]", core->nr);
3439 strcpy(core->v4l2_dev.name, core->name);
3440 if (v4l2_device_register(NULL, &core->v4l2_dev)) {
3445 if (0 != cx88_get_resources(core, pci)) {
3446 v4l2_device_unregister(&core->v4l2_dev);
3452 cx88_pci_quirks(core->name, pci);
3453 core->lmmio = ioremap(pci_resource_start(pci, 0),
3454 pci_resource_len(pci, 0));
3455 core->bmmio = (u8 __iomem *)core->lmmio;
3457 if (core->lmmio == NULL) {
3463 core->boardnr = UNSET;
3464 if (card[core->nr] < ARRAY_SIZE(cx88_boards))
3465 core->boardnr = card[core->nr];
3466 for (i = 0; UNSET == core->boardnr && i < ARRAY_SIZE(cx88_subids); i++)
3467 if (pci->subsystem_vendor == cx88_subids[i].subvendor &&
3468 pci->subsystem_device == cx88_subids[i].subdevice)
3469 core->boardnr = cx88_subids[i].card;
3470 if (UNSET == core->boardnr) {
3471 core->boardnr = CX88_BOARD_UNKNOWN;
3472 cx88_card_list(core, pci);
3475 memcpy(&core->board, &cx88_boards[core->boardnr], sizeof(core->board));
3477 if (!core->board.num_frontends && (core->board.mpeg & CX88_MPEG_DVB))
3478 core->board.num_frontends = 1;
3480 info_printk(core, "subsystem: %04x:%04x, board: %s [card=%d,%s], frontend(s): %d\n",
3481 pci->subsystem_vendor, pci->subsystem_device, core->board.name,
3482 core->boardnr, card[core->nr] == core->boardnr ?
3483 "insmod option" : "autodetected",
3484 core->board.num_frontends);
3486 if (tuner[core->nr] != UNSET)
3487 core->board.tuner_type = tuner[core->nr];
3488 if (radio[core->nr] != UNSET)
3489 core->board.radio_type = radio[core->nr];
3491 info_printk(core, "TV tuner type %d, Radio tuner type %d\n",
3492 core->board.tuner_type, core->board.radio_type);
3496 cx88_card_setup_pre_i2c(core);
3497 cx88_i2c_init(core, pci);
3499 /* load tuner module, if needed */
3500 if (TUNER_ABSENT != core->board.tuner_type) {
3501 /* Ignore 0x6b and 0x6f on cx88 boards.
3502 * FusionHDTV5 RT Gold has an ir receiver at 0x6b
3503 * and an RTC at 0x6f which can get corrupted if probed. */
3504 static const unsigned short tv_addrs[] = {
3505 0x42, 0x43, 0x4a, 0x4b, /* tda8290 */
3506 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
3507 0x68, 0x69, 0x6a, 0x6c, 0x6d, 0x6e,
3510 int has_demod = (core->board.tda9887_conf & TDA9887_PRESENT);
3512 /* I don't trust the radio_type as is stored in the card
3513 definitions, so we just probe for it.
3514 The radio_type is sometimes missing, or set to UNSET but
3515 later code configures a tea5767.
3517 v4l2_i2c_new_subdev(&core->v4l2_dev, &core->i2c_adap,
3519 0, v4l2_i2c_tuner_addrs(ADDRS_RADIO));
3521 v4l2_i2c_new_subdev(&core->v4l2_dev,
3522 &core->i2c_adap, NULL, "tuner",
3523 0, v4l2_i2c_tuner_addrs(ADDRS_DEMOD));
3524 if (core->board.tuner_addr == ADDR_UNSET) {
3525 v4l2_i2c_new_subdev(&core->v4l2_dev,
3526 &core->i2c_adap, NULL, "tuner",
3527 0, has_demod ? tv_addrs + 4 : tv_addrs);
3529 v4l2_i2c_new_subdev(&core->v4l2_dev, &core->i2c_adap,
3530 NULL, "tuner", core->board.tuner_addr, NULL);
3534 cx88_card_setup(core);
3536 cx88_i2c_init_ir(core);
3537 cx88_ir_init(core, pci);