diff options
Diffstat (limited to 'drivers/media/video/cx88')
-rw-r--r-- | drivers/media/video/cx88/cx88-alsa.c | 3 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88-blackbird.c | 16 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88-cards.c | 86 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88-core.c | 3 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88-dvb.c | 230 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88-mpeg.c | 4 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88.h | 14 |
7 files changed, 232 insertions, 124 deletions
diff --git a/drivers/media/video/cx88/cx88-alsa.c b/drivers/media/video/cx88/cx88-alsa.c index 06f171ab6149..66c755c116dc 100644 --- a/drivers/media/video/cx88/cx88-alsa.c +++ b/drivers/media/video/cx88/cx88-alsa.c | |||
@@ -742,7 +742,6 @@ static int __devinit snd_cx88_create(struct snd_card *card, | |||
742 | core = cx88_core_get(pci); | 742 | core = cx88_core_get(pci); |
743 | if (NULL == core) { | 743 | if (NULL == core) { |
744 | err = -EINVAL; | 744 | err = -EINVAL; |
745 | kfree (chip); | ||
746 | return err; | 745 | return err; |
747 | } | 746 | } |
748 | 747 | ||
@@ -812,7 +811,7 @@ static int __devinit cx88_audio_initdev(struct pci_dev *pci, | |||
812 | 811 | ||
813 | err = snd_cx88_create(card, pci, &chip); | 812 | err = snd_cx88_create(card, pci, &chip); |
814 | if (err < 0) | 813 | if (err < 0) |
815 | return (err); | 814 | goto error; |
816 | 815 | ||
817 | err = snd_cx88_pcm(chip, 0, "CX88 Digital"); | 816 | err = snd_cx88_pcm(chip, 0, "CX88 Digital"); |
818 | if (err < 0) | 817 | if (err < 0) |
diff --git a/drivers/media/video/cx88/cx88-blackbird.c b/drivers/media/video/cx88/cx88-blackbird.c index d3ae5b4dfca7..e162a70748c5 100644 --- a/drivers/media/video/cx88/cx88-blackbird.c +++ b/drivers/media/video/cx88/cx88-blackbird.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * Support for a cx23416 mpeg encoder via cx2388x host port. | 3 | * Support for a cx23416 mpeg encoder via cx2388x host port. |
4 | * "blackbird" reference design. | 4 | * "blackbird" reference design. |
5 | * | 5 | * |
6 | * (c) 2004 Jelle Foks <jelle@foks.8m.com> | 6 | * (c) 2004 Jelle Foks <jelle@foks.us> |
7 | * (c) 2004 Gerd Knorr <kraxel@bytesex.org> | 7 | * (c) 2004 Gerd Knorr <kraxel@bytesex.org> |
8 | * | 8 | * |
9 | * (c) 2005-2006 Mauro Carvalho Chehab <mchehab@infradead.org> | 9 | * (c) 2005-2006 Mauro Carvalho Chehab <mchehab@infradead.org> |
@@ -39,7 +39,7 @@ | |||
39 | #include "cx88.h" | 39 | #include "cx88.h" |
40 | 40 | ||
41 | MODULE_DESCRIPTION("driver for cx2388x/cx23416 based mpeg encoder cards"); | 41 | MODULE_DESCRIPTION("driver for cx2388x/cx23416 based mpeg encoder cards"); |
42 | MODULE_AUTHOR("Jelle Foks <jelle@foks.8m.com>, Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]"); | 42 | MODULE_AUTHOR("Jelle Foks <jelle@foks.us>, Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]"); |
43 | MODULE_LICENSE("GPL"); | 43 | MODULE_LICENSE("GPL"); |
44 | 44 | ||
45 | static unsigned int mpegbufs = 32; | 45 | static unsigned int mpegbufs = 32; |
@@ -1244,8 +1244,16 @@ static int cx8802_blackbird_advise_acquire(struct cx8802_driver *drv) | |||
1244 | * We're being given access to re-arrange the GPIOs. | 1244 | * We're being given access to re-arrange the GPIOs. |
1245 | * Take the bus off the cx22702 and put the cx23416 on it. | 1245 | * Take the bus off the cx22702 and put the cx23416 on it. |
1246 | */ | 1246 | */ |
1247 | cx_clear(MO_GP0_IO, 0x00000080); /* cx22702 in reset */ | 1247 | /* Toggle reset on cx22702 leaving i2c active */ |
1248 | cx_set(MO_GP0_IO, 0x00000004); /* Disable the cx22702 */ | 1248 | cx_set(MO_GP0_IO, 0x00000080); |
1249 | udelay(1000); | ||
1250 | cx_clear(MO_GP0_IO, 0x00000080); | ||
1251 | udelay(50); | ||
1252 | cx_set(MO_GP0_IO, 0x00000080); | ||
1253 | udelay(1000); | ||
1254 | /* tri-state the cx22702 pins */ | ||
1255 | cx_set(MO_GP0_IO, 0x00000004); | ||
1256 | udelay(1000); | ||
1249 | break; | 1257 | break; |
1250 | default: | 1258 | default: |
1251 | err = -ENODEV; | 1259 | err = -ENODEV; |
diff --git a/drivers/media/video/cx88/cx88-cards.c b/drivers/media/video/cx88/cx88-cards.c index 5bcbb4cc7c2a..733ede34f93a 100644 --- a/drivers/media/video/cx88/cx88-cards.c +++ b/drivers/media/video/cx88/cx88-cards.c | |||
@@ -1237,7 +1237,6 @@ static const struct cx88_board cx88_boards[] = { | |||
1237 | }, | 1237 | }, |
1238 | }, | 1238 | }, |
1239 | [CX88_BOARD_WINFAST_DTV2000H] = { | 1239 | [CX88_BOARD_WINFAST_DTV2000H] = { |
1240 | /* video inputs and radio still in testing */ | ||
1241 | .name = "WinFast DTV2000 H", | 1240 | .name = "WinFast DTV2000 H", |
1242 | .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3, | 1241 | .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3, |
1243 | .radio_type = UNSET, | 1242 | .radio_type = UNSET, |
@@ -1251,7 +1250,35 @@ static const struct cx88_board cx88_boards[] = { | |||
1251 | .gpio1 = 0x00008203, | 1250 | .gpio1 = 0x00008203, |
1252 | .gpio2 = 0x00017304, | 1251 | .gpio2 = 0x00017304, |
1253 | .gpio3 = 0x02000000, | 1252 | .gpio3 = 0x02000000, |
1253 | }, { | ||
1254 | .type = CX88_VMUX_COMPOSITE1, | ||
1255 | .vmux = 1, | ||
1256 | .gpio0 = 0x0001d701, | ||
1257 | .gpio1 = 0x0000b207, | ||
1258 | .gpio2 = 0x0001d701, | ||
1259 | .gpio3 = 0x02000000, | ||
1260 | }, { | ||
1261 | .type = CX88_VMUX_COMPOSITE2, | ||
1262 | .vmux = 2, | ||
1263 | .gpio0 = 0x0001d503, | ||
1264 | .gpio1 = 0x0000b207, | ||
1265 | .gpio2 = 0x0001d503, | ||
1266 | .gpio3 = 0x02000000, | ||
1267 | }, { | ||
1268 | .type = CX88_VMUX_SVIDEO, | ||
1269 | .vmux = 3, | ||
1270 | .gpio0 = 0x0001d701, | ||
1271 | .gpio1 = 0x0000b207, | ||
1272 | .gpio2 = 0x0001d701, | ||
1273 | .gpio3 = 0x02000000, | ||
1254 | }}, | 1274 | }}, |
1275 | .radio = { | ||
1276 | .type = CX88_RADIO, | ||
1277 | .gpio0 = 0x00015702, | ||
1278 | .gpio1 = 0x0000f207, | ||
1279 | .gpio2 = 0x00015702, | ||
1280 | .gpio3 = 0x02000000, | ||
1281 | }, | ||
1255 | .mpeg = CX88_MPEG_DVB, | 1282 | .mpeg = CX88_MPEG_DVB, |
1256 | }, | 1283 | }, |
1257 | [CX88_BOARD_GENIATECH_DVBS] = { | 1284 | [CX88_BOARD_GENIATECH_DVBS] = { |
@@ -1847,6 +1874,18 @@ static const struct cx88_board cx88_boards[] = { | |||
1847 | } }, | 1874 | } }, |
1848 | .mpeg = CX88_MPEG_DVB, | 1875 | .mpeg = CX88_MPEG_DVB, |
1849 | }, | 1876 | }, |
1877 | [CX88_BOARD_TBS_8910] = { | ||
1878 | .name = "TBS 8910 DVB-S", | ||
1879 | .tuner_type = UNSET, | ||
1880 | .radio_type = UNSET, | ||
1881 | .tuner_addr = ADDR_UNSET, | ||
1882 | .radio_addr = ADDR_UNSET, | ||
1883 | .input = {{ | ||
1884 | .type = CX88_VMUX_DVB, | ||
1885 | .vmux = 0, | ||
1886 | } }, | ||
1887 | .mpeg = CX88_MPEG_DVB, | ||
1888 | }, | ||
1850 | [CX88_BOARD_TBS_8920] = { | 1889 | [CX88_BOARD_TBS_8920] = { |
1851 | .name = "TBS 8920 DVB-S/S2", | 1890 | .name = "TBS 8920 DVB-S/S2", |
1852 | .tuner_type = TUNER_ABSENT, | 1891 | .tuner_type = TUNER_ABSENT, |
@@ -1859,6 +1898,18 @@ static const struct cx88_board cx88_boards[] = { | |||
1859 | } }, | 1898 | } }, |
1860 | .mpeg = CX88_MPEG_DVB, | 1899 | .mpeg = CX88_MPEG_DVB, |
1861 | }, | 1900 | }, |
1901 | [CX88_BOARD_PROF_6200] = { | ||
1902 | .name = "Prof 6200 DVB-S", | ||
1903 | .tuner_type = UNSET, | ||
1904 | .radio_type = UNSET, | ||
1905 | .tuner_addr = ADDR_UNSET, | ||
1906 | .radio_addr = ADDR_UNSET, | ||
1907 | .input = {{ | ||
1908 | .type = CX88_VMUX_DVB, | ||
1909 | .vmux = 0, | ||
1910 | } }, | ||
1911 | .mpeg = CX88_MPEG_DVB, | ||
1912 | }, | ||
1862 | [CX88_BOARD_PROF_7300] = { | 1913 | [CX88_BOARD_PROF_7300] = { |
1863 | .name = "PROF 7300 DVB-S/S2", | 1914 | .name = "PROF 7300 DVB-S/S2", |
1864 | .tuner_type = UNSET, | 1915 | .tuner_type = UNSET, |
@@ -1871,6 +1922,18 @@ static const struct cx88_board cx88_boards[] = { | |||
1871 | } }, | 1922 | } }, |
1872 | .mpeg = CX88_MPEG_DVB, | 1923 | .mpeg = CX88_MPEG_DVB, |
1873 | }, | 1924 | }, |
1925 | [CX88_BOARD_SATTRADE_ST4200] = { | ||
1926 | .name = "SATTRADE ST4200 DVB-S/S2", | ||
1927 | .tuner_type = UNSET, | ||
1928 | .radio_type = UNSET, | ||
1929 | .tuner_addr = ADDR_UNSET, | ||
1930 | .radio_addr = ADDR_UNSET, | ||
1931 | .input = {{ | ||
1932 | .type = CX88_VMUX_DVB, | ||
1933 | .vmux = 0, | ||
1934 | } }, | ||
1935 | .mpeg = CX88_MPEG_DVB, | ||
1936 | }, | ||
1874 | }; | 1937 | }; |
1875 | 1938 | ||
1876 | /* ------------------------------------------------------------------ */ | 1939 | /* ------------------------------------------------------------------ */ |
@@ -1897,7 +1960,11 @@ static const struct cx88_subid cx88_subids[] = { | |||
1897 | .subvendor = PCI_VENDOR_ID_ATI, | 1960 | .subvendor = PCI_VENDOR_ID_ATI, |
1898 | .subdevice = 0x00f8, | 1961 | .subdevice = 0x00f8, |
1899 | .card = CX88_BOARD_ATI_WONDER_PRO, | 1962 | .card = CX88_BOARD_ATI_WONDER_PRO, |
1900 | },{ | 1963 | }, { |
1964 | .subvendor = PCI_VENDOR_ID_ATI, | ||
1965 | .subdevice = 0x00f9, | ||
1966 | .card = CX88_BOARD_ATI_WONDER_PRO, | ||
1967 | }, { | ||
1901 | .subvendor = 0x107d, | 1968 | .subvendor = 0x107d, |
1902 | .subdevice = 0x6611, | 1969 | .subdevice = 0x6611, |
1903 | .card = CX88_BOARD_WINFAST2000XP_EXPERT, | 1970 | .card = CX88_BOARD_WINFAST2000XP_EXPERT, |
@@ -2257,13 +2324,25 @@ static const struct cx88_subid cx88_subids[] = { | |||
2257 | .subdevice = 0x2011, | 2324 | .subdevice = 0x2011, |
2258 | .card = CX88_BOARD_OMICOM_SS4_PCI, | 2325 | .card = CX88_BOARD_OMICOM_SS4_PCI, |
2259 | }, { | 2326 | }, { |
2327 | .subvendor = 0x8910, | ||
2328 | .subdevice = 0x8888, | ||
2329 | .card = CX88_BOARD_TBS_8910, | ||
2330 | }, { | ||
2260 | .subvendor = 0x8920, | 2331 | .subvendor = 0x8920, |
2261 | .subdevice = 0x8888, | 2332 | .subdevice = 0x8888, |
2262 | .card = CX88_BOARD_TBS_8920, | 2333 | .card = CX88_BOARD_TBS_8920, |
2263 | }, { | 2334 | }, { |
2335 | .subvendor = 0xb022, | ||
2336 | .subdevice = 0x3022, | ||
2337 | .card = CX88_BOARD_PROF_6200, | ||
2338 | }, { | ||
2264 | .subvendor = 0xB033, | 2339 | .subvendor = 0xB033, |
2265 | .subdevice = 0x3033, | 2340 | .subdevice = 0x3033, |
2266 | .card = CX88_BOARD_PROF_7300, | 2341 | .card = CX88_BOARD_PROF_7300, |
2342 | }, { | ||
2343 | .subvendor = 0xb200, | ||
2344 | .subdevice = 0x4200, | ||
2345 | .card = CX88_BOARD_SATTRADE_ST4200, | ||
2267 | }, | 2346 | }, |
2268 | }; | 2347 | }; |
2269 | 2348 | ||
@@ -2874,8 +2953,11 @@ static void cx88_card_setup(struct cx88_core *core) | |||
2874 | case CX88_BOARD_TEVII_S420: | 2953 | case CX88_BOARD_TEVII_S420: |
2875 | case CX88_BOARD_TEVII_S460: | 2954 | case CX88_BOARD_TEVII_S460: |
2876 | case CX88_BOARD_OMICOM_SS4_PCI: | 2955 | case CX88_BOARD_OMICOM_SS4_PCI: |
2956 | case CX88_BOARD_TBS_8910: | ||
2877 | case CX88_BOARD_TBS_8920: | 2957 | case CX88_BOARD_TBS_8920: |
2958 | case CX88_BOARD_PROF_6200: | ||
2878 | case CX88_BOARD_PROF_7300: | 2959 | case CX88_BOARD_PROF_7300: |
2960 | case CX88_BOARD_SATTRADE_ST4200: | ||
2879 | cx_write(MO_SRST_IO, 0); | 2961 | cx_write(MO_SRST_IO, 0); |
2880 | msleep(100); | 2962 | msleep(100); |
2881 | cx_write(MO_SRST_IO, 1); | 2963 | cx_write(MO_SRST_IO, 1); |
diff --git a/drivers/media/video/cx88/cx88-core.c b/drivers/media/video/cx88/cx88-core.c index 60705b08bfe8..b045874ad04f 100644 --- a/drivers/media/video/cx88/cx88-core.c +++ b/drivers/media/video/cx88/cx88-core.c | |||
@@ -844,6 +844,9 @@ static int set_tvaudio(struct cx88_core *core) | |||
844 | } else if (V4L2_STD_SECAM_L & norm) { | 844 | } else if (V4L2_STD_SECAM_L & norm) { |
845 | core->tvaudio = WW_L; | 845 | core->tvaudio = WW_L; |
846 | 846 | ||
847 | } else if ((V4L2_STD_SECAM_B | V4L2_STD_SECAM_G | V4L2_STD_SECAM_H) & norm) { | ||
848 | core->tvaudio = WW_BG; | ||
849 | |||
847 | } else if (V4L2_STD_SECAM_DK & norm) { | 850 | } else if (V4L2_STD_SECAM_DK & norm) { |
848 | core->tvaudio = WW_DK; | 851 | core->tvaudio = WW_DK; |
849 | 852 | ||
diff --git a/drivers/media/video/cx88/cx88-dvb.c b/drivers/media/video/cx88/cx88-dvb.c index 309ca5e68063..da4dd4913d9f 100644 --- a/drivers/media/video/cx88/cx88-dvb.c +++ b/drivers/media/video/cx88/cx88-dvb.c | |||
@@ -406,7 +406,7 @@ static int tevii_dvbs_set_voltage(struct dvb_frontend *fe, | |||
406 | cx_write(MO_GP0_IO, 0x00006060); | 406 | cx_write(MO_GP0_IO, 0x00006060); |
407 | break; | 407 | break; |
408 | case SEC_VOLTAGE_OFF: | 408 | case SEC_VOLTAGE_OFF: |
409 | printk("LNB Voltage SEC_VOLTAGE_off\n"); | 409 | printk("LNB Voltage SEC_VOLTAGE_off\n"); |
410 | break; | 410 | break; |
411 | } | 411 | } |
412 | 412 | ||
@@ -606,7 +606,7 @@ static int dvb_register(struct cx8802_dev *dev) | |||
606 | /* Get the first frontend */ | 606 | /* Get the first frontend */ |
607 | fe0 = videobuf_dvb_get_frontend(&dev->frontends, 1); | 607 | fe0 = videobuf_dvb_get_frontend(&dev->frontends, 1); |
608 | if (!fe0) | 608 | if (!fe0) |
609 | return -EINVAL; | 609 | goto frontend_detach; |
610 | 610 | ||
611 | /* multi-frontend gate control is undefined or defaults to fe0 */ | 611 | /* multi-frontend gate control is undefined or defaults to fe0 */ |
612 | dev->frontends.gate = 0; | 612 | dev->frontends.gate = 0; |
@@ -653,38 +653,35 @@ static int dvb_register(struct cx8802_dev *dev) | |||
653 | } | 653 | } |
654 | break; | 654 | break; |
655 | case CX88_BOARD_HAUPPAUGE_HVR3000: | 655 | case CX88_BOARD_HAUPPAUGE_HVR3000: |
656 | /* MFE frontend 1 */ | ||
657 | mfe_shared = 1; | ||
658 | dev->frontends.gate = 2; | ||
656 | /* DVB-S init */ | 659 | /* DVB-S init */ |
657 | fe0->dvb.frontend = dvb_attach(cx24123_attach, | 660 | fe0->dvb.frontend = dvb_attach(cx24123_attach, |
658 | &hauppauge_novas_config, | 661 | &hauppauge_novas_config, |
659 | &dev->core->i2c_adap); | 662 | &dev->core->i2c_adap); |
660 | if (fe0->dvb.frontend) { | 663 | if (fe0->dvb.frontend) { |
661 | if (!dvb_attach(isl6421_attach, fe0->dvb.frontend, | 664 | if (!dvb_attach(isl6421_attach, |
662 | &dev->core->i2c_adap, 0x08, ISL6421_DCL, 0x00)) { | 665 | fe0->dvb.frontend, |
663 | dprintk( 1, "%s(): HVR3000 - DVB-S LNB Init: failed\n", __func__); | 666 | &dev->core->i2c_adap, |
664 | } | 667 | 0x08, ISL6421_DCL, 0x00)) |
665 | } else { | 668 | goto frontend_detach; |
666 | dprintk( 1, "%s(): HVR3000 - DVB-S Init: failed\n", __func__); | ||
667 | } | 669 | } |
668 | /* DVB-T init */ | 670 | /* MFE frontend 2 */ |
669 | fe1 = videobuf_dvb_get_frontend(&dev->frontends, 2); | 671 | fe1 = videobuf_dvb_get_frontend(&dev->frontends, 2); |
670 | if (fe1) { | 672 | if (!fe1) |
671 | dev->frontends.gate = 2; | 673 | goto frontend_detach; |
672 | mfe_shared = 1; | 674 | /* DVB-T init */ |
673 | fe1->dvb.frontend = dvb_attach(cx22702_attach, | 675 | fe1->dvb.frontend = dvb_attach(cx22702_attach, |
674 | &hauppauge_hvr_config, | 676 | &hauppauge_hvr_config, |
675 | &dev->core->i2c_adap); | 677 | &dev->core->i2c_adap); |
676 | if (fe1->dvb.frontend) { | 678 | if (fe1->dvb.frontend) { |
677 | fe1->dvb.frontend->id = 1; | 679 | fe1->dvb.frontend->id = 1; |
678 | if(!dvb_attach(simple_tuner_attach, fe1->dvb.frontend, | 680 | if (!dvb_attach(simple_tuner_attach, |
679 | &dev->core->i2c_adap, 0x61, | 681 | fe1->dvb.frontend, |
680 | TUNER_PHILIPS_FMD1216ME_MK3)) { | 682 | &dev->core->i2c_adap, |
681 | dprintk( 1, "%s(): HVR3000 - DVB-T misc Init: failed\n", __func__); | 683 | 0x61, TUNER_PHILIPS_FMD1216ME_MK3)) |
682 | } | 684 | goto frontend_detach; |
683 | } else { | ||
684 | dprintk( 1, "%s(): HVR3000 - DVB-T Init: failed\n", __func__); | ||
685 | } | ||
686 | } else { | ||
687 | dprintk( 1, "%s(): HVR3000 - DVB-T Init: can't find frontend 2.\n", __func__); | ||
688 | } | 685 | } |
689 | break; | 686 | break; |
690 | case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS: | 687 | case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS: |
@@ -998,50 +995,51 @@ static int dvb_register(struct cx8802_dev *dev) | |||
998 | } | 995 | } |
999 | break; | 996 | break; |
1000 | case CX88_BOARD_HAUPPAUGE_HVR4000: | 997 | case CX88_BOARD_HAUPPAUGE_HVR4000: |
998 | /* MFE frontend 1 */ | ||
999 | mfe_shared = 1; | ||
1000 | dev->frontends.gate = 2; | ||
1001 | /* DVB-S/S2 Init */ | 1001 | /* DVB-S/S2 Init */ |
1002 | fe0->dvb.frontend = dvb_attach(cx24116_attach, | 1002 | fe0->dvb.frontend = dvb_attach(cx24116_attach, |
1003 | &hauppauge_hvr4000_config, | 1003 | &hauppauge_hvr4000_config, |
1004 | &dev->core->i2c_adap); | 1004 | &dev->core->i2c_adap); |
1005 | if (fe0->dvb.frontend) { | 1005 | if (fe0->dvb.frontend) { |
1006 | if(!dvb_attach(isl6421_attach, fe0->dvb.frontend, | 1006 | if (!dvb_attach(isl6421_attach, |
1007 | &dev->core->i2c_adap, 0x08, ISL6421_DCL, 0x00)) { | 1007 | fe0->dvb.frontend, |
1008 | dprintk( 1, "%s(): HVR4000 - DVB-S LNB Init: failed\n", __func__); | 1008 | &dev->core->i2c_adap, |
1009 | } | 1009 | 0x08, ISL6421_DCL, 0x00)) |
1010 | } else { | 1010 | goto frontend_detach; |
1011 | dprintk( 1, "%s(): HVR4000 - DVB-S Init: failed\n", __func__); | ||
1012 | } | 1011 | } |
1013 | /* DVB-T Init */ | 1012 | /* MFE frontend 2 */ |
1014 | fe1 = videobuf_dvb_get_frontend(&dev->frontends, 2); | 1013 | fe1 = videobuf_dvb_get_frontend(&dev->frontends, 2); |
1015 | if (fe1) { | 1014 | if (!fe1) |
1016 | dev->frontends.gate = 2; | 1015 | goto frontend_detach; |
1017 | mfe_shared = 1; | 1016 | /* DVB-T Init */ |
1018 | fe1->dvb.frontend = dvb_attach(cx22702_attach, | 1017 | fe1->dvb.frontend = dvb_attach(cx22702_attach, |
1019 | &hauppauge_hvr_config, | 1018 | &hauppauge_hvr_config, |
1020 | &dev->core->i2c_adap); | 1019 | &dev->core->i2c_adap); |
1021 | if (fe1->dvb.frontend) { | 1020 | if (fe1->dvb.frontend) { |
1022 | fe1->dvb.frontend->id = 1; | 1021 | fe1->dvb.frontend->id = 1; |
1023 | if(!dvb_attach(simple_tuner_attach, fe1->dvb.frontend, | 1022 | if (!dvb_attach(simple_tuner_attach, |
1024 | &dev->core->i2c_adap, 0x61, | 1023 | fe1->dvb.frontend, |
1025 | TUNER_PHILIPS_FMD1216ME_MK3)) { | 1024 | &dev->core->i2c_adap, |
1026 | dprintk( 1, "%s(): HVR4000 - DVB-T misc Init: failed\n", __func__); | 1025 | 0x61, TUNER_PHILIPS_FMD1216ME_MK3)) |
1027 | } | 1026 | goto frontend_detach; |
1028 | } else { | ||
1029 | dprintk( 1, "%s(): HVR4000 - DVB-T Init: failed\n", __func__); | ||
1030 | } | ||
1031 | } else { | ||
1032 | dprintk( 1, "%s(): HVR4000 - DVB-T Init: can't find frontend 2.\n", __func__); | ||
1033 | } | 1027 | } |
1034 | break; | 1028 | break; |
1035 | case CX88_BOARD_HAUPPAUGE_HVR4000LITE: | 1029 | case CX88_BOARD_HAUPPAUGE_HVR4000LITE: |
1036 | fe0->dvb.frontend = dvb_attach(cx24116_attach, | 1030 | fe0->dvb.frontend = dvb_attach(cx24116_attach, |
1037 | &hauppauge_hvr4000_config, | 1031 | &hauppauge_hvr4000_config, |
1038 | &dev->core->i2c_adap); | 1032 | &dev->core->i2c_adap); |
1039 | if (fe0->dvb.frontend) { | 1033 | if (fe0->dvb.frontend) { |
1040 | dvb_attach(isl6421_attach, fe0->dvb.frontend, | 1034 | if (!dvb_attach(isl6421_attach, |
1041 | &dev->core->i2c_adap, | 1035 | fe0->dvb.frontend, |
1042 | 0x08, ISL6421_DCL, 0x00); | 1036 | &dev->core->i2c_adap, |
1037 | 0x08, ISL6421_DCL, 0x00)) | ||
1038 | goto frontend_detach; | ||
1043 | } | 1039 | } |
1044 | break; | 1040 | break; |
1041 | case CX88_BOARD_PROF_6200: | ||
1042 | case CX88_BOARD_TBS_8910: | ||
1045 | case CX88_BOARD_TEVII_S420: | 1043 | case CX88_BOARD_TEVII_S420: |
1046 | fe0->dvb.frontend = dvb_attach(stv0299_attach, | 1044 | fe0->dvb.frontend = dvb_attach(stv0299_attach, |
1047 | &tevii_tuner_sharp_config, | 1045 | &tevii_tuner_sharp_config, |
@@ -1070,21 +1068,18 @@ static int dvb_register(struct cx8802_dev *dev) | |||
1070 | fe0->dvb.frontend = dvb_attach(cx24116_attach, | 1068 | fe0->dvb.frontend = dvb_attach(cx24116_attach, |
1071 | &tevii_s460_config, | 1069 | &tevii_s460_config, |
1072 | &core->i2c_adap); | 1070 | &core->i2c_adap); |
1073 | if (fe0->dvb.frontend != NULL) { | 1071 | if (fe0->dvb.frontend != NULL) |
1074 | core->prev_set_voltage = fe0->dvb.frontend->ops.set_voltage; | ||
1075 | fe0->dvb.frontend->ops.set_voltage = tevii_dvbs_set_voltage; | 1072 | fe0->dvb.frontend->ops.set_voltage = tevii_dvbs_set_voltage; |
1076 | } | ||
1077 | break; | 1073 | break; |
1078 | case CX88_BOARD_OMICOM_SS4_PCI: | 1074 | case CX88_BOARD_OMICOM_SS4_PCI: |
1079 | case CX88_BOARD_TBS_8920: | 1075 | case CX88_BOARD_TBS_8920: |
1080 | case CX88_BOARD_PROF_7300: | 1076 | case CX88_BOARD_PROF_7300: |
1077 | case CX88_BOARD_SATTRADE_ST4200: | ||
1081 | fe0->dvb.frontend = dvb_attach(cx24116_attach, | 1078 | fe0->dvb.frontend = dvb_attach(cx24116_attach, |
1082 | &hauppauge_hvr4000_config, | 1079 | &hauppauge_hvr4000_config, |
1083 | &core->i2c_adap); | 1080 | &core->i2c_adap); |
1084 | if (fe0->dvb.frontend != NULL) { | 1081 | if (fe0->dvb.frontend != NULL) |
1085 | core->prev_set_voltage = fe0->dvb.frontend->ops.set_voltage; | ||
1086 | fe0->dvb.frontend->ops.set_voltage = tevii_dvbs_set_voltage; | 1082 | fe0->dvb.frontend->ops.set_voltage = tevii_dvbs_set_voltage; |
1087 | } | ||
1088 | break; | 1083 | break; |
1089 | default: | 1084 | default: |
1090 | printk(KERN_ERR "%s/2: The frontend of your DVB/ATSC card isn't supported yet\n", | 1085 | printk(KERN_ERR "%s/2: The frontend of your DVB/ATSC card isn't supported yet\n", |
@@ -1092,11 +1087,11 @@ static int dvb_register(struct cx8802_dev *dev) | |||
1092 | break; | 1087 | break; |
1093 | } | 1088 | } |
1094 | 1089 | ||
1095 | if ( (NULL == fe0->dvb.frontend) || (fe1 && NULL == fe1->dvb.frontend) ) { | 1090 | if ( (NULL == fe0->dvb.frontend) || (fe1 && NULL == fe1->dvb.frontend) ) { |
1096 | printk(KERN_ERR | 1091 | printk(KERN_ERR |
1097 | "%s/2: frontend initialization failed\n", | 1092 | "%s/2: frontend initialization failed\n", |
1098 | core->name); | 1093 | core->name); |
1099 | return -EINVAL; | 1094 | goto frontend_detach; |
1100 | } | 1095 | } |
1101 | /* define general-purpose callback pointer */ | 1096 | /* define general-purpose callback pointer */ |
1102 | fe0->dvb.frontend->callback = cx88_tuner_callback; | 1097 | fe0->dvb.frontend->callback = cx88_tuner_callback; |
@@ -1133,40 +1128,44 @@ static int cx8802_dvb_advise_acquire(struct cx8802_driver *drv) | |||
1133 | * on the bus. Take the bus from the cx23416 and enable the | 1128 | * on the bus. Take the bus from the cx23416 and enable the |
1134 | * cx22702 demod | 1129 | * cx22702 demod |
1135 | */ | 1130 | */ |
1136 | cx_set(MO_GP0_IO, 0x00000080); /* cx22702 out of reset and enable */ | 1131 | /* Toggle reset on cx22702 leaving i2c active */ |
1132 | cx_set(MO_GP0_IO, 0x00000080); | ||
1133 | udelay(1000); | ||
1134 | cx_clear(MO_GP0_IO, 0x00000080); | ||
1135 | udelay(50); | ||
1136 | cx_set(MO_GP0_IO, 0x00000080); | ||
1137 | udelay(1000); | ||
1138 | /* enable the cx22702 pins */ | ||
1137 | cx_clear(MO_GP0_IO, 0x00000004); | 1139 | cx_clear(MO_GP0_IO, 0x00000004); |
1138 | udelay(1000); | 1140 | udelay(1000); |
1139 | break; | 1141 | break; |
1140 | 1142 | ||
1141 | case CX88_BOARD_HAUPPAUGE_HVR3000: | 1143 | case CX88_BOARD_HAUPPAUGE_HVR3000: |
1142 | case CX88_BOARD_HAUPPAUGE_HVR4000: | 1144 | case CX88_BOARD_HAUPPAUGE_HVR4000: |
1143 | if(core->dvbdev->frontends.active_fe_id == 1) { | 1145 | /* Toggle reset on cx22702 leaving i2c active */ |
1144 | /* DVB-S/S2 Enabled */ | 1146 | cx_set(MO_GP0_IO, 0x00000080); |
1145 | 1147 | udelay(1000); | |
1146 | /* Toggle reset on cx22702 leaving i2c active */ | 1148 | cx_clear(MO_GP0_IO, 0x00000080); |
1147 | cx_write(MO_GP0_IO, (core->board.input[0].gpio0 & 0x0000ff00) | 0x00000080); | 1149 | udelay(50); |
1148 | udelay(1000); | 1150 | cx_set(MO_GP0_IO, 0x00000080); |
1149 | cx_clear(MO_GP0_IO, 0x00000080); | 1151 | udelay(1000); |
1150 | udelay(50); | 1152 | switch (core->dvbdev->frontends.active_fe_id) { |
1151 | cx_set(MO_GP0_IO, 0x00000080); /* cx22702 out of reset */ | 1153 | case 1: /* DVB-S/S2 Enabled */ |
1152 | cx_set(MO_GP0_IO, 0x00000004); /* tri-state the cx22702 pins */ | 1154 | /* tri-state the cx22702 pins */ |
1153 | udelay(1000); | 1155 | cx_set(MO_GP0_IO, 0x00000004); |
1154 | 1156 | /* Take the cx24116/cx24123 out of reset */ | |
1155 | cx_write(MO_SRST_IO, 1); /* Take the cx24116/cx24123 out of reset */ | 1157 | cx_write(MO_SRST_IO, 1); |
1156 | core->dvbdev->ts_gen_cntrl = 0x02; /* Parallel IO */ | 1158 | core->dvbdev->ts_gen_cntrl = 0x02; /* Parallel IO */ |
1157 | } else | 1159 | break; |
1158 | if (core->dvbdev->frontends.active_fe_id == 2) { | 1160 | case 2: /* DVB-T Enabled */ |
1159 | /* DVB-T Enabled */ | ||
1160 | |||
1161 | /* Put the cx24116/cx24123 into reset */ | 1161 | /* Put the cx24116/cx24123 into reset */ |
1162 | cx_write(MO_SRST_IO, 0); | 1162 | cx_write(MO_SRST_IO, 0); |
1163 | 1163 | /* enable the cx22702 pins */ | |
1164 | /* cx22702 out of reset and enable it */ | ||
1165 | cx_set(MO_GP0_IO, 0x00000080); | ||
1166 | cx_clear(MO_GP0_IO, 0x00000004); | 1164 | cx_clear(MO_GP0_IO, 0x00000004); |
1167 | core->dvbdev->ts_gen_cntrl = 0x0c; /* Serial IO */ | 1165 | core->dvbdev->ts_gen_cntrl = 0x0c; /* Serial IO */ |
1168 | udelay(1000); | 1166 | break; |
1169 | } | 1167 | } |
1168 | udelay(1000); | ||
1170 | break; | 1169 | break; |
1171 | 1170 | ||
1172 | default: | 1171 | default: |
@@ -1199,8 +1198,7 @@ static int cx8802_dvb_probe(struct cx8802_driver *drv) | |||
1199 | { | 1198 | { |
1200 | struct cx88_core *core = drv->core; | 1199 | struct cx88_core *core = drv->core; |
1201 | struct cx8802_dev *dev = drv->core->dvbdev; | 1200 | struct cx8802_dev *dev = drv->core->dvbdev; |
1202 | int err, i; | 1201 | int err; |
1203 | struct videobuf_dvb_frontend *fe; | ||
1204 | 1202 | ||
1205 | dprintk( 1, "%s\n", __func__); | 1203 | dprintk( 1, "%s\n", __func__); |
1206 | dprintk( 1, " ->being probed by Card=%d Name=%s, PCI %02x:%02x\n", | 1204 | dprintk( 1, " ->being probed by Card=%d Name=%s, PCI %02x:%02x\n", |
@@ -1216,31 +1214,47 @@ static int cx8802_dvb_probe(struct cx8802_driver *drv) | |||
1216 | /* If vp3054 isn't enabled, a stub will just return 0 */ | 1214 | /* If vp3054 isn't enabled, a stub will just return 0 */ |
1217 | err = vp3054_i2c_probe(dev); | 1215 | err = vp3054_i2c_probe(dev); |
1218 | if (0 != err) | 1216 | if (0 != err) |
1219 | goto fail_core; | 1217 | goto fail_probe; |
1220 | 1218 | ||
1221 | /* dvb stuff */ | 1219 | /* dvb stuff */ |
1222 | printk(KERN_INFO "%s/2: cx2388x based DVB/ATSC card\n", core->name); | 1220 | printk(KERN_INFO "%s/2: cx2388x based DVB/ATSC card\n", core->name); |
1223 | dev->ts_gen_cntrl = 0x0c; | 1221 | dev->ts_gen_cntrl = 0x0c; |
1224 | 1222 | ||
1225 | for (i = 1; i <= core->board.num_frontends; i++) { | 1223 | err = -ENODEV; |
1226 | fe = videobuf_dvb_get_frontend(&core->dvbdev->frontends, i); | 1224 | if (core->board.num_frontends) { |
1227 | if (!fe) { | 1225 | struct videobuf_dvb_frontend *fe; |
1228 | printk(KERN_ERR "%s() failed to get frontend(%d)\n", __func__, i); | 1226 | int i; |
1229 | continue; | 1227 | |
1228 | for (i = 1; i <= core->board.num_frontends; i++) { | ||
1229 | fe = videobuf_dvb_get_frontend(&core->dvbdev->frontends, i); | ||
1230 | if (fe == NULL) { | ||
1231 | printk(KERN_ERR "%s() failed to get frontend(%d)\n", | ||
1232 | __func__, i); | ||
1233 | goto fail_probe; | ||
1234 | } | ||
1235 | videobuf_queue_sg_init(&fe->dvb.dvbq, &dvb_qops, | ||
1236 | &dev->pci->dev, &dev->slock, | ||
1237 | V4L2_BUF_TYPE_VIDEO_CAPTURE, | ||
1238 | V4L2_FIELD_TOP, | ||
1239 | sizeof(struct cx88_buffer), | ||
1240 | dev); | ||
1241 | /* init struct videobuf_dvb */ | ||
1242 | fe->dvb.name = dev->core->name; | ||
1230 | } | 1243 | } |
1231 | videobuf_queue_sg_init(&fe->dvb.dvbq, &dvb_qops, | 1244 | } else { |
1232 | &dev->pci->dev, &dev->slock, | 1245 | /* no frontends allocated */ |
1233 | V4L2_BUF_TYPE_VIDEO_CAPTURE, | 1246 | printk(KERN_ERR "%s/2 .num_frontends should be non-zero\n", |
1234 | V4L2_FIELD_TOP, | 1247 | core->name); |
1235 | sizeof(struct cx88_buffer), | 1248 | goto fail_core; |
1236 | dev); | ||
1237 | /* init struct videobuf_dvb */ | ||
1238 | fe->dvb.name = dev->core->name; | ||
1239 | } | 1249 | } |
1240 | err = dvb_register(dev); | 1250 | err = dvb_register(dev); |
1241 | if (err != 0) | 1251 | if (err) |
1252 | /* frontends/adapter de-allocated in dvb_register */ | ||
1242 | printk(KERN_ERR "%s/2: dvb_register failed (err = %d)\n", | 1253 | printk(KERN_ERR "%s/2: dvb_register failed (err = %d)\n", |
1243 | core->name, err); | 1254 | core->name, err); |
1255 | return err; | ||
1256 | fail_probe: | ||
1257 | videobuf_dvb_dealloc_frontends(&core->dvbdev->frontends); | ||
1244 | fail_core: | 1258 | fail_core: |
1245 | return err; | 1259 | return err; |
1246 | } | 1260 | } |
diff --git a/drivers/media/video/cx88/cx88-mpeg.c b/drivers/media/video/cx88/cx88-mpeg.c index 3ebdcd1d83f8..a04fee235db6 100644 --- a/drivers/media/video/cx88/cx88-mpeg.c +++ b/drivers/media/video/cx88/cx88-mpeg.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * Support for the mpeg transport stream transfers | 3 | * Support for the mpeg transport stream transfers |
4 | * PCI function #2 of the cx2388x. | 4 | * PCI function #2 of the cx2388x. |
5 | * | 5 | * |
6 | * (c) 2004 Jelle Foks <jelle@foks.8m.com> | 6 | * (c) 2004 Jelle Foks <jelle@foks.us> |
7 | * (c) 2004 Chris Pascoe <c.pascoe@itee.uq.edu.au> | 7 | * (c) 2004 Chris Pascoe <c.pascoe@itee.uq.edu.au> |
8 | * (c) 2004 Gerd Knorr <kraxel@bytesex.org> | 8 | * (c) 2004 Gerd Knorr <kraxel@bytesex.org> |
9 | * | 9 | * |
@@ -34,7 +34,7 @@ | |||
34 | /* ------------------------------------------------------------------ */ | 34 | /* ------------------------------------------------------------------ */ |
35 | 35 | ||
36 | MODULE_DESCRIPTION("mpeg driver for cx2388x based TV cards"); | 36 | MODULE_DESCRIPTION("mpeg driver for cx2388x based TV cards"); |
37 | MODULE_AUTHOR("Jelle Foks <jelle@foks.8m.com>"); | 37 | MODULE_AUTHOR("Jelle Foks <jelle@foks.us>"); |
38 | MODULE_AUTHOR("Chris Pascoe <c.pascoe@itee.uq.edu.au>"); | 38 | MODULE_AUTHOR("Chris Pascoe <c.pascoe@itee.uq.edu.au>"); |
39 | MODULE_AUTHOR("Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]"); | 39 | MODULE_AUTHOR("Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]"); |
40 | MODULE_LICENSE("GPL"); | 40 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/media/video/cx88/cx88.h b/drivers/media/video/cx88/cx88.h index f4240965be32..20649b25f7ba 100644 --- a/drivers/media/video/cx88/cx88.h +++ b/drivers/media/video/cx88/cx88.h | |||
@@ -53,12 +53,11 @@ | |||
53 | /* ----------------------------------------------------------- */ | 53 | /* ----------------------------------------------------------- */ |
54 | /* defines and enums */ | 54 | /* defines and enums */ |
55 | 55 | ||
56 | /* Currently unsupported by the driver: PAL/H, NTSC/Kr, SECAM B/G/H/LC */ | 56 | /* Currently unsupported by the driver: PAL/H, NTSC/Kr, SECAM/LC */ |
57 | #define CX88_NORMS (\ | 57 | #define CX88_NORMS (V4L2_STD_ALL \ |
58 | V4L2_STD_NTSC_M| V4L2_STD_NTSC_M_JP| V4L2_STD_NTSC_443 | \ | 58 | & ~V4L2_STD_PAL_H \ |
59 | V4L2_STD_PAL_BG| V4L2_STD_PAL_DK | V4L2_STD_PAL_I | \ | 59 | & ~V4L2_STD_NTSC_M_KR \ |
60 | V4L2_STD_PAL_M | V4L2_STD_PAL_N | V4L2_STD_PAL_Nc | \ | 60 | & ~V4L2_STD_SECAM_LC) |
61 | V4L2_STD_PAL_60| V4L2_STD_SECAM_L | V4L2_STD_SECAM_DK ) | ||
62 | 61 | ||
63 | #define FORMAT_FLAGS_PACKED 0x01 | 62 | #define FORMAT_FLAGS_PACKED 0x01 |
64 | #define FORMAT_FLAGS_PLANAR 0x02 | 63 | #define FORMAT_FLAGS_PLANAR 0x02 |
@@ -229,6 +228,9 @@ extern struct sram_channel cx88_sram_channels[]; | |||
229 | #define CX88_BOARD_TEVII_S420 73 | 228 | #define CX88_BOARD_TEVII_S420 73 |
230 | #define CX88_BOARD_PROLINK_PV_GLOBAL_XTREME 74 | 229 | #define CX88_BOARD_PROLINK_PV_GLOBAL_XTREME 74 |
231 | #define CX88_BOARD_PROF_7300 75 | 230 | #define CX88_BOARD_PROF_7300 75 |
231 | #define CX88_BOARD_SATTRADE_ST4200 76 | ||
232 | #define CX88_BOARD_TBS_8910 77 | ||
233 | #define CX88_BOARD_PROF_6200 78 | ||
232 | 234 | ||
233 | enum cx88_itype { | 235 | enum cx88_itype { |
234 | CX88_VMUX_COMPOSITE1 = 1, | 236 | CX88_VMUX_COMPOSITE1 = 1, |