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_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
,
571 .type
= CX88_VMUX_TELEVISION
,
578 .type
= CX88_VMUX_COMPOSITE1
,
585 .type
= CX88_VMUX_SVIDEO
,
602 [CX88_BOARD_HAUPPAUGE_ROSLYN
] = {
603 // entry added by Kaustubh D. Bhalerao <bhalerao.1@osu.edu>
604 // GPIO values obtained from regspy, courtesy Sean Covel
605 .name
= "Hauppauge WinTV 28xxx (Roslyn) models",
608 .tuner_addr
= ADDR_UNSET
,
609 .radio_addr
= ADDR_UNSET
,
611 .type
= CX88_VMUX_TELEVISION
,
613 .gpio0
= 0xed12, /* internal decoder */
616 .type
= CX88_VMUX_DEBUG
,
618 .gpio0
= 0xff01, /* mono from tuner chip */
620 .type
= CX88_VMUX_COMPOSITE1
,
624 .type
= CX88_VMUX_SVIDEO
,
636 [CX88_BOARD_DIGITALLOGIC_MEC
] = {
637 .name
= "Digital-Logic MICROSPACE Entertainment Center (MEC)",
638 .tuner_type
= TUNER_PHILIPS_FM1216ME_MK3
,
640 .tuner_addr
= ADDR_UNSET
,
641 .radio_addr
= ADDR_UNSET
,
642 .tda9887_conf
= TDA9887_PRESENT
,
644 .type
= CX88_VMUX_TELEVISION
,
648 .type
= CX88_VMUX_COMPOSITE1
,
652 .type
= CX88_VMUX_SVIDEO
,
662 [CX88_BOARD_IODATA_GVBCTV7E
] = {
663 .name
= "IODATA GV/BCTV7E",
664 .tuner_type
= TUNER_PHILIPS_FQ1286
,
666 .tuner_addr
= ADDR_UNSET
,
667 .radio_addr
= ADDR_UNSET
,
668 .tda9887_conf
= TDA9887_PRESENT
,
670 .type
= CX88_VMUX_TELEVISION
,
674 .type
= CX88_VMUX_COMPOSITE1
,
678 .type
= CX88_VMUX_SVIDEO
,
683 [CX88_BOARD_PIXELVIEW_PLAYTV_ULTRA_PRO
] = {
684 .name
= "PixelView PlayTV Ultra Pro (Stereo)",
685 /* May be also TUNER_YMEC_TVF_5533MF for NTSC/M or PAL/M */
686 .tuner_type
= TUNER_PHILIPS_FM1216ME_MK3
,
688 .tuner_addr
= ADDR_UNSET
,
689 .radio_addr
= ADDR_UNSET
,
691 .type
= CX88_VMUX_TELEVISION
,
693 .gpio0
= 0xbf61, /* internal decoder */
695 .type
= CX88_VMUX_COMPOSITE1
,
699 .type
= CX88_VMUX_SVIDEO
,
708 [CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T
] = {
709 .name
= "DViCO FusionHDTV 3 Gold-T",
710 .tuner_type
= TUNER_THOMSON_DTT7611
,
712 .tuner_addr
= ADDR_UNSET
,
713 .radio_addr
= ADDR_UNSET
,
715 .type
= CX88_VMUX_TELEVISION
,
719 .type
= CX88_VMUX_COMPOSITE1
,
723 .type
= CX88_VMUX_SVIDEO
,
729 [CX88_BOARD_ADSTECH_DVB_T_PCI
] = {
730 .name
= "ADS Tech Instant TV DVB-T PCI",
731 .tuner_type
= TUNER_ABSENT
,
733 .tuner_addr
= ADDR_UNSET
,
734 .radio_addr
= ADDR_UNSET
,
736 .type
= CX88_VMUX_COMPOSITE1
,
741 .type
= CX88_VMUX_SVIDEO
,
748 [CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1
] = {
749 .name
= "TerraTec Cinergy 1400 DVB-T",
750 .tuner_type
= TUNER_ABSENT
,
752 .type
= CX88_VMUX_DVB
,
757 [CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD
] = {
758 .name
= "DViCO FusionHDTV 5 Gold",
759 .tuner_type
= TUNER_LG_TDVS_H062F
,
761 .tuner_addr
= ADDR_UNSET
,
762 .radio_addr
= ADDR_UNSET
,
763 .tda9887_conf
= TDA9887_PRESENT
,
765 .type
= CX88_VMUX_TELEVISION
,
769 .type
= CX88_VMUX_COMPOSITE1
,
773 .type
= CX88_VMUX_SVIDEO
,
779 [CX88_BOARD_AVERMEDIA_ULTRATV_MC_550
] = {
780 .name
= "AverMedia UltraTV Media Center PCI 550",
781 .tuner_type
= TUNER_PHILIPS_FM1236_MK3
,
783 .tuner_addr
= ADDR_UNSET
,
784 .radio_addr
= ADDR_UNSET
,
785 .tda9887_conf
= TDA9887_PRESENT
,
788 .type
= CX88_VMUX_COMPOSITE1
,
792 .type
= CX88_VMUX_SVIDEO
,
796 .type
= CX88_VMUX_TELEVISION
,
806 [CX88_BOARD_KWORLD_VSTREAM_EXPERT_DVD
] = {
807 /* Alexander Wold <awold@bigfoot.com> */
808 .name
= "Kworld V-Stream Xpert DVD",
811 .type
= CX88_VMUX_COMPOSITE1
,
818 .type
= CX88_VMUX_SVIDEO
,
826 [CX88_BOARD_ATI_HDTVWONDER
] = {
827 .name
= "ATI HDTV Wonder",
828 .tuner_type
= TUNER_PHILIPS_TUV1236D
,
830 .tuner_addr
= ADDR_UNSET
,
831 .radio_addr
= ADDR_UNSET
,
833 .type
= CX88_VMUX_TELEVISION
,
840 .type
= CX88_VMUX_COMPOSITE1
,
847 .type
= CX88_VMUX_SVIDEO
,
855 [CX88_BOARD_WINFAST_DTV1000
] = {
856 .name
= "WinFast DTV1000-T",
857 .tuner_type
= TUNER_ABSENT
,
859 .tuner_addr
= ADDR_UNSET
,
860 .radio_addr
= ADDR_UNSET
,
862 .type
= CX88_VMUX_DVB
,
868 const unsigned int cx88_bcount
= ARRAY_SIZE(cx88_boards
);
870 /* ------------------------------------------------------------------ */
871 /* PCI subsystem IDs */
873 struct cx88_subid cx88_subids
[] = {
877 .card
= CX88_BOARD_HAUPPAUGE
,
881 .card
= CX88_BOARD_HAUPPAUGE
,
885 .card
= CX88_BOARD_GDI
,
888 .subdevice
= 0x0107, /* with mpeg encoder */
889 .card
= CX88_BOARD_GDI
,
891 .subvendor
= PCI_VENDOR_ID_ATI
,
893 .card
= CX88_BOARD_ATI_WONDER_PRO
,
897 .card
= CX88_BOARD_WINFAST2000XP_EXPERT
,
900 .subdevice
= 0x6613, /* NTSC */
901 .card
= CX88_BOARD_WINFAST2000XP_EXPERT
,
905 .card
= CX88_BOARD_WINFAST_DV2000
,
909 .card
= CX88_BOARD_LEADTEK_PVR2000
,
913 .card
= CX88_BOARD_LEADTEK_PVR2000
,
917 .card
= CX88_BOARD_AVERTV_303
,
921 .card
= CX88_BOARD_MSI_TVANYWHERE_MASTER
,
925 .card
= CX88_BOARD_IODATA_GVVCP3PCI
,
928 .subdevice
= 0x4823, /* with mpeg encoder */
929 .card
= CX88_BOARD_ASUS_PVR_416
,
933 .card
= CX88_BOARD_KWORLD_DVB_T
,
937 .card
= CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q
,
941 .card
= CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T
,
945 .card
= CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1
,
949 .card
= CX88_BOARD_HAUPPAUGE_DVB_T1
,
953 .card
= CX88_BOARD_CONEXANT_DVB_T1
,
957 .card
= CX88_BOARD_PROVIDEO_PV259
,
961 .card
= CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS
,
965 .card
= CX88_BOARD_PIXELVIEW
,
968 .subdevice
= 0x3000, /* HD-3000 card */
969 .card
= CX88_BOARD_PCHDTV_HD3000
,
973 .card
= CX88_BOARD_DNTV_LIVE_DVB_T
,
977 .card
= CX88_BOARD_HAUPPAUGE_ROSLYN
,
981 .card
= CX88_BOARD_DIGITALLOGIC_MEC
,
985 .card
= CX88_BOARD_IODATA_GVBCTV7E
,
989 .card
= CX88_BOARD_ADSTECH_DVB_T_PCI
,
993 .card
= CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1
,
997 .card
= CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD
,
1000 .subdevice
= 0x8011,
1001 .card
= CX88_BOARD_AVERMEDIA_ULTRATV_MC_550
,
1003 .subvendor
= PCI_VENDOR_ID_ATI
,
1004 .subdevice
= 0xa101,
1005 .card
= CX88_BOARD_ATI_HDTVWONDER
,
1007 .subvendor
= 0x107d,
1008 .subdevice
= 0x665f,
1009 .card
= CX88_BOARD_WINFAST_DTV1000
,
1012 const unsigned int cx88_idcount
= ARRAY_SIZE(cx88_subids
);
1014 /* ----------------------------------------------------------------------- */
1015 /* some leadtek specific stuff */
1017 static void __devinit
leadtek_eeprom(struct cx88_core
*core
, u8
*eeprom_data
)
1019 /* This is just for the "Winfast 2000XP Expert" board ATM; I don't have data on
1022 * Byte 0 is 1 on the NTSC board.
1025 if (eeprom_data
[4] != 0x7d ||
1026 eeprom_data
[5] != 0x10 ||
1027 eeprom_data
[7] != 0x66) {
1028 printk(KERN_WARNING
"%s: Leadtek eeprom invalid.\n",
1033 core
->has_radio
= 1;
1034 core
->tuner_type
= (eeprom_data
[6] == 0x13) ? 43 : 38;
1036 printk(KERN_INFO
"%s: Leadtek Winfast 2000XP Expert config: "
1037 "tuner=%d, eeprom[0]=0x%02x\n",
1038 core
->name
, core
->tuner_type
, eeprom_data
[0]);
1042 /* ----------------------------------------------------------------------- */
1044 static void hauppauge_eeprom(struct cx88_core
*core
, u8
*eeprom_data
)
1048 tveeprom_hauppauge_analog(&core
->i2c_client
, &tv
, eeprom_data
);
1049 core
->tuner_type
= tv
.tuner_type
;
1050 core
->has_radio
= tv
.has_radio
;
1053 static int hauppauge_eeprom_dvb(struct cx88_core
*core
, u8
*ee
)
1058 /* Make sure we support the board model */
1059 model
= ee
[0x1f] << 24 | ee
[0x1e] << 16 | ee
[0x1d] << 8 | ee
[0x1c];
1067 printk("%s: warning: unknown hauppauge model #%d\n",
1072 /* Make sure we support the tuner */
1075 case 0x4B: /* dtt 7595 */
1076 case 0x4C: /* dtt 7592 */
1079 printk("%s: error: unknown hauppauge tuner 0x%02x\n",
1083 printk(KERN_INFO
"%s: hauppauge eeprom: model=%d, tuner=%d\n",
1084 core
->name
, model
, tuner
);
1088 /* ----------------------------------------------------------------------- */
1089 /* some GDI (was: Modular Technology) specific stuff */
1096 [ 0x01 ] = { .id
= TUNER_ABSENT
,
1098 [ 0x02 ] = { .id
= TUNER_ABSENT
,
1100 [ 0x03 ] = { .id
= TUNER_ABSENT
,
1102 [ 0x04 ] = { .id
= TUNER_ABSENT
,
1104 [ 0x05 ] = { .id
= TUNER_ABSENT
,
1107 [ 0x10 ] = { .id
= TUNER_ABSENT
,
1109 .name
= "TEMIC_4049" },
1110 [ 0x11 ] = { .id
= TUNER_TEMIC_4136FY5
,
1111 .name
= "TEMIC_4136" },
1112 [ 0x12 ] = { .id
= TUNER_ABSENT
,
1113 .name
= "TEMIC_4146" },
1115 [ 0x20 ] = { .id
= TUNER_PHILIPS_FQ1216ME
,
1117 .name
= "PHILIPS_FQ1216_MK3" },
1118 [ 0x21 ] = { .id
= TUNER_ABSENT
, .fm
= 1,
1119 .name
= "PHILIPS_FQ1236_MK3" },
1120 [ 0x22 ] = { .id
= TUNER_ABSENT
,
1121 .name
= "PHILIPS_FI1236_MK3" },
1122 [ 0x23 ] = { .id
= TUNER_ABSENT
,
1123 .name
= "PHILIPS_FI1216_MK3" },
1126 static void gdi_eeprom(struct cx88_core
*core
, u8
*eeprom_data
)
1128 char *name
= (eeprom_data
[0x0d] < ARRAY_SIZE(gdi_tuner
))
1129 ? gdi_tuner
[eeprom_data
[0x0d]].name
: NULL
;
1131 printk(KERN_INFO
"%s: GDI: tuner=%s\n", core
->name
,
1132 name
? name
: "unknown");
1135 core
->tuner_type
= gdi_tuner
[eeprom_data
[0x0d]].id
;
1136 core
->has_radio
= gdi_tuner
[eeprom_data
[0x0d]].fm
;
1139 /* ----------------------------------------------------------------------- */
1141 void cx88_card_list(struct cx88_core
*core
, struct pci_dev
*pci
)
1145 if (0 == pci
->subsystem_vendor
&&
1146 0 == pci
->subsystem_device
) {
1147 printk("%s: Your board has no valid PCI Subsystem ID and thus can't\n"
1148 "%s: be autodetected. Please pass card=<n> insmod option to\n"
1149 "%s: workaround that. Redirect complaints to the vendor of\n"
1150 "%s: the TV card. Best regards,\n"
1152 core
->name
,core
->name
,core
->name
,core
->name
,core
->name
);
1154 printk("%s: Your board isn't known (yet) to the driver. You can\n"
1155 "%s: try to pick one of the existing card configs via\n"
1156 "%s: card=<n> insmod option. Updating to the latest\n"
1157 "%s: version might help as well.\n",
1158 core
->name
,core
->name
,core
->name
,core
->name
);
1160 printk("%s: Here is a list of valid choices for the card=<n> insmod option:\n",
1162 for (i
= 0; i
< cx88_bcount
; i
++)
1163 printk("%s: card=%d -> %s\n",
1164 core
->name
, i
, cx88_boards
[i
].name
);
1167 void cx88_card_setup(struct cx88_core
*core
)
1169 static u8 eeprom
[128];
1171 if (0 == core
->i2c_rc
) {
1172 core
->i2c_client
.addr
= 0xa0 >> 1;
1173 tveeprom_read(&core
->i2c_client
,eeprom
,sizeof(eeprom
));
1176 switch (core
->board
) {
1177 case CX88_BOARD_HAUPPAUGE
:
1178 case CX88_BOARD_HAUPPAUGE_ROSLYN
:
1179 if (0 == core
->i2c_rc
)
1180 hauppauge_eeprom(core
,eeprom
+8);
1182 case CX88_BOARD_GDI
:
1183 if (0 == core
->i2c_rc
)
1184 gdi_eeprom(core
,eeprom
);
1186 case CX88_BOARD_WINFAST2000XP_EXPERT
:
1187 if (0 == core
->i2c_rc
)
1188 leadtek_eeprom(core
,eeprom
);
1190 case CX88_BOARD_HAUPPAUGE_DVB_T1
:
1191 if (0 == core
->i2c_rc
)
1192 hauppauge_eeprom_dvb(core
,eeprom
);
1194 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1
:
1195 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS
:
1196 /* GPIO0:0 is hooked to mt352 reset pin */
1197 cx_set(MO_GP0_IO
, 0x00000101);
1198 cx_clear(MO_GP0_IO
, 0x00000001);
1200 cx_set(MO_GP0_IO
, 0x00000101);
1202 case CX88_BOARD_KWORLD_DVB_T
:
1203 case CX88_BOARD_DNTV_LIVE_DVB_T
:
1204 cx_set(MO_GP0_IO
, 0x00000707);
1205 cx_set(MO_GP2_IO
, 0x00000101);
1206 cx_clear(MO_GP2_IO
, 0x00000001);
1208 cx_clear(MO_GP0_IO
, 0x00000007);
1209 cx_set(MO_GP2_IO
, 0x00000101);
1211 case CX88_BOARD_ATI_HDTVWONDER
:
1212 if (0 == core
->i2c_rc
) {
1216 core
->i2c_client
.addr
= 0x0a;
1217 buffer
[0] = 0x10; buffer
[1] = 0x12; buffer
[2] = 0x13; buffer
[3] = 0x04;
1218 buffer
[4] = 0x16; buffer
[5] = 0x00; buffer
[6] = 0x14; buffer
[7] = 0x04;
1219 buffer
[8] = 0x14; buffer
[9] = 0x00; buffer
[10] = 0x17; buffer
[11] = 0x00;
1221 for (i
= 0; i
< 6; i
++)
1222 if (2 != i2c_master_send(&core
->i2c_client
,&buffer
[i
*2],2))
1223 printk(KERN_WARNING
"%s: Unable to enable tuner(%i).\n",
1228 if (cx88_boards
[core
->board
].radio
.type
== CX88_RADIO
)
1229 core
->has_radio
= 1;
1232 /* ------------------------------------------------------------------ */
1234 EXPORT_SYMBOL(cx88_boards
);
1235 EXPORT_SYMBOL(cx88_bcount
);
1236 EXPORT_SYMBOL(cx88_subids
);
1237 EXPORT_SYMBOL(cx88_idcount
);
1238 EXPORT_SYMBOL(cx88_card_list
);
1239 EXPORT_SYMBOL(cx88_card_setup
);
1245 * 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