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 /* ------------------------------------------------------------------ */
31 /* board config info */
33 struct cx88_board cx88_boards
[] = {
34 [CX88_BOARD_UNKNOWN
] = {
35 .name
= "UNKNOWN/GENERIC",
38 .tuner_addr
= ADDR_UNSET
,
39 .radio_addr
= ADDR_UNSET
,
41 .type
= CX88_VMUX_COMPOSITE1
,
44 .type
= CX88_VMUX_COMPOSITE2
,
47 .type
= CX88_VMUX_COMPOSITE3
,
50 .type
= CX88_VMUX_COMPOSITE4
,
54 [CX88_BOARD_HAUPPAUGE
] = {
55 .name
= "Hauppauge WinTV 34xxx models",
58 .tuner_addr
= ADDR_UNSET
,
59 .radio_addr
= ADDR_UNSET
,
60 .tda9887_conf
= TDA9887_PRESENT
,
62 .type
= CX88_VMUX_TELEVISION
,
64 .gpio0
= 0xff00, // internal decoder
66 .type
= CX88_VMUX_DEBUG
,
68 .gpio0
= 0xff01, // mono from tuner chip
70 .type
= CX88_VMUX_COMPOSITE1
,
74 .type
= CX88_VMUX_SVIDEO
,
84 .name
= "GDI Black Gold",
87 .tuner_addr
= ADDR_UNSET
,
88 .radio_addr
= ADDR_UNSET
,
90 .type
= CX88_VMUX_TELEVISION
,
93 .type
= CX88_VMUX_SVIDEO
,
97 [CX88_BOARD_PIXELVIEW
] = {
99 .tuner_type
= TUNER_PHILIPS_PAL
,
101 .tuner_addr
= ADDR_UNSET
,
102 .radio_addr
= ADDR_UNSET
,
104 .type
= CX88_VMUX_TELEVISION
,
106 .gpio0
= 0xff00, // internal decoder
108 .type
= CX88_VMUX_COMPOSITE1
,
111 .type
= CX88_VMUX_SVIDEO
,
119 [CX88_BOARD_ATI_WONDER_PRO
] = {
120 .name
= "ATI TV Wonder Pro",
121 .tuner_type
= TUNER_PHILIPS_4IN1
,
123 .tuner_addr
= ADDR_UNSET
,
124 .radio_addr
= ADDR_UNSET
,
125 .tda9887_conf
= TDA9887_PRESENT
| TDA9887_INTERCARRIER
,
127 .type
= CX88_VMUX_TELEVISION
,
131 .type
= CX88_VMUX_COMPOSITE1
,
135 .type
= CX88_VMUX_SVIDEO
,
140 [CX88_BOARD_WINFAST2000XP_EXPERT
] = {
141 .name
= "Leadtek Winfast 2000XP Expert",
142 .tuner_type
= TUNER_PHILIPS_4IN1
,
144 .tuner_addr
= ADDR_UNSET
,
145 .radio_addr
= ADDR_UNSET
,
146 .tda9887_conf
= TDA9887_PRESENT
,
148 .type
= CX88_VMUX_TELEVISION
,
155 .type
= CX88_VMUX_COMPOSITE1
,
162 .type
= CX88_VMUX_SVIDEO
,
177 [CX88_BOARD_AVERTV_STUDIO_303
] = {
178 .name
= "AverTV Studio 303 (M126)",
179 .tuner_type
= TUNER_PHILIPS_FM1216ME_MK3
,
181 .tuner_addr
= ADDR_UNSET
,
182 .radio_addr
= ADDR_UNSET
,
183 .tda9887_conf
= TDA9887_PRESENT
,
185 .type
= CX88_VMUX_TELEVISION
,
189 .type
= CX88_VMUX_COMPOSITE1
,
193 .type
= CX88_VMUX_SVIDEO
,
201 [CX88_BOARD_MSI_TVANYWHERE_MASTER
] = {
202 // added gpio values thanks to Michal
203 // values for PAL from DScaler
204 .name
= "MSI TV-@nywhere Master",
205 .tuner_type
= TUNER_MT2032
,
207 .tuner_addr
= ADDR_UNSET
,
208 .radio_addr
= ADDR_UNSET
,
209 .tda9887_conf
= TDA9887_PRESENT
| TDA9887_INTERCARRIER_NTSC
,
211 .type
= CX88_VMUX_TELEVISION
,
217 .type
= CX88_VMUX_COMPOSITE1
,
223 .type
= CX88_VMUX_SVIDEO
,
233 [CX88_BOARD_WINFAST_DV2000
] = {
234 .name
= "Leadtek Winfast DV2000",
235 .tuner_type
= TUNER_PHILIPS_FM1216ME_MK3
,
237 .tuner_addr
= ADDR_UNSET
,
238 .radio_addr
= ADDR_UNSET
,
239 .tda9887_conf
= TDA9887_PRESENT
,
241 .type
= CX88_VMUX_TELEVISION
,
249 .type
= CX88_VMUX_COMPOSITE1
,
256 .type
= CX88_VMUX_SVIDEO
,
271 [CX88_BOARD_LEADTEK_PVR2000
] = {
272 // gpio values for PAL version from regspy by DScaler
273 .name
= "Leadtek PVR 2000",
274 .tuner_type
= TUNER_PHILIPS_FM1216ME_MK3
,
276 .tuner_addr
= ADDR_UNSET
,
277 .radio_addr
= ADDR_UNSET
,
278 .tda9887_conf
= TDA9887_PRESENT
,
280 .type
= CX88_VMUX_TELEVISION
,
284 .type
= CX88_VMUX_COMPOSITE1
,
288 .type
= CX88_VMUX_SVIDEO
,
298 [CX88_BOARD_IODATA_GVVCP3PCI
] = {
299 .name
= "IODATA GV-VCP3/PCI",
300 .tuner_type
= TUNER_ABSENT
,
302 .tuner_addr
= ADDR_UNSET
,
303 .radio_addr
= ADDR_UNSET
,
305 .type
= CX88_VMUX_COMPOSITE1
,
308 .type
= CX88_VMUX_COMPOSITE2
,
311 .type
= CX88_VMUX_SVIDEO
,
315 [CX88_BOARD_PROLINK_PLAYTVPVR
] = {
316 .name
= "Prolink PlayTV PVR",
317 .tuner_type
= TUNER_PHILIPS_FM1236_MK3
,
319 .tuner_addr
= ADDR_UNSET
,
320 .radio_addr
= ADDR_UNSET
,
321 .tda9887_conf
= TDA9887_PRESENT
,
323 .type
= CX88_VMUX_TELEVISION
,
327 .type
= CX88_VMUX_COMPOSITE1
,
331 .type
= CX88_VMUX_SVIDEO
,
340 [CX88_BOARD_ASUS_PVR_416
] = {
341 .name
= "ASUS PVR-416",
342 .tuner_type
= TUNER_PHILIPS_FM1236_MK3
,
344 .tuner_addr
= ADDR_UNSET
,
345 .radio_addr
= ADDR_UNSET
,
346 .tda9887_conf
= TDA9887_PRESENT
,
348 .type
= CX88_VMUX_TELEVISION
,
352 .type
= CX88_VMUX_SVIDEO
,
354 .gpio0
= 0x0000fde6, // 0x0000fda6 L,R RCA audio in?
362 [CX88_BOARD_MSI_TVANYWHERE
] = {
363 .name
= "MSI TV-@nywhere",
364 .tuner_type
= TUNER_MT2032
,
366 .tuner_addr
= ADDR_UNSET
,
367 .radio_addr
= ADDR_UNSET
,
368 .tda9887_conf
= TDA9887_PRESENT
,
370 .type
= CX88_VMUX_TELEVISION
,
375 .type
= CX88_VMUX_COMPOSITE1
,
380 .type
= CX88_VMUX_SVIDEO
,
386 [CX88_BOARD_KWORLD_DVB_T
] = {
387 .name
= "KWorld/VStream XPert DVB-T",
388 .tuner_type
= TUNER_ABSENT
,
390 .tuner_addr
= ADDR_UNSET
,
391 .radio_addr
= ADDR_UNSET
,
393 .type
= CX88_VMUX_COMPOSITE1
,
398 .type
= CX88_VMUX_SVIDEO
,
405 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1
] = {
406 .name
= "DViCO FusionHDTV DVB-T1",
407 .tuner_type
= TUNER_ABSENT
, /* No analog tuner */
409 .tuner_addr
= ADDR_UNSET
,
410 .radio_addr
= ADDR_UNSET
,
412 .type
= CX88_VMUX_COMPOSITE1
,
416 .type
= CX88_VMUX_SVIDEO
,
422 [CX88_BOARD_KWORLD_LTV883
] = {
423 .name
= "KWorld LTV883RF",
424 .tuner_type
= TUNER_TNF_8831BGFF
,
426 .tuner_addr
= ADDR_UNSET
,
427 .radio_addr
= ADDR_UNSET
,
429 .type
= CX88_VMUX_TELEVISION
,
433 .type
= CX88_VMUX_DEBUG
,
435 .gpio0
= 0x07f9, // mono from tuner chip
437 .type
= CX88_VMUX_COMPOSITE1
,
441 .type
= CX88_VMUX_SVIDEO
,
450 [CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q
] = {
451 .name
= "DViCO FusionHDTV 3 Gold-Q",
452 .tuner_type
= TUNER_MICROTUNE_4042FI5
,
454 .tuner_addr
= ADDR_UNSET
,
455 .radio_addr
= ADDR_UNSET
,
457 GPIO[0] resets DT3302 DTV receiver
460 GPIO[1] mutes analog audio output connector
461 0 - enable selected source
463 GPIO[2] selects source for analog audio output connector
464 0 - analog audio input connector on tab
465 1 - analog DAC output from CX23881 chip
466 GPIO[3] selects RF input connector on tuner module
467 0 - RF connector labeled CABLE
468 1 - RF connector labeled ANT
469 GPIO[4] selects high RF for QAM256 mode
474 .type
= CX88_VMUX_TELEVISION
,
478 .type
= CX88_VMUX_CABLE
,
482 .type
= CX88_VMUX_COMPOSITE1
,
486 .type
= CX88_VMUX_SVIDEO
,
492 [CX88_BOARD_HAUPPAUGE_DVB_T1
] = {
493 .name
= "Hauppauge Nova-T DVB-T",
494 .tuner_type
= TUNER_ABSENT
,
496 .tuner_addr
= ADDR_UNSET
,
497 .radio_addr
= ADDR_UNSET
,
499 .type
= CX88_VMUX_DVB
,
504 [CX88_BOARD_CONEXANT_DVB_T1
] = {
505 .name
= "Conexant DVB-T reference design",
506 .tuner_type
= TUNER_ABSENT
,
508 .tuner_addr
= ADDR_UNSET
,
509 .radio_addr
= ADDR_UNSET
,
511 .type
= CX88_VMUX_DVB
,
516 [CX88_BOARD_PROVIDEO_PV259
] = {
517 .name
= "Provideo PV259",
518 .tuner_type
= TUNER_PHILIPS_FQ1216ME
,
520 .tuner_addr
= ADDR_UNSET
,
521 .radio_addr
= ADDR_UNSET
,
523 .type
= CX88_VMUX_TELEVISION
,
528 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS
] = {
529 .name
= "DViCO FusionHDTV DVB-T Plus",
530 .tuner_type
= TUNER_ABSENT
, /* No analog tuner */
532 .tuner_addr
= ADDR_UNSET
,
533 .radio_addr
= ADDR_UNSET
,
535 .type
= CX88_VMUX_COMPOSITE1
,
539 .type
= CX88_VMUX_SVIDEO
,
545 [CX88_BOARD_DNTV_LIVE_DVB_T
] = {
546 .name
= "digitalnow DNTV Live! DVB-T",
547 .tuner_type
= TUNER_ABSENT
,
549 .tuner_addr
= ADDR_UNSET
,
550 .radio_addr
= ADDR_UNSET
,
552 .type
= CX88_VMUX_COMPOSITE1
,
557 .type
= CX88_VMUX_SVIDEO
,
564 [CX88_BOARD_PCHDTV_HD3000
] = {
565 .name
= "pcHDTV HD3000 HDTV",
566 .tuner_type
= TUNER_THOMSON_DTT7610
,
568 .tuner_addr
= ADDR_UNSET
,
569 .radio_addr
= ADDR_UNSET
,
570 .tda9887_conf
= TDA9887_PRESENT
,
572 .type
= CX88_VMUX_TELEVISION
,
579 .type
= CX88_VMUX_COMPOSITE1
,
586 .type
= CX88_VMUX_SVIDEO
,
603 [CX88_BOARD_HAUPPAUGE_ROSLYN
] = {
604 // entry added by Kaustubh D. Bhalerao <bhalerao.1@osu.edu>
605 // GPIO values obtained from regspy, courtesy Sean Covel
606 .name
= "Hauppauge WinTV 28xxx (Roslyn) models",
609 .tuner_addr
= ADDR_UNSET
,
610 .radio_addr
= ADDR_UNSET
,
612 .type
= CX88_VMUX_TELEVISION
,
617 .type
= CX88_VMUX_DEBUG
,
621 .type
= CX88_VMUX_COMPOSITE1
,
625 .type
= CX88_VMUX_SVIDEO
,
637 [CX88_BOARD_DIGITALLOGIC_MEC
] = {
638 .name
= "Digital-Logic MICROSPACE Entertainment Center (MEC)",
639 .tuner_type
= TUNER_PHILIPS_FM1216ME_MK3
,
641 .tuner_addr
= ADDR_UNSET
,
642 .radio_addr
= ADDR_UNSET
,
643 .tda9887_conf
= TDA9887_PRESENT
,
645 .type
= CX88_VMUX_TELEVISION
,
649 .type
= CX88_VMUX_COMPOSITE1
,
653 .type
= CX88_VMUX_SVIDEO
,
663 [CX88_BOARD_IODATA_GVBCTV7E
] = {
664 .name
= "IODATA GV/BCTV7E",
665 .tuner_type
= TUNER_PHILIPS_FQ1286
,
667 .tuner_addr
= ADDR_UNSET
,
668 .radio_addr
= ADDR_UNSET
,
669 .tda9887_conf
= TDA9887_PRESENT
,
671 .type
= CX88_VMUX_TELEVISION
,
675 .type
= CX88_VMUX_COMPOSITE1
,
679 .type
= CX88_VMUX_SVIDEO
,
684 [CX88_BOARD_PIXELVIEW_PLAYTV_ULTRA_PRO
] = {
685 .name
= "PixelView PlayTV Ultra Pro (Stereo)",
686 /* May be also TUNER_YMEC_TVF_5533MF for NTSC/M or PAL/M */
687 .tuner_type
= TUNER_PHILIPS_FM1216ME_MK3
,
689 .tuner_addr
= ADDR_UNSET
,
690 .radio_addr
= ADDR_UNSET
,
692 .type
= CX88_VMUX_TELEVISION
,
694 .gpio0
= 0xbf61, /* internal decoder */
696 .type
= CX88_VMUX_COMPOSITE1
,
700 .type
= CX88_VMUX_SVIDEO
,
709 [CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T
] = {
710 .name
= "DViCO FusionHDTV 3 Gold-T",
711 .tuner_type
= TUNER_THOMSON_DTT761X
,
713 .tuner_addr
= ADDR_UNSET
,
714 .radio_addr
= ADDR_UNSET
,
715 .tda9887_conf
= TDA9887_PRESENT
,
717 .type
= CX88_VMUX_TELEVISION
,
721 .type
= CX88_VMUX_COMPOSITE1
,
725 .type
= CX88_VMUX_SVIDEO
,
731 [CX88_BOARD_ADSTECH_DVB_T_PCI
] = {
732 .name
= "ADS Tech Instant TV DVB-T PCI",
733 .tuner_type
= TUNER_ABSENT
,
735 .tuner_addr
= ADDR_UNSET
,
736 .radio_addr
= ADDR_UNSET
,
738 .type
= CX88_VMUX_COMPOSITE1
,
743 .type
= CX88_VMUX_SVIDEO
,
750 [CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1
] = {
751 .name
= "TerraTec Cinergy 1400 DVB-T",
752 .tuner_type
= TUNER_ABSENT
,
754 .type
= CX88_VMUX_DVB
,
759 [CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD
] = {
760 .name
= "DViCO FusionHDTV 5 Gold",
761 .tuner_type
= TUNER_LG_TDVS_H062F
,
763 .tuner_addr
= ADDR_UNSET
,
764 .radio_addr
= ADDR_UNSET
,
765 .tda9887_conf
= TDA9887_PRESENT
,
767 .type
= CX88_VMUX_TELEVISION
,
771 .type
= CX88_VMUX_COMPOSITE1
,
775 .type
= CX88_VMUX_SVIDEO
,
781 [CX88_BOARD_AVERMEDIA_ULTRATV_MC_550
] = {
782 .name
= "AverMedia UltraTV Media Center PCI 550",
783 .tuner_type
= TUNER_PHILIPS_FM1236_MK3
,
785 .tuner_addr
= ADDR_UNSET
,
786 .radio_addr
= ADDR_UNSET
,
787 .tda9887_conf
= TDA9887_PRESENT
,
790 .type
= CX88_VMUX_COMPOSITE1
,
794 .type
= CX88_VMUX_SVIDEO
,
798 .type
= CX88_VMUX_TELEVISION
,
808 [CX88_BOARD_KWORLD_VSTREAM_EXPERT_DVD
] = {
809 /* Alexander Wold <awold@bigfoot.com> */
810 .name
= "Kworld V-Stream Xpert DVD",
813 .type
= CX88_VMUX_COMPOSITE1
,
820 .type
= CX88_VMUX_SVIDEO
,
828 [CX88_BOARD_ATI_HDTVWONDER
] = {
829 .name
= "ATI HDTV Wonder",
830 .tuner_type
= TUNER_PHILIPS_TUV1236D
,
832 .tuner_addr
= ADDR_UNSET
,
833 .radio_addr
= ADDR_UNSET
,
835 .type
= CX88_VMUX_TELEVISION
,
842 .type
= CX88_VMUX_COMPOSITE1
,
849 .type
= CX88_VMUX_SVIDEO
,
858 [CX88_BOARD_WINFAST_DTV1000
] = {
859 .name
= "WinFast DTV1000-T",
860 .tuner_type
= TUNER_ABSENT
,
862 .tuner_addr
= ADDR_UNSET
,
863 .radio_addr
= ADDR_UNSET
,
865 .type
= CX88_VMUX_DVB
,
870 [CX88_BOARD_AVERTV_303
] = {
871 .name
= "AVerTV 303 (M126)",
872 .tuner_type
= TUNER_PHILIPS_FM1216ME_MK3
,
874 .tuner_addr
= ADDR_UNSET
,
875 .radio_addr
= ADDR_UNSET
,
876 .tda9887_conf
= TDA9887_PRESENT
,
878 .type
= CX88_VMUX_TELEVISION
,
885 .type
= CX88_VMUX_COMPOSITE1
,
892 .type
= CX88_VMUX_SVIDEO
,
900 [CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1
] = {
901 .name
= "Hauppauge Nova-S-Plus DVB-S",
902 .tuner_type
= TUNER_ABSENT
,
904 .tuner_addr
= ADDR_UNSET
,
905 .radio_addr
= ADDR_UNSET
,
907 .type
= CX88_VMUX_DVB
,
910 .type
= CX88_VMUX_COMPOSITE1
,
913 .type
= CX88_VMUX_SVIDEO
,
918 [CX88_BOARD_HAUPPAUGE_NOVASE2_S1
] = {
919 .name
= "Hauppauge Nova-SE2 DVB-S",
920 .tuner_type
= TUNER_ABSENT
,
922 .tuner_addr
= ADDR_UNSET
,
923 .radio_addr
= ADDR_UNSET
,
925 .type
= CX88_VMUX_DVB
,
930 [CX88_BOARD_KWORLD_DVBS_100
] = {
931 .name
= "KWorld DVB-S 100",
932 .tuner_type
= TUNER_ABSENT
,
934 .tuner_addr
= ADDR_UNSET
,
935 .radio_addr
= ADDR_UNSET
,
937 .type
= CX88_VMUX_DVB
,
940 .type
= CX88_VMUX_COMPOSITE1
,
943 .type
= CX88_VMUX_SVIDEO
,
948 [CX88_BOARD_HAUPPAUGE_HVR1100
] = {
949 .name
= "Hauppauge WinTV-HVR1100 DVB-T/Hybrid",
950 .tuner_type
= TUNER_PHILIPS_FMD1216ME_MK3
,
952 .tuner_addr
= ADDR_UNSET
,
953 .radio_addr
= ADDR_UNSET
,
954 .tda9887_conf
= TDA9887_PRESENT
,
956 .type
= CX88_VMUX_TELEVISION
,
959 .type
= CX88_VMUX_COMPOSITE1
,
962 .type
= CX88_VMUX_SVIDEO
,
965 /* fixme: Add radio support */
968 [CX88_BOARD_HAUPPAUGE_HVR1100LP
] = {
969 .name
= "Hauppauge WinTV-HVR1100 DVB-T/Hybrid (Low Profile)",
970 .tuner_type
= TUNER_PHILIPS_FMD1216ME_MK3
,
972 .tuner_addr
= ADDR_UNSET
,
973 .radio_addr
= ADDR_UNSET
,
974 .tda9887_conf
= TDA9887_PRESENT
,
976 .type
= CX88_VMUX_TELEVISION
,
979 .type
= CX88_VMUX_COMPOSITE1
,
982 /* fixme: Add radio support */
985 [CX88_BOARD_DNTV_LIVE_DVB_T_PRO
] = {
986 .name
= "digitalnow DNTV Live! DVB-T Pro",
987 .tuner_type
= TUNER_PHILIPS_FMD1216ME_MK3
,
989 .tuner_addr
= ADDR_UNSET
,
990 .radio_addr
= ADDR_UNSET
,
991 .tda9887_conf
= TDA9887_PRESENT
| TDA9887_PORT1_ACTIVE
|
992 TDA9887_PORT2_ACTIVE
,
994 .type
= CX88_VMUX_TELEVISION
,
998 .type
= CX88_VMUX_COMPOSITE1
,
1002 .type
= CX88_VMUX_SVIDEO
,
1012 [CX88_BOARD_KWORLD_DVB_T_CX22702
] = {
1013 /* Kworld V-stream Xpert DVB-T with Thomson tuner */
1014 /* DTT 7579 Conexant CX22702-19 Conexant CX2388x */
1015 /* Manenti Marco <marco_manenti@colman.it> */
1016 .name
= "KWorld/VStream XPert DVB-T with cx22702",
1017 .tuner_type
= TUNER_ABSENT
,
1018 .radio_type
= UNSET
,
1019 .tuner_addr
= ADDR_UNSET
,
1020 .radio_addr
= ADDR_UNSET
,
1022 .type
= CX88_VMUX_COMPOSITE1
,
1027 .type
= CX88_VMUX_SVIDEO
,
1034 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL
] = {
1035 .name
= "DViCO FusionHDTV DVB-T Dual Digital",
1036 .tuner_type
= TUNER_ABSENT
, /* No analog tuner */
1037 .radio_type
= UNSET
,
1038 .tuner_addr
= ADDR_UNSET
,
1039 .radio_addr
= ADDR_UNSET
,
1041 .type
= CX88_VMUX_COMPOSITE1
,
1043 .gpio0
= 0x000027df,
1045 .type
= CX88_VMUX_SVIDEO
,
1047 .gpio0
= 0x000027df,
1051 [CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT
] = {
1052 /* FIXME: Standard video using the cx88 broadcast decoder is
1053 * working, but blackbird isn't working yet, audio is only
1054 * working correctly for television mode. S-Video and Composite
1055 * are working for video-only, so I have them disabled for now.
1057 .name
= "KWorld HardwareMpegTV XPert",
1058 .tuner_type
= TUNER_PHILIPS_TDA8290
,
1059 .radio_type
= UNSET
,
1060 .tuner_addr
= ADDR_UNSET
,
1061 .radio_addr
= ADDR_UNSET
,
1063 .type
= CX88_VMUX_TELEVISION
,
1074 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID
] = {
1075 .name
= "DViCO FusionHDTV DVB-T Hybrid",
1076 .tuner_type
= TUNER_THOMSON_FE6600
,
1077 .radio_type
= UNSET
,
1078 .tuner_addr
= ADDR_UNSET
,
1079 .radio_addr
= ADDR_UNSET
,
1081 .type
= CX88_VMUX_TELEVISION
,
1083 .gpio0
= 0x0000a75f,
1085 .type
= CX88_VMUX_COMPOSITE1
,
1087 .gpio0
= 0x0000a75b,
1089 .type
= CX88_VMUX_SVIDEO
,
1091 .gpio0
= 0x0000a75b,
1097 const unsigned int cx88_bcount
= ARRAY_SIZE(cx88_boards
);
1099 /* ------------------------------------------------------------------ */
1100 /* PCI subsystem IDs */
1102 struct cx88_subid cx88_subids
[] = {
1104 .subvendor
= 0x0070,
1105 .subdevice
= 0x3400,
1106 .card
= CX88_BOARD_HAUPPAUGE
,
1108 .subvendor
= 0x0070,
1109 .subdevice
= 0x3401,
1110 .card
= CX88_BOARD_HAUPPAUGE
,
1112 .subvendor
= 0x14c7,
1113 .subdevice
= 0x0106,
1114 .card
= CX88_BOARD_GDI
,
1116 .subvendor
= 0x14c7,
1117 .subdevice
= 0x0107, /* with mpeg encoder */
1118 .card
= CX88_BOARD_GDI
,
1120 .subvendor
= PCI_VENDOR_ID_ATI
,
1121 .subdevice
= 0x00f8,
1122 .card
= CX88_BOARD_ATI_WONDER_PRO
,
1124 .subvendor
= 0x107d,
1125 .subdevice
= 0x6611,
1126 .card
= CX88_BOARD_WINFAST2000XP_EXPERT
,
1128 .subvendor
= 0x107d,
1129 .subdevice
= 0x6613, /* NTSC */
1130 .card
= CX88_BOARD_WINFAST2000XP_EXPERT
,
1132 .subvendor
= 0x107d,
1133 .subdevice
= 0x6620,
1134 .card
= CX88_BOARD_WINFAST_DV2000
,
1136 .subvendor
= 0x107d,
1137 .subdevice
= 0x663b,
1138 .card
= CX88_BOARD_LEADTEK_PVR2000
,
1140 .subvendor
= 0x107d,
1141 .subdevice
= 0x663C,
1142 .card
= CX88_BOARD_LEADTEK_PVR2000
,
1144 .subvendor
= 0x1461,
1145 .subdevice
= 0x000b,
1146 .card
= CX88_BOARD_AVERTV_STUDIO_303
,
1148 .subvendor
= 0x1462,
1149 .subdevice
= 0x8606,
1150 .card
= CX88_BOARD_MSI_TVANYWHERE_MASTER
,
1152 .subvendor
= 0x10fc,
1153 .subdevice
= 0xd003,
1154 .card
= CX88_BOARD_IODATA_GVVCP3PCI
,
1156 .subvendor
= 0x1043,
1157 .subdevice
= 0x4823, /* with mpeg encoder */
1158 .card
= CX88_BOARD_ASUS_PVR_416
,
1160 .subvendor
= 0x17de,
1161 .subdevice
= 0x08a6,
1162 .card
= CX88_BOARD_KWORLD_DVB_T
,
1164 .subvendor
= 0x18ac,
1165 .subdevice
= 0xd810,
1166 .card
= CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q
,
1168 .subvendor
= 0x18ac,
1169 .subdevice
= 0xd820,
1170 .card
= CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T
,
1172 .subvendor
= 0x18ac,
1173 .subdevice
= 0xdb00,
1174 .card
= CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1
,
1176 .subvendor
= 0x0070,
1177 .subdevice
= 0x9002,
1178 .card
= CX88_BOARD_HAUPPAUGE_DVB_T1
,
1180 .subvendor
= 0x14f1,
1181 .subdevice
= 0x0187,
1182 .card
= CX88_BOARD_CONEXANT_DVB_T1
,
1184 .subvendor
= 0x1540,
1185 .subdevice
= 0x2580,
1186 .card
= CX88_BOARD_PROVIDEO_PV259
,
1188 .subvendor
= 0x18ac,
1189 .subdevice
= 0xdb10,
1190 .card
= CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS
,
1192 .subvendor
= 0x1554,
1193 .subdevice
= 0x4811,
1194 .card
= CX88_BOARD_PIXELVIEW
,
1196 .subvendor
= 0x7063,
1197 .subdevice
= 0x3000, /* HD-3000 card */
1198 .card
= CX88_BOARD_PCHDTV_HD3000
,
1200 .subvendor
= 0x17de,
1201 .subdevice
= 0xa8a6,
1202 .card
= CX88_BOARD_DNTV_LIVE_DVB_T
,
1204 .subvendor
= 0x0070,
1205 .subdevice
= 0x2801,
1206 .card
= CX88_BOARD_HAUPPAUGE_ROSLYN
,
1208 .subvendor
= 0x14f1,
1209 .subdevice
= 0x0342,
1210 .card
= CX88_BOARD_DIGITALLOGIC_MEC
,
1212 .subvendor
= 0x10fc,
1213 .subdevice
= 0xd035,
1214 .card
= CX88_BOARD_IODATA_GVBCTV7E
,
1216 .subvendor
= 0x1421,
1217 .subdevice
= 0x0334,
1218 .card
= CX88_BOARD_ADSTECH_DVB_T_PCI
,
1220 .subvendor
= 0x153b,
1221 .subdevice
= 0x1166,
1222 .card
= CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1
,
1224 .subvendor
= 0x18ac,
1225 .subdevice
= 0xd500,
1226 .card
= CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD
,
1228 .subvendor
= 0x1461,
1229 .subdevice
= 0x8011,
1230 .card
= CX88_BOARD_AVERMEDIA_ULTRATV_MC_550
,
1232 .subvendor
= PCI_VENDOR_ID_ATI
,
1233 .subdevice
= 0xa101,
1234 .card
= CX88_BOARD_ATI_HDTVWONDER
,
1236 .subvendor
= 0x107d,
1237 .subdevice
= 0x665f,
1238 .card
= CX88_BOARD_WINFAST_DTV1000
,
1240 .subvendor
= 0x1461,
1241 .subdevice
= 0x000a,
1242 .card
= CX88_BOARD_AVERTV_303
,
1244 .subvendor
= 0x0070,
1245 .subdevice
= 0x9200,
1246 .card
= CX88_BOARD_HAUPPAUGE_NOVASE2_S1
,
1248 .subvendor
= 0x0070,
1249 .subdevice
= 0x9201,
1250 .card
= CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1
,
1252 .subvendor
= 0x0070,
1253 .subdevice
= 0x9202,
1254 .card
= CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1
,
1256 .subvendor
= 0x17de,
1257 .subdevice
= 0x08b2,
1258 .card
= CX88_BOARD_KWORLD_DVBS_100
,
1260 .subvendor
= 0x0070,
1261 .subdevice
= 0x9400,
1262 .card
= CX88_BOARD_HAUPPAUGE_HVR1100
,
1264 .subvendor
= 0x0070,
1265 .subdevice
= 0x9402,
1266 .card
= CX88_BOARD_HAUPPAUGE_HVR1100
,
1268 .subvendor
= 0x0070,
1269 .subdevice
= 0x9800,
1270 .card
= CX88_BOARD_HAUPPAUGE_HVR1100LP
,
1272 .subvendor
= 0x0070,
1273 .subdevice
= 0x9802,
1274 .card
= CX88_BOARD_HAUPPAUGE_HVR1100LP
,
1276 .subvendor
= 0x0070,
1277 .subdevice
= 0x9001,
1278 .card
= CX88_BOARD_HAUPPAUGE_DVB_T1
,
1280 .subvendor
= 0x1822,
1281 .subdevice
= 0x0025,
1282 .card
= CX88_BOARD_DNTV_LIVE_DVB_T_PRO
,
1284 .subvendor
= 0x17de,
1285 .subdevice
= 0x08a1,
1286 .card
= CX88_BOARD_KWORLD_DVB_T_CX22702
,
1288 .subvendor
= 0x18ac,
1289 .subdevice
= 0xdb50,
1290 .card
= CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL
,
1292 .subvendor
= 0x18ac,
1293 .subdevice
= 0xdb54,
1294 .card
= CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL
,
1295 /* Re-branded DViCO: DigitalNow DVB-T Dual */
1297 .subvendor
= 0x18ac,
1298 .subdevice
= 0xdb11,
1299 .card
= CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS
,
1300 /* Re-branded DViCO: UltraView DVB-T Plus */
1302 .subvendor
= 0x17de,
1303 .subdevice
= 0x0840,
1304 .card
= CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT
,
1306 .subvendor
= 0x18ac,
1307 .subdevice
= 0xdb40,
1308 .card
= CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID
,
1310 .subvendor
= 0x18ac,
1311 .subdevice
= 0xdb44,
1312 .card
= CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID
,
1315 const unsigned int cx88_idcount
= ARRAY_SIZE(cx88_subids
);
1317 /* ----------------------------------------------------------------------- */
1318 /* some leadtek specific stuff */
1320 static void __devinit
leadtek_eeprom(struct cx88_core
*core
, u8
*eeprom_data
)
1322 /* This is just for the "Winfast 2000XP Expert" board ATM; I don't have data on
1325 * Byte 0 is 1 on the NTSC board.
1328 if (eeprom_data
[4] != 0x7d ||
1329 eeprom_data
[5] != 0x10 ||
1330 eeprom_data
[7] != 0x66) {
1331 printk(KERN_WARNING
"%s: Leadtek eeprom invalid.\n",
1336 core
->has_radio
= 1;
1337 core
->tuner_type
= (eeprom_data
[6] == 0x13) ? 43 : 38;
1339 printk(KERN_INFO
"%s: Leadtek Winfast 2000XP Expert config: "
1340 "tuner=%d, eeprom[0]=0x%02x\n",
1341 core
->name
, core
->tuner_type
, eeprom_data
[0]);
1344 static void hauppauge_eeprom(struct cx88_core
*core
, u8
*eeprom_data
)
1348 tveeprom_hauppauge_analog(&core
->i2c_client
, &tv
, eeprom_data
);
1349 core
->tuner_type
= tv
.tuner_type
;
1350 core
->tuner_formats
= tv
.tuner_formats
;
1351 core
->has_radio
= tv
.has_radio
;
1353 /* Make sure we support the board model */
1356 case 28552: /* WinTV-PVR 'Roslyn' (No IR) */
1357 case 34519: /* WinTV-PCI-FM */
1358 case 90002: /* Nova-T-PCI (9002) */
1359 case 92001: /* Nova-S-Plus (Video and IR) */
1360 case 92002: /* Nova-S-Plus (Video and IR) */
1361 case 90003: /* Nova-T-PCI (9002 No RF out) */
1362 case 90500: /* Nova-T-PCI (oem) */
1363 case 90501: /* Nova-T-PCI (oem/IR) */
1364 case 92000: /* Nova-SE2 (OEM, No Video or IR) */
1365 case 94009: /* WinTV-HVR1100 (Video and IR Retail) */
1366 case 94501: /* WinTV-HVR1100 (Video and IR OEM) */
1367 case 98559: /* WinTV-HVR1100LP (Video no IR, Retail - Low Profile) */
1371 printk("%s: warning: unknown hauppauge model #%d\n",
1372 core
->name
, tv
.model
);
1376 printk(KERN_INFO
"%s: hauppauge eeprom: model=%d\n",
1377 core
->name
, tv
.model
);
1380 /* ----------------------------------------------------------------------- */
1381 /* some GDI (was: Modular Technology) specific stuff */
1388 [ 0x01 ] = { .id
= TUNER_ABSENT
,
1390 [ 0x02 ] = { .id
= TUNER_ABSENT
,
1392 [ 0x03 ] = { .id
= TUNER_ABSENT
,
1394 [ 0x04 ] = { .id
= TUNER_ABSENT
,
1396 [ 0x05 ] = { .id
= TUNER_ABSENT
,
1399 [ 0x10 ] = { .id
= TUNER_ABSENT
,
1401 .name
= "TEMIC_4049" },
1402 [ 0x11 ] = { .id
= TUNER_TEMIC_4136FY5
,
1403 .name
= "TEMIC_4136" },
1404 [ 0x12 ] = { .id
= TUNER_ABSENT
,
1405 .name
= "TEMIC_4146" },
1407 [ 0x20 ] = { .id
= TUNER_PHILIPS_FQ1216ME
,
1409 .name
= "PHILIPS_FQ1216_MK3" },
1410 [ 0x21 ] = { .id
= TUNER_ABSENT
, .fm
= 1,
1411 .name
= "PHILIPS_FQ1236_MK3" },
1412 [ 0x22 ] = { .id
= TUNER_ABSENT
,
1413 .name
= "PHILIPS_FI1236_MK3" },
1414 [ 0x23 ] = { .id
= TUNER_ABSENT
,
1415 .name
= "PHILIPS_FI1216_MK3" },
1418 static void gdi_eeprom(struct cx88_core
*core
, u8
*eeprom_data
)
1420 char *name
= (eeprom_data
[0x0d] < ARRAY_SIZE(gdi_tuner
))
1421 ? gdi_tuner
[eeprom_data
[0x0d]].name
: NULL
;
1423 printk(KERN_INFO
"%s: GDI: tuner=%s\n", core
->name
,
1424 name
? name
: "unknown");
1427 core
->tuner_type
= gdi_tuner
[eeprom_data
[0x0d]].id
;
1428 core
->has_radio
= gdi_tuner
[eeprom_data
[0x0d]].fm
;
1431 /* ----------------------------------------------------------------------- */
1432 /* some DViCO specific stuff */
1434 static void dvico_fusionhdtv_hybrid_init(struct cx88_core
*core
)
1436 struct i2c_msg msg
= { .addr
= 0x45, .flags
= 0 };
1438 static u8 init_bufs
[13][5] = {
1439 { 0x10, 0x00, 0x20, 0x01, 0x03 },
1440 { 0x10, 0x10, 0x01, 0x00, 0x21 },
1441 { 0x10, 0x10, 0x10, 0x00, 0xCA },
1442 { 0x10, 0x10, 0x12, 0x00, 0x08 },
1443 { 0x10, 0x10, 0x13, 0x00, 0x0A },
1444 { 0x10, 0x10, 0x16, 0x01, 0xC0 },
1445 { 0x10, 0x10, 0x22, 0x01, 0x3D },
1446 { 0x10, 0x10, 0x73, 0x01, 0x2E },
1447 { 0x10, 0x10, 0x72, 0x00, 0xC5 },
1448 { 0x10, 0x10, 0x71, 0x01, 0x97 },
1449 { 0x10, 0x10, 0x70, 0x00, 0x0F },
1450 { 0x10, 0x10, 0xB0, 0x00, 0x01 },
1454 for (i
= 0; i
< 13; i
++) {
1455 msg
.buf
= init_bufs
[i
];
1456 msg
.len
= (i
!= 12 ? 5 : 2);
1457 err
= i2c_transfer(&core
->i2c_adap
, &msg
, 1);
1459 printk("dvico_fusionhdtv_hybrid_init buf %d failed (err = %d)!\n", i
, err
);
1465 /* ----------------------------------------------------------------------- */
1467 void cx88_card_list(struct cx88_core
*core
, struct pci_dev
*pci
)
1471 if (0 == pci
->subsystem_vendor
&&
1472 0 == pci
->subsystem_device
) {
1473 printk("%s: Your board has no valid PCI Subsystem ID and thus can't\n"
1474 "%s: be autodetected. Please pass card=<n> insmod option to\n"
1475 "%s: workaround that. Redirect complaints to the vendor of\n"
1476 "%s: the TV card. Best regards,\n"
1478 core
->name
,core
->name
,core
->name
,core
->name
,core
->name
);
1480 printk("%s: Your board isn't known (yet) to the driver. You can\n"
1481 "%s: try to pick one of the existing card configs via\n"
1482 "%s: card=<n> insmod option. Updating to the latest\n"
1483 "%s: version might help as well.\n",
1484 core
->name
,core
->name
,core
->name
,core
->name
);
1486 printk("%s: Here is a list of valid choices for the card=<n> insmod option:\n",
1488 for (i
= 0; i
< cx88_bcount
; i
++)
1489 printk("%s: card=%d -> %s\n",
1490 core
->name
, i
, cx88_boards
[i
].name
);
1493 void cx88_card_setup(struct cx88_core
*core
)
1495 static u8 eeprom
[256];
1497 if (0 == core
->i2c_rc
) {
1498 core
->i2c_client
.addr
= 0xa0 >> 1;
1499 tveeprom_read(&core
->i2c_client
,eeprom
,sizeof(eeprom
));
1502 switch (core
->board
) {
1503 case CX88_BOARD_HAUPPAUGE
:
1504 case CX88_BOARD_HAUPPAUGE_ROSLYN
:
1505 if (0 == core
->i2c_rc
)
1506 hauppauge_eeprom(core
,eeprom
+8);
1508 case CX88_BOARD_GDI
:
1509 if (0 == core
->i2c_rc
)
1510 gdi_eeprom(core
,eeprom
);
1512 case CX88_BOARD_WINFAST2000XP_EXPERT
:
1513 if (0 == core
->i2c_rc
)
1514 leadtek_eeprom(core
,eeprom
);
1516 case CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1
:
1517 case CX88_BOARD_HAUPPAUGE_NOVASE2_S1
:
1518 case CX88_BOARD_HAUPPAUGE_DVB_T1
:
1519 case CX88_BOARD_HAUPPAUGE_HVR1100
:
1520 case CX88_BOARD_HAUPPAUGE_HVR1100LP
:
1521 if (0 == core
->i2c_rc
)
1522 hauppauge_eeprom(core
,eeprom
);
1524 case CX88_BOARD_KWORLD_DVBS_100
:
1525 cx_write(MO_GP0_IO
, 0x000007f8);
1526 cx_write(MO_GP1_IO
, 0x00000001);
1528 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1
:
1529 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS
:
1530 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL
:
1531 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID
:
1532 /* GPIO0:0 is hooked to mt352 reset pin */
1533 cx_set(MO_GP0_IO
, 0x00000101);
1534 cx_clear(MO_GP0_IO
, 0x00000001);
1536 cx_set(MO_GP0_IO
, 0x00000101);
1537 if (0 == core
->i2c_rc
&&
1538 core
->board
== CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID
)
1539 dvico_fusionhdtv_hybrid_init(core
);
1541 case CX88_BOARD_KWORLD_DVB_T
:
1542 case CX88_BOARD_DNTV_LIVE_DVB_T
:
1543 cx_set(MO_GP0_IO
, 0x00000707);
1544 cx_set(MO_GP2_IO
, 0x00000101);
1545 cx_clear(MO_GP2_IO
, 0x00000001);
1547 cx_clear(MO_GP0_IO
, 0x00000007);
1548 cx_set(MO_GP2_IO
, 0x00000101);
1550 case CX88_BOARD_DNTV_LIVE_DVB_T_PRO
:
1551 cx_write(MO_GP0_IO
, 0x00080808);
1553 case CX88_BOARD_ATI_HDTVWONDER
:
1554 if (0 == core
->i2c_rc
) {
1557 static const u8 buffer
[] = { 0x10,0x12,0x13,0x04,0x16,0x00,0x14,0x04,0x017,0x00 };
1558 core
->i2c_client
.addr
= 0x0a;
1560 for (i
= 0; i
< 5; i
++)
1561 if (2 != i2c_master_send(&core
->i2c_client
,&buffer
[i
*2],2))
1562 printk(KERN_WARNING
"%s: Unable to enable tuner(%i).\n",
1567 if (cx88_boards
[core
->board
].radio
.type
== CX88_RADIO
)
1568 core
->has_radio
= 1;
1571 /* ------------------------------------------------------------------ */
1573 EXPORT_SYMBOL(cx88_boards
);
1574 EXPORT_SYMBOL(cx88_bcount
);
1575 EXPORT_SYMBOL(cx88_subids
);
1576 EXPORT_SYMBOL(cx88_idcount
);
1577 EXPORT_SYMBOL(cx88_card_list
);
1578 EXPORT_SYMBOL(cx88_card_setup
);
1584 * kate: eol "unix"; indent-width 3; remove-trailing-space on; replace-trailing-space-save on; tab-width 8; replace-tabs off; space-indent off; mixed-indent off