diff options
Diffstat (limited to 'drivers/media/video/cx88')
-rw-r--r-- | drivers/media/video/cx88/Kconfig | 10 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88-cards.c | 94 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88-dvb.c | 30 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88-i2c.c | 2 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88-input.c | 4 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88.h | 2 |
6 files changed, 127 insertions, 15 deletions
diff --git a/drivers/media/video/cx88/Kconfig b/drivers/media/video/cx88/Kconfig index 5c42abdf422f..3598dc087b08 100644 --- a/drivers/media/video/cx88/Kconfig +++ b/drivers/media/video/cx88/Kconfig | |||
@@ -70,11 +70,6 @@ config VIDEO_CX88_DVB | |||
70 | To compile this driver as a module, choose M here: the | 70 | To compile this driver as a module, choose M here: the |
71 | module will be called cx88-dvb. | 71 | module will be called cx88-dvb. |
72 | 72 | ||
73 | config VIDEO_CX88_MPEG | ||
74 | tristate | ||
75 | depends on VIDEO_CX88_DVB || VIDEO_CX88_BLACKBIRD | ||
76 | default y | ||
77 | |||
78 | config VIDEO_CX88_VP3054 | 73 | config VIDEO_CX88_VP3054 |
79 | tristate "VP-3054 Secondary I2C Bus Support" | 74 | tristate "VP-3054 Secondary I2C Bus Support" |
80 | default m | 75 | default m |
@@ -84,3 +79,8 @@ config VIDEO_CX88_VP3054 | |||
84 | Conexant 2388x chip and the MT352 demodulator, | 79 | Conexant 2388x chip and the MT352 demodulator, |
85 | which also require support for the VP-3054 | 80 | which also require support for the VP-3054 |
86 | Secondary I2C bus, such at DNTV Live! DVB-T Pro. | 81 | Secondary I2C bus, such at DNTV Live! DVB-T Pro. |
82 | |||
83 | config VIDEO_CX88_MPEG | ||
84 | tristate | ||
85 | depends on VIDEO_CX88_DVB || VIDEO_CX88_BLACKBIRD | ||
86 | default y | ||
diff --git a/drivers/media/video/cx88/cx88-cards.c b/drivers/media/video/cx88/cx88-cards.c index 0d719faafd8a..62c7ad050f9b 100644 --- a/drivers/media/video/cx88/cx88-cards.c +++ b/drivers/media/video/cx88/cx88-cards.c | |||
@@ -1306,7 +1306,7 @@ static const struct cx88_board cx88_boards[] = { | |||
1306 | }, | 1306 | }, |
1307 | [CX88_BOARD_WINFAST_DTV2000H_J] = { | 1307 | [CX88_BOARD_WINFAST_DTV2000H_J] = { |
1308 | .name = "WinFast DTV2000 H rev. J", | 1308 | .name = "WinFast DTV2000 H rev. J", |
1309 | .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3, | 1309 | .tuner_type = TUNER_PHILIPS_FMD1216MEX_MK3, |
1310 | .radio_type = UNSET, | 1310 | .radio_type = UNSET, |
1311 | .tuner_addr = ADDR_UNSET, | 1311 | .tuner_addr = ADDR_UNSET, |
1312 | .radio_addr = ADDR_UNSET, | 1312 | .radio_addr = ADDR_UNSET, |
@@ -1643,6 +1643,78 @@ static const struct cx88_board cx88_boards[] = { | |||
1643 | .gpio3 = 0x0000, | 1643 | .gpio3 = 0x0000, |
1644 | }, | 1644 | }, |
1645 | }, | 1645 | }, |
1646 | [CX88_BOARD_WINFAST_TV2000_XP_GLOBAL_6F36] = { | ||
1647 | .name = "Leadtek TV2000 XP Global (SC4100)", | ||
1648 | .tuner_type = TUNER_XC4000, | ||
1649 | .tuner_addr = 0x61, | ||
1650 | .radio_type = UNSET, | ||
1651 | .radio_addr = ADDR_UNSET, | ||
1652 | .input = { { | ||
1653 | .type = CX88_VMUX_TELEVISION, | ||
1654 | .vmux = 0, | ||
1655 | .gpio0 = 0x0400, /* pin 2 = 0 */ | ||
1656 | .gpio1 = 0x0000, | ||
1657 | .gpio2 = 0x0C04, /* pin 18 = 1, pin 19 = 0 */ | ||
1658 | .gpio3 = 0x0000, | ||
1659 | }, { | ||
1660 | .type = CX88_VMUX_COMPOSITE1, | ||
1661 | .vmux = 1, | ||
1662 | .gpio0 = 0x0400, /* pin 2 = 0 */ | ||
1663 | .gpio1 = 0x0000, | ||
1664 | .gpio2 = 0x0C0C, /* pin 18 = 1, pin 19 = 1 */ | ||
1665 | .gpio3 = 0x0000, | ||
1666 | }, { | ||
1667 | .type = CX88_VMUX_SVIDEO, | ||
1668 | .vmux = 2, | ||
1669 | .gpio0 = 0x0400, /* pin 2 = 0 */ | ||
1670 | .gpio1 = 0x0000, | ||
1671 | .gpio2 = 0x0C0C, /* pin 18 = 1, pin 19 = 1 */ | ||
1672 | .gpio3 = 0x0000, | ||
1673 | } }, | ||
1674 | .radio = { | ||
1675 | .type = CX88_RADIO, | ||
1676 | .gpio0 = 0x0400, /* pin 2 = 0 */ | ||
1677 | .gpio1 = 0x0000, | ||
1678 | .gpio2 = 0x0C00, /* pin 18 = 0, pin 19 = 0 */ | ||
1679 | .gpio3 = 0x0000, | ||
1680 | }, | ||
1681 | }, | ||
1682 | [CX88_BOARD_WINFAST_TV2000_XP_GLOBAL_6F43] = { | ||
1683 | .name = "Leadtek TV2000 XP Global (XC4100)", | ||
1684 | .tuner_type = TUNER_XC4000, | ||
1685 | .tuner_addr = 0x61, | ||
1686 | .radio_type = UNSET, | ||
1687 | .radio_addr = ADDR_UNSET, | ||
1688 | .input = { { | ||
1689 | .type = CX88_VMUX_TELEVISION, | ||
1690 | .vmux = 0, | ||
1691 | .gpio0 = 0x0400, /* pin 2 = 0 */ | ||
1692 | .gpio1 = 0x6040, /* pin 14 = 1, pin 13 = 0 */ | ||
1693 | .gpio2 = 0x0000, | ||
1694 | .gpio3 = 0x0000, | ||
1695 | }, { | ||
1696 | .type = CX88_VMUX_COMPOSITE1, | ||
1697 | .vmux = 1, | ||
1698 | .gpio0 = 0x0400, /* pin 2 = 0 */ | ||
1699 | .gpio1 = 0x6060, /* pin 14 = 1, pin 13 = 1 */ | ||
1700 | .gpio2 = 0x0000, | ||
1701 | .gpio3 = 0x0000, | ||
1702 | }, { | ||
1703 | .type = CX88_VMUX_SVIDEO, | ||
1704 | .vmux = 2, | ||
1705 | .gpio0 = 0x0400, /* pin 2 = 0 */ | ||
1706 | .gpio1 = 0x6060, /* pin 14 = 1, pin 13 = 1 */ | ||
1707 | .gpio2 = 0x0000, | ||
1708 | .gpio3 = 0x0000, | ||
1709 | } }, | ||
1710 | .radio = { | ||
1711 | .type = CX88_RADIO, | ||
1712 | .gpio0 = 0x0400, /* pin 2 = 0 */ | ||
1713 | .gpio1 = 0x6000, /* pin 14 = 1, pin 13 = 0 */ | ||
1714 | .gpio2 = 0x0000, | ||
1715 | .gpio3 = 0x0000, | ||
1716 | }, | ||
1717 | }, | ||
1646 | [CX88_BOARD_POWERCOLOR_REAL_ANGEL] = { | 1718 | [CX88_BOARD_POWERCOLOR_REAL_ANGEL] = { |
1647 | .name = "PowerColor RA330", /* Long names may confuse LIRC. */ | 1719 | .name = "PowerColor RA330", /* Long names may confuse LIRC. */ |
1648 | .tuner_type = TUNER_XC2028, | 1720 | .tuner_type = TUNER_XC2028, |
@@ -2719,6 +2791,21 @@ static const struct cx88_subid cx88_subids[] = { | |||
2719 | .subdevice = 0x6618, | 2791 | .subdevice = 0x6618, |
2720 | .card = CX88_BOARD_WINFAST_TV2000_XP_GLOBAL, | 2792 | .card = CX88_BOARD_WINFAST_TV2000_XP_GLOBAL, |
2721 | }, { | 2793 | }, { |
2794 | /* TV2000 XP Global [107d:6618] */ | ||
2795 | .subvendor = 0x107d, | ||
2796 | .subdevice = 0x6619, | ||
2797 | .card = CX88_BOARD_WINFAST_TV2000_XP_GLOBAL, | ||
2798 | }, { | ||
2799 | /* WinFast TV2000 XP Global with XC4000 tuner */ | ||
2800 | .subvendor = 0x107d, | ||
2801 | .subdevice = 0x6f36, | ||
2802 | .card = CX88_BOARD_WINFAST_TV2000_XP_GLOBAL_6F36, | ||
2803 | }, { | ||
2804 | /* WinFast TV2000 XP Global with XC4000 tuner and different GPIOs */ | ||
2805 | .subvendor = 0x107d, | ||
2806 | .subdevice = 0x6f43, | ||
2807 | .card = CX88_BOARD_WINFAST_TV2000_XP_GLOBAL_6F43, | ||
2808 | }, { | ||
2722 | .subvendor = 0xb034, | 2809 | .subvendor = 0xb034, |
2723 | .subdevice = 0x3034, | 2810 | .subdevice = 0x3034, |
2724 | .card = CX88_BOARD_PROF_7301, | 2811 | .card = CX88_BOARD_PROF_7301, |
@@ -3075,6 +3162,8 @@ static int cx88_xc4000_tuner_callback(struct cx88_core *core, | |||
3075 | switch (core->boardnr) { | 3162 | switch (core->boardnr) { |
3076 | case CX88_BOARD_WINFAST_DTV1800H_XC4000: | 3163 | case CX88_BOARD_WINFAST_DTV1800H_XC4000: |
3077 | case CX88_BOARD_WINFAST_DTV2000H_PLUS: | 3164 | case CX88_BOARD_WINFAST_DTV2000H_PLUS: |
3165 | case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL_6F36: | ||
3166 | case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL_6F43: | ||
3078 | return cx88_xc4000_winfast2000h_plus_callback(core, | 3167 | return cx88_xc4000_winfast2000h_plus_callback(core, |
3079 | command, arg); | 3168 | command, arg); |
3080 | } | 3169 | } |
@@ -3232,6 +3321,7 @@ static void cx88_card_setup_pre_i2c(struct cx88_core *core) | |||
3232 | cx_set(MO_GP0_IO, 0x00001010); | 3321 | cx_set(MO_GP0_IO, 0x00001010); |
3233 | break; | 3322 | break; |
3234 | 3323 | ||
3324 | case CX88_BOARD_WINFAST_DTV2000H_J: | ||
3235 | case CX88_BOARD_HAUPPAUGE_HVR3000: | 3325 | case CX88_BOARD_HAUPPAUGE_HVR3000: |
3236 | case CX88_BOARD_HAUPPAUGE_HVR4000: | 3326 | case CX88_BOARD_HAUPPAUGE_HVR4000: |
3237 | /* Init GPIO */ | 3327 | /* Init GPIO */ |
@@ -3250,6 +3340,8 @@ static void cx88_card_setup_pre_i2c(struct cx88_core *core) | |||
3250 | 3340 | ||
3251 | case CX88_BOARD_WINFAST_DTV1800H_XC4000: | 3341 | case CX88_BOARD_WINFAST_DTV1800H_XC4000: |
3252 | case CX88_BOARD_WINFAST_DTV2000H_PLUS: | 3342 | case CX88_BOARD_WINFAST_DTV2000H_PLUS: |
3343 | case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL_6F36: | ||
3344 | case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL_6F43: | ||
3253 | cx88_xc4000_winfast2000h_plus_callback(core, | 3345 | cx88_xc4000_winfast2000h_plus_callback(core, |
3254 | XC4000_TUNER_RESET, 0); | 3346 | XC4000_TUNER_RESET, 0); |
3255 | break; | 3347 | break; |
diff --git a/drivers/media/video/cx88/cx88-dvb.c b/drivers/media/video/cx88/cx88-dvb.c index cf3d33ab541b..003937cd72f5 100644 --- a/drivers/media/video/cx88/cx88-dvb.c +++ b/drivers/media/video/cx88/cx88-dvb.c | |||
@@ -815,9 +815,9 @@ static const u8 samsung_smt_7020_inittab[] = { | |||
815 | }; | 815 | }; |
816 | 816 | ||
817 | 817 | ||
818 | static int samsung_smt_7020_tuner_set_params(struct dvb_frontend *fe, | 818 | static int samsung_smt_7020_tuner_set_params(struct dvb_frontend *fe) |
819 | struct dvb_frontend_parameters *params) | ||
820 | { | 819 | { |
820 | struct dtv_frontend_properties *c = &fe->dtv_property_cache; | ||
821 | struct cx8802_dev *dev = fe->dvb->priv; | 821 | struct cx8802_dev *dev = fe->dvb->priv; |
822 | u8 buf[4]; | 822 | u8 buf[4]; |
823 | u32 div; | 823 | u32 div; |
@@ -827,14 +827,14 @@ static int samsung_smt_7020_tuner_set_params(struct dvb_frontend *fe, | |||
827 | .buf = buf, | 827 | .buf = buf, |
828 | .len = sizeof(buf) }; | 828 | .len = sizeof(buf) }; |
829 | 829 | ||
830 | div = params->frequency / 125; | 830 | div = c->frequency / 125; |
831 | 831 | ||
832 | buf[0] = (div >> 8) & 0x7f; | 832 | buf[0] = (div >> 8) & 0x7f; |
833 | buf[1] = div & 0xff; | 833 | buf[1] = div & 0xff; |
834 | buf[2] = 0x84; /* 0xC4 */ | 834 | buf[2] = 0x84; /* 0xC4 */ |
835 | buf[3] = 0x00; | 835 | buf[3] = 0x00; |
836 | 836 | ||
837 | if (params->frequency < 1500000) | 837 | if (c->frequency < 1500000) |
838 | buf[3] |= 0x10; | 838 | buf[3] |= 0x10; |
839 | 839 | ||
840 | if (fe->ops.i2c_gate_ctrl) | 840 | if (fe->ops.i2c_gate_ctrl) |
@@ -954,6 +954,7 @@ static int dvb_register(struct cx8802_dev *dev) | |||
954 | struct cx88_core *core = dev->core; | 954 | struct cx88_core *core = dev->core; |
955 | struct videobuf_dvb_frontend *fe0, *fe1 = NULL; | 955 | struct videobuf_dvb_frontend *fe0, *fe1 = NULL; |
956 | int mfe_shared = 0; /* bus not shared by default */ | 956 | int mfe_shared = 0; /* bus not shared by default */ |
957 | int res = -EINVAL; | ||
957 | 958 | ||
958 | if (0 != core->i2c_rc) { | 959 | if (0 != core->i2c_rc) { |
959 | printk(KERN_ERR "%s/2: no i2c-bus available, cannot attach dvb drivers\n", core->name); | 960 | printk(KERN_ERR "%s/2: no i2c-bus available, cannot attach dvb drivers\n", core->name); |
@@ -999,7 +1000,6 @@ static int dvb_register(struct cx8802_dev *dev) | |||
999 | } | 1000 | } |
1000 | break; | 1001 | break; |
1001 | case CX88_BOARD_WINFAST_DTV2000H: | 1002 | case CX88_BOARD_WINFAST_DTV2000H: |
1002 | case CX88_BOARD_WINFAST_DTV2000H_J: | ||
1003 | case CX88_BOARD_HAUPPAUGE_HVR1100: | 1003 | case CX88_BOARD_HAUPPAUGE_HVR1100: |
1004 | case CX88_BOARD_HAUPPAUGE_HVR1100LP: | 1004 | case CX88_BOARD_HAUPPAUGE_HVR1100LP: |
1005 | case CX88_BOARD_HAUPPAUGE_HVR1300: | 1005 | case CX88_BOARD_HAUPPAUGE_HVR1300: |
@@ -1013,6 +1013,17 @@ static int dvb_register(struct cx8802_dev *dev) | |||
1013 | goto frontend_detach; | 1013 | goto frontend_detach; |
1014 | } | 1014 | } |
1015 | break; | 1015 | break; |
1016 | case CX88_BOARD_WINFAST_DTV2000H_J: | ||
1017 | fe0->dvb.frontend = dvb_attach(cx22702_attach, | ||
1018 | &hauppauge_hvr_config, | ||
1019 | &core->i2c_adap); | ||
1020 | if (fe0->dvb.frontend != NULL) { | ||
1021 | if (!dvb_attach(simple_tuner_attach, fe0->dvb.frontend, | ||
1022 | &core->i2c_adap, 0x61, | ||
1023 | TUNER_PHILIPS_FMD1216MEX_MK3)) | ||
1024 | goto frontend_detach; | ||
1025 | } | ||
1026 | break; | ||
1016 | case CX88_BOARD_HAUPPAUGE_HVR3000: | 1027 | case CX88_BOARD_HAUPPAUGE_HVR3000: |
1017 | /* MFE frontend 1 */ | 1028 | /* MFE frontend 1 */ |
1018 | mfe_shared = 1; | 1029 | mfe_shared = 1; |
@@ -1566,13 +1577,16 @@ static int dvb_register(struct cx8802_dev *dev) | |||
1566 | call_all(core, core, s_power, 0); | 1577 | call_all(core, core, s_power, 0); |
1567 | 1578 | ||
1568 | /* register everything */ | 1579 | /* register everything */ |
1569 | return videobuf_dvb_register_bus(&dev->frontends, THIS_MODULE, dev, | 1580 | res = videobuf_dvb_register_bus(&dev->frontends, THIS_MODULE, dev, |
1570 | &dev->pci->dev, adapter_nr, mfe_shared, NULL); | 1581 | &dev->pci->dev, adapter_nr, mfe_shared, NULL); |
1582 | if (res) | ||
1583 | goto frontend_detach; | ||
1584 | return res; | ||
1571 | 1585 | ||
1572 | frontend_detach: | 1586 | frontend_detach: |
1573 | core->gate_ctrl = NULL; | 1587 | core->gate_ctrl = NULL; |
1574 | videobuf_dvb_dealloc_frontends(&dev->frontends); | 1588 | videobuf_dvb_dealloc_frontends(&dev->frontends); |
1575 | return -EINVAL; | 1589 | return res; |
1576 | } | 1590 | } |
1577 | 1591 | ||
1578 | /* ----------------------------------------------------------- */ | 1592 | /* ----------------------------------------------------------- */ |
diff --git a/drivers/media/video/cx88/cx88-i2c.c b/drivers/media/video/cx88/cx88-i2c.c index a1fe0abb6e43..de0f1af74e41 100644 --- a/drivers/media/video/cx88/cx88-i2c.c +++ b/drivers/media/video/cx88/cx88-i2c.c | |||
@@ -132,7 +132,7 @@ static void do_i2c_scan(const char *name, struct i2c_client *c) | |||
132 | } | 132 | } |
133 | } | 133 | } |
134 | 134 | ||
135 | /* init + register i2c algo-bit adapter */ | 135 | /* init + register i2c adapter */ |
136 | int cx88_i2c_init(struct cx88_core *core, struct pci_dev *pci) | 136 | int cx88_i2c_init(struct cx88_core *core, struct pci_dev *pci) |
137 | { | 137 | { |
138 | /* Prevents usage of invalid delay values */ | 138 | /* Prevents usage of invalid delay values */ |
diff --git a/drivers/media/video/cx88/cx88-input.c b/drivers/media/video/cx88/cx88-input.c index e614201b5ed3..ebf448c48ca3 100644 --- a/drivers/media/video/cx88/cx88-input.c +++ b/drivers/media/video/cx88/cx88-input.c | |||
@@ -103,6 +103,8 @@ static void cx88_ir_handle_key(struct cx88_IR *ir) | |||
103 | case CX88_BOARD_WINFAST_DTV1800H_XC4000: | 103 | case CX88_BOARD_WINFAST_DTV1800H_XC4000: |
104 | case CX88_BOARD_WINFAST_DTV2000H_PLUS: | 104 | case CX88_BOARD_WINFAST_DTV2000H_PLUS: |
105 | case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL: | 105 | case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL: |
106 | case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL_6F36: | ||
107 | case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL_6F43: | ||
106 | gpio = (gpio & 0x6ff) | ((cx_read(MO_GP1_IO) << 8) & 0x900); | 108 | gpio = (gpio & 0x6ff) | ((cx_read(MO_GP1_IO) << 8) & 0x900); |
107 | auxgpio = gpio; | 109 | auxgpio = gpio; |
108 | break; | 110 | break; |
@@ -302,6 +304,8 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci) | |||
302 | case CX88_BOARD_WINFAST2000XP_EXPERT: | 304 | case CX88_BOARD_WINFAST2000XP_EXPERT: |
303 | case CX88_BOARD_WINFAST_DTV1000: | 305 | case CX88_BOARD_WINFAST_DTV1000: |
304 | case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL: | 306 | case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL: |
307 | case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL_6F36: | ||
308 | case CX88_BOARD_WINFAST_TV2000_XP_GLOBAL_6F43: | ||
305 | ir_codes = RC_MAP_WINFAST; | 309 | ir_codes = RC_MAP_WINFAST; |
306 | ir->gpio_addr = MO_GP0_IO; | 310 | ir->gpio_addr = MO_GP0_IO; |
307 | ir->mask_keycode = 0x8f8; | 311 | ir->mask_keycode = 0x8f8; |
diff --git a/drivers/media/video/cx88/cx88.h b/drivers/media/video/cx88/cx88.h index fa8d307e1a3d..c9659def2a78 100644 --- a/drivers/media/video/cx88/cx88.h +++ b/drivers/media/video/cx88/cx88.h | |||
@@ -244,6 +244,8 @@ extern const struct sram_channel const cx88_sram_channels[]; | |||
244 | #define CX88_BOARD_TEVII_S464 86 | 244 | #define CX88_BOARD_TEVII_S464 86 |
245 | #define CX88_BOARD_WINFAST_DTV2000H_PLUS 87 | 245 | #define CX88_BOARD_WINFAST_DTV2000H_PLUS 87 |
246 | #define CX88_BOARD_WINFAST_DTV1800H_XC4000 88 | 246 | #define CX88_BOARD_WINFAST_DTV1800H_XC4000 88 |
247 | #define CX88_BOARD_WINFAST_TV2000_XP_GLOBAL_6F36 89 | ||
248 | #define CX88_BOARD_WINFAST_TV2000_XP_GLOBAL_6F43 90 | ||
247 | 249 | ||
248 | enum cx88_itype { | 250 | enum cx88_itype { |
249 | CX88_VMUX_COMPOSITE1 = 1, | 251 | CX88_VMUX_COMPOSITE1 = 1, |