3 * device driver for Conexant 2388x based TV cards
6 * (c) 2003 Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 #include <linux/init.h>
24 #include <linux/module.h>
25 #include <linux/pci.h>
26 #include <linux/delay.h>
31 static unsigned int tuner
[] = {[0 ... (CX88_MAXBOARDS
- 1)] = UNSET
};
32 static unsigned int radio
[] = {[0 ... (CX88_MAXBOARDS
- 1)] = UNSET
};
33 static unsigned int card
[] = {[0 ... (CX88_MAXBOARDS
- 1)] = UNSET
};
35 module_param_array(tuner
, int, NULL
, 0444);
36 module_param_array(radio
, int, NULL
, 0444);
37 module_param_array(card
, int, NULL
, 0444);
39 MODULE_PARM_DESC(tuner
,"tuner type");
40 MODULE_PARM_DESC(radio
,"radio tuner type");
41 MODULE_PARM_DESC(card
,"card type");
43 static unsigned int latency
= UNSET
;
44 module_param(latency
,int,0444);
45 MODULE_PARM_DESC(latency
,"pci latency timer");
47 #define info_printk(core, fmt, arg...) \
48 printk(KERN_INFO "%s: " fmt, core->name , ## arg)
50 #define warn_printk(core, fmt, arg...) \
51 printk(KERN_WARNING "%s: " fmt, core->name , ## arg)
53 #define err_printk(core, fmt, arg...) \
54 printk(KERN_ERR "%s: " fmt, core->name , ## arg)
57 /* ------------------------------------------------------------------ */
58 /* board config info */
60 /* If radio_type !=UNSET, radio_addr should be specified
63 static const struct cx88_board cx88_boards
[] = {
64 [CX88_BOARD_UNKNOWN
] = {
65 .name
= "UNKNOWN/GENERIC",
68 .tuner_addr
= ADDR_UNSET
,
69 .radio_addr
= ADDR_UNSET
,
71 .type
= CX88_VMUX_COMPOSITE1
,
74 .type
= CX88_VMUX_COMPOSITE2
,
77 .type
= CX88_VMUX_COMPOSITE3
,
80 .type
= CX88_VMUX_COMPOSITE4
,
84 [CX88_BOARD_HAUPPAUGE
] = {
85 .name
= "Hauppauge WinTV 34xxx models",
88 .tuner_addr
= ADDR_UNSET
,
89 .radio_addr
= ADDR_UNSET
,
90 .tda9887_conf
= TDA9887_PRESENT
,
92 .type
= CX88_VMUX_TELEVISION
,
94 .gpio0
= 0xff00, // internal decoder
96 .type
= CX88_VMUX_DEBUG
,
98 .gpio0
= 0xff01, // mono from tuner chip
100 .type
= CX88_VMUX_COMPOSITE1
,
104 .type
= CX88_VMUX_SVIDEO
,
114 .name
= "GDI Black Gold",
117 .tuner_addr
= ADDR_UNSET
,
118 .radio_addr
= ADDR_UNSET
,
120 .type
= CX88_VMUX_TELEVISION
,
123 .type
= CX88_VMUX_SVIDEO
,
127 [CX88_BOARD_PIXELVIEW
] = {
129 .tuner_type
= TUNER_PHILIPS_PAL
,
131 .tuner_addr
= ADDR_UNSET
,
132 .radio_addr
= ADDR_UNSET
,
134 .type
= CX88_VMUX_TELEVISION
,
136 .gpio0
= 0xff00, // internal decoder
138 .type
= CX88_VMUX_COMPOSITE1
,
141 .type
= CX88_VMUX_SVIDEO
,
149 [CX88_BOARD_ATI_WONDER_PRO
] = {
150 .name
= "ATI TV Wonder Pro",
151 .tuner_type
= TUNER_PHILIPS_4IN1
,
153 .tuner_addr
= ADDR_UNSET
,
154 .radio_addr
= ADDR_UNSET
,
155 .tda9887_conf
= TDA9887_PRESENT
| TDA9887_INTERCARRIER
,
157 .type
= CX88_VMUX_TELEVISION
,
161 .type
= CX88_VMUX_COMPOSITE1
,
165 .type
= CX88_VMUX_SVIDEO
,
170 [CX88_BOARD_WINFAST2000XP_EXPERT
] = {
171 .name
= "Leadtek Winfast 2000XP Expert",
172 .tuner_type
= TUNER_PHILIPS_4IN1
,
174 .tuner_addr
= ADDR_UNSET
,
175 .radio_addr
= ADDR_UNSET
,
176 .tda9887_conf
= TDA9887_PRESENT
,
178 .type
= CX88_VMUX_TELEVISION
,
185 .type
= CX88_VMUX_COMPOSITE1
,
192 .type
= CX88_VMUX_SVIDEO
,
207 [CX88_BOARD_AVERTV_STUDIO_303
] = {
208 .name
= "AverTV Studio 303 (M126)",
209 .tuner_type
= TUNER_PHILIPS_FM1216ME_MK3
,
211 .tuner_addr
= ADDR_UNSET
,
212 .radio_addr
= ADDR_UNSET
,
213 .tda9887_conf
= TDA9887_PRESENT
,
215 .type
= CX88_VMUX_TELEVISION
,
219 .type
= CX88_VMUX_COMPOSITE1
,
223 .type
= CX88_VMUX_SVIDEO
,
232 [CX88_BOARD_MSI_TVANYWHERE_MASTER
] = {
233 // added gpio values thanks to Michal
234 // values for PAL from DScaler
235 .name
= "MSI TV-@nywhere Master",
236 .tuner_type
= TUNER_MT2032
,
238 .tuner_addr
= ADDR_UNSET
,
239 .radio_addr
= ADDR_UNSET
,
240 .tda9887_conf
= TDA9887_PRESENT
| TDA9887_INTERCARRIER_NTSC
,
242 .type
= CX88_VMUX_TELEVISION
,
248 .type
= CX88_VMUX_COMPOSITE1
,
254 .type
= CX88_VMUX_SVIDEO
,
268 [CX88_BOARD_WINFAST_DV2000
] = {
269 .name
= "Leadtek Winfast DV2000",
270 .tuner_type
= TUNER_PHILIPS_FM1216ME_MK3
,
272 .tuner_addr
= ADDR_UNSET
,
273 .radio_addr
= ADDR_UNSET
,
274 .tda9887_conf
= TDA9887_PRESENT
,
276 .type
= CX88_VMUX_TELEVISION
,
284 .type
= CX88_VMUX_COMPOSITE1
,
291 .type
= CX88_VMUX_SVIDEO
,
306 [CX88_BOARD_LEADTEK_PVR2000
] = {
307 // gpio values for PAL version from regspy by DScaler
308 .name
= "Leadtek PVR 2000",
309 .tuner_type
= TUNER_PHILIPS_FM1216ME_MK3
,
311 .tuner_addr
= ADDR_UNSET
,
312 .radio_addr
= ADDR_UNSET
,
313 .tda9887_conf
= TDA9887_PRESENT
,
315 .type
= CX88_VMUX_TELEVISION
,
320 .type
= CX88_VMUX_COMPOSITE1
,
325 .type
= CX88_VMUX_SVIDEO
,
335 .mpeg
= CX88_MPEG_BLACKBIRD
,
337 [CX88_BOARD_IODATA_GVVCP3PCI
] = {
338 .name
= "IODATA GV-VCP3/PCI",
339 .tuner_type
= TUNER_ABSENT
,
341 .tuner_addr
= ADDR_UNSET
,
342 .radio_addr
= ADDR_UNSET
,
344 .type
= CX88_VMUX_COMPOSITE1
,
347 .type
= CX88_VMUX_COMPOSITE2
,
350 .type
= CX88_VMUX_SVIDEO
,
354 [CX88_BOARD_PROLINK_PLAYTVPVR
] = {
355 .name
= "Prolink PlayTV PVR",
356 .tuner_type
= TUNER_PHILIPS_FM1236_MK3
,
358 .tuner_addr
= ADDR_UNSET
,
359 .radio_addr
= ADDR_UNSET
,
360 .tda9887_conf
= TDA9887_PRESENT
,
362 .type
= CX88_VMUX_TELEVISION
,
366 .type
= CX88_VMUX_COMPOSITE1
,
370 .type
= CX88_VMUX_SVIDEO
,
379 [CX88_BOARD_ASUS_PVR_416
] = {
380 .name
= "ASUS PVR-416",
381 .tuner_type
= TUNER_PHILIPS_FM1236_MK3
,
383 .tuner_addr
= ADDR_UNSET
,
384 .radio_addr
= ADDR_UNSET
,
385 .tda9887_conf
= TDA9887_PRESENT
,
387 .type
= CX88_VMUX_TELEVISION
,
391 .type
= CX88_VMUX_SVIDEO
,
393 .gpio0
= 0x0000fde6, // 0x0000fda6 L,R RCA audio in?
400 .mpeg
= CX88_MPEG_BLACKBIRD
,
402 [CX88_BOARD_MSI_TVANYWHERE
] = {
403 .name
= "MSI TV-@nywhere",
404 .tuner_type
= TUNER_MT2032
,
406 .tuner_addr
= ADDR_UNSET
,
407 .radio_addr
= ADDR_UNSET
,
408 .tda9887_conf
= TDA9887_PRESENT
,
410 .type
= CX88_VMUX_TELEVISION
,
415 .type
= CX88_VMUX_COMPOSITE1
,
420 .type
= CX88_VMUX_SVIDEO
,
426 [CX88_BOARD_KWORLD_DVB_T
] = {
427 .name
= "KWorld/VStream XPert DVB-T",
428 .tuner_type
= TUNER_ABSENT
,
430 .tuner_addr
= ADDR_UNSET
,
431 .radio_addr
= ADDR_UNSET
,
433 .type
= CX88_VMUX_COMPOSITE1
,
438 .type
= CX88_VMUX_SVIDEO
,
443 .mpeg
= CX88_MPEG_DVB
,
445 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1
] = {
446 .name
= "DViCO FusionHDTV DVB-T1",
447 .tuner_type
= TUNER_ABSENT
, /* No analog tuner */
449 .tuner_addr
= ADDR_UNSET
,
450 .radio_addr
= ADDR_UNSET
,
452 .type
= CX88_VMUX_COMPOSITE1
,
456 .type
= CX88_VMUX_SVIDEO
,
460 .mpeg
= CX88_MPEG_DVB
,
462 [CX88_BOARD_KWORLD_LTV883
] = {
463 .name
= "KWorld LTV883RF",
464 .tuner_type
= TUNER_TNF_8831BGFF
,
466 .tuner_addr
= ADDR_UNSET
,
467 .radio_addr
= ADDR_UNSET
,
469 .type
= CX88_VMUX_TELEVISION
,
473 .type
= CX88_VMUX_DEBUG
,
475 .gpio0
= 0x07f9, // mono from tuner chip
477 .type
= CX88_VMUX_COMPOSITE1
,
481 .type
= CX88_VMUX_SVIDEO
,
490 [CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q
] = {
491 .name
= "DViCO FusionHDTV 3 Gold-Q",
492 .tuner_type
= TUNER_MICROTUNE_4042FI5
,
494 .tuner_addr
= ADDR_UNSET
,
495 .radio_addr
= ADDR_UNSET
,
497 GPIO[0] resets DT3302 DTV receiver
500 GPIO[1] mutes analog audio output connector
501 0 - enable selected source
503 GPIO[2] selects source for analog audio output connector
504 0 - analog audio input connector on tab
505 1 - analog DAC output from CX23881 chip
506 GPIO[3] selects RF input connector on tuner module
507 0 - RF connector labeled CABLE
508 1 - RF connector labeled ANT
509 GPIO[4] selects high RF for QAM256 mode
514 .type
= CX88_VMUX_TELEVISION
,
518 .type
= CX88_VMUX_CABLE
,
522 .type
= CX88_VMUX_COMPOSITE1
,
526 .type
= CX88_VMUX_SVIDEO
,
530 .mpeg
= CX88_MPEG_DVB
,
532 [CX88_BOARD_HAUPPAUGE_DVB_T1
] = {
533 .name
= "Hauppauge Nova-T DVB-T",
534 .tuner_type
= TUNER_ABSENT
,
536 .tuner_addr
= ADDR_UNSET
,
537 .radio_addr
= ADDR_UNSET
,
539 .type
= CX88_VMUX_DVB
,
542 .mpeg
= CX88_MPEG_DVB
,
544 [CX88_BOARD_CONEXANT_DVB_T1
] = {
545 .name
= "Conexant DVB-T reference design",
546 .tuner_type
= TUNER_ABSENT
,
548 .tuner_addr
= ADDR_UNSET
,
549 .radio_addr
= ADDR_UNSET
,
551 .type
= CX88_VMUX_DVB
,
554 .mpeg
= CX88_MPEG_DVB
,
556 [CX88_BOARD_PROVIDEO_PV259
] = {
557 .name
= "Provideo PV259",
558 .tuner_type
= TUNER_PHILIPS_FQ1216ME
,
560 .tuner_addr
= ADDR_UNSET
,
561 .radio_addr
= ADDR_UNSET
,
563 .type
= CX88_VMUX_TELEVISION
,
567 .mpeg
= CX88_MPEG_BLACKBIRD
,
569 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS
] = {
570 .name
= "DViCO FusionHDTV DVB-T Plus",
571 .tuner_type
= TUNER_ABSENT
, /* No analog tuner */
573 .tuner_addr
= ADDR_UNSET
,
574 .radio_addr
= ADDR_UNSET
,
576 .type
= CX88_VMUX_COMPOSITE1
,
580 .type
= CX88_VMUX_SVIDEO
,
584 .mpeg
= CX88_MPEG_DVB
,
586 [CX88_BOARD_DNTV_LIVE_DVB_T
] = {
587 .name
= "digitalnow DNTV Live! DVB-T",
588 .tuner_type
= TUNER_ABSENT
,
590 .tuner_addr
= ADDR_UNSET
,
591 .radio_addr
= ADDR_UNSET
,
593 .type
= CX88_VMUX_COMPOSITE1
,
598 .type
= CX88_VMUX_SVIDEO
,
603 .mpeg
= CX88_MPEG_DVB
,
605 [CX88_BOARD_PCHDTV_HD3000
] = {
606 .name
= "pcHDTV HD3000 HDTV",
607 .tuner_type
= TUNER_THOMSON_DTT761X
,
609 .tuner_addr
= ADDR_UNSET
,
610 .radio_addr
= ADDR_UNSET
,
611 .tda9887_conf
= TDA9887_PRESENT
,
612 /* GPIO[2] = audio source for analog audio out connector
613 * 0 = analog audio input connector
614 * 1 = CX88 audio DACs
616 * GPIO[7] = input to CX88's audio/chroma ADC
618 * 1 = Sound 4.5 MHz IF
620 * GPIO[1,5,6] = Oren 51132 pins 27,35,28 respectively
622 * GPIO[16] = Remote control input
625 .type
= CX88_VMUX_TELEVISION
,
629 .type
= CX88_VMUX_COMPOSITE1
,
633 .type
= CX88_VMUX_SVIDEO
,
641 .mpeg
= CX88_MPEG_DVB
,
643 [CX88_BOARD_HAUPPAUGE_ROSLYN
] = {
644 // entry added by Kaustubh D. Bhalerao <bhalerao.1@osu.edu>
645 // GPIO values obtained from regspy, courtesy Sean Covel
646 .name
= "Hauppauge WinTV 28xxx (Roslyn) models",
649 .tuner_addr
= ADDR_UNSET
,
650 .radio_addr
= ADDR_UNSET
,
652 .type
= CX88_VMUX_TELEVISION
,
657 .type
= CX88_VMUX_DEBUG
,
661 .type
= CX88_VMUX_COMPOSITE1
,
665 .type
= CX88_VMUX_SVIDEO
,
675 .mpeg
= CX88_MPEG_BLACKBIRD
,
677 [CX88_BOARD_DIGITALLOGIC_MEC
] = {
678 .name
= "Digital-Logic MICROSPACE Entertainment Center (MEC)",
679 .tuner_type
= TUNER_PHILIPS_FM1216ME_MK3
,
681 .tuner_addr
= ADDR_UNSET
,
682 .radio_addr
= ADDR_UNSET
,
683 .tda9887_conf
= TDA9887_PRESENT
,
685 .type
= CX88_VMUX_TELEVISION
,
690 .type
= CX88_VMUX_COMPOSITE1
,
695 .type
= CX88_VMUX_SVIDEO
,
705 .mpeg
= CX88_MPEG_BLACKBIRD
,
707 [CX88_BOARD_IODATA_GVBCTV7E
] = {
708 .name
= "IODATA GV/BCTV7E",
709 .tuner_type
= TUNER_PHILIPS_FQ1286
,
711 .tuner_addr
= ADDR_UNSET
,
712 .radio_addr
= ADDR_UNSET
,
713 .tda9887_conf
= TDA9887_PRESENT
,
715 .type
= CX88_VMUX_TELEVISION
,
719 .type
= CX88_VMUX_COMPOSITE1
,
723 .type
= CX88_VMUX_SVIDEO
,
728 [CX88_BOARD_PIXELVIEW_PLAYTV_ULTRA_PRO
] = {
729 .name
= "PixelView PlayTV Ultra Pro (Stereo)",
730 /* May be also TUNER_YMEC_TVF_5533MF for NTSC/M or PAL/M */
731 .tuner_type
= TUNER_PHILIPS_FM1216ME_MK3
,
733 .tuner_addr
= ADDR_UNSET
,
734 .radio_addr
= ADDR_UNSET
,
736 .type
= CX88_VMUX_TELEVISION
,
738 .gpio0
= 0xbf61, /* internal decoder */
740 .type
= CX88_VMUX_COMPOSITE1
,
744 .type
= CX88_VMUX_SVIDEO
,
753 [CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T
] = {
754 .name
= "DViCO FusionHDTV 3 Gold-T",
755 .tuner_type
= TUNER_THOMSON_DTT761X
,
757 .tuner_addr
= ADDR_UNSET
,
758 .radio_addr
= ADDR_UNSET
,
759 .tda9887_conf
= TDA9887_PRESENT
,
761 .type
= CX88_VMUX_TELEVISION
,
765 .type
= CX88_VMUX_COMPOSITE1
,
769 .type
= CX88_VMUX_SVIDEO
,
773 .mpeg
= CX88_MPEG_DVB
,
775 [CX88_BOARD_ADSTECH_DVB_T_PCI
] = {
776 .name
= "ADS Tech Instant TV DVB-T PCI",
777 .tuner_type
= TUNER_ABSENT
,
779 .tuner_addr
= ADDR_UNSET
,
780 .radio_addr
= ADDR_UNSET
,
782 .type
= CX88_VMUX_COMPOSITE1
,
787 .type
= CX88_VMUX_SVIDEO
,
792 .mpeg
= CX88_MPEG_DVB
,
794 [CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1
] = {
795 .name
= "TerraTec Cinergy 1400 DVB-T",
796 .tuner_type
= TUNER_ABSENT
,
798 .type
= CX88_VMUX_DVB
,
801 .type
= CX88_VMUX_COMPOSITE1
,
804 .type
= CX88_VMUX_SVIDEO
,
807 .mpeg
= CX88_MPEG_DVB
,
809 [CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD
] = {
810 .name
= "DViCO FusionHDTV 5 Gold",
811 .tuner_type
= TUNER_LG_TDVS_H06XF
, /* TDVS-H062F */
813 .tuner_addr
= ADDR_UNSET
,
814 .radio_addr
= ADDR_UNSET
,
815 .tda9887_conf
= TDA9887_PRESENT
,
817 .type
= CX88_VMUX_TELEVISION
,
821 .type
= CX88_VMUX_COMPOSITE1
,
825 .type
= CX88_VMUX_SVIDEO
,
829 .mpeg
= CX88_MPEG_DVB
,
831 [CX88_BOARD_AVERMEDIA_ULTRATV_MC_550
] = {
832 .name
= "AverMedia UltraTV Media Center PCI 550",
833 .tuner_type
= TUNER_PHILIPS_FM1236_MK3
,
835 .tuner_addr
= ADDR_UNSET
,
836 .radio_addr
= ADDR_UNSET
,
837 .tda9887_conf
= TDA9887_PRESENT
,
839 .type
= CX88_VMUX_COMPOSITE1
,
844 .type
= CX88_VMUX_SVIDEO
,
849 .type
= CX88_VMUX_TELEVISION
,
860 .mpeg
= CX88_MPEG_BLACKBIRD
,
862 [CX88_BOARD_KWORLD_VSTREAM_EXPERT_DVD
] = {
863 /* Alexander Wold <awold@bigfoot.com> */
864 .name
= "Kworld V-Stream Xpert DVD",
867 .type
= CX88_VMUX_COMPOSITE1
,
874 .type
= CX88_VMUX_SVIDEO
,
882 [CX88_BOARD_ATI_HDTVWONDER
] = {
883 .name
= "ATI HDTV Wonder",
884 .tuner_type
= TUNER_PHILIPS_TUV1236D
,
886 .tuner_addr
= ADDR_UNSET
,
887 .radio_addr
= ADDR_UNSET
,
889 .type
= CX88_VMUX_TELEVISION
,
896 .type
= CX88_VMUX_COMPOSITE1
,
903 .type
= CX88_VMUX_SVIDEO
,
910 .mpeg
= CX88_MPEG_DVB
,
912 [CX88_BOARD_WINFAST_DTV1000
] = {
913 .name
= "WinFast DTV1000-T",
914 .tuner_type
= TUNER_ABSENT
,
916 .tuner_addr
= ADDR_UNSET
,
917 .radio_addr
= ADDR_UNSET
,
919 .type
= CX88_VMUX_DVB
,
922 .type
= CX88_VMUX_COMPOSITE1
,
925 .type
= CX88_VMUX_SVIDEO
,
928 .mpeg
= CX88_MPEG_DVB
,
930 [CX88_BOARD_AVERTV_303
] = {
931 .name
= "AVerTV 303 (M126)",
932 .tuner_type
= TUNER_PHILIPS_FM1216ME_MK3
,
934 .tuner_addr
= ADDR_UNSET
,
935 .radio_addr
= ADDR_UNSET
,
936 .tda9887_conf
= TDA9887_PRESENT
,
938 .type
= CX88_VMUX_TELEVISION
,
945 .type
= CX88_VMUX_COMPOSITE1
,
952 .type
= CX88_VMUX_SVIDEO
,
960 [CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1
] = {
961 .name
= "Hauppauge Nova-S-Plus DVB-S",
962 .tuner_type
= TUNER_ABSENT
,
964 .tuner_addr
= ADDR_UNSET
,
965 .radio_addr
= ADDR_UNSET
,
967 .type
= CX88_VMUX_DVB
,
970 .type
= CX88_VMUX_COMPOSITE1
,
973 .type
= CX88_VMUX_SVIDEO
,
976 .mpeg
= CX88_MPEG_DVB
,
978 [CX88_BOARD_HAUPPAUGE_NOVASE2_S1
] = {
979 .name
= "Hauppauge Nova-SE2 DVB-S",
980 .tuner_type
= TUNER_ABSENT
,
982 .tuner_addr
= ADDR_UNSET
,
983 .radio_addr
= ADDR_UNSET
,
985 .type
= CX88_VMUX_DVB
,
988 .mpeg
= CX88_MPEG_DVB
,
990 [CX88_BOARD_KWORLD_DVBS_100
] = {
991 .name
= "KWorld DVB-S 100",
992 .tuner_type
= TUNER_ABSENT
,
994 .tuner_addr
= ADDR_UNSET
,
995 .radio_addr
= ADDR_UNSET
,
997 .type
= CX88_VMUX_DVB
,
1000 .type
= CX88_VMUX_COMPOSITE1
,
1003 .type
= CX88_VMUX_SVIDEO
,
1006 .mpeg
= CX88_MPEG_DVB
,
1008 [CX88_BOARD_HAUPPAUGE_HVR1100
] = {
1009 .name
= "Hauppauge WinTV-HVR1100 DVB-T/Hybrid",
1010 .tuner_type
= TUNER_PHILIPS_FMD1216ME_MK3
,
1011 .radio_type
= UNSET
,
1012 .tuner_addr
= ADDR_UNSET
,
1013 .radio_addr
= ADDR_UNSET
,
1014 .tda9887_conf
= TDA9887_PRESENT
,
1016 .type
= CX88_VMUX_TELEVISION
,
1019 .type
= CX88_VMUX_COMPOSITE1
,
1022 .type
= CX88_VMUX_SVIDEO
,
1025 /* fixme: Add radio support */
1026 .mpeg
= CX88_MPEG_DVB
,
1028 [CX88_BOARD_HAUPPAUGE_HVR1100LP
] = {
1029 .name
= "Hauppauge WinTV-HVR1100 DVB-T/Hybrid (Low Profile)",
1030 .tuner_type
= TUNER_PHILIPS_FMD1216ME_MK3
,
1031 .radio_type
= UNSET
,
1032 .tuner_addr
= ADDR_UNSET
,
1033 .radio_addr
= ADDR_UNSET
,
1034 .tda9887_conf
= TDA9887_PRESENT
,
1036 .type
= CX88_VMUX_TELEVISION
,
1039 .type
= CX88_VMUX_COMPOSITE1
,
1042 /* fixme: Add radio support */
1043 .mpeg
= CX88_MPEG_DVB
,
1045 [CX88_BOARD_DNTV_LIVE_DVB_T_PRO
] = {
1046 .name
= "digitalnow DNTV Live! DVB-T Pro",
1047 .tuner_type
= TUNER_PHILIPS_FMD1216ME_MK3
,
1048 .radio_type
= UNSET
,
1049 .tuner_addr
= ADDR_UNSET
,
1050 .radio_addr
= ADDR_UNSET
,
1051 .tda9887_conf
= TDA9887_PRESENT
| TDA9887_PORT1_ACTIVE
|
1052 TDA9887_PORT2_ACTIVE
,
1054 .type
= CX88_VMUX_TELEVISION
,
1058 .type
= CX88_VMUX_COMPOSITE1
,
1062 .type
= CX88_VMUX_SVIDEO
,
1070 .mpeg
= CX88_MPEG_DVB
,
1072 [CX88_BOARD_KWORLD_DVB_T_CX22702
] = {
1073 /* Kworld V-stream Xpert DVB-T with Thomson tuner */
1074 /* DTT 7579 Conexant CX22702-19 Conexant CX2388x */
1075 /* Manenti Marco <marco_manenti@colman.it> */
1076 .name
= "KWorld/VStream XPert DVB-T with cx22702",
1077 .tuner_type
= TUNER_ABSENT
,
1078 .radio_type
= UNSET
,
1079 .tuner_addr
= ADDR_UNSET
,
1080 .radio_addr
= ADDR_UNSET
,
1082 .type
= CX88_VMUX_COMPOSITE1
,
1087 .type
= CX88_VMUX_SVIDEO
,
1092 .mpeg
= CX88_MPEG_DVB
,
1094 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL
] = {
1095 .name
= "DViCO FusionHDTV DVB-T Dual Digital",
1096 .tuner_type
= TUNER_ABSENT
, /* No analog tuner */
1097 .radio_type
= UNSET
,
1098 .tuner_addr
= ADDR_UNSET
,
1099 .radio_addr
= ADDR_UNSET
,
1101 .type
= CX88_VMUX_COMPOSITE1
,
1103 .gpio0
= 0x000067df,
1105 .type
= CX88_VMUX_SVIDEO
,
1107 .gpio0
= 0x000067df,
1109 .mpeg
= CX88_MPEG_DVB
,
1111 [CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT
] = {
1112 .name
= "KWorld HardwareMpegTV XPert",
1113 .tuner_type
= TUNER_PHILIPS_TDA8290
,
1114 .radio_type
= UNSET
,
1115 .tuner_addr
= ADDR_UNSET
,
1116 .radio_addr
= ADDR_UNSET
,
1118 .type
= CX88_VMUX_TELEVISION
,
1123 .type
= CX88_VMUX_COMPOSITE1
,
1128 .type
= CX88_VMUX_SVIDEO
,
1138 .mpeg
= CX88_MPEG_BLACKBIRD
,
1140 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID
] = {
1141 .name
= "DViCO FusionHDTV DVB-T Hybrid",
1142 .tuner_type
= TUNER_THOMSON_FE6600
,
1143 .radio_type
= UNSET
,
1144 .tuner_addr
= ADDR_UNSET
,
1145 .radio_addr
= ADDR_UNSET
,
1147 .type
= CX88_VMUX_TELEVISION
,
1149 .gpio0
= 0x0000a75f,
1151 .type
= CX88_VMUX_COMPOSITE1
,
1153 .gpio0
= 0x0000a75b,
1155 .type
= CX88_VMUX_SVIDEO
,
1157 .gpio0
= 0x0000a75b,
1159 .mpeg
= CX88_MPEG_DVB
,
1161 [CX88_BOARD_PCHDTV_HD5500
] = {
1162 .name
= "pcHDTV HD5500 HDTV",
1163 .tuner_type
= TUNER_LG_TDVS_H06XF
, /* TDVS-H064F */
1164 .radio_type
= UNSET
,
1165 .tuner_addr
= ADDR_UNSET
,
1166 .radio_addr
= ADDR_UNSET
,
1167 .tda9887_conf
= TDA9887_PRESENT
,
1169 .type
= CX88_VMUX_TELEVISION
,
1173 .type
= CX88_VMUX_COMPOSITE1
,
1177 .type
= CX88_VMUX_SVIDEO
,
1181 .mpeg
= CX88_MPEG_DVB
,
1183 [CX88_BOARD_KWORLD_MCE200_DELUXE
] = {
1184 /* FIXME: tested TV input only, disabled composite,
1185 svideo and radio until they can be tested also. */
1186 .name
= "Kworld MCE 200 Deluxe",
1187 .tuner_type
= TUNER_TENA_9533_DI
,
1188 .radio_type
= UNSET
,
1189 .tda9887_conf
= TDA9887_PRESENT
,
1190 .tuner_addr
= ADDR_UNSET
,
1191 .radio_addr
= ADDR_UNSET
,
1193 .type
= CX88_VMUX_TELEVISION
,
1197 .mpeg
= CX88_MPEG_BLACKBIRD
,
1199 [CX88_BOARD_PIXELVIEW_PLAYTV_P7000
] = {
1200 /* FIXME: SVideo, Composite and FM inputs are untested */
1201 .name
= "PixelView PlayTV P7000",
1202 .tuner_type
= TUNER_PHILIPS_FM1216ME_MK3
,
1203 .radio_type
= UNSET
,
1204 .tuner_addr
= ADDR_UNSET
,
1205 .radio_addr
= ADDR_UNSET
,
1206 .tda9887_conf
= TDA9887_PRESENT
| TDA9887_PORT1_ACTIVE
|
1207 TDA9887_PORT2_ACTIVE
,
1209 .type
= CX88_VMUX_TELEVISION
,
1213 .mpeg
= CX88_MPEG_BLACKBIRD
,
1215 [CX88_BOARD_NPGTECH_REALTV_TOP10FM
] = {
1216 .name
= "NPG Tech Real TV FM Top 10",
1217 .tuner_type
= TUNER_TNF_5335MF
, /* Actually a TNF9535 */
1218 .radio_type
= UNSET
,
1219 .tuner_addr
= ADDR_UNSET
,
1220 .radio_addr
= ADDR_UNSET
,
1222 .type
= CX88_VMUX_TELEVISION
,
1226 .type
= CX88_VMUX_COMPOSITE1
,
1230 .type
= CX88_VMUX_SVIDEO
,
1239 [CX88_BOARD_WINFAST_DTV2000H
] = {
1240 /* video inputs and radio still in testing */
1241 .name
= "WinFast DTV2000 H",
1242 .tuner_type
= TUNER_PHILIPS_FMD1216ME_MK3
,
1243 .radio_type
= UNSET
,
1244 .tuner_addr
= ADDR_UNSET
,
1245 .radio_addr
= ADDR_UNSET
,
1246 .tda9887_conf
= TDA9887_PRESENT
,
1248 .type
= CX88_VMUX_TELEVISION
,
1250 .gpio0
= 0x00017304,
1251 .gpio1
= 0x00008203,
1252 .gpio2
= 0x00017304,
1253 .gpio3
= 0x02000000,
1255 .mpeg
= CX88_MPEG_DVB
,
1257 [CX88_BOARD_GENIATECH_DVBS
] = {
1258 .name
= "Geniatech DVB-S",
1259 .tuner_type
= TUNER_ABSENT
,
1260 .radio_type
= UNSET
,
1261 .tuner_addr
= ADDR_UNSET
,
1262 .radio_addr
= ADDR_UNSET
,
1264 .type
= CX88_VMUX_DVB
,
1267 .type
= CX88_VMUX_COMPOSITE1
,
1270 .mpeg
= CX88_MPEG_DVB
,
1272 [CX88_BOARD_HAUPPAUGE_HVR3000
] = {
1273 /* FIXME: Add dvb & radio support */
1274 .name
= "Hauppauge WinTV-HVR3000 TriMode Analog/DVB-S/DVB-T",
1275 .tuner_type
= TUNER_PHILIPS_FMD1216ME_MK3
,
1276 .radio_type
= UNSET
,
1277 .tuner_addr
= ADDR_UNSET
,
1278 .radio_addr
= ADDR_UNSET
,
1279 .tda9887_conf
= TDA9887_PRESENT
,
1281 .type
= CX88_VMUX_TELEVISION
,
1285 .type
= CX88_VMUX_COMPOSITE1
,
1289 .type
= CX88_VMUX_SVIDEO
,
1293 .mpeg
= CX88_MPEG_DVB
,
1295 [CX88_BOARD_NORWOOD_MICRO
] = {
1296 .name
= "Norwood Micro TV Tuner",
1297 .tuner_type
= TUNER_TNF_5335MF
,
1298 .radio_type
= UNSET
,
1299 .tuner_addr
= ADDR_UNSET
,
1300 .radio_addr
= ADDR_UNSET
,
1302 .type
= CX88_VMUX_TELEVISION
,
1306 .type
= CX88_VMUX_COMPOSITE1
,
1310 .type
= CX88_VMUX_SVIDEO
,
1315 [CX88_BOARD_TE_DTV_250_OEM_SWANN
] = {
1316 .name
= "Shenzhen Tungsten Ages Tech TE-DTV-250 / Swann OEM",
1317 .tuner_type
= TUNER_LG_PAL_NEW_TAPC
,
1318 .radio_type
= UNSET
,
1319 .tuner_addr
= ADDR_UNSET
,
1320 .radio_addr
= ADDR_UNSET
,
1322 .type
= CX88_VMUX_TELEVISION
,
1324 .gpio0
= 0x003fffff,
1325 .gpio1
= 0x00e00000,
1326 .gpio2
= 0x003fffff,
1327 .gpio3
= 0x02000000,
1329 .type
= CX88_VMUX_COMPOSITE1
,
1331 .gpio0
= 0x003fffff,
1332 .gpio1
= 0x00e00000,
1333 .gpio2
= 0x003fffff,
1334 .gpio3
= 0x02000000,
1336 .type
= CX88_VMUX_SVIDEO
,
1338 .gpio0
= 0x003fffff,
1339 .gpio1
= 0x00e00000,
1340 .gpio2
= 0x003fffff,
1341 .gpio3
= 0x02000000,
1344 [CX88_BOARD_HAUPPAUGE_HVR1300
] = {
1345 .name
= "Hauppauge WinTV-HVR1300 DVB-T/Hybrid MPEG Encoder",
1346 .tuner_type
= TUNER_PHILIPS_FMD1216ME_MK3
,
1347 .radio_type
= UNSET
,
1348 .tuner_addr
= ADDR_UNSET
,
1349 .radio_addr
= ADDR_UNSET
,
1350 .tda9887_conf
= TDA9887_PRESENT
,
1351 .audio_chip
= AUDIO_CHIP_WM8775
,
1353 .type
= CX88_VMUX_TELEVISION
,
1358 .type
= CX88_VMUX_COMPOSITE1
,
1363 .type
= CX88_VMUX_SVIDEO
,
1368 /* fixme: Add radio support */
1369 .mpeg
= CX88_MPEG_DVB
| CX88_MPEG_BLACKBIRD
,
1375 [CX88_BOARD_ADSTECH_PTV_390
] = {
1376 .name
= "ADS Tech Instant Video PCI",
1377 .tuner_type
= TUNER_ABSENT
,
1378 .radio_type
= UNSET
,
1379 .tuner_addr
= ADDR_UNSET
,
1380 .radio_addr
= ADDR_UNSET
,
1382 .type
= CX88_VMUX_DEBUG
,
1386 .type
= CX88_VMUX_COMPOSITE1
,
1390 .type
= CX88_VMUX_SVIDEO
,
1395 [CX88_BOARD_PINNACLE_PCTV_HD_800i
] = {
1396 .name
= "Pinnacle PCTV HD 800i",
1397 .tuner_type
= TUNER_XC5000
,
1398 .radio_type
= UNSET
,
1399 .tuner_addr
= ADDR_UNSET
,
1400 .radio_addr
= ADDR_UNSET
,
1402 .type
= CX88_VMUX_TELEVISION
,
1407 .type
= CX88_VMUX_COMPOSITE1
,
1413 .type
= CX88_VMUX_SVIDEO
,
1419 .mpeg
= CX88_MPEG_DVB
,
1421 [CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO
] = {
1422 .name
= "DViCO FusionHDTV 5 PCI nano",
1423 /* xc3008 tuner, digital only for now */
1424 .tuner_type
= TUNER_ABSENT
,
1425 .radio_type
= UNSET
,
1426 .tuner_addr
= ADDR_UNSET
,
1427 .radio_addr
= ADDR_UNSET
,
1429 .type
= CX88_VMUX_TELEVISION
,
1431 .gpio0
= 0x000027df, /* Unconfirmed */
1433 .type
= CX88_VMUX_COMPOSITE1
,
1435 .gpio0
= 0x000027df, /* Unconfirmed */
1438 .type
= CX88_VMUX_SVIDEO
,
1440 .gpio0
= 0x000027df, /* Unconfirmed */
1443 .mpeg
= CX88_MPEG_DVB
,
1445 [CX88_BOARD_PINNACLE_HYBRID_PCTV
] = {
1446 .name
= "Pinnacle Hybrid PCTV",
1447 .tuner_type
= TUNER_XC2028
,
1450 .type
= CX88_VMUX_TELEVISION
,
1453 .type
= CX88_VMUX_COMPOSITE1
,
1456 .type
= CX88_VMUX_SVIDEO
,
1466 [CX88_BOARD_WINFAST_TV2000_XP_GLOBAL
] = {
1467 .name
= "Winfast TV2000 XP Global",
1468 .tuner_type
= TUNER_XC2028
,
1471 .type
= CX88_VMUX_TELEVISION
,
1473 .gpio0
= 0x0400, /* pin 2:mute = 0 (off?) */
1475 .gpio2
= 0x0800, /* pin 19:audio = 0 (tv) */
1478 .type
= CX88_VMUX_COMPOSITE1
,
1480 .gpio0
= 0x0400, /* probably? or 0x0404 to turn mute on */
1482 .gpio2
= 0x0808, /* pin 19:audio = 1 (line) */
1485 .type
= CX88_VMUX_SVIDEO
,
1495 [CX88_BOARD_POWERCOLOR_REAL_ANGEL
] = {
1496 .name
= "PowerColor RA330", /* Long names may confuse LIRC. */
1497 .tuner_type
= TUNER_XC2028
,
1500 .type
= CX88_VMUX_DEBUG
,
1501 .vmux
= 3, /* Due to the way the cx88 driver is written, */
1502 .gpio0
= 0x00ff, /* there is no way to deactivate audio pass- */
1503 .gpio1
= 0xf39d, /* through without this entry. Furthermore, if */
1504 .gpio3
= 0x0000, /* the TV mux entry is first, you get audio */
1505 }, { /* from the tuner on boot for a little while. */
1506 .type
= CX88_VMUX_TELEVISION
,
1512 .type
= CX88_VMUX_COMPOSITE1
,
1518 .type
= CX88_VMUX_SVIDEO
,
1531 [CX88_BOARD_GENIATECH_X8000_MT
] = {
1532 /* Also PowerColor Real Angel 330 and Geniatech X800 OEM */
1533 .name
= "Geniatech X8000-MT DVBT",
1534 .tuner_type
= TUNER_XC2028
,
1537 .type
= CX88_VMUX_TELEVISION
,
1539 .gpio0
= 0x00000000,
1540 .gpio1
= 0x00e3e341,
1541 .gpio2
= 0x00000000,
1542 .gpio3
= 0x00000000,
1544 .type
= CX88_VMUX_COMPOSITE1
,
1546 .gpio0
= 0x00000000,
1547 .gpio1
= 0x00e3e361,
1548 .gpio2
= 0x00000000,
1549 .gpio3
= 0x00000000,
1551 .type
= CX88_VMUX_SVIDEO
,
1553 .gpio0
= 0x00000000,
1554 .gpio1
= 0x00e3e361,
1555 .gpio2
= 0x00000000,
1556 .gpio3
= 0x00000000,
1560 .gpio0
= 0x00000000,
1561 .gpio1
= 0x00e3e341,
1562 .gpio2
= 0x00000000,
1563 .gpio3
= 0x00000000,
1565 .mpeg
= CX88_MPEG_DVB
,
1567 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO
] = {
1568 .name
= "DViCO FusionHDTV DVB-T PRO",
1569 .tuner_type
= TUNER_ABSENT
, /* XXX: Has XC3028 */
1570 .radio_type
= UNSET
,
1571 .tuner_addr
= ADDR_UNSET
,
1572 .radio_addr
= ADDR_UNSET
,
1574 .type
= CX88_VMUX_COMPOSITE1
,
1576 .gpio0
= 0x000067df,
1578 .type
= CX88_VMUX_SVIDEO
,
1580 .gpio0
= 0x000067df,
1582 .mpeg
= CX88_MPEG_DVB
,
1584 [CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD
] = {
1585 .name
= "DViCO FusionHDTV 7 Gold",
1586 .tuner_type
= TUNER_XC5000
,
1587 .radio_type
= UNSET
,
1588 .tuner_addr
= ADDR_UNSET
,
1589 .radio_addr
= ADDR_UNSET
,
1591 .type
= CX88_VMUX_TELEVISION
,
1595 .type
= CX88_VMUX_COMPOSITE1
,
1599 .type
= CX88_VMUX_SVIDEO
,
1603 .mpeg
= CX88_MPEG_DVB
,
1605 [CX88_BOARD_PROLINK_PV_8000GT
] = {
1606 .name
= "Prolink Pixelview MPEG 8000GT",
1607 .tuner_type
= TUNER_XC2028
,
1610 .type
= CX88_VMUX_TELEVISION
,
1615 .type
= CX88_VMUX_COMPOSITE1
,
1619 .type
= CX88_VMUX_SVIDEO
,
1628 /* Both radio, analog and ATSC work with this board.
1629 However, for analog to work, s5h1409 gate should be open,
1630 otherwise, tuner-xc3028 won't be detected.
1631 A proper fix require using the newer i2c methods to add
1632 tuner-xc3028 without doing an i2c probe.
1634 [CX88_BOARD_KWORLD_ATSC_120
] = {
1635 .name
= "Kworld PlusTV HD PCI 120 (ATSC 120)",
1636 .tuner_type
= TUNER_XC2028
,
1637 .radio_type
= UNSET
,
1638 .tuner_addr
= ADDR_UNSET
,
1639 .radio_addr
= ADDR_UNSET
,
1641 .type
= CX88_VMUX_TELEVISION
,
1643 .gpio0
= 0x000000ff,
1644 .gpio1
= 0x0000f35d,
1645 .gpio2
= 0x00000000,
1647 .type
= CX88_VMUX_COMPOSITE1
,
1649 .gpio0
= 0x000000ff,
1650 .gpio1
= 0x0000f37e,
1651 .gpio2
= 0x00000000,
1653 .type
= CX88_VMUX_SVIDEO
,
1655 .gpio0
= 0x000000ff,
1656 .gpio1
= 0x0000f37e,
1657 .gpio2
= 0x00000000,
1661 .gpio0
= 0x000000ff,
1662 .gpio1
= 0x0000f35d,
1663 .gpio2
= 0x00000000,
1665 .mpeg
= CX88_MPEG_DVB
,
1669 /* ------------------------------------------------------------------ */
1670 /* PCI subsystem IDs */
1672 static const struct cx88_subid cx88_subids
[] = {
1674 .subvendor
= 0x0070,
1675 .subdevice
= 0x3400,
1676 .card
= CX88_BOARD_HAUPPAUGE
,
1678 .subvendor
= 0x0070,
1679 .subdevice
= 0x3401,
1680 .card
= CX88_BOARD_HAUPPAUGE
,
1682 .subvendor
= 0x14c7,
1683 .subdevice
= 0x0106,
1684 .card
= CX88_BOARD_GDI
,
1686 .subvendor
= 0x14c7,
1687 .subdevice
= 0x0107, /* with mpeg encoder */
1688 .card
= CX88_BOARD_GDI
,
1690 .subvendor
= PCI_VENDOR_ID_ATI
,
1691 .subdevice
= 0x00f8,
1692 .card
= CX88_BOARD_ATI_WONDER_PRO
,
1694 .subvendor
= 0x107d,
1695 .subdevice
= 0x6611,
1696 .card
= CX88_BOARD_WINFAST2000XP_EXPERT
,
1698 .subvendor
= 0x107d,
1699 .subdevice
= 0x6613, /* NTSC */
1700 .card
= CX88_BOARD_WINFAST2000XP_EXPERT
,
1702 .subvendor
= 0x107d,
1703 .subdevice
= 0x6620,
1704 .card
= CX88_BOARD_WINFAST_DV2000
,
1706 .subvendor
= 0x107d,
1707 .subdevice
= 0x663b,
1708 .card
= CX88_BOARD_LEADTEK_PVR2000
,
1710 .subvendor
= 0x107d,
1711 .subdevice
= 0x663c,
1712 .card
= CX88_BOARD_LEADTEK_PVR2000
,
1714 .subvendor
= 0x1461,
1715 .subdevice
= 0x000b,
1716 .card
= CX88_BOARD_AVERTV_STUDIO_303
,
1718 .subvendor
= 0x1462,
1719 .subdevice
= 0x8606,
1720 .card
= CX88_BOARD_MSI_TVANYWHERE_MASTER
,
1722 .subvendor
= 0x10fc,
1723 .subdevice
= 0xd003,
1724 .card
= CX88_BOARD_IODATA_GVVCP3PCI
,
1726 .subvendor
= 0x1043,
1727 .subdevice
= 0x4823, /* with mpeg encoder */
1728 .card
= CX88_BOARD_ASUS_PVR_416
,
1730 .subvendor
= 0x17de,
1731 .subdevice
= 0x08a6,
1732 .card
= CX88_BOARD_KWORLD_DVB_T
,
1734 .subvendor
= 0x18ac,
1735 .subdevice
= 0xd810,
1736 .card
= CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q
,
1738 .subvendor
= 0x18ac,
1739 .subdevice
= 0xd820,
1740 .card
= CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T
,
1742 .subvendor
= 0x18ac,
1743 .subdevice
= 0xdb00,
1744 .card
= CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1
,
1746 .subvendor
= 0x0070,
1747 .subdevice
= 0x9002,
1748 .card
= CX88_BOARD_HAUPPAUGE_DVB_T1
,
1750 .subvendor
= 0x14f1,
1751 .subdevice
= 0x0187,
1752 .card
= CX88_BOARD_CONEXANT_DVB_T1
,
1754 .subvendor
= 0x1540,
1755 .subdevice
= 0x2580,
1756 .card
= CX88_BOARD_PROVIDEO_PV259
,
1758 .subvendor
= 0x18ac,
1759 .subdevice
= 0xdb10,
1760 .card
= CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS
,
1762 .subvendor
= 0x1554,
1763 .subdevice
= 0x4811,
1764 .card
= CX88_BOARD_PIXELVIEW
,
1766 .subvendor
= 0x7063,
1767 .subdevice
= 0x3000, /* HD-3000 card */
1768 .card
= CX88_BOARD_PCHDTV_HD3000
,
1770 .subvendor
= 0x17de,
1771 .subdevice
= 0xa8a6,
1772 .card
= CX88_BOARD_DNTV_LIVE_DVB_T
,
1774 .subvendor
= 0x0070,
1775 .subdevice
= 0x2801,
1776 .card
= CX88_BOARD_HAUPPAUGE_ROSLYN
,
1778 .subvendor
= 0x14f1,
1779 .subdevice
= 0x0342,
1780 .card
= CX88_BOARD_DIGITALLOGIC_MEC
,
1782 .subvendor
= 0x10fc,
1783 .subdevice
= 0xd035,
1784 .card
= CX88_BOARD_IODATA_GVBCTV7E
,
1786 .subvendor
= 0x1421,
1787 .subdevice
= 0x0334,
1788 .card
= CX88_BOARD_ADSTECH_DVB_T_PCI
,
1790 .subvendor
= 0x153b,
1791 .subdevice
= 0x1166,
1792 .card
= CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1
,
1794 .subvendor
= 0x18ac,
1795 .subdevice
= 0xd500,
1796 .card
= CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD
,
1798 .subvendor
= 0x1461,
1799 .subdevice
= 0x8011,
1800 .card
= CX88_BOARD_AVERMEDIA_ULTRATV_MC_550
,
1802 .subvendor
= PCI_VENDOR_ID_ATI
,
1803 .subdevice
= 0xa101,
1804 .card
= CX88_BOARD_ATI_HDTVWONDER
,
1806 .subvendor
= 0x107d,
1807 .subdevice
= 0x665f,
1808 .card
= CX88_BOARD_WINFAST_DTV1000
,
1810 .subvendor
= 0x1461,
1811 .subdevice
= 0x000a,
1812 .card
= CX88_BOARD_AVERTV_303
,
1814 .subvendor
= 0x0070,
1815 .subdevice
= 0x9200,
1816 .card
= CX88_BOARD_HAUPPAUGE_NOVASE2_S1
,
1818 .subvendor
= 0x0070,
1819 .subdevice
= 0x9201,
1820 .card
= CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1
,
1822 .subvendor
= 0x0070,
1823 .subdevice
= 0x9202,
1824 .card
= CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1
,
1826 .subvendor
= 0x17de,
1827 .subdevice
= 0x08b2,
1828 .card
= CX88_BOARD_KWORLD_DVBS_100
,
1830 .subvendor
= 0x0070,
1831 .subdevice
= 0x9400,
1832 .card
= CX88_BOARD_HAUPPAUGE_HVR1100
,
1834 .subvendor
= 0x0070,
1835 .subdevice
= 0x9402,
1836 .card
= CX88_BOARD_HAUPPAUGE_HVR1100
,
1838 .subvendor
= 0x0070,
1839 .subdevice
= 0x9800,
1840 .card
= CX88_BOARD_HAUPPAUGE_HVR1100LP
,
1842 .subvendor
= 0x0070,
1843 .subdevice
= 0x9802,
1844 .card
= CX88_BOARD_HAUPPAUGE_HVR1100LP
,
1846 .subvendor
= 0x0070,
1847 .subdevice
= 0x9001,
1848 .card
= CX88_BOARD_HAUPPAUGE_DVB_T1
,
1850 .subvendor
= 0x1822,
1851 .subdevice
= 0x0025,
1852 .card
= CX88_BOARD_DNTV_LIVE_DVB_T_PRO
,
1854 .subvendor
= 0x17de,
1855 .subdevice
= 0x08a1,
1856 .card
= CX88_BOARD_KWORLD_DVB_T_CX22702
,
1858 .subvendor
= 0x18ac,
1859 .subdevice
= 0xdb50,
1860 .card
= CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL
,
1862 .subvendor
= 0x18ac,
1863 .subdevice
= 0xdb54,
1864 .card
= CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL
,
1865 /* Re-branded DViCO: DigitalNow DVB-T Dual */
1867 .subvendor
= 0x18ac,
1868 .subdevice
= 0xdb11,
1869 .card
= CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS
,
1870 /* Re-branded DViCO: UltraView DVB-T Plus */
1872 .subvendor
= 0x18ac,
1873 .subdevice
= 0xdb30,
1874 .card
= CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO
,
1876 .subvendor
= 0x17de,
1877 .subdevice
= 0x0840,
1878 .card
= CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT
,
1880 .subvendor
= 0x1421,
1881 .subdevice
= 0x0305,
1882 .card
= CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT
,
1884 .subvendor
= 0x18ac,
1885 .subdevice
= 0xdb40,
1886 .card
= CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID
,
1888 .subvendor
= 0x18ac,
1889 .subdevice
= 0xdb44,
1890 .card
= CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID
,
1892 .subvendor
= 0x7063,
1893 .subdevice
= 0x5500,
1894 .card
= CX88_BOARD_PCHDTV_HD5500
,
1896 .subvendor
= 0x17de,
1897 .subdevice
= 0x0841,
1898 .card
= CX88_BOARD_KWORLD_MCE200_DELUXE
,
1900 .subvendor
= 0x1822,
1901 .subdevice
= 0x0019,
1902 .card
= CX88_BOARD_DNTV_LIVE_DVB_T_PRO
,
1904 .subvendor
= 0x1554,
1905 .subdevice
= 0x4813,
1906 .card
= CX88_BOARD_PIXELVIEW_PLAYTV_P7000
,
1908 .subvendor
= 0x14f1,
1909 .subdevice
= 0x0842,
1910 .card
= CX88_BOARD_NPGTECH_REALTV_TOP10FM
,
1912 .subvendor
= 0x107d,
1913 .subdevice
= 0x665e,
1914 .card
= CX88_BOARD_WINFAST_DTV2000H
,
1916 .subvendor
= 0x18ac,
1917 .subdevice
= 0xd800, /* FusionHDTV 3 Gold (original revision) */
1918 .card
= CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q
,
1920 .subvendor
= 0x14f1,
1921 .subdevice
= 0x0084,
1922 .card
= CX88_BOARD_GENIATECH_DVBS
,
1924 .subvendor
= 0x0070,
1925 .subdevice
= 0x1404,
1926 .card
= CX88_BOARD_HAUPPAUGE_HVR3000
,
1928 .subvendor
= 0x1461,
1929 .subdevice
= 0xc111, /* AverMedia M150-D */
1930 /* This board is known to work with the ASUS PVR416 config */
1931 .card
= CX88_BOARD_ASUS_PVR_416
,
1933 .subvendor
= 0xc180,
1934 .subdevice
= 0xc980,
1935 .card
= CX88_BOARD_TE_DTV_250_OEM_SWANN
,
1937 .subvendor
= 0x0070,
1938 .subdevice
= 0x9600,
1939 .card
= CX88_BOARD_HAUPPAUGE_HVR1300
,
1941 .subvendor
= 0x0070,
1942 .subdevice
= 0x9601,
1943 .card
= CX88_BOARD_HAUPPAUGE_HVR1300
,
1945 .subvendor
= 0x0070,
1946 .subdevice
= 0x9602,
1947 .card
= CX88_BOARD_HAUPPAUGE_HVR1300
,
1949 .subvendor
= 0x107d,
1950 .subdevice
= 0x6632,
1951 .card
= CX88_BOARD_LEADTEK_PVR2000
,
1953 .subvendor
= 0x12ab,
1954 .subdevice
= 0x2300, /* Club3D Zap TV2100 */
1955 .card
= CX88_BOARD_KWORLD_DVB_T_CX22702
,
1957 .subvendor
= 0x0070,
1958 .subdevice
= 0x9000,
1959 .card
= CX88_BOARD_HAUPPAUGE_DVB_T1
,
1961 .subvendor
= 0x0070,
1962 .subdevice
= 0x1400,
1963 .card
= CX88_BOARD_HAUPPAUGE_HVR3000
,
1965 .subvendor
= 0x0070,
1966 .subdevice
= 0x1401,
1967 .card
= CX88_BOARD_HAUPPAUGE_HVR3000
,
1969 .subvendor
= 0x0070,
1970 .subdevice
= 0x1402,
1971 .card
= CX88_BOARD_HAUPPAUGE_HVR3000
,
1973 .subvendor
= 0x1421,
1974 .subdevice
= 0x0341, /* ADS Tech InstantTV DVB-S */
1975 .card
= CX88_BOARD_KWORLD_DVBS_100
,
1977 .subvendor
= 0x1421,
1978 .subdevice
= 0x0390,
1979 .card
= CX88_BOARD_ADSTECH_PTV_390
,
1981 .subvendor
= 0x11bd,
1982 .subdevice
= 0x0051,
1983 .card
= CX88_BOARD_PINNACLE_PCTV_HD_800i
,
1985 .subvendor
= 0x18ac,
1986 .subdevice
= 0xd530,
1987 .card
= CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO
,
1989 .subvendor
= 0x12ab,
1990 .subdevice
= 0x1788,
1991 .card
= CX88_BOARD_PINNACLE_HYBRID_PCTV
,
1993 .subvendor
= 0x14f1,
1994 .subdevice
= 0xea3d,
1995 .card
= CX88_BOARD_POWERCOLOR_REAL_ANGEL
,
1997 .subvendor
= 0x107d,
1998 .subdevice
= 0x6f18,
1999 .card
= CX88_BOARD_WINFAST_TV2000_XP_GLOBAL
,
2001 .subvendor
= 0x14f1,
2002 .subdevice
= 0x8852,
2003 .card
= CX88_BOARD_GENIATECH_X8000_MT
,
2005 .subvendor
= 0x18ac,
2006 .subdevice
= 0xd610,
2007 .card
= CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD
,
2009 .subvendor
= 0x1554,
2010 .subdevice
= 0x4935,
2011 .card
= CX88_BOARD_PROLINK_PV_8000GT
,
2013 .subvendor
= 0x17de,
2014 .subdevice
= 0x08c1,
2015 .card
= CX88_BOARD_KWORLD_ATSC_120
,
2019 /* ----------------------------------------------------------------------- */
2020 /* some leadtek specific stuff */
2022 static void leadtek_eeprom(struct cx88_core
*core
, u8
*eeprom_data
)
2024 /* This is just for the "Winfast 2000XP Expert" board ATM; I don't have data on
2027 * Byte 0 is 1 on the NTSC board.
2030 if (eeprom_data
[4] != 0x7d ||
2031 eeprom_data
[5] != 0x10 ||
2032 eeprom_data
[7] != 0x66) {
2033 warn_printk(core
, "Leadtek eeprom invalid.\n");
2037 core
->board
.tuner_type
= (eeprom_data
[6] == 0x13) ?
2038 TUNER_PHILIPS_FM1236_MK3
: TUNER_PHILIPS_FM1216ME_MK3
;
2040 info_printk(core
, "Leadtek Winfast 2000XP Expert config: "
2041 "tuner=%d, eeprom[0]=0x%02x\n",
2042 core
->board
.tuner_type
, eeprom_data
[0]);
2045 static void hauppauge_eeprom(struct cx88_core
*core
, u8
*eeprom_data
)
2049 tveeprom_hauppauge_analog(&core
->i2c_client
, &tv
, eeprom_data
);
2050 core
->board
.tuner_type
= tv
.tuner_type
;
2051 core
->tuner_formats
= tv
.tuner_formats
;
2052 core
->board
.radio
.type
= tv
.has_radio
? CX88_RADIO
: 0;
2054 /* Make sure we support the board model */
2057 case 14009: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in) */
2058 case 14019: /* WinTV-HVR3000 (Retail, IR Blaster, b/panel video, 3.5mm audio in) */
2059 case 14029: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - 880 bridge) */
2060 case 14109: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - low profile) */
2061 case 14129: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - 880 bridge - LP) */
2062 case 14559: /* WinTV-HVR3000 (OEM, no IR, b/panel video, 3.5mm audio in) */
2063 case 14569: /* WinTV-HVR3000 (OEM, no IR, no back panel video) */
2064 case 14659: /* WinTV-HVR3000 (OEM, no IR, b/panel video, RCA audio in - Low profile) */
2065 case 14669: /* WinTV-HVR3000 (OEM, no IR, no b/panel video - Low profile) */
2066 case 28552: /* WinTV-PVR 'Roslyn' (No IR) */
2067 case 34519: /* WinTV-PCI-FM */
2068 case 90002: /* Nova-T-PCI (9002) */
2069 case 92001: /* Nova-S-Plus (Video and IR) */
2070 case 92002: /* Nova-S-Plus (Video and IR) */
2071 case 90003: /* Nova-T-PCI (9002 No RF out) */
2072 case 90500: /* Nova-T-PCI (oem) */
2073 case 90501: /* Nova-T-PCI (oem/IR) */
2074 case 92000: /* Nova-SE2 (OEM, No Video or IR) */
2075 case 94009: /* WinTV-HVR1100 (Video and IR Retail) */
2076 case 94501: /* WinTV-HVR1100 (Video and IR OEM) */
2077 case 96009: /* WinTV-HVR1300 (PAL Video, MPEG Video and IR RX) */
2078 case 96019: /* WinTV-HVR1300 (PAL Video, MPEG Video and IR RX/TX) */
2079 case 96559: /* WinTV-HVR1300 (PAL Video, MPEG Video no IR) */
2080 case 96569: /* WinTV-HVR1300 () */
2081 case 96659: /* WinTV-HVR1300 () */
2082 case 98559: /* WinTV-HVR1100LP (Video no IR, Retail - Low Profile) */
2086 warn_printk(core
, "warning: unknown hauppauge model #%d\n",
2091 info_printk(core
, "hauppauge eeprom: model=%d\n", tv
.model
);
2094 /* ----------------------------------------------------------------------- */
2095 /* some GDI (was: Modular Technology) specific stuff */
2102 [ 0x01 ] = { .id
= TUNER_ABSENT
,
2104 [ 0x02 ] = { .id
= TUNER_ABSENT
,
2106 [ 0x03 ] = { .id
= TUNER_ABSENT
,
2108 [ 0x04 ] = { .id
= TUNER_ABSENT
,
2110 [ 0x05 ] = { .id
= TUNER_ABSENT
,
2113 [ 0x10 ] = { .id
= TUNER_ABSENT
,
2115 .name
= "TEMIC_4049" },
2116 [ 0x11 ] = { .id
= TUNER_TEMIC_4136FY5
,
2117 .name
= "TEMIC_4136" },
2118 [ 0x12 ] = { .id
= TUNER_ABSENT
,
2119 .name
= "TEMIC_4146" },
2121 [ 0x20 ] = { .id
= TUNER_PHILIPS_FQ1216ME
,
2123 .name
= "PHILIPS_FQ1216_MK3" },
2124 [ 0x21 ] = { .id
= TUNER_ABSENT
, .fm
= 1,
2125 .name
= "PHILIPS_FQ1236_MK3" },
2126 [ 0x22 ] = { .id
= TUNER_ABSENT
,
2127 .name
= "PHILIPS_FI1236_MK3" },
2128 [ 0x23 ] = { .id
= TUNER_ABSENT
,
2129 .name
= "PHILIPS_FI1216_MK3" },
2132 static void gdi_eeprom(struct cx88_core
*core
, u8
*eeprom_data
)
2134 char *name
= (eeprom_data
[0x0d] < ARRAY_SIZE(gdi_tuner
))
2135 ? gdi_tuner
[eeprom_data
[0x0d]].name
: NULL
;
2137 info_printk(core
, "GDI: tuner=%s\n", name
? name
: "unknown");
2140 core
->board
.tuner_type
= gdi_tuner
[eeprom_data
[0x0d]].id
;
2141 core
->board
.radio
.type
= gdi_tuner
[eeprom_data
[0x0d]].fm
?
2145 /* ------------------------------------------------------------------- */
2146 /* some Divco specific stuff */
2147 static int cx88_dvico_xc2028_callback(struct cx88_core
*core
,
2148 int command
, int arg
)
2151 case XC2028_TUNER_RESET
:
2152 cx_write(MO_GP0_IO
, 0x101000);
2154 cx_set(MO_GP0_IO
, 0x101010);
2164 /* ----------------------------------------------------------------------- */
2165 /* some Geniatech specific stuff */
2167 static int cx88_xc3028_geniatech_tuner_callback(struct cx88_core
*core
,
2168 int command
, int mode
)
2171 case XC2028_TUNER_RESET
:
2172 switch (INPUT(core
->input
).type
) {
2176 cx_write(MO_GP1_IO
, 0x030302);
2180 cx_write(MO_GP1_IO
, 0x030301);
2183 cx_write(MO_GP1_IO
, 0x101010);
2185 cx_write(MO_GP1_IO
, 0x101000);
2187 cx_write(MO_GP1_IO
, 0x101010);
2194 /* ------------------------------------------------------------------- */
2195 /* some Divco specific stuff */
2196 static int cx88_pv_8000gt_callback(struct cx88_core
*core
,
2197 int command
, int arg
)
2200 case XC2028_TUNER_RESET
:
2201 cx_write(MO_GP2_IO
, 0xcf7);
2203 cx_write(MO_GP2_IO
, 0xef5);
2205 cx_write(MO_GP2_IO
, 0xcf7);
2214 /* ----------------------------------------------------------------------- */
2215 /* some DViCO specific stuff */
2217 static void dvico_fusionhdtv_hybrid_init(struct cx88_core
*core
)
2219 struct i2c_msg msg
= { .addr
= 0x45, .flags
= 0 };
2221 static u8 init_bufs
[13][5] = {
2222 { 0x10, 0x00, 0x20, 0x01, 0x03 },
2223 { 0x10, 0x10, 0x01, 0x00, 0x21 },
2224 { 0x10, 0x10, 0x10, 0x00, 0xCA },
2225 { 0x10, 0x10, 0x12, 0x00, 0x08 },
2226 { 0x10, 0x10, 0x13, 0x00, 0x0A },
2227 { 0x10, 0x10, 0x16, 0x01, 0xC0 },
2228 { 0x10, 0x10, 0x22, 0x01, 0x3D },
2229 { 0x10, 0x10, 0x73, 0x01, 0x2E },
2230 { 0x10, 0x10, 0x72, 0x00, 0xC5 },
2231 { 0x10, 0x10, 0x71, 0x01, 0x97 },
2232 { 0x10, 0x10, 0x70, 0x00, 0x0F },
2233 { 0x10, 0x10, 0xB0, 0x00, 0x01 },
2237 for (i
= 0; i
< ARRAY_SIZE(init_bufs
); i
++) {
2238 msg
.buf
= init_bufs
[i
];
2239 msg
.len
= (i
!= 12 ? 5 : 2);
2240 err
= i2c_transfer(&core
->i2c_adap
, &msg
, 1);
2242 warn_printk(core
, "dvico_fusionhdtv_hybrid_init buf %d "
2243 "failed (err = %d)!\n", i
, err
);
2249 static int cx88_xc2028_tuner_callback(struct cx88_core
*core
,
2250 int command
, int arg
)
2252 /* Board-specific callbacks */
2253 switch (core
->boardnr
) {
2254 case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL
:
2255 case CX88_BOARD_POWERCOLOR_REAL_ANGEL
:
2256 case CX88_BOARD_GENIATECH_X8000_MT
:
2257 case CX88_BOARD_KWORLD_ATSC_120
:
2258 return cx88_xc3028_geniatech_tuner_callback(core
,
2260 case CX88_BOARD_PROLINK_PV_8000GT
:
2261 return cx88_pv_8000gt_callback(core
, command
, arg
);
2262 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO
:
2263 return cx88_dvico_xc2028_callback(core
, command
, arg
);
2267 case XC2028_TUNER_RESET
:
2268 switch (INPUT(core
->input
).type
) {
2270 info_printk(core
, "setting GPIO to radio!\n");
2271 cx_write(MO_GP0_IO
, 0x4ff);
2273 cx_write(MO_GP2_IO
, 0xff);
2276 case CX88_VMUX_DVB
: /* Digital TV*/
2277 default: /* Analog TV */
2278 info_printk(core
, "setting GPIO to TV!\n");
2281 cx_write(MO_GP1_IO
, 0x101010);
2283 cx_write(MO_GP1_IO
, 0x101000);
2285 cx_write(MO_GP1_IO
, 0x101010);
2292 /* ----------------------------------------------------------------------- */
2293 /* Tuner callback function. Currently only needed for the Pinnacle *
2294 * PCTV HD 800i with an xc5000 sillicon tuner. This is used for both *
2295 * analog tuner attach (tuner-core.c) and dvb tuner attach (cx88-dvb.c) */
2297 static int cx88_xc5000_tuner_callback(struct cx88_core
*core
,
2298 int command
, int arg
)
2300 switch (core
->boardnr
) {
2301 case CX88_BOARD_PINNACLE_PCTV_HD_800i
:
2302 if (command
== 0) { /* This is the reset command from xc5000 */
2303 /* Reset XC5000 tuner via SYS_RSTO_pin */
2304 cx_write(MO_SRST_IO
, 0);
2306 cx_write(MO_SRST_IO
, 1);
2309 err_printk(core
, "xc5000: unknown tuner "
2310 "callback command.\n");
2314 case CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD
:
2315 if (command
== 0) { /* This is the reset command from xc5000 */
2316 cx_clear(MO_GP0_IO
, 0x00000010);
2318 cx_set(MO_GP0_IO
, 0x00000010);
2322 "xc5000: unknown tuner callback command.\n");
2327 return 0; /* Should never be here */
2330 int cx88_tuner_callback(void *priv
, int command
, int arg
)
2332 struct i2c_algo_bit_data
*i2c_algo
= priv
;
2333 struct cx88_core
*core
;
2336 printk(KERN_ERR
"cx88: Error - i2c private data undefined.\n");
2340 core
= i2c_algo
->data
;
2343 printk(KERN_ERR
"cx88: Error - device struct undefined.\n");
2347 switch (core
->board
.tuner_type
) {
2349 info_printk(core
, "Calling XC2028/3028 callback\n");
2350 return cx88_xc2028_tuner_callback(core
, command
, arg
);
2352 info_printk(core
, "Calling XC5000 callback\n");
2353 return cx88_xc5000_tuner_callback(core
, command
, arg
);
2355 err_printk(core
, "Error: Calling callback for tuner %d\n",
2356 core
->board
.tuner_type
);
2359 EXPORT_SYMBOL(cx88_tuner_callback
);
2361 /* ----------------------------------------------------------------------- */
2363 static void cx88_card_list(struct cx88_core
*core
, struct pci_dev
*pci
)
2367 if (0 == pci
->subsystem_vendor
&&
2368 0 == pci
->subsystem_device
) {
2370 "%s: Your board has no valid PCI Subsystem ID and thus can't\n"
2371 "%s: be autodetected. Please pass card=<n> insmod option to\n"
2372 "%s: workaround that. Redirect complaints to the vendor of\n"
2373 "%s: the TV card. Best regards,\n"
2375 core
->name
,core
->name
,core
->name
,core
->name
,core
->name
);
2378 "%s: Your board isn't known (yet) to the driver. You can\n"
2379 "%s: try to pick one of the existing card configs via\n"
2380 "%s: card=<n> insmod option. Updating to the latest\n"
2381 "%s: version might help as well.\n",
2382 core
->name
,core
->name
,core
->name
,core
->name
);
2384 err_printk(core
, "Here is a list of valid choices for the card=<n> "
2385 "insmod option:\n");
2386 for (i
= 0; i
< ARRAY_SIZE(cx88_boards
); i
++)
2387 printk(KERN_ERR
"%s: card=%d -> %s\n",
2388 core
->name
, i
, cx88_boards
[i
].name
);
2391 static void cx88_card_setup_pre_i2c(struct cx88_core
*core
)
2393 switch (core
->boardnr
) {
2394 case CX88_BOARD_HAUPPAUGE_HVR1300
:
2395 /* Bring the 702 demod up before i2c scanning/attach or devices are hidden */
2396 /* We leave here with the 702 on the bus */
2397 cx_write(MO_GP0_IO
, 0x0000e780);
2399 cx_clear(MO_GP0_IO
, 0x00000080);
2401 cx_set(MO_GP0_IO
, 0x00000080); /* 702 out of reset */
2405 case CX88_BOARD_PROLINK_PV_8000GT
:
2406 cx_write(MO_GP2_IO
, 0xcf7);
2408 cx_write(MO_GP2_IO
, 0xef5);
2410 cx_write(MO_GP2_IO
, 0xcf7);
2414 case CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD
:
2415 /* Enable the xc5000 tuner */
2416 cx_set(MO_GP0_IO
, 0x00001010);
2422 * Sets board-dependent xc3028 configuration
2424 void cx88_setup_xc3028(struct cx88_core
*core
, struct xc2028_ctrl
*ctl
)
2426 memset(ctl
, 0, sizeof(*ctl
));
2428 ctl
->fname
= XC2028_DEFAULT_FIRMWARE
;
2431 switch (core
->boardnr
) {
2432 case CX88_BOARD_POWERCOLOR_REAL_ANGEL
:
2433 /* Now works with firmware version 2.7 */
2434 if (core
->i2c_algo
.udelay
< 16)
2435 core
->i2c_algo
.udelay
= 16;
2437 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO
:
2438 ctl
->scode_table
= XC3028_FE_ZARLINK456
;
2440 case CX88_BOARD_KWORLD_ATSC_120
:
2441 case CX88_BOARD_DVICO_FUSIONHDTV_5_PCI_NANO
:
2442 ctl
->demod
= XC3028_FE_OREN538
;
2444 case CX88_BOARD_PROLINK_PV_8000GT
:
2446 * This board uses non-MTS firmware
2450 ctl
->demod
= XC3028_FE_OREN538
;
2454 EXPORT_SYMBOL_GPL(cx88_setup_xc3028
);
2456 static void cx88_card_setup(struct cx88_core
*core
)
2458 static u8 eeprom
[256];
2459 struct tuner_setup tun_setup
;
2460 unsigned int mode_mask
= T_RADIO
|
2464 memset(&tun_setup
, 0, sizeof(tun_setup
));
2466 if (0 == core
->i2c_rc
) {
2467 core
->i2c_client
.addr
= 0xa0 >> 1;
2468 tveeprom_read(&core
->i2c_client
, eeprom
, sizeof(eeprom
));
2471 switch (core
->boardnr
) {
2472 case CX88_BOARD_HAUPPAUGE
:
2473 case CX88_BOARD_HAUPPAUGE_ROSLYN
:
2474 if (0 == core
->i2c_rc
)
2475 hauppauge_eeprom(core
, eeprom
+8);
2477 case CX88_BOARD_GDI
:
2478 if (0 == core
->i2c_rc
)
2479 gdi_eeprom(core
, eeprom
);
2481 case CX88_BOARD_WINFAST2000XP_EXPERT
:
2482 if (0 == core
->i2c_rc
)
2483 leadtek_eeprom(core
, eeprom
);
2485 case CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1
:
2486 case CX88_BOARD_HAUPPAUGE_NOVASE2_S1
:
2487 case CX88_BOARD_HAUPPAUGE_DVB_T1
:
2488 case CX88_BOARD_HAUPPAUGE_HVR1100
:
2489 case CX88_BOARD_HAUPPAUGE_HVR1100LP
:
2490 case CX88_BOARD_HAUPPAUGE_HVR3000
:
2491 case CX88_BOARD_HAUPPAUGE_HVR1300
:
2492 if (0 == core
->i2c_rc
)
2493 hauppauge_eeprom(core
, eeprom
);
2495 case CX88_BOARD_KWORLD_DVBS_100
:
2496 cx_write(MO_GP0_IO
, 0x000007f8);
2497 cx_write(MO_GP1_IO
, 0x00000001);
2499 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PRO
:
2500 /* GPIO0:0 is hooked to demod reset */
2501 /* GPIO0:4 is hooked to xc3028 reset */
2502 cx_write(MO_GP0_IO
, 0x00111100);
2504 cx_write(MO_GP0_IO
, 0x00111111);
2506 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL
:
2507 /* GPIO0:6 is hooked to FX2 reset pin */
2508 cx_set(MO_GP0_IO
, 0x00004040);
2509 cx_clear(MO_GP0_IO
, 0x00000040);
2511 cx_set(MO_GP0_IO
, 0x00004040);
2513 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1
:
2514 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS
:
2515 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID
:
2516 /* GPIO0:0 is hooked to mt352 reset pin */
2517 cx_set(MO_GP0_IO
, 0x00000101);
2518 cx_clear(MO_GP0_IO
, 0x00000001);
2520 cx_set(MO_GP0_IO
, 0x00000101);
2521 if (0 == core
->i2c_rc
&&
2522 core
->boardnr
== CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID
)
2523 dvico_fusionhdtv_hybrid_init(core
);
2525 case CX88_BOARD_KWORLD_DVB_T
:
2526 case CX88_BOARD_DNTV_LIVE_DVB_T
:
2527 cx_set(MO_GP0_IO
, 0x00000707);
2528 cx_set(MO_GP2_IO
, 0x00000101);
2529 cx_clear(MO_GP2_IO
, 0x00000001);
2531 cx_clear(MO_GP0_IO
, 0x00000007);
2532 cx_set(MO_GP2_IO
, 0x00000101);
2534 case CX88_BOARD_DNTV_LIVE_DVB_T_PRO
:
2535 cx_write(MO_GP0_IO
, 0x00080808);
2537 case CX88_BOARD_ATI_HDTVWONDER
:
2538 if (0 == core
->i2c_rc
) {
2541 static const u8 buffer
[][2] = {
2548 core
->i2c_client
.addr
= 0x0a;
2550 for (i
= 0; i
< ARRAY_SIZE(buffer
); i
++)
2551 if (2 != i2c_master_send(&core
->i2c_client
,
2553 warn_printk(core
, "Unable to enable "
2557 case CX88_BOARD_MSI_TVANYWHERE_MASTER
:
2559 struct v4l2_priv_tun_config tea5767_cfg
;
2560 struct tea5767_ctrl ctl
;
2562 memset(&ctl
, 0, sizeof(ctl
));
2567 ctl
.xtal_freq
= TEA5767_HIGH_LO_13MHz
;
2569 tea5767_cfg
.tuner
= TUNER_TEA5767
;
2570 tea5767_cfg
.priv
= &ctl
;
2572 cx88_call_i2c_clients(core
, TUNER_SET_CONFIG
, &tea5767_cfg
);
2578 if ((core
->board
.radio_type
!= UNSET
)) {
2579 tun_setup
.mode_mask
= T_RADIO
;
2580 tun_setup
.type
= core
->board
.radio_type
;
2581 tun_setup
.addr
= core
->board
.radio_addr
;
2582 tun_setup
.tuner_callback
= cx88_tuner_callback
;
2583 cx88_call_i2c_clients(core
, TUNER_SET_TYPE_ADDR
, &tun_setup
);
2584 mode_mask
&= ~T_RADIO
;
2587 if (core
->board
.tuner_type
!= TUNER_ABSENT
) {
2588 tun_setup
.mode_mask
= mode_mask
;
2589 tun_setup
.type
= core
->board
.tuner_type
;
2590 tun_setup
.addr
= core
->board
.tuner_addr
;
2591 tun_setup
.tuner_callback
= cx88_tuner_callback
;
2593 cx88_call_i2c_clients(core
, TUNER_SET_TYPE_ADDR
, &tun_setup
);
2596 if (core
->board
.tda9887_conf
) {
2597 struct v4l2_priv_tun_config tda9887_cfg
;
2599 tda9887_cfg
.tuner
= TUNER_TDA9887
;
2600 tda9887_cfg
.priv
= &core
->board
.tda9887_conf
;
2602 cx88_call_i2c_clients(core
, TUNER_SET_CONFIG
, &tda9887_cfg
);
2605 if (core
->board
.tuner_type
== TUNER_XC2028
) {
2606 struct v4l2_priv_tun_config xc2028_cfg
;
2607 struct xc2028_ctrl ctl
;
2609 /* Fills device-dependent initialization parameters */
2610 cx88_setup_xc3028(core
, &ctl
);
2612 /* Sends parameters to xc2028/3028 tuner */
2613 memset(&xc2028_cfg
, 0, sizeof(xc2028_cfg
));
2614 xc2028_cfg
.tuner
= TUNER_XC2028
;
2615 xc2028_cfg
.priv
= &ctl
;
2616 info_printk(core
, "Asking xc2028/3028 to load firmware %s\n",
2618 cx88_call_i2c_clients(core
, TUNER_SET_CONFIG
, &xc2028_cfg
);
2620 cx88_call_i2c_clients (core
, TUNER_SET_STANDBY
, NULL
);
2623 /* ------------------------------------------------------------------ */
2625 static int cx88_pci_quirks(const char *name
, struct pci_dev
*pci
)
2627 unsigned int lat
= UNSET
;
2631 /* check pci quirks */
2632 if (pci_pci_problems
& PCIPCI_TRITON
) {
2633 printk(KERN_INFO
"%s: quirk: PCIPCI_TRITON -- set TBFX\n",
2635 ctrl
|= CX88X_EN_TBFX
;
2637 if (pci_pci_problems
& PCIPCI_NATOMA
) {
2638 printk(KERN_INFO
"%s: quirk: PCIPCI_NATOMA -- set TBFX\n",
2640 ctrl
|= CX88X_EN_TBFX
;
2642 if (pci_pci_problems
& PCIPCI_VIAETBF
) {
2643 printk(KERN_INFO
"%s: quirk: PCIPCI_VIAETBF -- set TBFX\n",
2645 ctrl
|= CX88X_EN_TBFX
;
2647 if (pci_pci_problems
& PCIPCI_VSFX
) {
2648 printk(KERN_INFO
"%s: quirk: PCIPCI_VSFX -- set VSFX\n",
2650 ctrl
|= CX88X_EN_VSFX
;
2652 #ifdef PCIPCI_ALIMAGIK
2653 if (pci_pci_problems
& PCIPCI_ALIMAGIK
) {
2654 printk(KERN_INFO
"%s: quirk: PCIPCI_ALIMAGIK -- latency fixup\n",
2660 /* check insmod options */
2661 if (UNSET
!= latency
)
2666 pci_read_config_byte(pci
, CX88X_DEVCTRL
, &value
);
2668 pci_write_config_byte(pci
, CX88X_DEVCTRL
, value
);
2671 printk(KERN_INFO
"%s: setting pci latency timer to %d\n",
2673 pci_write_config_byte(pci
, PCI_LATENCY_TIMER
, latency
);
2678 int cx88_get_resources(const struct cx88_core
*core
, struct pci_dev
*pci
)
2680 if (request_mem_region(pci_resource_start(pci
,0),
2681 pci_resource_len(pci
,0),
2685 "%s/%d: Can't get MMIO memory @ 0x%llx, subsystem: %04x:%04x\n",
2686 core
->name
, PCI_FUNC(pci
->devfn
),
2687 (unsigned long long)pci_resource_start(pci
, 0),
2688 pci
->subsystem_vendor
, pci
->subsystem_device
);
2692 /* Allocate and initialize the cx88 core struct. One should hold the
2693 * devlist mutex before calling this. */
2694 struct cx88_core
*cx88_core_create(struct pci_dev
*pci
, int nr
)
2696 struct cx88_core
*core
;
2699 core
= kzalloc(sizeof(*core
), GFP_KERNEL
);
2701 atomic_inc(&core
->refcount
);
2702 core
->pci_bus
= pci
->bus
->number
;
2703 core
->pci_slot
= PCI_SLOT(pci
->devfn
);
2704 core
->pci_irqmask
= PCI_INT_RISC_RD_BERRINT
| PCI_INT_RISC_WR_BERRINT
|
2705 PCI_INT_BRDG_BERRINT
| PCI_INT_SRC_DMA_BERRINT
|
2706 PCI_INT_DST_DMA_BERRINT
| PCI_INT_IPB_DMA_BERRINT
;
2707 mutex_init(&core
->lock
);
2710 sprintf(core
->name
, "cx88[%d]", core
->nr
);
2711 if (0 != cx88_get_resources(core
, pci
)) {
2717 cx88_pci_quirks(core
->name
, pci
);
2718 core
->lmmio
= ioremap(pci_resource_start(pci
, 0),
2719 pci_resource_len(pci
, 0));
2720 core
->bmmio
= (u8 __iomem
*)core
->lmmio
;
2723 core
->boardnr
= UNSET
;
2724 if (card
[core
->nr
] < ARRAY_SIZE(cx88_boards
))
2725 core
->boardnr
= card
[core
->nr
];
2726 for (i
= 0; UNSET
== core
->boardnr
&& i
< ARRAY_SIZE(cx88_subids
); i
++)
2727 if (pci
->subsystem_vendor
== cx88_subids
[i
].subvendor
&&
2728 pci
->subsystem_device
== cx88_subids
[i
].subdevice
)
2729 core
->boardnr
= cx88_subids
[i
].card
;
2730 if (UNSET
== core
->boardnr
) {
2731 core
->boardnr
= CX88_BOARD_UNKNOWN
;
2732 cx88_card_list(core
, pci
);
2735 memcpy(&core
->board
, &cx88_boards
[core
->boardnr
], sizeof(core
->board
));
2737 info_printk(core
, "subsystem: %04x:%04x, board: %s [card=%d,%s]\n",
2738 pci
->subsystem_vendor
, pci
->subsystem_device
, core
->board
.name
,
2739 core
->boardnr
, card
[core
->nr
] == core
->boardnr
?
2740 "insmod option" : "autodetected");
2742 if (tuner
[core
->nr
] != UNSET
)
2743 core
->board
.tuner_type
= tuner
[core
->nr
];
2744 if (radio
[core
->nr
] != UNSET
)
2745 core
->board
.radio_type
= radio
[core
->nr
];
2747 info_printk(core
, "TV tuner type %d, Radio tuner type %d\n",
2748 core
->board
.tuner_type
, core
->board
.radio_type
);
2752 cx88_card_setup_pre_i2c(core
);
2753 cx88_i2c_init(core
, pci
);
2755 /* load tuner module, if needed */
2756 if (TUNER_ABSENT
!= core
->board
.tuner_type
)
2757 request_module("tuner");
2759 cx88_card_setup(core
);
2760 cx88_ir_init(core
, pci
);