aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Toth <stoth@hauppauge.com>2006-09-25 11:43:45 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-10-03 14:13:54 -0400
commit3a5ba52a1a1981c51af8f3559c16feaa238b2fec (patch)
treee2881b38f57f7cdbb0811d8d8782cbe1458ba768
parent3057906df5c9be9c99a181eccac3bc40cf07ad9f (diff)
V4L/DVB (4667): Changed cx88_board .dvb and .register to an enum.
Some basic cleanup in preperation for a future patch where the cx88-mpeg functions have to deal with the port being used by multiple frontends in (mpeg2 hw encoder and dvb demod). Signed-off-by: Steven Toth <stoth@hauppauge.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r--drivers/media/video/cx88/cx88-blackbird.c2
-rw-r--r--drivers/media/video/cx88/cx88-cards.c72
-rw-r--r--drivers/media/video/cx88/cx88-dvb.c2
-rw-r--r--drivers/media/video/cx88/cx88-i2c.c2
-rw-r--r--drivers/media/video/cx88/cx88-mpeg.c13
-rw-r--r--drivers/media/video/cx88/cx88-tvaudio.c4
-rw-r--r--drivers/media/video/cx88/cx88.h9
7 files changed, 59 insertions, 45 deletions
diff --git a/drivers/media/video/cx88/cx88-blackbird.c b/drivers/media/video/cx88/cx88-blackbird.c
index a7921f9d45d8..8fbbac413b66 100644
--- a/drivers/media/video/cx88/cx88-blackbird.c
+++ b/drivers/media/video/cx88/cx88-blackbird.c
@@ -1086,7 +1086,7 @@ static int __devinit blackbird_probe(struct pci_dev *pci_dev,
1086 return -EINVAL; 1086 return -EINVAL;
1087 1087
1088 err = -ENODEV; 1088 err = -ENODEV;
1089 if (!cx88_boards[core->board].blackbird) 1089 if (!(cx88_boards[core->board].mpeg & CX88_BOARD_BLACKBIRD))
1090 goto fail_core; 1090 goto fail_core;
1091 1091
1092 err = -ENOMEM; 1092 err = -ENOMEM;
diff --git a/drivers/media/video/cx88/cx88-cards.c b/drivers/media/video/cx88/cx88-cards.c
index 425d15df9d07..76386d7bcb79 100644
--- a/drivers/media/video/cx88/cx88-cards.c
+++ b/drivers/media/video/cx88/cx88-cards.c
@@ -294,7 +294,7 @@ struct cx88_board cx88_boards[] = {
294 .type = CX88_RADIO, 294 .type = CX88_RADIO,
295 .gpio0 = 0x0000bd62, 295 .gpio0 = 0x0000bd62,
296 }, 296 },
297 .blackbird = 1, 297 .mpeg = CX88_BOARD_BLACKBIRD,
298 }, 298 },
299 [CX88_BOARD_IODATA_GVVCP3PCI] = { 299 [CX88_BOARD_IODATA_GVVCP3PCI] = {
300 .name = "IODATA GV-VCP3/PCI", 300 .name = "IODATA GV-VCP3/PCI",
@@ -358,7 +358,7 @@ struct cx88_board cx88_boards[] = {
358 .type = CX88_RADIO, 358 .type = CX88_RADIO,
359 .gpio0 = 0x0000fde2, 359 .gpio0 = 0x0000fde2,
360 }, 360 },
361 .blackbird = 1, 361 .mpeg = CX88_BOARD_BLACKBIRD,
362 }, 362 },
363 [CX88_BOARD_MSI_TVANYWHERE] = { 363 [CX88_BOARD_MSI_TVANYWHERE] = {
364 .name = "MSI TV-@nywhere", 364 .name = "MSI TV-@nywhere",
@@ -401,7 +401,7 @@ struct cx88_board cx88_boards[] = {
401 .gpio0 = 0x0700, 401 .gpio0 = 0x0700,
402 .gpio2 = 0x0101, 402 .gpio2 = 0x0101,
403 }}, 403 }},
404 .dvb = 1, 404 .mpeg = CX88_BOARD_DVB,
405 }, 405 },
406 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1] = { 406 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1] = {
407 .name = "DViCO FusionHDTV DVB-T1", 407 .name = "DViCO FusionHDTV DVB-T1",
@@ -418,7 +418,7 @@ struct cx88_board cx88_boards[] = {
418 .vmux = 2, 418 .vmux = 2,
419 .gpio0 = 0x000027df, 419 .gpio0 = 0x000027df,
420 }}, 420 }},
421 .dvb = 1, 421 .mpeg = CX88_BOARD_DVB,
422 }, 422 },
423 [CX88_BOARD_KWORLD_LTV883] = { 423 [CX88_BOARD_KWORLD_LTV883] = {
424 .name = "KWorld LTV883RF", 424 .name = "KWorld LTV883RF",
@@ -488,7 +488,7 @@ struct cx88_board cx88_boards[] = {
488 .vmux = 2, 488 .vmux = 2,
489 .gpio0 = 0x0f00, 489 .gpio0 = 0x0f00,
490 }}, 490 }},
491 .dvb = 1, 491 .mpeg = CX88_BOARD_DVB,
492 }, 492 },
493 [CX88_BOARD_HAUPPAUGE_DVB_T1] = { 493 [CX88_BOARD_HAUPPAUGE_DVB_T1] = {
494 .name = "Hauppauge Nova-T DVB-T", 494 .name = "Hauppauge Nova-T DVB-T",
@@ -500,7 +500,7 @@ struct cx88_board cx88_boards[] = {
500 .type = CX88_VMUX_DVB, 500 .type = CX88_VMUX_DVB,
501 .vmux = 0, 501 .vmux = 0,
502 }}, 502 }},
503 .dvb = 1, 503 .mpeg = CX88_BOARD_DVB,
504 }, 504 },
505 [CX88_BOARD_CONEXANT_DVB_T1] = { 505 [CX88_BOARD_CONEXANT_DVB_T1] = {
506 .name = "Conexant DVB-T reference design", 506 .name = "Conexant DVB-T reference design",
@@ -512,7 +512,7 @@ struct cx88_board cx88_boards[] = {
512 .type = CX88_VMUX_DVB, 512 .type = CX88_VMUX_DVB,
513 .vmux = 0, 513 .vmux = 0,
514 }}, 514 }},
515 .dvb = 1, 515 .mpeg = CX88_BOARD_DVB,
516 }, 516 },
517 [CX88_BOARD_PROVIDEO_PV259] = { 517 [CX88_BOARD_PROVIDEO_PV259] = {
518 .name = "Provideo PV259", 518 .name = "Provideo PV259",
@@ -524,7 +524,7 @@ struct cx88_board cx88_boards[] = {
524 .type = CX88_VMUX_TELEVISION, 524 .type = CX88_VMUX_TELEVISION,
525 .vmux = 0, 525 .vmux = 0,
526 }}, 526 }},
527 .blackbird = 1, 527 .mpeg = CX88_BOARD_BLACKBIRD,
528 }, 528 },
529 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS] = { 529 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS] = {
530 .name = "DViCO FusionHDTV DVB-T Plus", 530 .name = "DViCO FusionHDTV DVB-T Plus",
@@ -541,7 +541,7 @@ struct cx88_board cx88_boards[] = {
541 .vmux = 2, 541 .vmux = 2,
542 .gpio0 = 0x000027df, 542 .gpio0 = 0x000027df,
543 }}, 543 }},
544 .dvb = 1, 544 .mpeg = CX88_BOARD_DVB,
545 }, 545 },
546 [CX88_BOARD_DNTV_LIVE_DVB_T] = { 546 [CX88_BOARD_DNTV_LIVE_DVB_T] = {
547 .name = "digitalnow DNTV Live! DVB-T", 547 .name = "digitalnow DNTV Live! DVB-T",
@@ -560,7 +560,7 @@ struct cx88_board cx88_boards[] = {
560 .gpio0 = 0x00000700, 560 .gpio0 = 0x00000700,
561 .gpio2 = 0x00000101, 561 .gpio2 = 0x00000101,
562 }}, 562 }},
563 .dvb = 1, 563 .mpeg = CX88_BOARD_DVB,
564 }, 564 },
565 [CX88_BOARD_PCHDTV_HD3000] = { 565 [CX88_BOARD_PCHDTV_HD3000] = {
566 .name = "pcHDTV HD3000 HDTV", 566 .name = "pcHDTV HD3000 HDTV",
@@ -599,7 +599,7 @@ struct cx88_board cx88_boards[] = {
599 .gpio2 = 0x00000000, 599 .gpio2 = 0x00000000,
600 .gpio3 = 0x00000000, 600 .gpio3 = 0x00000000,
601 }, 601 },
602 .dvb = 1, 602 .mpeg = CX88_BOARD_DVB,
603 }, 603 },
604 [CX88_BOARD_HAUPPAUGE_ROSLYN] = { 604 [CX88_BOARD_HAUPPAUGE_ROSLYN] = {
605 // entry added by Kaustubh D. Bhalerao <bhalerao.1@osu.edu> 605 // entry added by Kaustubh D. Bhalerao <bhalerao.1@osu.edu>
@@ -633,7 +633,7 @@ struct cx88_board cx88_boards[] = {
633 .gpio0 = 0xed96, 633 .gpio0 = 0xed96,
634 .gpio2 = 0x00ff, 634 .gpio2 = 0x00ff,
635 }, 635 },
636 .blackbird = 1, 636 .mpeg = CX88_BOARD_BLACKBIRD,
637 }, 637 },
638 [CX88_BOARD_DIGITALLOGIC_MEC] = { 638 [CX88_BOARD_DIGITALLOGIC_MEC] = {
639 .name = "Digital-Logic MICROSPACE Entertainment Center (MEC)", 639 .name = "Digital-Logic MICROSPACE Entertainment Center (MEC)",
@@ -659,7 +659,7 @@ struct cx88_board cx88_boards[] = {
659 .type = CX88_RADIO, 659 .type = CX88_RADIO,
660 .gpio0 = 0x00009d00, 660 .gpio0 = 0x00009d00,
661 }, 661 },
662 .blackbird = 1, 662 .mpeg = CX88_BOARD_BLACKBIRD,
663 }, 663 },
664 [CX88_BOARD_IODATA_GVBCTV7E] = { 664 [CX88_BOARD_IODATA_GVBCTV7E] = {
665 .name = "IODATA GV/BCTV7E", 665 .name = "IODATA GV/BCTV7E",
@@ -727,7 +727,7 @@ struct cx88_board cx88_boards[] = {
727 .vmux = 2, 727 .vmux = 2,
728 .gpio0 = 0x97e9, 728 .gpio0 = 0x97e9,
729 }}, 729 }},
730 .dvb = 1, 730 .mpeg = CX88_BOARD_DVB,
731 }, 731 },
732 [CX88_BOARD_ADSTECH_DVB_T_PCI] = { 732 [CX88_BOARD_ADSTECH_DVB_T_PCI] = {
733 .name = "ADS Tech Instant TV DVB-T PCI", 733 .name = "ADS Tech Instant TV DVB-T PCI",
@@ -746,7 +746,7 @@ struct cx88_board cx88_boards[] = {
746 .gpio0 = 0x0700, 746 .gpio0 = 0x0700,
747 .gpio2 = 0x0101, 747 .gpio2 = 0x0101,
748 }}, 748 }},
749 .dvb = 1, 749 .mpeg = CX88_BOARD_DVB,
750 }, 750 },
751 [CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1] = { 751 [CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1] = {
752 .name = "TerraTec Cinergy 1400 DVB-T", 752 .name = "TerraTec Cinergy 1400 DVB-T",
@@ -755,7 +755,7 @@ struct cx88_board cx88_boards[] = {
755 .type = CX88_VMUX_DVB, 755 .type = CX88_VMUX_DVB,
756 .vmux = 0, 756 .vmux = 0,
757 }}, 757 }},
758 .dvb = 1, 758 .mpeg = CX88_BOARD_DVB,
759 }, 759 },
760 [CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD] = { 760 [CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD] = {
761 .name = "DViCO FusionHDTV 5 Gold", 761 .name = "DViCO FusionHDTV 5 Gold",
@@ -777,7 +777,7 @@ struct cx88_board cx88_boards[] = {
777 .vmux = 2, 777 .vmux = 2,
778 .gpio0 = 0x87f9, 778 .gpio0 = 0x87f9,
779 }}, 779 }},
780 .dvb = 1, 780 .mpeg = CX88_BOARD_DVB,
781 }, 781 },
782 [CX88_BOARD_AVERMEDIA_ULTRATV_MC_550] = { 782 [CX88_BOARD_AVERMEDIA_ULTRATV_MC_550] = {
783 .name = "AverMedia UltraTV Media Center PCI 550", 783 .name = "AverMedia UltraTV Media Center PCI 550",
@@ -786,7 +786,7 @@ struct cx88_board cx88_boards[] = {
786 .tuner_addr = ADDR_UNSET, 786 .tuner_addr = ADDR_UNSET,
787 .radio_addr = ADDR_UNSET, 787 .radio_addr = ADDR_UNSET,
788 .tda9887_conf = TDA9887_PRESENT, 788 .tda9887_conf = TDA9887_PRESENT,
789 .blackbird = 1, 789 .mpeg = CX88_BOARD_BLACKBIRD,
790 .input = {{ 790 .input = {{
791 .type = CX88_VMUX_COMPOSITE1, 791 .type = CX88_VMUX_COMPOSITE1,
792 .vmux = 0, 792 .vmux = 0,
@@ -854,7 +854,7 @@ struct cx88_board cx88_boards[] = {
854 .gpio2 = 0x00000001, 854 .gpio2 = 0x00000001,
855 .gpio3 = 0x00000000, 855 .gpio3 = 0x00000000,
856 }}, 856 }},
857 .dvb = 1, 857 .mpeg = CX88_BOARD_DVB,
858 }, 858 },
859 [CX88_BOARD_WINFAST_DTV1000] = { 859 [CX88_BOARD_WINFAST_DTV1000] = {
860 .name = "WinFast DTV1000-T", 860 .name = "WinFast DTV1000-T",
@@ -866,7 +866,7 @@ struct cx88_board cx88_boards[] = {
866 .type = CX88_VMUX_DVB, 866 .type = CX88_VMUX_DVB,
867 .vmux = 0, 867 .vmux = 0,
868 }}, 868 }},
869 .dvb = 1, 869 .mpeg = CX88_BOARD_DVB,
870 }, 870 },
871 [CX88_BOARD_AVERTV_303] = { 871 [CX88_BOARD_AVERTV_303] = {
872 .name = "AVerTV 303 (M126)", 872 .name = "AVerTV 303 (M126)",
@@ -914,7 +914,7 @@ struct cx88_board cx88_boards[] = {
914 .type = CX88_VMUX_SVIDEO, 914 .type = CX88_VMUX_SVIDEO,
915 .vmux = 2, 915 .vmux = 2,
916 }}, 916 }},
917 .dvb = 1, 917 .mpeg = CX88_BOARD_DVB,
918 }, 918 },
919 [CX88_BOARD_HAUPPAUGE_NOVASE2_S1] = { 919 [CX88_BOARD_HAUPPAUGE_NOVASE2_S1] = {
920 .name = "Hauppauge Nova-SE2 DVB-S", 920 .name = "Hauppauge Nova-SE2 DVB-S",
@@ -926,7 +926,7 @@ struct cx88_board cx88_boards[] = {
926 .type = CX88_VMUX_DVB, 926 .type = CX88_VMUX_DVB,
927 .vmux = 0, 927 .vmux = 0,
928 }}, 928 }},
929 .dvb = 1, 929 .mpeg = CX88_BOARD_DVB,
930 }, 930 },
931 [CX88_BOARD_KWORLD_DVBS_100] = { 931 [CX88_BOARD_KWORLD_DVBS_100] = {
932 .name = "KWorld DVB-S 100", 932 .name = "KWorld DVB-S 100",
@@ -944,7 +944,7 @@ struct cx88_board cx88_boards[] = {
944 .type = CX88_VMUX_SVIDEO, 944 .type = CX88_VMUX_SVIDEO,
945 .vmux = 2, 945 .vmux = 2,
946 }}, 946 }},
947 .dvb = 1, 947 .mpeg = CX88_BOARD_DVB,
948 }, 948 },
949 [CX88_BOARD_HAUPPAUGE_HVR1100] = { 949 [CX88_BOARD_HAUPPAUGE_HVR1100] = {
950 .name = "Hauppauge WinTV-HVR1100 DVB-T/Hybrid", 950 .name = "Hauppauge WinTV-HVR1100 DVB-T/Hybrid",
@@ -964,7 +964,7 @@ struct cx88_board cx88_boards[] = {
964 .vmux = 2, 964 .vmux = 2,
965 }}, 965 }},
966 /* fixme: Add radio support */ 966 /* fixme: Add radio support */
967 .dvb = 1, 967 .mpeg = CX88_BOARD_DVB,
968 }, 968 },
969 [CX88_BOARD_HAUPPAUGE_HVR1100LP] = { 969 [CX88_BOARD_HAUPPAUGE_HVR1100LP] = {
970 .name = "Hauppauge WinTV-HVR1100 DVB-T/Hybrid (Low Profile)", 970 .name = "Hauppauge WinTV-HVR1100 DVB-T/Hybrid (Low Profile)",
@@ -981,7 +981,7 @@ struct cx88_board cx88_boards[] = {
981 .vmux = 1, 981 .vmux = 1,
982 }}, 982 }},
983 /* fixme: Add radio support */ 983 /* fixme: Add radio support */
984 .dvb = 1, 984 .mpeg = CX88_BOARD_DVB,
985 }, 985 },
986 [CX88_BOARD_DNTV_LIVE_DVB_T_PRO] = { 986 [CX88_BOARD_DNTV_LIVE_DVB_T_PRO] = {
987 .name = "digitalnow DNTV Live! DVB-T Pro", 987 .name = "digitalnow DNTV Live! DVB-T Pro",
@@ -1008,7 +1008,7 @@ struct cx88_board cx88_boards[] = {
1008 .type = CX88_RADIO, 1008 .type = CX88_RADIO,
1009 .gpio0 = 0xf80808, 1009 .gpio0 = 0xf80808,
1010 }, 1010 },
1011 .dvb = 1, 1011 .mpeg = CX88_BOARD_DVB,
1012 }, 1012 },
1013 [CX88_BOARD_KWORLD_DVB_T_CX22702] = { 1013 [CX88_BOARD_KWORLD_DVB_T_CX22702] = {
1014 /* Kworld V-stream Xpert DVB-T with Thomson tuner */ 1014 /* Kworld V-stream Xpert DVB-T with Thomson tuner */
@@ -1030,7 +1030,7 @@ struct cx88_board cx88_boards[] = {
1030 .gpio0 = 0x0700, 1030 .gpio0 = 0x0700,
1031 .gpio2 = 0x0101, 1031 .gpio2 = 0x0101,
1032 }}, 1032 }},
1033 .dvb = 1, 1033 .mpeg = CX88_BOARD_DVB,
1034 }, 1034 },
1035 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL] = { 1035 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL] = {
1036 .name = "DViCO FusionHDTV DVB-T Dual Digital", 1036 .name = "DViCO FusionHDTV DVB-T Dual Digital",
@@ -1047,7 +1047,7 @@ struct cx88_board cx88_boards[] = {
1047 .vmux = 2, 1047 .vmux = 2,
1048 .gpio0 = 0x000067df, 1048 .gpio0 = 0x000067df,
1049 }}, 1049 }},
1050 .dvb = 1, 1050 .mpeg = CX88_BOARD_DVB,
1051 }, 1051 },
1052 [CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT] = { 1052 [CX88_BOARD_KWORLD_HARDWARE_MPEG_TV_XPERT] = {
1053 /* FIXME: Audio not working for s-video / composite inputs. */ 1053 /* FIXME: Audio not working for s-video / composite inputs. */
@@ -1075,7 +1075,7 @@ struct cx88_board cx88_boards[] = {
1075 .gpio0 = 0x3de6, 1075 .gpio0 = 0x3de6,
1076 .gpio2 = 0x00ff, 1076 .gpio2 = 0x00ff,
1077 }, 1077 },
1078 .blackbird = 1, 1078 .mpeg = CX88_BOARD_BLACKBIRD,
1079 }, 1079 },
1080 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID] = { 1080 [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_HYBRID] = {
1081 .name = "DViCO FusionHDTV DVB-T Hybrid", 1081 .name = "DViCO FusionHDTV DVB-T Hybrid",
@@ -1096,7 +1096,7 @@ struct cx88_board cx88_boards[] = {
1096 .vmux = 2, 1096 .vmux = 2,
1097 .gpio0 = 0x0000a75b, 1097 .gpio0 = 0x0000a75b,
1098 }}, 1098 }},
1099 .dvb = 1, 1099 .mpeg = CX88_BOARD_DVB,
1100 }, 1100 },
1101 [CX88_BOARD_PCHDTV_HD5500] = { 1101 [CX88_BOARD_PCHDTV_HD5500] = {
1102 .name = "pcHDTV HD5500 HDTV", 1102 .name = "pcHDTV HD5500 HDTV",
@@ -1118,7 +1118,7 @@ struct cx88_board cx88_boards[] = {
1118 .vmux = 2, 1118 .vmux = 2,
1119 .gpio0 = 0x87f9, 1119 .gpio0 = 0x87f9,
1120 }}, 1120 }},
1121 .dvb = 1, 1121 .mpeg = CX88_BOARD_DVB,
1122 }, 1122 },
1123 [CX88_BOARD_KWORLD_MCE200_DELUXE] = { 1123 [CX88_BOARD_KWORLD_MCE200_DELUXE] = {
1124 /* FIXME: tested TV input only, disabled composite, 1124 /* FIXME: tested TV input only, disabled composite,
@@ -1134,7 +1134,7 @@ struct cx88_board cx88_boards[] = {
1134 .vmux = 0, 1134 .vmux = 0,
1135 .gpio0 = 0x0000BDE6 1135 .gpio0 = 0x0000BDE6
1136 }}, 1136 }},
1137 .blackbird = 1, 1137 .mpeg = CX88_BOARD_BLACKBIRD,
1138 }, 1138 },
1139 [CX88_BOARD_PIXELVIEW_PLAYTV_P7000] = { 1139 [CX88_BOARD_PIXELVIEW_PLAYTV_P7000] = {
1140 /* FIXME: SVideo, Composite and FM inputs are untested */ 1140 /* FIXME: SVideo, Composite and FM inputs are untested */
@@ -1150,7 +1150,7 @@ struct cx88_board cx88_boards[] = {
1150 .vmux = 0, 1150 .vmux = 0,
1151 .gpio0 = 0x5da6, 1151 .gpio0 = 0x5da6,
1152 }}, 1152 }},
1153 .blackbird = 1, 1153 .mpeg = CX88_BOARD_BLACKBIRD,
1154 }, 1154 },
1155 [CX88_BOARD_NPGTECH_REALTV_TOP10FM] = { 1155 [CX88_BOARD_NPGTECH_REALTV_TOP10FM] = {
1156 .name = "NPG Tech Real TV FM Top 10", 1156 .name = "NPG Tech Real TV FM Top 10",
@@ -1192,7 +1192,7 @@ struct cx88_board cx88_boards[] = {
1192 .gpio2 = 0x00017304, 1192 .gpio2 = 0x00017304,
1193 .gpio3 = 0x02000000, 1193 .gpio3 = 0x02000000,
1194 }}, 1194 }},
1195 .dvb = 1, 1195 .mpeg = CX88_BOARD_DVB,
1196 }, 1196 },
1197 [CX88_BOARD_GENIATECH_DVBS] = { 1197 [CX88_BOARD_GENIATECH_DVBS] = {
1198 .name = "Geniatech DVB-S", 1198 .name = "Geniatech DVB-S",
@@ -1207,7 +1207,7 @@ struct cx88_board cx88_boards[] = {
1207 .type = CX88_VMUX_COMPOSITE1, 1207 .type = CX88_VMUX_COMPOSITE1,
1208 .vmux = 1, 1208 .vmux = 1,
1209 }}, 1209 }},
1210 .dvb = 1, 1210 .mpeg = CX88_BOARD_DVB,
1211 }, 1211 },
1212 [CX88_BOARD_HAUPPAUGE_HVR3000] = { 1212 [CX88_BOARD_HAUPPAUGE_HVR3000] = {
1213 /* FIXME: Add dvb & radio support */ 1213 /* FIXME: Add dvb & radio support */
@@ -1302,7 +1302,7 @@ struct cx88_board cx88_boards[] = {
1302 .gpio0 = 0xe780, 1302 .gpio0 = 0xe780,
1303 }}, 1303 }},
1304 /* fixme: Add radio support */ 1304 /* fixme: Add radio support */
1305 .dvb = 1, 1305 .mpeg = CX88_BOARD_DVB,
1306 }, 1306 },
1307}; 1307};
1308const unsigned int cx88_bcount = ARRAY_SIZE(cx88_boards); 1308const unsigned int cx88_bcount = ARRAY_SIZE(cx88_boards);
diff --git a/drivers/media/video/cx88/cx88-dvb.c b/drivers/media/video/cx88/cx88-dvb.c
index c87041dee21e..32775f6a91d3 100644
--- a/drivers/media/video/cx88/cx88-dvb.c
+++ b/drivers/media/video/cx88/cx88-dvb.c
@@ -802,7 +802,7 @@ static int __devinit dvb_probe(struct pci_dev *pci_dev,
802 return -EINVAL; 802 return -EINVAL;
803 803
804 err = -ENODEV; 804 err = -ENODEV;
805 if (!cx88_boards[core->board].dvb) 805 if (!(cx88_boards[core->board].mpeg & CX88_BOARD_DVB))
806 goto fail_core; 806 goto fail_core;
807 807
808 err = -ENOMEM; 808 err = -ENOMEM;
diff --git a/drivers/media/video/cx88/cx88-i2c.c b/drivers/media/video/cx88/cx88-i2c.c
index 27b5dbb2ca1a..440c4171b721 100644
--- a/drivers/media/video/cx88/cx88-i2c.c
+++ b/drivers/media/video/cx88/cx88-i2c.c
@@ -220,7 +220,7 @@ int cx88_i2c_init(struct cx88_core *core, struct pci_dev *pci)
220 220
221 if (core->tuner_type != TUNER_ABSENT) 221 if (core->tuner_type != TUNER_ABSENT)
222 core->i2c_adap.class |= I2C_CLASS_TV_ANALOG; 222 core->i2c_adap.class |= I2C_CLASS_TV_ANALOG;
223 if (cx88_boards[core->board].dvb) 223 if (cx88_boards[core->board].mpeg & CX88_BOARD_DVB)
224 core->i2c_adap.class |= I2C_CLASS_TV_DIGITAL; 224 core->i2c_adap.class |= I2C_CLASS_TV_DIGITAL;
225 225
226 core->i2c_adap.dev.parent = &pci->dev; 226 core->i2c_adap.dev.parent = &pci->dev;
diff --git a/drivers/media/video/cx88/cx88-mpeg.c b/drivers/media/video/cx88/cx88-mpeg.c
index 138a4f692501..957f37c7857a 100644
--- a/drivers/media/video/cx88/cx88-mpeg.c
+++ b/drivers/media/video/cx88/cx88-mpeg.c
@@ -65,8 +65,17 @@ static int cx8802_start_dma(struct cx8802_dev *dev,
65 65
66 /* FIXME: this needs a review. 66 /* FIXME: this needs a review.
67 * also: move to cx88-blackbird + cx88-dvb source files? */ 67 * also: move to cx88-blackbird + cx88-dvb source files? */
68 if (cx88_boards[core->board].mpeg == (CX88_BOARD_DVB | CX88_BOARD_BLACKBIRD) ) {
69 /* Report a warning until the mini driver patch is applied,
70 * else the following conditions will set the dma registers incorrectly.
71 * This will be removed in the next major patch and changes to the conditions
72 * will be made.
73 */
74 printk(KERN_INFO "%s() board->(CX88_BOARD_DVB | CX88_BOARD_BLACKBIRD) is invalid\n", __FUNCTION__);
75 return -EINVAL;
76 }
68 77
69 if (cx88_boards[core->board].dvb) { 78 if (cx88_boards[core->board].mpeg & CX88_BOARD_DVB) {
70 /* negedge driven & software reset */ 79 /* negedge driven & software reset */
71 cx_write(TS_GEN_CNTRL, 0x0040 | dev->ts_gen_cntrl); 80 cx_write(TS_GEN_CNTRL, 0x0040 | dev->ts_gen_cntrl);
72 udelay(100); 81 udelay(100);
@@ -92,7 +101,7 @@ static int cx8802_start_dma(struct cx8802_dev *dev,
92 udelay(100); 101 udelay(100);
93 } 102 }
94 103
95 if (cx88_boards[core->board].blackbird) { 104 if (cx88_boards[core->board].mpeg & CX88_BOARD_BLACKBIRD) {
96 cx_write(MO_PINMUX_IO, 0x88); /* enable MPEG parallel IO */ 105 cx_write(MO_PINMUX_IO, 0x88); /* enable MPEG parallel IO */
97 106
98 cx_write(TS_GEN_CNTRL, 0x46); /* punctured clock TS & posedge driven & software reset */ 107 cx_write(TS_GEN_CNTRL, 0x46); /* punctured clock TS & posedge driven & software reset */
diff --git a/drivers/media/video/cx88/cx88-tvaudio.c b/drivers/media/video/cx88/cx88-tvaudio.c
index 741e7c5e69ec..b6e2bf953cdd 100644
--- a/drivers/media/video/cx88/cx88-tvaudio.c
+++ b/drivers/media/video/cx88/cx88-tvaudio.c
@@ -142,7 +142,7 @@ static void set_audio_finish(struct cx88_core *core, u32 ctl)
142 cx_write(AUD_RATE_THRES_DMD, 0x000000C0); 142 cx_write(AUD_RATE_THRES_DMD, 0x000000C0);
143 cx88_start_audio_dma(core); 143 cx88_start_audio_dma(core);
144 144
145 if (cx88_boards[core->board].blackbird) { 145 if (cx88_boards[core->board].mpeg & CX88_BOARD_BLACKBIRD) {
146 /* sets sound input from external adc */ 146 /* sets sound input from external adc */
147 switch (core->board) { 147 switch (core->board) {
148 case CX88_BOARD_HAUPPAUGE_ROSLYN: 148 case CX88_BOARD_HAUPPAUGE_ROSLYN:
@@ -164,7 +164,7 @@ static void set_audio_finish(struct cx88_core *core, u32 ctl)
164 cx_write(AUD_I2SCNTL, 0); 164 cx_write(AUD_I2SCNTL, 0);
165 /* cx_write(AUD_APB_IN_RATE_ADJ, 0); */ 165 /* cx_write(AUD_APB_IN_RATE_ADJ, 0); */
166 } 166 }
167 if ((always_analog) || (!cx88_boards[core->board].blackbird)) { 167 if ((always_analog) || (!(cx88_boards[core->board].mpeg & CX88_BOARD_BLACKBIRD))) {
168 ctl |= EN_DAC_ENABLE; 168 ctl |= EN_DAC_ENABLE;
169 cx_write(AUD_CTL, ctl); 169 cx_write(AUD_CTL, ctl);
170 } 170 }
diff --git a/drivers/media/video/cx88/cx88.h b/drivers/media/video/cx88/cx88.h
index 2371ab407984..5c4e845c1cf0 100644
--- a/drivers/media/video/cx88/cx88.h
+++ b/drivers/media/video/cx88/cx88.h
@@ -74,6 +74,12 @@ enum cx88_deemph_type {
74 FM_DEEMPH_75 74 FM_DEEMPH_75
75}; 75};
76 76
77enum cx88_board_type {
78 CX88_BOARD_NONE = 0,
79 CX88_BOARD_DVB,
80 CX88_BOARD_BLACKBIRD
81};
82
77/* ----------------------------------------------------------- */ 83/* ----------------------------------------------------------- */
78/* tv norms */ 84/* tv norms */
79 85
@@ -231,8 +237,7 @@ struct cx88_board {
231 int tda9887_conf; 237 int tda9887_conf;
232 struct cx88_input input[MAX_CX88_INPUT]; 238 struct cx88_input input[MAX_CX88_INPUT];
233 struct cx88_input radio; 239 struct cx88_input radio;
234 unsigned int blackbird:1; 240 enum cx88_board_type mpeg;
235 unsigned int dvb:1;
236 enum audiochip audio_chip; 241 enum audiochip audio_chip;
237}; 242};
238 243