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>
30 #include "tuner-xc2028.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 #define info_printk(core, fmt, arg...) \
49 printk(KERN_INFO "%s: " fmt, core->name , ## arg)
51 #define warn_printk(core, fmt, arg...) \
52 printk(KERN_WARNING "%s: " fmt, core->name , ## arg)
54 #define err_printk(core, fmt, arg...) \
55 printk(KERN_ERR "%s: " fmt, core->name , ## arg)
58 /* ------------------------------------------------------------------ */
59 /* board config info */
61 static const struct cx88_board cx88_boards[] = {
62 [CX88_BOARD_UNKNOWN] = {
63 .name = "UNKNOWN/GENERIC",
66 .tuner_addr = ADDR_UNSET,
67 .radio_addr = ADDR_UNSET,
69 .type = CX88_VMUX_COMPOSITE1,
72 .type = CX88_VMUX_COMPOSITE2,
75 .type = CX88_VMUX_COMPOSITE3,
78 .type = CX88_VMUX_COMPOSITE4,
82 [CX88_BOARD_HAUPPAUGE] = {
83 .name = "Hauppauge WinTV 34xxx models",
86 .tuner_addr = ADDR_UNSET,
87 .radio_addr = ADDR_UNSET,
88 .tda9887_conf = TDA9887_PRESENT,
90 .type = CX88_VMUX_TELEVISION,
92 .gpio0 = 0xff00, // internal decoder
94 .type = CX88_VMUX_DEBUG,
96 .gpio0 = 0xff01, // mono from tuner chip
98 .type = CX88_VMUX_COMPOSITE1,
102 .type = CX88_VMUX_SVIDEO,
112 .name = "GDI Black Gold",
115 .tuner_addr = ADDR_UNSET,
116 .radio_addr = ADDR_UNSET,
118 .type = CX88_VMUX_TELEVISION,
121 .type = CX88_VMUX_SVIDEO,
125 [CX88_BOARD_PIXELVIEW] = {
127 .tuner_type = TUNER_PHILIPS_PAL,
129 .tuner_addr = ADDR_UNSET,
130 .radio_addr = ADDR_UNSET,
132 .type = CX88_VMUX_TELEVISION,
134 .gpio0 = 0xff00, // internal decoder
136 .type = CX88_VMUX_COMPOSITE1,
139 .type = CX88_VMUX_SVIDEO,
147 [CX88_BOARD_ATI_WONDER_PRO] = {
148 .name = "ATI TV Wonder Pro",
149 .tuner_type = TUNER_PHILIPS_4IN1,
151 .tuner_addr = ADDR_UNSET,
152 .radio_addr = ADDR_UNSET,
153 .tda9887_conf = TDA9887_PRESENT | TDA9887_INTERCARRIER,
155 .type = CX88_VMUX_TELEVISION,
159 .type = CX88_VMUX_COMPOSITE1,
163 .type = CX88_VMUX_SVIDEO,
168 [CX88_BOARD_WINFAST2000XP_EXPERT] = {
169 .name = "Leadtek Winfast 2000XP Expert",
170 .tuner_type = TUNER_PHILIPS_4IN1,
172 .tuner_addr = ADDR_UNSET,
173 .radio_addr = ADDR_UNSET,
174 .tda9887_conf = TDA9887_PRESENT,
176 .type = CX88_VMUX_TELEVISION,
183 .type = CX88_VMUX_COMPOSITE1,
190 .type = CX88_VMUX_SVIDEO,
205 [CX88_BOARD_AVERTV_STUDIO_303] = {
206 .name = "AverTV Studio 303 (M126)",
207 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
209 .tuner_addr = ADDR_UNSET,
210 .radio_addr = ADDR_UNSET,
211 .tda9887_conf = TDA9887_PRESENT,
213 .type = CX88_VMUX_TELEVISION,
217 .type = CX88_VMUX_COMPOSITE1,
221 .type = CX88_VMUX_SVIDEO,
230 [CX88_BOARD_MSI_TVANYWHERE_MASTER] = {
231 // added gpio values thanks to Michal
232 // values for PAL from DScaler
233 .name = "MSI TV-@nywhere Master",
234 .tuner_type = TUNER_MT2032,
236 .tuner_addr = ADDR_UNSET,
237 .radio_addr = ADDR_UNSET,
238 .tda9887_conf = TDA9887_PRESENT | TDA9887_INTERCARRIER_NTSC,
240 .type = CX88_VMUX_TELEVISION,
246 .type = CX88_VMUX_COMPOSITE1,
252 .type = CX88_VMUX_SVIDEO,
266 [CX88_BOARD_WINFAST_DV2000] = {
267 .name = "Leadtek Winfast DV2000",
268 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
270 .tuner_addr = ADDR_UNSET,
271 .radio_addr = ADDR_UNSET,
272 .tda9887_conf = TDA9887_PRESENT,
274 .type = CX88_VMUX_TELEVISION,
282 .type = CX88_VMUX_COMPOSITE1,
289 .type = CX88_VMUX_SVIDEO,
304 [CX88_BOARD_LEADTEK_PVR2000] = {
305 // gpio values for PAL version from regspy by DScaler
306 .name = "Leadtek PVR 2000",
307 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
309 .tuner_addr = ADDR_UNSET,
310 .radio_addr = ADDR_UNSET,
311 .tda9887_conf = TDA9887_PRESENT,
313 .type = CX88_VMUX_TELEVISION,
318 .type = CX88_VMUX_COMPOSITE1,
323 .type = CX88_VMUX_SVIDEO,
333 .mpeg = CX88_MPEG_BLACKBIRD,
335 [CX88_BOARD_IODATA_GVVCP3PCI] = {
336 .name = "IODATA GV-VCP3/PCI",
337 .tuner_type = TUNER_ABSENT,
339 .tuner_addr = ADDR_UNSET,
340 .radio_addr = ADDR_UNSET,
342 .type = CX88_VMUX_COMPOSITE1,
345 .type = CX88_VMUX_COMPOSITE2,
348 .type = CX88_VMUX_SVIDEO,
352 [CX88_BOARD_PROLINK_PLAYTVPVR] = {
353 .name = "Prolink PlayTV PVR",
354 .tuner_type = TUNER_PHILIPS_FM1236_MK3,
356 .tuner_addr = ADDR_UNSET,
357 .radio_addr = ADDR_UNSET,
358 .tda9887_conf = TDA9887_PRESENT,
360 .type = CX88_VMUX_TELEVISION,
364 .type = CX88_VMUX_COMPOSITE1,
368 .type = CX88_VMUX_SVIDEO,
377 [CX88_BOARD_ASUS_PVR_416] = {
378 .name = "ASUS PVR-416",
379 .tuner_type = TUNER_PHILIPS_FM1236_MK3,
381 .tuner_addr = ADDR_UNSET,
382 .radio_addr = ADDR_UNSET,
383 .tda9887_conf = TDA9887_PRESENT,
385 .type = CX88_VMUX_TELEVISION,
389 .type = CX88_VMUX_SVIDEO,
391 .gpio0 = 0x0000fde6, // 0x0000fda6 L,R RCA audio in?
398 .mpeg = CX88_MPEG_BLACKBIRD,
400 [CX88_BOARD_MSI_TVANYWHERE] = {
401 .name = "MSI TV-@nywhere",
402 .tuner_type = TUNER_MT2032,
404 .tuner_addr = ADDR_UNSET,
405 .radio_addr = ADDR_UNSET,
406 .tda9887_conf = TDA9887_PRESENT,
408 .type = CX88_VMUX_TELEVISION,
413 .type = CX88_VMUX_COMPOSITE1,
418 .type = CX88_VMUX_SVIDEO,
424 [CX88_BOARD_KWORLD_DVB_T] = {
425 .name = "KWorld/VStream XPert DVB-T",
426 .tuner_type = TUNER_ABSENT,
428 .tuner_addr = ADDR_UNSET,
429 .radio_addr = ADDR_UNSET,
431 .type = CX88_VMUX_COMPOSITE1,
436 .type = CX88_VMUX_SVIDEO,
441 .mpeg = CX88_MPEG_DVB,
443 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1] = {
444 .name = "DViCO FusionHDTV DVB-T1",
445 .tuner_type = TUNER_ABSENT, /* No analog tuner */
447 .tuner_addr = ADDR_UNSET,
448 .radio_addr = ADDR_UNSET,
450 .type = CX88_VMUX_COMPOSITE1,
454 .type = CX88_VMUX_SVIDEO,
458 .mpeg = CX88_MPEG_DVB,
460 [CX88_BOARD_KWORLD_LTV883] = {
461 .name = "KWorld LTV883RF",
462 .tuner_type = TUNER_TNF_8831BGFF,
464 .tuner_addr = ADDR_UNSET,
465 .radio_addr = ADDR_UNSET,
467 .type = CX88_VMUX_TELEVISION,
471 .type = CX88_VMUX_DEBUG,
473 .gpio0 = 0x07f9, // mono from tuner chip
475 .type = CX88_VMUX_COMPOSITE1,
479 .type = CX88_VMUX_SVIDEO,
488 [CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q] = {
489 .name = "DViCO FusionHDTV 3 Gold-Q",
490 .tuner_type = TUNER_MICROTUNE_4042FI5,
492 .tuner_addr = ADDR_UNSET,
493 .radio_addr = ADDR_UNSET,
495 GPIO[0] resets DT3302 DTV receiver
498 GPIO[1] mutes analog audio output connector
499 0 - enable selected source
501 GPIO[2] selects source for analog audio output connector
502 0 - analog audio input connector on tab
503 1 - analog DAC output from CX23881 chip
504 GPIO[3] selects RF input connector on tuner module
505 0 - RF connector labeled CABLE
506 1 - RF connector labeled ANT
507 GPIO[4] selects high RF for QAM256 mode
512 .type = CX88_VMUX_TELEVISION,
516 .type = CX88_VMUX_CABLE,
520 .type = CX88_VMUX_COMPOSITE1,
524 .type = CX88_VMUX_SVIDEO,
528 .mpeg = CX88_MPEG_DVB,
530 [CX88_BOARD_HAUPPAUGE_DVB_T1] = {
531 .name = "Hauppauge Nova-T DVB-T",
532 .tuner_type = TUNER_ABSENT,
534 .tuner_addr = ADDR_UNSET,
535 .radio_addr = ADDR_UNSET,
537 .type = CX88_VMUX_DVB,
540 .mpeg = CX88_MPEG_DVB,
542 [CX88_BOARD_CONEXANT_DVB_T1] = {
543 .name = "Conexant DVB-T reference design",
544 .tuner_type = TUNER_ABSENT,
546 .tuner_addr = ADDR_UNSET,
547 .radio_addr = ADDR_UNSET,
549 .type = CX88_VMUX_DVB,
552 .mpeg = CX88_MPEG_DVB,
554 [CX88_BOARD_PROVIDEO_PV259] = {
555 .name = "Provideo PV259",
556 .tuner_type = TUNER_PHILIPS_FQ1216ME,
558 .tuner_addr = ADDR_UNSET,
559 .radio_addr = ADDR_UNSET,
561 .type = CX88_VMUX_TELEVISION,
565 .mpeg = CX88_MPEG_BLACKBIRD,
567 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS] = {
568 .name = "DViCO FusionHDTV DVB-T Plus",
569 .tuner_type = TUNER_ABSENT, /* No analog tuner */
571 .tuner_addr = ADDR_UNSET,
572 .radio_addr = ADDR_UNSET,
574 .type = CX88_VMUX_COMPOSITE1,
578 .type = CX88_VMUX_SVIDEO,
582 .mpeg = CX88_MPEG_DVB,
584 [CX88_BOARD_DNTV_LIVE_DVB_T] = {
585 .name = "digitalnow DNTV Live! DVB-T",
586 .tuner_type = TUNER_ABSENT,
588 .tuner_addr = ADDR_UNSET,
589 .radio_addr = ADDR_UNSET,
591 .type = CX88_VMUX_COMPOSITE1,
596 .type = CX88_VMUX_SVIDEO,
601 .mpeg = CX88_MPEG_DVB,
603 [CX88_BOARD_PCHDTV_HD3000] = {
604 .name = "pcHDTV HD3000 HDTV",
605 .tuner_type = TUNER_THOMSON_DTT761X,
607 .tuner_addr = ADDR_UNSET,
608 .radio_addr = ADDR_UNSET,
609 .tda9887_conf = TDA9887_PRESENT,
610 /* GPIO[2] = audio source for analog audio out connector
611 * 0 = analog audio input connector
612 * 1 = CX88 audio DACs
614 * GPIO[7] = input to CX88's audio/chroma ADC
616 * 1 = Sound 4.5 MHz IF
618 * GPIO[1,5,6] = Oren 51132 pins 27,35,28 respectively
620 * GPIO[16] = Remote control input
623 .type = CX88_VMUX_TELEVISION,
627 .type = CX88_VMUX_COMPOSITE1,
631 .type = CX88_VMUX_SVIDEO,
639 .mpeg = CX88_MPEG_DVB,
641 [CX88_BOARD_HAUPPAUGE_ROSLYN] = {
642 // entry added by Kaustubh D. Bhalerao <bhalerao.1@osu.edu>
643 // GPIO values obtained from regspy, courtesy Sean Covel
644 .name = "Hauppauge WinTV 28xxx (Roslyn) models",
647 .tuner_addr = ADDR_UNSET,
648 .radio_addr = ADDR_UNSET,
650 .type = CX88_VMUX_TELEVISION,
655 .type = CX88_VMUX_DEBUG,
659 .type = CX88_VMUX_COMPOSITE1,
663 .type = CX88_VMUX_SVIDEO,
673 .mpeg = CX88_MPEG_BLACKBIRD,
675 [CX88_BOARD_DIGITALLOGIC_MEC] = {
676 .name = "Digital-Logic MICROSPACE Entertainment Center (MEC)",
677 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
679 .tuner_addr = ADDR_UNSET,
680 .radio_addr = ADDR_UNSET,
681 .tda9887_conf = TDA9887_PRESENT,
683 .type = CX88_VMUX_TELEVISION,
688 .type = CX88_VMUX_COMPOSITE1,
693 .type = CX88_VMUX_SVIDEO,
703 .mpeg = CX88_MPEG_BLACKBIRD,
705 [CX88_BOARD_IODATA_GVBCTV7E] = {
706 .name = "IODATA GV/BCTV7E",
707 .tuner_type = TUNER_PHILIPS_FQ1286,
709 .tuner_addr = ADDR_UNSET,
710 .radio_addr = ADDR_UNSET,
711 .tda9887_conf = TDA9887_PRESENT,
713 .type = CX88_VMUX_TELEVISION,
717 .type = CX88_VMUX_COMPOSITE1,
721 .type = CX88_VMUX_SVIDEO,
726 [CX88_BOARD_PIXELVIEW_PLAYTV_ULTRA_PRO] = {
727 .name = "PixelView PlayTV Ultra Pro (Stereo)",
728 /* May be also TUNER_YMEC_TVF_5533MF for NTSC/M or PAL/M */
729 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
731 .tuner_addr = ADDR_UNSET,
732 .radio_addr = ADDR_UNSET,
734 .type = CX88_VMUX_TELEVISION,
736 .gpio0 = 0xbf61, /* internal decoder */
738 .type = CX88_VMUX_COMPOSITE1,
742 .type = CX88_VMUX_SVIDEO,
751 [CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T] = {
752 .name = "DViCO FusionHDTV 3 Gold-T",
753 .tuner_type = TUNER_THOMSON_DTT761X,
755 .tuner_addr = ADDR_UNSET,
756 .radio_addr = ADDR_UNSET,
757 .tda9887_conf = TDA9887_PRESENT,
759 .type = CX88_VMUX_TELEVISION,
763 .type = CX88_VMUX_COMPOSITE1,
767 .type = CX88_VMUX_SVIDEO,
771 .mpeg = CX88_MPEG_DVB,
773 [CX88_BOARD_ADSTECH_DVB_T_PCI] = {
774 .name = "ADS Tech Instant TV DVB-T PCI",
775 .tuner_type = TUNER_ABSENT,
777 .tuner_addr = ADDR_UNSET,
778 .radio_addr = ADDR_UNSET,
780 .type = CX88_VMUX_COMPOSITE1,
785 .type = CX88_VMUX_SVIDEO,
790 .mpeg = CX88_MPEG_DVB,
792 [CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1] = {
793 .name = "TerraTec Cinergy 1400 DVB-T",
794 .tuner_type = TUNER_ABSENT,
796 .type = CX88_VMUX_DVB,
799 .type = CX88_VMUX_COMPOSITE1,
802 .type = CX88_VMUX_SVIDEO,
805 .mpeg = CX88_MPEG_DVB,
807 [CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD] = {
808 .name = "DViCO FusionHDTV 5 Gold",
809 .tuner_type = TUNER_LG_TDVS_H06XF, /* TDVS-H062F */
811 .tuner_addr = ADDR_UNSET,
812 .radio_addr = ADDR_UNSET,
813 .tda9887_conf = TDA9887_PRESENT,
815 .type = CX88_VMUX_TELEVISION,
819 .type = CX88_VMUX_COMPOSITE1,
823 .type = CX88_VMUX_SVIDEO,
827 .mpeg = CX88_MPEG_DVB,
829 [CX88_BOARD_AVERMEDIA_ULTRATV_MC_550] = {
830 .name = "AverMedia UltraTV Media Center PCI 550",
831 .tuner_type = TUNER_PHILIPS_FM1236_MK3,
833 .tuner_addr = ADDR_UNSET,
834 .radio_addr = ADDR_UNSET,
835 .tda9887_conf = TDA9887_PRESENT,
837 .type = CX88_VMUX_COMPOSITE1,
842 .type = CX88_VMUX_SVIDEO,
847 .type = CX88_VMUX_TELEVISION,
858 .mpeg = CX88_MPEG_BLACKBIRD,
860 [CX88_BOARD_KWORLD_VSTREAM_EXPERT_DVD] = {
861 /* Alexander Wold <awold@bigfoot.com> */
862 .name = "Kworld V-Stream Xpert DVD",
865 .type = CX88_VMUX_COMPOSITE1,
872 .type = CX88_VMUX_SVIDEO,
880 [CX88_BOARD_ATI_HDTVWONDER] = {
881 .name = "ATI HDTV Wonder",
882 .tuner_type = TUNER_PHILIPS_TUV1236D,
884 .tuner_addr = ADDR_UNSET,
885 .radio_addr = ADDR_UNSET,
887 .type = CX88_VMUX_TELEVISION,
894 .type = CX88_VMUX_COMPOSITE1,
901 .type = CX88_VMUX_SVIDEO,
908 .mpeg = CX88_MPEG_DVB,
910 [CX88_BOARD_WINFAST_DTV1000] = {
911 .name = "WinFast DTV1000-T",
912 .tuner_type = TUNER_ABSENT,
914 .tuner_addr = ADDR_UNSET,
915 .radio_addr = ADDR_UNSET,
917 .type = CX88_VMUX_DVB,
920 .type = CX88_VMUX_COMPOSITE1,
923 .type = CX88_VMUX_SVIDEO,
926 .mpeg = CX88_MPEG_DVB,
928 [CX88_BOARD_AVERTV_303] = {
929 .name = "AVerTV 303 (M126)",
930 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
932 .tuner_addr = ADDR_UNSET,
933 .radio_addr = ADDR_UNSET,
934 .tda9887_conf = TDA9887_PRESENT,
936 .type = CX88_VMUX_TELEVISION,
943 .type = CX88_VMUX_COMPOSITE1,
950 .type = CX88_VMUX_SVIDEO,
958 [CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1] = {
959 .name = "Hauppauge Nova-S-Plus DVB-S",
960 .tuner_type = TUNER_ABSENT,
962 .tuner_addr = ADDR_UNSET,
963 .radio_addr = ADDR_UNSET,
965 .type = CX88_VMUX_DVB,
968 .type = CX88_VMUX_COMPOSITE1,
971 .type = CX88_VMUX_SVIDEO,
974 .mpeg = CX88_MPEG_DVB,
976 [CX88_BOARD_HAUPPAUGE_NOVASE2_S1] = {
977 .name = "Hauppauge Nova-SE2 DVB-S",
978 .tuner_type = TUNER_ABSENT,
980 .tuner_addr = ADDR_UNSET,
981 .radio_addr = ADDR_UNSET,
983 .type = CX88_VMUX_DVB,
986 .mpeg = CX88_MPEG_DVB,
988 [CX88_BOARD_KWORLD_DVBS_100] = {
989 .name = "KWorld DVB-S 100",
990 .tuner_type = TUNER_ABSENT,
992 .tuner_addr = ADDR_UNSET,
993 .radio_addr = ADDR_UNSET,
995 .type = CX88_VMUX_DVB,
998 .type = CX88_VMUX_COMPOSITE1,
1001 .type = CX88_VMUX_SVIDEO,
1004 .mpeg = CX88_MPEG_DVB,
1006 [CX88_BOARD_HAUPPAUGE_HVR1100] = {
1007 .name = "Hauppauge WinTV-HVR1100 DVB-T/Hybrid",
1008 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1009 .radio_type = UNSET,
1010 .tuner_addr = ADDR_UNSET,
1011 .radio_addr = ADDR_UNSET,
1012 .tda9887_conf = TDA9887_PRESENT,
1014 .type = CX88_VMUX_TELEVISION,
1017 .type = CX88_VMUX_COMPOSITE1,
1020 .type = CX88_VMUX_SVIDEO,
1023 /* fixme: Add radio support */
1024 .mpeg = CX88_MPEG_DVB,
1026 [CX88_BOARD_HAUPPAUGE_HVR1100LP] = {
1027 .name = "Hauppauge WinTV-HVR1100 DVB-T/Hybrid (Low Profile)",
1028 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1029 .radio_type = UNSET,
1030 .tuner_addr = ADDR_UNSET,
1031 .radio_addr = ADDR_UNSET,
1032 .tda9887_conf = TDA9887_PRESENT,
1034 .type = CX88_VMUX_TELEVISION,
1037 .type = CX88_VMUX_COMPOSITE1,
1040 /* fixme: Add radio support */
1041 .mpeg = CX88_MPEG_DVB,
1043 [CX88_BOARD_DNTV_LIVE_DVB_T_PRO] = {
1044 .name = "digitalnow DNTV Live! DVB-T Pro",
1045 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1046 .radio_type = UNSET,
1047 .tuner_addr = ADDR_UNSET,
1048 .radio_addr = ADDR_UNSET,
1049 .tda9887_conf = TDA9887_PRESENT | TDA9887_PORT1_ACTIVE |
1050 TDA9887_PORT2_ACTIVE,
1052 .type = CX88_VMUX_TELEVISION,
1056 .type = CX88_VMUX_COMPOSITE1,
1060 .type = CX88_VMUX_SVIDEO,
1068 .mpeg = CX88_MPEG_DVB,
1070 [CX88_BOARD_KWORLD_DVB_T_CX22702] = {
1071 /* Kworld V-stream Xpert DVB-T with Thomson tuner */
1072 /* DTT 7579 Conexant CX22702-19 Conexant CX2388x */
1073 /* Manenti Marco <marco_manenti@colman.it> */
1074 .name = "KWorld/VStream XPert DVB-T with cx22702",
1075 .tuner_type = TUNER_ABSENT,
1076 .radio_type = UNSET,
1077 .tuner_addr = ADDR_UNSET,
1078 .radio_addr = ADDR_UNSET,
1080 .type = CX88_VMUX_COMPOSITE1,
1085 .type = CX88_VMUX_SVIDEO,
1090 .mpeg = CX88_MPEG_DVB,
1092 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL] = {
1093 .name = "DViCO FusionHDTV DVB-T Dual Digital",
1094 .tuner_type = TUNER_ABSENT, /* No analog tuner */
1095 .radio_type = UNSET,
1096 .tuner_addr = ADDR_UNSET,
1097 .radio_addr = ADDR_UNSET,
1099 .type = CX88_VMUX_COMPOSITE1,
1101 .gpio0 = 0x000067df,
1103 .type = CX88_VMUX_SVIDEO,
1105 .gpio0 = 0x000067df,
1107 .mpeg = CX88_MPEG_DVB,
1109 [CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT] = {
1110 .name = "KWorld HardwareMpegTV XPert",
1111 .tuner_type = TUNER_PHILIPS_TDA8290,
1112 .radio_type = UNSET,
1113 .tuner_addr = ADDR_UNSET,
1114 .radio_addr = ADDR_UNSET,
1116 .type = CX88_VMUX_TELEVISION,
1121 .type = CX88_VMUX_COMPOSITE1,
1126 .type = CX88_VMUX_SVIDEO,
1136 .mpeg = CX88_MPEG_BLACKBIRD,
1138 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID] = {
1139 .name = "DViCO FusionHDTV DVB-T Hybrid",
1140 .tuner_type = TUNER_THOMSON_FE6600,
1141 .radio_type = UNSET,
1142 .tuner_addr = ADDR_UNSET,
1143 .radio_addr = ADDR_UNSET,
1145 .type = CX88_VMUX_TELEVISION,
1147 .gpio0 = 0x0000a75f,
1149 .type = CX88_VMUX_COMPOSITE1,
1151 .gpio0 = 0x0000a75b,
1153 .type = CX88_VMUX_SVIDEO,
1155 .gpio0 = 0x0000a75b,
1157 .mpeg = CX88_MPEG_DVB,
1159 [CX88_BOARD_PCHDTV_HD5500] = {
1160 .name = "pcHDTV HD5500 HDTV",
1161 .tuner_type = TUNER_LG_TDVS_H06XF, /* TDVS-H064F */
1162 .radio_type = UNSET,
1163 .tuner_addr = ADDR_UNSET,
1164 .radio_addr = ADDR_UNSET,
1165 .tda9887_conf = TDA9887_PRESENT,
1167 .type = CX88_VMUX_TELEVISION,
1171 .type = CX88_VMUX_COMPOSITE1,
1175 .type = CX88_VMUX_SVIDEO,
1179 .mpeg = CX88_MPEG_DVB,
1181 [CX88_BOARD_KWORLD_MCE200_DELUXE] = {
1182 /* FIXME: tested TV input only, disabled composite,
1183 svideo and radio until they can be tested also. */
1184 .name = "Kworld MCE 200 Deluxe",
1185 .tuner_type = TUNER_TENA_9533_DI,
1186 .radio_type = UNSET,
1187 .tda9887_conf = TDA9887_PRESENT,
1188 .tuner_addr = ADDR_UNSET,
1189 .radio_addr = ADDR_UNSET,
1191 .type = CX88_VMUX_TELEVISION,
1195 .mpeg = CX88_MPEG_BLACKBIRD,
1197 [CX88_BOARD_PIXELVIEW_PLAYTV_P7000] = {
1198 /* FIXME: SVideo, Composite and FM inputs are untested */
1199 .name = "PixelView PlayTV P7000",
1200 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
1201 .radio_type = UNSET,
1202 .tuner_addr = ADDR_UNSET,
1203 .radio_addr = ADDR_UNSET,
1204 .tda9887_conf = TDA9887_PRESENT | TDA9887_PORT1_ACTIVE |
1205 TDA9887_PORT2_ACTIVE,
1207 .type = CX88_VMUX_TELEVISION,
1211 .mpeg = CX88_MPEG_BLACKBIRD,
1213 [CX88_BOARD_NPGTECH_REALTV_TOP10FM] = {
1214 .name = "NPG Tech Real TV FM Top 10",
1215 .tuner_type = TUNER_TNF_5335MF, /* Actually a TNF9535 */
1216 .radio_type = UNSET,
1217 .tuner_addr = ADDR_UNSET,
1218 .radio_addr = ADDR_UNSET,
1220 .type = CX88_VMUX_TELEVISION,
1224 .type = CX88_VMUX_COMPOSITE1,
1228 .type = CX88_VMUX_SVIDEO,
1237 [CX88_BOARD_WINFAST_DTV2000H] = {
1238 /* video inputs and radio still in testing */
1239 .name = "WinFast DTV2000 H",
1240 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1241 .radio_type = UNSET,
1242 .tuner_addr = ADDR_UNSET,
1243 .radio_addr = ADDR_UNSET,
1244 .tda9887_conf = TDA9887_PRESENT,
1246 .type = CX88_VMUX_TELEVISION,
1248 .gpio0 = 0x00017304,
1249 .gpio1 = 0x00008203,
1250 .gpio2 = 0x00017304,
1251 .gpio3 = 0x02000000,
1253 .mpeg = CX88_MPEG_DVB,
1255 [CX88_BOARD_GENIATECH_DVBS] = {
1256 .name = "Geniatech DVB-S",
1257 .tuner_type = TUNER_ABSENT,
1258 .radio_type = UNSET,
1259 .tuner_addr = ADDR_UNSET,
1260 .radio_addr = ADDR_UNSET,
1262 .type = CX88_VMUX_DVB,
1265 .type = CX88_VMUX_COMPOSITE1,
1268 .mpeg = CX88_MPEG_DVB,
1270 [CX88_BOARD_HAUPPAUGE_HVR3000] = {
1271 /* FIXME: Add dvb & radio support */
1272 .name = "Hauppauge WinTV-HVR3000 TriMode Analog/DVB-S/DVB-T",
1273 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1274 .radio_type = UNSET,
1275 .tuner_addr = ADDR_UNSET,
1276 .radio_addr = ADDR_UNSET,
1277 .tda9887_conf = TDA9887_PRESENT,
1279 .type = CX88_VMUX_TELEVISION,
1283 .type = CX88_VMUX_COMPOSITE1,
1287 .type = CX88_VMUX_SVIDEO,
1291 .mpeg = CX88_MPEG_DVB,
1293 [CX88_BOARD_NORWOOD_MICRO] = {
1294 .name = "Norwood Micro TV Tuner",
1295 .tuner_type = TUNER_TNF_5335MF,
1296 .radio_type = UNSET,
1297 .tuner_addr = ADDR_UNSET,
1298 .radio_addr = ADDR_UNSET,
1300 .type = CX88_VMUX_TELEVISION,
1304 .type = CX88_VMUX_COMPOSITE1,
1308 .type = CX88_VMUX_SVIDEO,
1313 [CX88_BOARD_TE_DTV_250_OEM_SWANN] = {
1314 .name = "Shenzhen Tungsten Ages Tech TE-DTV-250 / Swann OEM",
1315 .tuner_type = TUNER_LG_PAL_NEW_TAPC,
1316 .radio_type = UNSET,
1317 .tuner_addr = ADDR_UNSET,
1318 .radio_addr = ADDR_UNSET,
1320 .type = CX88_VMUX_TELEVISION,
1322 .gpio0 = 0x003fffff,
1323 .gpio1 = 0x00e00000,
1324 .gpio2 = 0x003fffff,
1325 .gpio3 = 0x02000000,
1327 .type = CX88_VMUX_COMPOSITE1,
1329 .gpio0 = 0x003fffff,
1330 .gpio1 = 0x00e00000,
1331 .gpio2 = 0x003fffff,
1332 .gpio3 = 0x02000000,
1334 .type = CX88_VMUX_SVIDEO,
1336 .gpio0 = 0x003fffff,
1337 .gpio1 = 0x00e00000,
1338 .gpio2 = 0x003fffff,
1339 .gpio3 = 0x02000000,
1342 [CX88_BOARD_HAUPPAUGE_HVR1300] = {
1343 .name = "Hauppauge WinTV-HVR1300 DVB-T/Hybrid MPEG Encoder",
1344 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1345 .radio_type = UNSET,
1346 .tuner_addr = ADDR_UNSET,
1347 .radio_addr = ADDR_UNSET,
1348 .tda9887_conf = TDA9887_PRESENT,
1349 .audio_chip = AUDIO_CHIP_WM8775,
1351 .type = CX88_VMUX_TELEVISION,
1356 .type = CX88_VMUX_COMPOSITE1,
1361 .type = CX88_VMUX_SVIDEO,
1366 /* fixme: Add radio support */
1367 .mpeg = CX88_MPEG_DVB | CX88_MPEG_BLACKBIRD,
1369 [CX88_BOARD_ADSTECH_PTV_390] = {
1370 .name = "ADS Tech Instant Video PCI",
1371 .tuner_type = TUNER_ABSENT,
1372 .radio_type = UNSET,
1373 .tuner_addr = ADDR_UNSET,
1374 .radio_addr = ADDR_UNSET,
1376 .type = CX88_VMUX_DEBUG,
1380 .type = CX88_VMUX_COMPOSITE1,
1384 .type = CX88_VMUX_SVIDEO,
1389 [CX88_BOARD_PINNACLE_PCTV_HD_800i] = {
1390 .name = "Pinnacle PCTV HD 800i",
1391 .tuner_type = TUNER_XC5000,
1392 .radio_type = UNSET,
1393 .tuner_addr = ADDR_UNSET,
1394 .radio_addr = ADDR_UNSET,
1396 .type = CX88_VMUX_TELEVISION,
1401 .type = CX88_VMUX_COMPOSITE1,
1407 .type = CX88_VMUX_SVIDEO,
1413 .mpeg = CX88_MPEG_DVB,
1415 [CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO] = {
1416 .name = "DViCO FusionHDTV 5 PCI nano",
1417 /* xc3008 tuner, digital only for now */
1418 .tuner_type = TUNER_ABSENT,
1419 .radio_type = UNSET,
1420 .tuner_addr = ADDR_UNSET,
1421 .radio_addr = ADDR_UNSET,
1423 .type = CX88_VMUX_TELEVISION,
1425 .gpio0 = 0x000027df, /* Unconfirmed */
1427 .type = CX88_VMUX_COMPOSITE1,
1429 .gpio0 = 0x000027df, /* Unconfirmed */
1432 .type = CX88_VMUX_SVIDEO,
1434 .gpio0 = 0x000027df, /* Unconfirmed */
1437 .mpeg = CX88_MPEG_DVB,
1439 [CX88_BOARD_PINNACLE_HYBRID_PCTV] = {
1440 .name = "Pinnacle Hybrid PCTV",
1441 .tuner_type = TUNER_XC2028,
1444 .type = CX88_VMUX_TELEVISION,
1447 .type = CX88_VMUX_COMPOSITE1,
1450 .type = CX88_VMUX_SVIDEO,
1460 [CX88_BOARD_WINFAST_TV2000_XP_GLOBAL] = {
1461 .name = "Winfast TV2000 XP Global",
1462 .tuner_type = TUNER_XC2028,
1465 .type = CX88_VMUX_TELEVISION,
1467 .gpio0 = 0x0400, /* pin 2:mute = 0 (off?) */
1469 .gpio2 = 0x0800, /* pin 19:audio = 0 (tv) */
1472 .type = CX88_VMUX_COMPOSITE1,
1474 .gpio0 = 0x0400, /* probably? or 0x0404 to turn mute on */
1476 .gpio2 = 0x0808, /* pin 19:audio = 1 (line) */
1479 .type = CX88_VMUX_SVIDEO,
1489 [CX88_BOARD_POWERCOLOR_REAL_ANGEL] = {
1490 .name = "PowerColor Real Angel 330",
1491 .tuner_type = TUNER_XC2028,
1494 .type = CX88_VMUX_TELEVISION,
1496 .gpio0 = 0x0400, /* pin 2:mute = 0 (off?) */
1498 .gpio2 = 0x0800, /* pin 19:audio = 0 (tv) */
1500 .type = CX88_VMUX_COMPOSITE1,
1502 .gpio0 = 0x0400, /* probably? or 0x0404 to turn mute on */
1504 .gpio2 = 0x0808, /* pin 19:audio = 1 (line) */
1506 .type = CX88_VMUX_SVIDEO,
1521 [CX88_BOARD_GENIATECH_X8000_MT] = {
1522 /* Also PowerColor Real Angel 330 and Geniatech X800 OEM */
1523 .name = "Geniatech X8000-MT DVBT",
1524 .tuner_type = TUNER_XC2028,
1527 .type = CX88_VMUX_TELEVISION,
1529 .gpio0 = 0x00000000,
1530 .gpio1 = 0x00e3e341,
1531 .gpio2 = 0x00000000,
1532 .gpio3 = 0x00000000,
1534 .type = CX88_VMUX_COMPOSITE1,
1536 .gpio0 = 0x00000000,
1537 .gpio1 = 0x00e3e361,
1538 .gpio2 = 0x00000000,
1539 .gpio3 = 0x00000000,
1541 .type = CX88_VMUX_SVIDEO,
1543 .gpio0 = 0x00000000,
1544 .gpio1 = 0x00e3e361,
1545 .gpio2 = 0x00000000,
1546 .gpio3 = 0x00000000,
1550 .gpio0 = 0x00000000,
1551 .gpio1 = 0x00e3e341,
1552 .gpio2 = 0x00000000,
1553 .gpio3 = 0x00000000,
1555 .mpeg = CX88_MPEG_DVB,
1557 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO] = {
1558 .name = "DViCO FusionHDTV DVB-T PRO",
1559 .tuner_type = TUNER_ABSENT, /* XXX: Has XC3028 */
1560 .radio_type = UNSET,
1561 .tuner_addr = ADDR_UNSET,
1562 .radio_addr = ADDR_UNSET,
1564 .type = CX88_VMUX_COMPOSITE1,
1566 .gpio0 = 0x000067df,
1568 .type = CX88_VMUX_SVIDEO,
1570 .gpio0 = 0x000067df,
1572 .mpeg = CX88_MPEG_DVB,
1574 [CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD] = {
1575 .name = "DViCO FusionHDTV 7 Gold",
1576 .tuner_type = TUNER_XC5000,
1577 .radio_type = UNSET,
1578 .tuner_addr = ADDR_UNSET,
1579 .radio_addr = ADDR_UNSET,
1581 .type = CX88_VMUX_TELEVISION,
1585 .type = CX88_VMUX_COMPOSITE1,
1589 .type = CX88_VMUX_SVIDEO,
1594 [CX88_BOARD_PROLINK_PV_8000GT] = {
1595 .name = "Prolink Pixelview MPEG 8000GT",
1596 .tuner_type = TUNER_XC2028,
1599 .type = CX88_VMUX_TELEVISION,
1604 .type = CX88_VMUX_COMPOSITE1,
1608 .type = CX88_VMUX_SVIDEO,
1619 /* ------------------------------------------------------------------ */
1620 /* PCI subsystem IDs */
1622 static const struct cx88_subid cx88_subids[] = {
1624 .subvendor = 0x0070,
1625 .subdevice = 0x3400,
1626 .card = CX88_BOARD_HAUPPAUGE,
1628 .subvendor = 0x0070,
1629 .subdevice = 0x3401,
1630 .card = CX88_BOARD_HAUPPAUGE,
1632 .subvendor = 0x14c7,
1633 .subdevice = 0x0106,
1634 .card = CX88_BOARD_GDI,
1636 .subvendor = 0x14c7,
1637 .subdevice = 0x0107, /* with mpeg encoder */
1638 .card = CX88_BOARD_GDI,
1640 .subvendor = PCI_VENDOR_ID_ATI,
1641 .subdevice = 0x00f8,
1642 .card = CX88_BOARD_ATI_WONDER_PRO,
1644 .subvendor = 0x107d,
1645 .subdevice = 0x6611,
1646 .card = CX88_BOARD_WINFAST2000XP_EXPERT,
1648 .subvendor = 0x107d,
1649 .subdevice = 0x6613, /* NTSC */
1650 .card = CX88_BOARD_WINFAST2000XP_EXPERT,
1652 .subvendor = 0x107d,
1653 .subdevice = 0x6620,
1654 .card = CX88_BOARD_WINFAST_DV2000,
1656 .subvendor = 0x107d,
1657 .subdevice = 0x663b,
1658 .card = CX88_BOARD_LEADTEK_PVR2000,
1660 .subvendor = 0x107d,
1661 .subdevice = 0x663c,
1662 .card = CX88_BOARD_LEADTEK_PVR2000,
1664 .subvendor = 0x1461,
1665 .subdevice = 0x000b,
1666 .card = CX88_BOARD_AVERTV_STUDIO_303,
1668 .subvendor = 0x1462,
1669 .subdevice = 0x8606,
1670 .card = CX88_BOARD_MSI_TVANYWHERE_MASTER,
1672 .subvendor = 0x10fc,
1673 .subdevice = 0xd003,
1674 .card = CX88_BOARD_IODATA_GVVCP3PCI,
1676 .subvendor = 0x1043,
1677 .subdevice = 0x4823, /* with mpeg encoder */
1678 .card = CX88_BOARD_ASUS_PVR_416,
1680 .subvendor = 0x17de,
1681 .subdevice = 0x08a6,
1682 .card = CX88_BOARD_KWORLD_DVB_T,
1684 .subvendor = 0x18ac,
1685 .subdevice = 0xd810,
1686 .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q,
1688 .subvendor = 0x18ac,
1689 .subdevice = 0xd820,
1690 .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T,
1692 .subvendor = 0x18ac,
1693 .subdevice = 0xdb00,
1694 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1,
1696 .subvendor = 0x0070,
1697 .subdevice = 0x9002,
1698 .card = CX88_BOARD_HAUPPAUGE_DVB_T1,
1700 .subvendor = 0x14f1,
1701 .subdevice = 0x0187,
1702 .card = CX88_BOARD_CONEXANT_DVB_T1,
1704 .subvendor = 0x1540,
1705 .subdevice = 0x2580,
1706 .card = CX88_BOARD_PROVIDEO_PV259,
1708 .subvendor = 0x18ac,
1709 .subdevice = 0xdb10,
1710 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS,
1712 .subvendor = 0x1554,
1713 .subdevice = 0x4811,
1714 .card = CX88_BOARD_PIXELVIEW,
1716 .subvendor = 0x7063,
1717 .subdevice = 0x3000, /* HD-3000 card */
1718 .card = CX88_BOARD_PCHDTV_HD3000,
1720 .subvendor = 0x17de,
1721 .subdevice = 0xa8a6,
1722 .card = CX88_BOARD_DNTV_LIVE_DVB_T,
1724 .subvendor = 0x0070,
1725 .subdevice = 0x2801,
1726 .card = CX88_BOARD_HAUPPAUGE_ROSLYN,
1728 .subvendor = 0x14f1,
1729 .subdevice = 0x0342,
1730 .card = CX88_BOARD_DIGITALLOGIC_MEC,
1732 .subvendor = 0x10fc,
1733 .subdevice = 0xd035,
1734 .card = CX88_BOARD_IODATA_GVBCTV7E,
1736 .subvendor = 0x1421,
1737 .subdevice = 0x0334,
1738 .card = CX88_BOARD_ADSTECH_DVB_T_PCI,
1740 .subvendor = 0x153b,
1741 .subdevice = 0x1166,
1742 .card = CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1,
1744 .subvendor = 0x18ac,
1745 .subdevice = 0xd500,
1746 .card = CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD,
1748 .subvendor = 0x1461,
1749 .subdevice = 0x8011,
1750 .card = CX88_BOARD_AVERMEDIA_ULTRATV_MC_550,
1752 .subvendor = PCI_VENDOR_ID_ATI,
1753 .subdevice = 0xa101,
1754 .card = CX88_BOARD_ATI_HDTVWONDER,
1756 .subvendor = 0x107d,
1757 .subdevice = 0x665f,
1758 .card = CX88_BOARD_WINFAST_DTV1000,
1760 .subvendor = 0x1461,
1761 .subdevice = 0x000a,
1762 .card = CX88_BOARD_AVERTV_303,
1764 .subvendor = 0x0070,
1765 .subdevice = 0x9200,
1766 .card = CX88_BOARD_HAUPPAUGE_NOVASE2_S1,
1768 .subvendor = 0x0070,
1769 .subdevice = 0x9201,
1770 .card = CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1,
1772 .subvendor = 0x0070,
1773 .subdevice = 0x9202,
1774 .card = CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1,
1776 .subvendor = 0x17de,
1777 .subdevice = 0x08b2,
1778 .card = CX88_BOARD_KWORLD_DVBS_100,
1780 .subvendor = 0x0070,
1781 .subdevice = 0x9400,
1782 .card = CX88_BOARD_HAUPPAUGE_HVR1100,
1784 .subvendor = 0x0070,
1785 .subdevice = 0x9402,
1786 .card = CX88_BOARD_HAUPPAUGE_HVR1100,
1788 .subvendor = 0x0070,
1789 .subdevice = 0x9800,
1790 .card = CX88_BOARD_HAUPPAUGE_HVR1100LP,
1792 .subvendor = 0x0070,
1793 .subdevice = 0x9802,
1794 .card = CX88_BOARD_HAUPPAUGE_HVR1100LP,
1796 .subvendor = 0x0070,
1797 .subdevice = 0x9001,
1798 .card = CX88_BOARD_HAUPPAUGE_DVB_T1,
1800 .subvendor = 0x1822,
1801 .subdevice = 0x0025,
1802 .card = CX88_BOARD_DNTV_LIVE_DVB_T_PRO,
1804 .subvendor = 0x17de,
1805 .subdevice = 0x08a1,
1806 .card = CX88_BOARD_KWORLD_DVB_T_CX22702,
1808 .subvendor = 0x18ac,
1809 .subdevice = 0xdb50,
1810 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL,
1812 .subvendor = 0x18ac,
1813 .subdevice = 0xdb54,
1814 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL,
1815 /* Re-branded DViCO: DigitalNow DVB-T Dual */
1817 .subvendor = 0x18ac,
1818 .subdevice = 0xdb11,
1819 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS,
1820 /* Re-branded DViCO: UltraView DVB-T Plus */
1822 .subvendor = 0x18ac,
1823 .subdevice = 0xdb30,
1824 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO,
1826 .subvendor = 0x17de,
1827 .subdevice = 0x0840,
1828 .card = CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT,
1830 .subvendor = 0x1421,
1831 .subdevice = 0x0305,
1832 .card = CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT,
1834 .subvendor = 0x18ac,
1835 .subdevice = 0xdb40,
1836 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID,
1838 .subvendor = 0x18ac,
1839 .subdevice = 0xdb44,
1840 .card = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID,
1842 .subvendor = 0x7063,
1843 .subdevice = 0x5500,
1844 .card = CX88_BOARD_PCHDTV_HD5500,
1846 .subvendor = 0x17de,
1847 .subdevice = 0x0841,
1848 .card = CX88_BOARD_KWORLD_MCE200_DELUXE,
1850 .subvendor = 0x1822,
1851 .subdevice = 0x0019,
1852 .card = CX88_BOARD_DNTV_LIVE_DVB_T_PRO,
1854 .subvendor = 0x1554,
1855 .subdevice = 0x4813,
1856 .card = CX88_BOARD_PIXELVIEW_PLAYTV_P7000,
1858 .subvendor = 0x14f1,
1859 .subdevice = 0x0842,
1860 .card = CX88_BOARD_NPGTECH_REALTV_TOP10FM,
1862 .subvendor = 0x107d,
1863 .subdevice = 0x665e,
1864 .card = CX88_BOARD_WINFAST_DTV2000H,
1866 .subvendor = 0x18ac,
1867 .subdevice = 0xd800, /* FusionHDTV 3 Gold (original revision) */
1868 .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q,
1870 .subvendor = 0x14f1,
1871 .subdevice = 0x0084,
1872 .card = CX88_BOARD_GENIATECH_DVBS,
1874 .subvendor = 0x0070,
1875 .subdevice = 0x1404,
1876 .card = CX88_BOARD_HAUPPAUGE_HVR3000,
1878 .subvendor = 0x1461,
1879 .subdevice = 0xc111, /* AverMedia M150-D */
1880 /* This board is known to work with the ASUS PVR416 config */
1881 .card = CX88_BOARD_ASUS_PVR_416,
1883 .subvendor = 0xc180,
1884 .subdevice = 0xc980,
1885 .card = CX88_BOARD_TE_DTV_250_OEM_SWANN,
1887 .subvendor = 0x0070,
1888 .subdevice = 0x9600,
1889 .card = CX88_BOARD_HAUPPAUGE_HVR1300,
1891 .subvendor = 0x0070,
1892 .subdevice = 0x9601,
1893 .card = CX88_BOARD_HAUPPAUGE_HVR1300,
1895 .subvendor = 0x0070,
1896 .subdevice = 0x9602,
1897 .card = CX88_BOARD_HAUPPAUGE_HVR1300,
1899 .subvendor = 0x107d,
1900 .subdevice = 0x6632,
1901 .card = CX88_BOARD_LEADTEK_PVR2000,
1903 .subvendor = 0x12ab,
1904 .subdevice = 0x2300, /* Club3D Zap TV2100 */
1905 .card = CX88_BOARD_KWORLD_DVB_T_CX22702,
1907 .subvendor = 0x0070,
1908 .subdevice = 0x9000,
1909 .card = CX88_BOARD_HAUPPAUGE_DVB_T1,
1911 .subvendor = 0x0070,
1912 .subdevice = 0x1400,
1913 .card = CX88_BOARD_HAUPPAUGE_HVR3000,
1915 .subvendor = 0x0070,
1916 .subdevice = 0x1401,
1917 .card = CX88_BOARD_HAUPPAUGE_HVR3000,
1919 .subvendor = 0x0070,
1920 .subdevice = 0x1402,
1921 .card = CX88_BOARD_HAUPPAUGE_HVR3000,
1923 .subvendor = 0x1421,
1924 .subdevice = 0x0341, /* ADS Tech InstantTV DVB-S */
1925 .card = CX88_BOARD_KWORLD_DVBS_100,
1927 .subvendor = 0x1421,
1928 .subdevice = 0x0390,
1929 .card = CX88_BOARD_ADSTECH_PTV_390,
1931 .subvendor = 0x11bd,
1932 .subdevice = 0x0051,
1933 .card = CX88_BOARD_PINNACLE_PCTV_HD_800i,
1935 .subvendor = 0x18ac,
1936 .subdevice = 0xd530,
1937 .card = CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO,
1939 .subvendor = 0x12ab,
1940 .subdevice = 0x1788,
1941 .card = CX88_BOARD_PINNACLE_HYBRID_PCTV,
1943 .subvendor = 0x14f1,
1944 .subdevice = 0xea3d,
1945 .card = CX88_BOARD_POWERCOLOR_REAL_ANGEL,
1947 .subvendor = 0x107d,
1948 .subdevice = 0x6f18,
1949 .card = CX88_BOARD_WINFAST_TV2000_XP_GLOBAL,
1951 .subvendor = 0x14f1,
1952 .subdevice = 0x8852,
1953 .card = CX88_BOARD_GENIATECH_X8000_MT,
1955 .subvendor = 0x18ac,
1956 .subdevice = 0xd610,
1957 .card = CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD,
1959 .subvendor = 0x1554,
1960 .subdevice = 0x4935,
1961 .card = CX88_BOARD_PROLINK_PV_8000GT,
1965 /* ----------------------------------------------------------------------- */
1966 /* some leadtek specific stuff */
1968 static void leadtek_eeprom(struct cx88_core *core, u8 *eeprom_data)
1970 /* This is just for the "Winfast 2000XP Expert" board ATM; I don't have data on
1973 * Byte 0 is 1 on the NTSC board.
1976 if (eeprom_data[4] != 0x7d ||
1977 eeprom_data[5] != 0x10 ||
1978 eeprom_data[7] != 0x66) {
1979 warn_printk(core, "Leadtek eeprom invalid.\n");
1983 core->board.tuner_type = (eeprom_data[6] == 0x13) ?
1984 TUNER_PHILIPS_FM1236_MK3 : TUNER_PHILIPS_FM1216ME_MK3;
1986 info_printk(core, "Leadtek Winfast 2000XP Expert config: "
1987 "tuner=%d, eeprom[0]=0x%02x\n",
1988 core->board.tuner_type, eeprom_data[0]);
1991 static void hauppauge_eeprom(struct cx88_core *core, u8 *eeprom_data)
1995 tveeprom_hauppauge_analog(&core->i2c_client, &tv, eeprom_data);
1996 core->board.tuner_type = tv.tuner_type;
1997 core->tuner_formats = tv.tuner_formats;
1998 core->board.radio.type = tv.has_radio ? CX88_RADIO : 0;
2000 /* Make sure we support the board model */
2003 case 14009: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in) */
2004 case 14019: /* WinTV-HVR3000 (Retail, IR Blaster, b/panel video, 3.5mm audio in) */
2005 case 14029: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - 880 bridge) */
2006 case 14109: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - low profile) */
2007 case 14129: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - 880 bridge - LP) */
2008 case 14559: /* WinTV-HVR3000 (OEM, no IR, b/panel video, 3.5mm audio in) */
2009 case 14569: /* WinTV-HVR3000 (OEM, no IR, no back panel video) */
2010 case 14659: /* WinTV-HVR3000 (OEM, no IR, b/panel video, RCA audio in - Low profile) */
2011 case 14669: /* WinTV-HVR3000 (OEM, no IR, no b/panel video - Low profile) */
2012 case 28552: /* WinTV-PVR 'Roslyn' (No IR) */
2013 case 34519: /* WinTV-PCI-FM */
2014 case 90002: /* Nova-T-PCI (9002) */
2015 case 92001: /* Nova-S-Plus (Video and IR) */
2016 case 92002: /* Nova-S-Plus (Video and IR) */
2017 case 90003: /* Nova-T-PCI (9002 No RF out) */
2018 case 90500: /* Nova-T-PCI (oem) */
2019 case 90501: /* Nova-T-PCI (oem/IR) */
2020 case 92000: /* Nova-SE2 (OEM, No Video or IR) */
2021 case 94009: /* WinTV-HVR1100 (Video and IR Retail) */
2022 case 94501: /* WinTV-HVR1100 (Video and IR OEM) */
2023 case 96009: /* WinTV-HVR1300 (PAL Video, MPEG Video and IR RX) */
2024 case 96019: /* WinTV-HVR1300 (PAL Video, MPEG Video and IR RX/TX) */
2025 case 96559: /* WinTV-HVR1300 (PAL Video, MPEG Video no IR) */
2026 case 96569: /* WinTV-HVR1300 () */
2027 case 96659: /* WinTV-HVR1300 () */
2028 case 98559: /* WinTV-HVR1100LP (Video no IR, Retail - Low Profile) */
2032 warn_printk(core, "warning: unknown hauppauge model #%d\n",
2037 info_printk(core, "hauppauge eeprom: model=%d\n", tv.model);
2040 /* ----------------------------------------------------------------------- */
2041 /* some GDI (was: Modular Technology) specific stuff */
2048 [ 0x01 ] = { .id = TUNER_ABSENT,
2050 [ 0x02 ] = { .id = TUNER_ABSENT,
2052 [ 0x03 ] = { .id = TUNER_ABSENT,
2054 [ 0x04 ] = { .id = TUNER_ABSENT,
2056 [ 0x05 ] = { .id = TUNER_ABSENT,
2059 [ 0x10 ] = { .id = TUNER_ABSENT,
2061 .name = "TEMIC_4049" },
2062 [ 0x11 ] = { .id = TUNER_TEMIC_4136FY5,
2063 .name = "TEMIC_4136" },
2064 [ 0x12 ] = { .id = TUNER_ABSENT,
2065 .name = "TEMIC_4146" },
2067 [ 0x20 ] = { .id = TUNER_PHILIPS_FQ1216ME,
2069 .name = "PHILIPS_FQ1216_MK3" },
2070 [ 0x21 ] = { .id = TUNER_ABSENT, .fm = 1,
2071 .name = "PHILIPS_FQ1236_MK3" },
2072 [ 0x22 ] = { .id = TUNER_ABSENT,
2073 .name = "PHILIPS_FI1236_MK3" },
2074 [ 0x23 ] = { .id = TUNER_ABSENT,
2075 .name = "PHILIPS_FI1216_MK3" },
2078 static void gdi_eeprom(struct cx88_core *core, u8 *eeprom_data)
2080 char *name = (eeprom_data[0x0d] < ARRAY_SIZE(gdi_tuner))
2081 ? gdi_tuner[eeprom_data[0x0d]].name : NULL;
2083 info_printk(core, "GDI: tuner=%s\n", name ? name : "unknown");
2086 core->board.tuner_type = gdi_tuner[eeprom_data[0x0d]].id;
2087 core->board.radio.type = gdi_tuner[eeprom_data[0x0d]].fm ?
2091 /* ------------------------------------------------------------------- */
2092 /* some Divco specific stuff */
2093 static int cx88_dvico_xc2028_callback(struct cx88_core *core,
2094 int command, int arg)
2097 case XC2028_TUNER_RESET:
2098 cx_write(MO_GP0_IO, 0x101000);
2100 cx_set(MO_GP0_IO, 0x101010);
2110 /* ----------------------------------------------------------------------- */
2111 /* some Geniatech specific stuff */
2113 static int cx88_xc3028_geniatech_tuner_callback(struct cx88_core *core,
2114 int command, int mode)
2117 case XC2028_TUNER_RESET:
2118 switch (INPUT(core->input).type) {
2122 cx_write(MO_GP1_IO, 0x030302);
2126 cx_write(MO_GP1_IO, 0x030301);
2129 cx_write(MO_GP1_IO, 0x101010);
2131 cx_write(MO_GP1_IO, 0x101000);
2133 cx_write(MO_GP1_IO, 0x101010);
2140 /* ------------------------------------------------------------------- */
2141 /* some Divco specific stuff */
2142 static int cx88_pv_8000gt_callback(struct cx88_core *core,
2143 int command, int arg)
2146 case XC2028_TUNER_RESET:
2147 cx_write(MO_GP2_IO, 0xcf7);
2149 cx_write(MO_GP2_IO, 0xef5);
2151 cx_write(MO_GP2_IO, 0xcf7);
2160 /* ----------------------------------------------------------------------- */
2161 /* some DViCO specific stuff */
2163 static void dvico_fusionhdtv_hybrid_init(struct cx88_core *core)
2165 struct i2c_msg msg = { .addr = 0x45, .flags = 0 };
2167 static u8 init_bufs[13][5] = {
2168 { 0x10, 0x00, 0x20, 0x01, 0x03 },
2169 { 0x10, 0x10, 0x01, 0x00, 0x21 },
2170 { 0x10, 0x10, 0x10, 0x00, 0xCA },
2171 { 0x10, 0x10, 0x12, 0x00, 0x08 },
2172 { 0x10, 0x10, 0x13, 0x00, 0x0A },
2173 { 0x10, 0x10, 0x16, 0x01, 0xC0 },
2174 { 0x10, 0x10, 0x22, 0x01, 0x3D },
2175 { 0x10, 0x10, 0x73, 0x01, 0x2E },
2176 { 0x10, 0x10, 0x72, 0x00, 0xC5 },
2177 { 0x10, 0x10, 0x71, 0x01, 0x97 },
2178 { 0x10, 0x10, 0x70, 0x00, 0x0F },
2179 { 0x10, 0x10, 0xB0, 0x00, 0x01 },
2183 for (i = 0; i < ARRAY_SIZE(init_bufs); i++) {
2184 msg.buf = init_bufs[i];
2185 msg.len = (i != 12 ? 5 : 2);
2186 err = i2c_transfer(&core->i2c_adap, &msg, 1);
2188 warn_printk(core, "dvico_fusionhdtv_hybrid_init buf %d "
2189 "failed (err = %d)!\n", i, err);
2195 static int cx88_xc2028_tuner_callback(struct cx88_core *core,
2196 int command, int arg)
2198 /* Board-specific callbacks */
2199 switch (core->boardnr) {
2200 case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL:
2201 case CX88_BOARD_POWERCOLOR_REAL_ANGEL:
2202 case CX88_BOARD_GENIATECH_X8000_MT:
2203 return cx88_xc3028_geniatech_tuner_callback(core,
2205 case CX88_BOARD_PROLINK_PV_8000GT:
2206 return cx88_pv_8000gt_callback(core, command, arg);
2207 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO:
2208 return cx88_dvico_xc2028_callback(core, command, arg);
2212 case XC2028_TUNER_RESET:
2213 switch (INPUT(core->input).type) {
2215 info_printk(core, "setting GPIO to radio!\n");
2216 cx_write(MO_GP0_IO, 0x4ff);
2218 cx_write(MO_GP2_IO, 0xff);
2221 case CX88_VMUX_DVB: /* Digital TV*/
2222 default: /* Analog TV */
2223 info_printk(core, "setting GPIO to TV!\n");
2226 cx_write(MO_GP1_IO, 0x101010);
2228 cx_write(MO_GP1_IO, 0x101000);
2230 cx_write(MO_GP1_IO, 0x101010);
2237 /* ----------------------------------------------------------------------- */
2238 /* Tuner callback function. Currently only needed for the Pinnacle *
2239 * PCTV HD 800i with an xc5000 sillicon tuner. This is used for both *
2240 * analog tuner attach (tuner-core.c) and dvb tuner attach (cx88-dvb.c) */
2242 static int cx88_xc5000_tuner_callback(struct cx88_core *core,
2243 int command, int arg)
2245 switch (core->boardnr) {
2246 case CX88_BOARD_PINNACLE_PCTV_HD_800i:
2247 if (command == 0) { /* This is the reset command from xc5000 */
2248 /* Reset XC5000 tuner via SYS_RSTO_pin */
2249 cx_write(MO_SRST_IO, 0);
2251 cx_write(MO_SRST_IO, 1);
2254 err_printk(core, "xc5000: unknown tuner "
2255 "callback command.\n");
2259 case CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD:
2260 if (command == 0) { /* This is the reset command from xc5000 */
2261 cx_clear(MO_GP0_IO, 0x00000010);
2263 cx_set(MO_GP0_IO, 0x00000010);
2267 "xc5000: unknown tuner callback command.\n");
2272 return 0; /* Should never be here */
2275 int cx88_tuner_callback(void *priv, int command, int arg)
2277 struct i2c_algo_bit_data *i2c_algo = priv;
2278 struct cx88_core *core;
2281 printk(KERN_ERR "cx88: Error - i2c private data undefined.\n");
2285 core = i2c_algo->data;
2288 printk(KERN_ERR "cx88: Error - device struct undefined.\n");
2292 switch (core->board.tuner_type) {
2294 info_printk(core, "Calling XC2028/3028 callback\n");
2295 return cx88_xc2028_tuner_callback(core, command, arg);
2297 info_printk(core, "Calling XC5000 callback\n");
2298 return cx88_xc5000_tuner_callback(core, command, arg);
2300 err_printk(core, "Error: Calling callback for tuner %d\n",
2301 core->board.tuner_type);
2304 EXPORT_SYMBOL(cx88_tuner_callback);
2306 /* ----------------------------------------------------------------------- */
2308 static void cx88_card_list(struct cx88_core *core, struct pci_dev *pci)
2312 if (0 == pci->subsystem_vendor &&
2313 0 == pci->subsystem_device) {
2315 "%s: Your board has no valid PCI Subsystem ID and thus can't\n"
2316 "%s: be autodetected. Please pass card=<n> insmod option to\n"
2317 "%s: workaround that. Redirect complaints to the vendor of\n"
2318 "%s: the TV card. Best regards,\n"
2320 core->name,core->name,core->name,core->name,core->name);
2323 "%s: Your board isn't known (yet) to the driver. You can\n"
2324 "%s: try to pick one of the existing card configs via\n"
2325 "%s: card=<n> insmod option. Updating to the latest\n"
2326 "%s: version might help as well.\n",
2327 core->name,core->name,core->name,core->name);
2329 err_printk(core, "Here is a list of valid choices for the card=<n> "
2330 "insmod option:\n");
2331 for (i = 0; i < ARRAY_SIZE(cx88_boards); i++)
2332 printk(KERN_ERR "%s: card=%d -> %s\n",
2333 core->name, i, cx88_boards[i].name);
2336 static void cx88_card_setup_pre_i2c(struct cx88_core *core)
2338 switch (core->boardnr) {
2339 case CX88_BOARD_HAUPPAUGE_HVR1300:
2340 /* Bring the 702 demod up before i2c scanning/attach or devices are hidden */
2341 /* We leave here with the 702 on the bus */
2342 cx_write(MO_GP0_IO, 0x0000e780);
2344 cx_clear(MO_GP0_IO, 0x00000080);
2346 cx_set(MO_GP0_IO, 0x00000080); /* 702 out of reset */
2350 case CX88_BOARD_PROLINK_PV_8000GT:
2351 cx_write(MO_GP2_IO, 0xcf7);
2353 cx_write(MO_GP2_IO, 0xef5);
2355 cx_write(MO_GP2_IO, 0xcf7);
2359 case CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD:
2360 /* Enable the xc5000 tuner */
2361 cx_set(MO_GP0_IO, 0x00001010);
2366 static void cx88_card_setup(struct cx88_core *core)
2368 static u8 eeprom[256];
2370 if (0 == core->i2c_rc) {
2371 core->i2c_client.addr = 0xa0 >> 1;
2372 tveeprom_read(&core->i2c_client,eeprom,sizeof(eeprom));
2375 switch (core->boardnr) {
2376 case CX88_BOARD_HAUPPAUGE:
2377 case CX88_BOARD_HAUPPAUGE_ROSLYN:
2378 if (0 == core->i2c_rc)
2379 hauppauge_eeprom(core,eeprom+8);
2381 case CX88_BOARD_GDI:
2382 if (0 == core->i2c_rc)
2383 gdi_eeprom(core,eeprom);
2385 case CX88_BOARD_WINFAST2000XP_EXPERT:
2386 if (0 == core->i2c_rc)
2387 leadtek_eeprom(core,eeprom);
2389 case CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1:
2390 case CX88_BOARD_HAUPPAUGE_NOVASE2_S1:
2391 case CX88_BOARD_HAUPPAUGE_DVB_T1:
2392 case CX88_BOARD_HAUPPAUGE_HVR1100:
2393 case CX88_BOARD_HAUPPAUGE_HVR1100LP:
2394 case CX88_BOARD_HAUPPAUGE_HVR3000:
2395 case CX88_BOARD_HAUPPAUGE_HVR1300:
2396 if (0 == core->i2c_rc)
2397 hauppauge_eeprom(core,eeprom);
2399 case CX88_BOARD_KWORLD_DVBS_100:
2400 cx_write(MO_GP0_IO, 0x000007f8);
2401 cx_write(MO_GP1_IO, 0x00000001);
2403 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO:
2404 /* GPIO0:0 is hooked to demod reset */
2405 /* GPIO0:4 is hooked to xc3028 reset */
2406 cx_write(MO_GP0_IO, 0x00111100);
2408 cx_write(MO_GP0_IO, 0x00111111);
2410 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL:
2411 /* GPIO0:6 is hooked to FX2 reset pin */
2412 cx_set(MO_GP0_IO, 0x00004040);
2413 cx_clear(MO_GP0_IO, 0x00000040);
2415 cx_set(MO_GP0_IO, 0x00004040);
2417 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1:
2418 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS:
2419 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID:
2420 /* GPIO0:0 is hooked to mt352 reset pin */
2421 cx_set(MO_GP0_IO, 0x00000101);
2422 cx_clear(MO_GP0_IO, 0x00000001);
2424 cx_set(MO_GP0_IO, 0x00000101);
2425 if (0 == core->i2c_rc &&
2426 core->boardnr == CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID)
2427 dvico_fusionhdtv_hybrid_init(core);
2429 case CX88_BOARD_KWORLD_DVB_T:
2430 case CX88_BOARD_DNTV_LIVE_DVB_T:
2431 cx_set(MO_GP0_IO, 0x00000707);
2432 cx_set(MO_GP2_IO, 0x00000101);
2433 cx_clear(MO_GP2_IO, 0x00000001);
2435 cx_clear(MO_GP0_IO, 0x00000007);
2436 cx_set(MO_GP2_IO, 0x00000101);
2438 case CX88_BOARD_DNTV_LIVE_DVB_T_PRO:
2439 cx_write(MO_GP0_IO, 0x00080808);
2441 case CX88_BOARD_ATI_HDTVWONDER:
2442 if (0 == core->i2c_rc) {
2445 static const u8 buffer [][2] = {
2452 core->i2c_client.addr = 0x0a;
2454 for (i = 0; i < ARRAY_SIZE(buffer); i++)
2455 if (2 != i2c_master_send(&core->i2c_client,
2457 warn_printk(core, "Unable to enable "
2461 case CX88_BOARD_MSI_TVANYWHERE_MASTER:
2463 struct v4l2_priv_tun_config tea5767_cfg;
2464 struct tea5767_ctrl ctl;
2466 memset(&ctl, 0, sizeof(ctl));
2471 ctl.xtal_freq = TEA5767_HIGH_LO_13MHz;
2473 tea5767_cfg.tuner = TUNER_TEA5767;
2474 tea5767_cfg.priv = &ctl;
2476 cx88_call_i2c_clients(core, TUNER_SET_CONFIG, &tea5767_cfg);
2480 if (core->board.tuner_type == TUNER_XC2028) {
2481 struct v4l2_priv_tun_config xc2028_cfg;
2482 struct xc2028_ctrl ctl;
2484 memset(&xc2028_cfg, 0, sizeof(xc2028_cfg));
2485 memset(&ctl, 0, sizeof(ctl));
2487 ctl.fname = XC2028_DEFAULT_FIRMWARE;
2490 switch (core->boardnr) {
2491 case CX88_BOARD_POWERCOLOR_REAL_ANGEL:
2492 /* Doesn't work with firmware version 2.7 */
2493 ctl.fname = "xc3028-v25.fw";
2495 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO:
2496 ctl.scode_table = XC3028_FE_ZARLINK456;
2498 case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO:
2499 ctl.demod = XC3028_FE_OREN538;
2501 case CX88_BOARD_PROLINK_PV_8000GT:
2503 * This board uses non-MTS firmware
2507 ctl.demod = XC3028_FE_OREN538;
2511 xc2028_cfg.tuner = TUNER_XC2028;
2512 xc2028_cfg.priv = &ctl;
2514 info_printk(core, "Asking xc2028/3028 to load firmware %s\n",
2516 cx88_call_i2c_clients(core, TUNER_SET_CONFIG, &xc2028_cfg);
2520 /* ------------------------------------------------------------------ */
2522 static int cx88_pci_quirks(const char *name, struct pci_dev *pci)
2524 unsigned int lat = UNSET;
2528 /* check pci quirks */
2529 if (pci_pci_problems & PCIPCI_TRITON) {
2530 printk(KERN_INFO "%s: quirk: PCIPCI_TRITON -- set TBFX\n",
2532 ctrl |= CX88X_EN_TBFX;
2534 if (pci_pci_problems & PCIPCI_NATOMA) {
2535 printk(KERN_INFO "%s: quirk: PCIPCI_NATOMA -- set TBFX\n",
2537 ctrl |= CX88X_EN_TBFX;
2539 if (pci_pci_problems & PCIPCI_VIAETBF) {
2540 printk(KERN_INFO "%s: quirk: PCIPCI_VIAETBF -- set TBFX\n",
2542 ctrl |= CX88X_EN_TBFX;
2544 if (pci_pci_problems & PCIPCI_VSFX) {
2545 printk(KERN_INFO "%s: quirk: PCIPCI_VSFX -- set VSFX\n",
2547 ctrl |= CX88X_EN_VSFX;
2549 #ifdef PCIPCI_ALIMAGIK
2550 if (pci_pci_problems & PCIPCI_ALIMAGIK) {
2551 printk(KERN_INFO "%s: quirk: PCIPCI_ALIMAGIK -- latency fixup\n",
2557 /* check insmod options */
2558 if (UNSET != latency)
2563 pci_read_config_byte(pci, CX88X_DEVCTRL, &value);
2565 pci_write_config_byte(pci, CX88X_DEVCTRL, value);
2568 printk(KERN_INFO "%s: setting pci latency timer to %d\n",
2570 pci_write_config_byte(pci, PCI_LATENCY_TIMER, latency);
2575 int cx88_get_resources(const struct cx88_core *core, struct pci_dev *pci)
2577 if (request_mem_region(pci_resource_start(pci,0),
2578 pci_resource_len(pci,0),
2582 "%s/%d: Can't get MMIO memory @ 0x%llx, subsystem: %04x:%04x\n",
2583 core->name, PCI_FUNC(pci->devfn),
2584 (unsigned long long)pci_resource_start(pci, 0),
2585 pci->subsystem_vendor, pci->subsystem_device);
2589 /* Allocate and initialize the cx88 core struct. One should hold the
2590 * devlist mutex before calling this. */
2591 struct cx88_core *cx88_core_create(struct pci_dev *pci, int nr)
2593 struct cx88_core *core;
2596 core = kzalloc(sizeof(*core), GFP_KERNEL);
2598 atomic_inc(&core->refcount);
2599 core->pci_bus = pci->bus->number;
2600 core->pci_slot = PCI_SLOT(pci->devfn);
2601 core->pci_irqmask = PCI_INT_RISC_RD_BERRINT | PCI_INT_RISC_WR_BERRINT |
2602 PCI_INT_BRDG_BERRINT | PCI_INT_SRC_DMA_BERRINT |
2603 PCI_INT_DST_DMA_BERRINT | PCI_INT_IPB_DMA_BERRINT;
2604 mutex_init(&core->lock);
2607 sprintf(core->name, "cx88[%d]", core->nr);
2608 if (0 != cx88_get_resources(core, pci)) {
2614 cx88_pci_quirks(core->name, pci);
2615 core->lmmio = ioremap(pci_resource_start(pci, 0),
2616 pci_resource_len(pci, 0));
2617 core->bmmio = (u8 __iomem *)core->lmmio;
2620 core->boardnr = UNSET;
2621 if (card[core->nr] < ARRAY_SIZE(cx88_boards))
2622 core->boardnr = card[core->nr];
2623 for (i = 0; UNSET == core->boardnr && i < ARRAY_SIZE(cx88_subids); i++)
2624 if (pci->subsystem_vendor == cx88_subids[i].subvendor &&
2625 pci->subsystem_device == cx88_subids[i].subdevice)
2626 core->boardnr = cx88_subids[i].card;
2627 if (UNSET == core->boardnr) {
2628 core->boardnr = CX88_BOARD_UNKNOWN;
2629 cx88_card_list(core, pci);
2632 memcpy(&core->board, &cx88_boards[core->boardnr], sizeof(core->board));
2634 info_printk(core, "subsystem: %04x:%04x, board: %s [card=%d,%s]\n",
2635 pci->subsystem_vendor, pci->subsystem_device, core->board.name,
2636 core->boardnr, card[core->nr] == core->boardnr ?
2637 "insmod option" : "autodetected");
2639 if (tuner[core->nr] != UNSET)
2640 core->board.tuner_type = tuner[core->nr];
2641 if (radio[core->nr] != UNSET)
2642 core->board.radio_type = radio[core->nr];
2644 info_printk(core, "TV tuner type %d, Radio tuner type %d\n",
2645 core->board.tuner_type, core->board.radio_type);
2649 cx88_card_setup_pre_i2c(core);
2650 cx88_i2c_init(core, pci);
2652 /* load tuner module, if needed */
2653 if (TUNER_ABSENT != core->board.tuner_type)
2654 request_module("tuner");
2656 cx88_call_i2c_clients (core, TUNER_SET_STANDBY, NULL);
2657 cx88_card_setup(core);
2658 cx88_ir_init(core, pci);