2 * $Id: cx88-cards.c,v 1.82 2005/06/28 04:33:53 mkrufky Exp $
4 * device driver for Conexant 2388x based TV cards
7 * (c) 2003 Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 #include <linux/init.h>
25 #include <linux/module.h>
26 #include <linux/pci.h>
27 #include <linux/delay.h>
31 /* ------------------------------------------------------------------ */
32 /* board config info */
34 struct cx88_board cx88_boards
[] = {
35 [CX88_BOARD_UNKNOWN
] = {
36 .name
= "UNKNOWN/GENERIC",
39 .tuner_addr
= ADDR_UNSET
,
40 .radio_addr
= ADDR_UNSET
,
42 .type
= CX88_VMUX_COMPOSITE1
,
45 .type
= CX88_VMUX_COMPOSITE2
,
48 .type
= CX88_VMUX_COMPOSITE3
,
51 .type
= CX88_VMUX_COMPOSITE4
,
55 [CX88_BOARD_HAUPPAUGE
] = {
56 .name
= "Hauppauge WinTV 34xxx models",
59 .tuner_addr
= ADDR_UNSET
,
60 .radio_addr
= ADDR_UNSET
,
61 .tda9887_conf
= TDA9887_PRESENT
,
63 .type
= CX88_VMUX_TELEVISION
,
65 .gpio0
= 0xff00, // internal decoder
67 .type
= CX88_VMUX_DEBUG
,
69 .gpio0
= 0xff01, // mono from tuner chip
71 .type
= CX88_VMUX_COMPOSITE1
,
75 .type
= CX88_VMUX_SVIDEO
,
85 .name
= "GDI Black Gold",
88 .tuner_addr
= ADDR_UNSET
,
89 .radio_addr
= ADDR_UNSET
,
91 .type
= CX88_VMUX_TELEVISION
,
95 [CX88_BOARD_PIXELVIEW
] = {
97 .tuner_type
= TUNER_PHILIPS_PAL
,
99 .tuner_addr
= ADDR_UNSET
,
100 .radio_addr
= ADDR_UNSET
,
102 .type
= CX88_VMUX_TELEVISION
,
104 .gpio0
= 0xff00, // internal decoder
106 .type
= CX88_VMUX_COMPOSITE1
,
109 .type
= CX88_VMUX_SVIDEO
,
117 [CX88_BOARD_ATI_WONDER_PRO
] = {
118 .name
= "ATI TV Wonder Pro",
119 .tuner_type
= TUNER_PHILIPS_4IN1
,
121 .tuner_addr
= ADDR_UNSET
,
122 .radio_addr
= ADDR_UNSET
,
123 .tda9887_conf
= TDA9887_PRESENT
| TDA9887_INTERCARRIER
,
125 .type
= CX88_VMUX_TELEVISION
,
129 .type
= CX88_VMUX_COMPOSITE1
,
133 .type
= CX88_VMUX_SVIDEO
,
138 [CX88_BOARD_WINFAST2000XP_EXPERT
] = {
139 .name
= "Leadtek Winfast 2000XP Expert",
140 .tuner_type
= TUNER_PHILIPS_4IN1
,
142 .tuner_addr
= ADDR_UNSET
,
143 .radio_addr
= ADDR_UNSET
,
144 .tda9887_conf
= TDA9887_PRESENT
,
146 .type
= CX88_VMUX_TELEVISION
,
153 .type
= CX88_VMUX_COMPOSITE1
,
160 .type
= CX88_VMUX_SVIDEO
,
175 [CX88_BOARD_AVERTV_303
] = {
176 .name
= "AverTV Studio 303 (M126)",
177 .tuner_type
= TUNER_PHILIPS_FM1216ME_MK3
,
179 .tuner_addr
= ADDR_UNSET
,
180 .radio_addr
= ADDR_UNSET
,
181 .tda9887_conf
= TDA9887_PRESENT
,
183 .type
= CX88_VMUX_TELEVISION
,
187 .type
= CX88_VMUX_COMPOSITE1
,
191 .type
= CX88_VMUX_SVIDEO
,
199 [CX88_BOARD_MSI_TVANYWHERE_MASTER
] = {
200 // added gpio values thanks to Michal
201 // values for PAL from DScaler
202 .name
= "MSI TV-@nywhere Master",
203 .tuner_type
= TUNER_MT2032
,
205 .tuner_addr
= ADDR_UNSET
,
206 .radio_addr
= ADDR_UNSET
,
207 .tda9887_conf
= TDA9887_PRESENT
,
209 .type
= CX88_VMUX_TELEVISION
,
215 .type
= CX88_VMUX_COMPOSITE1
,
221 .type
= CX88_VMUX_SVIDEO
,
231 [CX88_BOARD_WINFAST_DV2000
] = {
232 .name
= "Leadtek Winfast DV2000",
233 .tuner_type
= TUNER_PHILIPS_FM1216ME_MK3
,
235 .tuner_addr
= ADDR_UNSET
,
236 .radio_addr
= ADDR_UNSET
,
237 .tda9887_conf
= TDA9887_PRESENT
,
239 .type
= CX88_VMUX_TELEVISION
,
247 .type
= CX88_VMUX_COMPOSITE1
,
254 .type
= CX88_VMUX_SVIDEO
,
269 [CX88_BOARD_LEADTEK_PVR2000
] = {
270 // gpio values for PAL version from regspy by DScaler
271 .name
= "Leadtek PVR 2000",
272 .tuner_type
= TUNER_PHILIPS_FM1216ME_MK3
,
274 .tuner_addr
= ADDR_UNSET
,
275 .radio_addr
= ADDR_UNSET
,
276 .tda9887_conf
= TDA9887_PRESENT
,
278 .type
= CX88_VMUX_TELEVISION
,
282 .type
= CX88_VMUX_COMPOSITE1
,
286 .type
= CX88_VMUX_SVIDEO
,
296 [CX88_BOARD_IODATA_GVVCP3PCI
] = {
297 .name
= "IODATA GV-VCP3/PCI",
298 .tuner_type
= TUNER_ABSENT
,
300 .tuner_addr
= ADDR_UNSET
,
301 .radio_addr
= ADDR_UNSET
,
303 .type
= CX88_VMUX_COMPOSITE1
,
306 .type
= CX88_VMUX_COMPOSITE2
,
309 .type
= CX88_VMUX_SVIDEO
,
313 [CX88_BOARD_PROLINK_PLAYTVPVR
] = {
314 .name
= "Prolink PlayTV PVR",
315 .tuner_type
= TUNER_PHILIPS_FM1236_MK3
,
317 .tuner_addr
= ADDR_UNSET
,
318 .radio_addr
= ADDR_UNSET
,
319 .tda9887_conf
= TDA9887_PRESENT
,
321 .type
= CX88_VMUX_TELEVISION
,
325 .type
= CX88_VMUX_COMPOSITE1
,
329 .type
= CX88_VMUX_SVIDEO
,
338 [CX88_BOARD_ASUS_PVR_416
] = {
339 .name
= "ASUS PVR-416",
340 .tuner_type
= TUNER_PHILIPS_FM1236_MK3
,
342 .tuner_addr
= ADDR_UNSET
,
343 .radio_addr
= ADDR_UNSET
,
344 .tda9887_conf
= TDA9887_PRESENT
,
346 .type
= CX88_VMUX_TELEVISION
,
350 .type
= CX88_VMUX_SVIDEO
,
352 .gpio0
= 0x0000fde6, // 0x0000fda6 L,R RCA audio in?
360 [CX88_BOARD_MSI_TVANYWHERE
] = {
361 .name
= "MSI TV-@nywhere",
362 .tuner_type
= TUNER_MT2032
,
364 .tuner_addr
= ADDR_UNSET
,
365 .radio_addr
= ADDR_UNSET
,
366 .tda9887_conf
= TDA9887_PRESENT
,
368 .type
= CX88_VMUX_TELEVISION
,
373 .type
= CX88_VMUX_COMPOSITE1
,
378 .type
= CX88_VMUX_SVIDEO
,
384 [CX88_BOARD_KWORLD_DVB_T
] = {
385 .name
= "KWorld/VStream XPert DVB-T",
386 .tuner_type
= TUNER_ABSENT
,
388 .tuner_addr
= ADDR_UNSET
,
389 .radio_addr
= ADDR_UNSET
,
391 .type
= CX88_VMUX_COMPOSITE1
,
396 .type
= CX88_VMUX_SVIDEO
,
403 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1
] = {
404 .name
= "DViCO FusionHDTV DVB-T1",
405 .tuner_type
= TUNER_ABSENT
, /* No analog tuner */
407 .tuner_addr
= ADDR_UNSET
,
408 .radio_addr
= ADDR_UNSET
,
410 .type
= CX88_VMUX_COMPOSITE1
,
414 .type
= CX88_VMUX_SVIDEO
,
420 [CX88_BOARD_KWORLD_LTV883
] = {
421 .name
= "KWorld LTV883RF",
422 .tuner_type
= TUNER_TNF_8831BGFF
,
424 .tuner_addr
= ADDR_UNSET
,
425 .radio_addr
= ADDR_UNSET
,
427 .type
= CX88_VMUX_TELEVISION
,
431 .type
= CX88_VMUX_DEBUG
,
433 .gpio0
= 0x07f9, // mono from tuner chip
435 .type
= CX88_VMUX_COMPOSITE1
,
439 .type
= CX88_VMUX_SVIDEO
,
448 [CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q
] = {
449 .name
= "DViCO FusionHDTV 3 Gold-Q",
450 .tuner_type
= TUNER_MICROTUNE_4042FI5
,
452 .tuner_addr
= ADDR_UNSET
,
453 .radio_addr
= ADDR_UNSET
,
455 GPIO[0] resets DT3302 DTV receiver
458 GPIO[1] mutes analog audio output connector
459 0 - enable selected source
461 GPIO[2] selects source for analog audio output connector
462 0 - analog audio input connector on tab
463 1 - analog DAC output from CX23881 chip
464 GPIO[3] selects RF input connector on tuner module
465 0 - RF connector labeled CABLE
466 1 - RF connector labeled ANT
467 GPIO[4] selects high RF for QAM256 mode
472 .type
= CX88_VMUX_TELEVISION
,
476 .type
= CX88_VMUX_CABLE
,
480 .type
= CX88_VMUX_COMPOSITE1
,
484 .type
= CX88_VMUX_SVIDEO
,
489 [CX88_BOARD_HAUPPAUGE_DVB_T1
] = {
490 .name
= "Hauppauge Nova-T DVB-T",
491 .tuner_type
= TUNER_ABSENT
,
493 .tuner_addr
= ADDR_UNSET
,
494 .radio_addr
= ADDR_UNSET
,
496 .type
= CX88_VMUX_DVB
,
501 [CX88_BOARD_CONEXANT_DVB_T1
] = {
502 .name
= "Conexant DVB-T reference design",
503 .tuner_type
= TUNER_ABSENT
,
505 .tuner_addr
= ADDR_UNSET
,
506 .radio_addr
= ADDR_UNSET
,
508 .type
= CX88_VMUX_DVB
,
513 [CX88_BOARD_PROVIDEO_PV259
] = {
514 .name
= "Provideo PV259",
515 .tuner_type
= TUNER_PHILIPS_FQ1216ME
,
517 .tuner_addr
= ADDR_UNSET
,
518 .radio_addr
= ADDR_UNSET
,
520 .type
= CX88_VMUX_TELEVISION
,
525 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS
] = {
526 .name
= "DViCO FusionHDTV DVB-T Plus",
527 .tuner_type
= TUNER_ABSENT
, /* No analog tuner */
529 .tuner_addr
= ADDR_UNSET
,
530 .radio_addr
= ADDR_UNSET
,
532 .type
= CX88_VMUX_COMPOSITE1
,
536 .type
= CX88_VMUX_SVIDEO
,
542 [CX88_BOARD_DNTV_LIVE_DVB_T
] = {
543 .name
= "digitalnow DNTV Live! DVB-T",
544 .tuner_type
= TUNER_ABSENT
,
546 .tuner_addr
= ADDR_UNSET
,
547 .radio_addr
= ADDR_UNSET
,
549 .type
= CX88_VMUX_COMPOSITE1
,
554 .type
= CX88_VMUX_SVIDEO
,
561 [CX88_BOARD_PCHDTV_HD3000
] = {
562 .name
= "pcHDTV HD3000 HDTV",
563 .tuner_type
= TUNER_THOMSON_DTT7610
,
565 .tuner_addr
= ADDR_UNSET
,
566 .radio_addr
= ADDR_UNSET
,
568 .type
= CX88_VMUX_TELEVISION
,
575 .type
= CX88_VMUX_COMPOSITE1
,
582 .type
= CX88_VMUX_SVIDEO
,
599 [CX88_BOARD_HAUPPAUGE_ROSLYN
] = {
600 // entry added by Kaustubh D. Bhalerao <bhalerao.1@osu.edu>
601 // GPIO values obtained from regspy, courtesy Sean Covel
602 .name
= "Hauppauge WinTV 28xxx (Roslyn) models",
605 .tuner_addr
= ADDR_UNSET
,
606 .radio_addr
= ADDR_UNSET
,
608 .type
= CX88_VMUX_TELEVISION
,
610 .gpio0
= 0xed12, // internal decoder
613 .type
= CX88_VMUX_DEBUG
,
615 .gpio0
= 0xff01, // mono from tuner chip
617 .type
= CX88_VMUX_COMPOSITE1
,
621 .type
= CX88_VMUX_SVIDEO
,
633 [CX88_BOARD_DIGITALLOGIC_MEC
] = {
634 .name
= "Digital-Logic MICROSPACE Entertainment Center (MEC)",
635 .tuner_type
= TUNER_PHILIPS_FM1216ME_MK3
,
637 .tuner_addr
= ADDR_UNSET
,
638 .radio_addr
= ADDR_UNSET
,
639 .tda9887_conf
= TDA9887_PRESENT
,
641 .type
= CX88_VMUX_TELEVISION
,
645 .type
= CX88_VMUX_COMPOSITE1
,
649 .type
= CX88_VMUX_SVIDEO
,
659 [CX88_BOARD_IODATA_GVBCTV7E
] = {
660 .name
= "IODATA GV/BCTV7E",
661 .tuner_type
= TUNER_PHILIPS_FQ1286
,
663 .tuner_addr
= ADDR_UNSET
,
664 .radio_addr
= ADDR_UNSET
,
665 .tda9887_conf
= TDA9887_PRESENT
,
667 .type
= CX88_VMUX_TELEVISION
,
671 .type
= CX88_VMUX_COMPOSITE1
,
675 .type
= CX88_VMUX_SVIDEO
,
680 [CX88_BOARD_PIXELVIEW_PLAYTV_ULTRA_PRO
] = {
681 .name
= "PixelView PlayTV Ultra Pro (Stereo)",
682 /* May be also TUNER_YMEC_TVF_5533MF for NTSC/M or PAL/M */
683 .tuner_type
= TUNER_PHILIPS_FM1216ME_MK3
,
684 .radio_type
= TUNER_TEA5767
,
685 .tuner_addr
= 0xc2>>1,
686 .radio_addr
= 0xc0>>1,
688 .type
= CX88_VMUX_TELEVISION
,
690 .gpio0
= 0xbf61, /* internal decoder */
692 .type
= CX88_VMUX_COMPOSITE1
,
696 .type
= CX88_VMUX_SVIDEO
,
705 [CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T
] = {
706 .name
= "DViCO FusionHDTV 3 Gold-T",
707 .tuner_type
= TUNER_THOMSON_DTT7611
,
709 .tuner_addr
= ADDR_UNSET
,
710 .radio_addr
= ADDR_UNSET
,
711 /* See DViCO FusionHDTV 3 Gold-Q for GPIO documentation. */
713 .type
= CX88_VMUX_TELEVISION
,
717 .type
= CX88_VMUX_COMPOSITE1
,
721 .type
= CX88_VMUX_SVIDEO
,
726 [CX88_BOARD_ADSTECH_DVB_T_PCI
] = {
727 .name
= "ADS Tech Instant TV DVB-T PCI",
728 .tuner_type
= TUNER_ABSENT
,
730 .tuner_addr
= ADDR_UNSET
,
731 .radio_addr
= ADDR_UNSET
,
733 .type
= CX88_VMUX_COMPOSITE1
,
738 .type
= CX88_VMUX_SVIDEO
,
746 const unsigned int cx88_bcount
= ARRAY_SIZE(cx88_boards
);
748 /* ------------------------------------------------------------------ */
749 /* PCI subsystem IDs */
751 struct cx88_subid cx88_subids
[] = {
755 .card
= CX88_BOARD_HAUPPAUGE
,
759 .card
= CX88_BOARD_HAUPPAUGE
,
763 .card
= CX88_BOARD_GDI
,
766 .subdevice
= 0x0107, /* with mpeg encoder */
767 .card
= CX88_BOARD_GDI
,
769 .subvendor
= PCI_VENDOR_ID_ATI
,
771 .card
= CX88_BOARD_ATI_WONDER_PRO
,
775 .card
= CX88_BOARD_WINFAST2000XP_EXPERT
,
778 .subdevice
= 0x6613, /* NTSC */
779 .card
= CX88_BOARD_WINFAST2000XP_EXPERT
,
783 .card
= CX88_BOARD_WINFAST_DV2000
,
787 .card
= CX88_BOARD_LEADTEK_PVR2000
,
791 .card
= CX88_BOARD_LEADTEK_PVR2000
,
795 .card
= CX88_BOARD_AVERTV_303
,
799 .card
= CX88_BOARD_MSI_TVANYWHERE_MASTER
,
803 .card
= CX88_BOARD_IODATA_GVVCP3PCI
,
806 .subdevice
= 0x4823, /* with mpeg encoder */
807 .card
= CX88_BOARD_ASUS_PVR_416
,
811 .card
= CX88_BOARD_KWORLD_DVB_T
,
815 .card
= CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q
,
819 .card
= CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T
,
823 .card
= CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1
,
827 .card
= CX88_BOARD_HAUPPAUGE_DVB_T1
,
831 .card
= CX88_BOARD_CONEXANT_DVB_T1
,
835 .card
= CX88_BOARD_PROVIDEO_PV259
,
839 .card
= CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS
,
843 .card
= CX88_BOARD_PIXELVIEW
,
846 .subdevice
= 0x3000, /* HD-3000 card */
847 .card
= CX88_BOARD_PCHDTV_HD3000
,
851 .card
= CX88_BOARD_DNTV_LIVE_DVB_T
,
855 .card
= CX88_BOARD_HAUPPAUGE_ROSLYN
,
859 .card
= CX88_BOARD_DIGITALLOGIC_MEC
,
863 .card
= CX88_BOARD_IODATA_GVBCTV7E
,
867 .card
= CX88_BOARD_ADSTECH_DVB_T_PCI
,
870 const unsigned int cx88_idcount
= ARRAY_SIZE(cx88_subids
);
872 /* ----------------------------------------------------------------------- */
873 /* some leadtek specific stuff */
875 static void __devinit
leadtek_eeprom(struct cx88_core
*core
, u8
*eeprom_data
)
877 /* This is just for the "Winfast 2000XP Expert" board ATM; I don't have data on
880 * Byte 0 is 1 on the NTSC board.
883 if (eeprom_data
[4] != 0x7d ||
884 eeprom_data
[5] != 0x10 ||
885 eeprom_data
[7] != 0x66) {
886 printk(KERN_WARNING
"%s: Leadtek eeprom invalid.\n",
892 core
->tuner_type
= (eeprom_data
[6] == 0x13) ? 43 : 38;
894 printk(KERN_INFO
"%s: Leadtek Winfast 2000XP Expert config: "
895 "tuner=%d, eeprom[0]=0x%02x\n",
896 core
->name
, core
->tuner_type
, eeprom_data
[0]);
900 /* ----------------------------------------------------------------------- */
902 static void hauppauge_eeprom(struct cx88_core
*core
, u8
*eeprom_data
)
906 tveeprom_hauppauge_analog(&tv
, eeprom_data
);
907 core
->tuner_type
= tv
.tuner_type
;
908 core
->has_radio
= tv
.has_radio
;
911 static int hauppauge_eeprom_dvb(struct cx88_core
*core
, u8
*ee
)
916 /* Make sure we support the board model */
917 model
= ee
[0x1f] << 24 | ee
[0x1e] << 16 | ee
[0x1d] << 8 | ee
[0x1c];
925 printk("%s: warning: unknown hauppauge model #%d\n",
930 /* Make sure we support the tuner */
933 case 0x4B: /* dtt 7595 */
934 case 0x4C: /* dtt 7592 */
937 printk("%s: error: unknown hauppauge tuner 0x%02x\n",
941 printk(KERN_INFO
"%s: hauppauge eeprom: model=%d, tuner=%d\n",
942 core
->name
, model
, tuner
);
946 /* ----------------------------------------------------------------------- */
947 /* some GDI (was: Modular Technology) specific stuff */
954 [ 0x01 ] = { .id
= TUNER_ABSENT
,
956 [ 0x02 ] = { .id
= TUNER_ABSENT
,
958 [ 0x03 ] = { .id
= TUNER_ABSENT
,
960 [ 0x04 ] = { .id
= TUNER_ABSENT
,
962 [ 0x05 ] = { .id
= TUNER_ABSENT
,
965 [ 0x10 ] = { .id
= TUNER_ABSENT
,
967 .name
= "TEMIC_4049" },
968 [ 0x11 ] = { .id
= TUNER_TEMIC_4136FY5
,
969 .name
= "TEMIC_4136" },
970 [ 0x12 ] = { .id
= TUNER_ABSENT
,
971 .name
= "TEMIC_4146" },
973 [ 0x20 ] = { .id
= TUNER_PHILIPS_FQ1216ME
,
975 .name
= "PHILIPS_FQ1216_MK3" },
976 [ 0x21 ] = { .id
= TUNER_ABSENT
, .fm
= 1,
977 .name
= "PHILIPS_FQ1236_MK3" },
978 [ 0x22 ] = { .id
= TUNER_ABSENT
,
979 .name
= "PHILIPS_FI1236_MK3" },
980 [ 0x23 ] = { .id
= TUNER_ABSENT
,
981 .name
= "PHILIPS_FI1216_MK3" },
984 static void gdi_eeprom(struct cx88_core
*core
, u8
*eeprom_data
)
986 char *name
= (eeprom_data
[0x0d] < ARRAY_SIZE(gdi_tuner
))
987 ? gdi_tuner
[eeprom_data
[0x0d]].name
: NULL
;
989 printk(KERN_INFO
"%s: GDI: tuner=%s\n", core
->name
,
990 name
? name
: "unknown");
993 core
->tuner_type
= gdi_tuner
[eeprom_data
[0x0d]].id
;
994 core
->has_radio
= gdi_tuner
[eeprom_data
[0x0d]].fm
;
997 /* ----------------------------------------------------------------------- */
999 void cx88_card_list(struct cx88_core
*core
, struct pci_dev
*pci
)
1003 if (0 == pci
->subsystem_vendor
&&
1004 0 == pci
->subsystem_device
) {
1005 printk("%s: Your board has no valid PCI Subsystem ID and thus can't\n"
1006 "%s: be autodetected. Please pass card=<n> insmod option to\n"
1007 "%s: workaround that. Redirect complaints to the vendor of\n"
1008 "%s: the TV card. Best regards,\n"
1010 core
->name
,core
->name
,core
->name
,core
->name
,core
->name
);
1012 printk("%s: Your board isn't known (yet) to the driver. You can\n"
1013 "%s: try to pick one of the existing card configs via\n"
1014 "%s: card=<n> insmod option. Updating to the latest\n"
1015 "%s: version might help as well.\n",
1016 core
->name
,core
->name
,core
->name
,core
->name
);
1018 printk("%s: Here is a list of valid choices for the card=<n> insmod option:\n",
1020 for (i
= 0; i
< cx88_bcount
; i
++)
1021 printk("%s: card=%d -> %s\n",
1022 core
->name
, i
, cx88_boards
[i
].name
);
1025 void cx88_card_setup(struct cx88_core
*core
)
1027 static u8 eeprom
[128];
1029 if (0 == core
->i2c_rc
) {
1030 core
->i2c_client
.addr
= 0xa0 >> 1;
1031 tveeprom_read(&core
->i2c_client
,eeprom
,sizeof(eeprom
));
1034 switch (core
->board
) {
1035 case CX88_BOARD_HAUPPAUGE
:
1036 case CX88_BOARD_HAUPPAUGE_ROSLYN
:
1037 if (0 == core
->i2c_rc
)
1038 hauppauge_eeprom(core
,eeprom
+8);
1040 case CX88_BOARD_GDI
:
1041 if (0 == core
->i2c_rc
)
1042 gdi_eeprom(core
,eeprom
);
1044 case CX88_BOARD_WINFAST2000XP_EXPERT
:
1045 if (0 == core
->i2c_rc
)
1046 leadtek_eeprom(core
,eeprom
);
1048 case CX88_BOARD_HAUPPAUGE_DVB_T1
:
1049 if (0 == core
->i2c_rc
)
1050 hauppauge_eeprom_dvb(core
,eeprom
);
1052 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1
:
1053 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS
:
1054 /* GPIO0:0 is hooked to mt352 reset pin */
1055 cx_set(MO_GP0_IO
, 0x00000101);
1056 cx_clear(MO_GP0_IO
, 0x00000001);
1058 cx_set(MO_GP0_IO
, 0x00000101);
1060 case CX88_BOARD_KWORLD_DVB_T
:
1061 case CX88_BOARD_DNTV_LIVE_DVB_T
:
1062 cx_set(MO_GP0_IO
, 0x00000707);
1063 cx_set(MO_GP2_IO
, 0x00000101);
1064 cx_clear(MO_GP2_IO
, 0x00000001);
1066 cx_clear(MO_GP0_IO
, 0x00000007);
1067 cx_set(MO_GP2_IO
, 0x00000101);
1070 if (cx88_boards
[core
->board
].radio
.type
== CX88_RADIO
)
1071 core
->has_radio
= 1;
1074 /* ------------------------------------------------------------------ */
1076 EXPORT_SYMBOL(cx88_boards
);
1077 EXPORT_SYMBOL(cx88_bcount
);
1078 EXPORT_SYMBOL(cx88_subids
);
1079 EXPORT_SYMBOL(cx88_idcount
);
1080 EXPORT_SYMBOL(cx88_card_list
);
1081 EXPORT_SYMBOL(cx88_card_setup
);
1087 * 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