diff options
Diffstat (limited to 'drivers/media/video')
-rw-r--r-- | drivers/media/video/cx231xx/Kconfig | 2 | ||||
-rw-r--r-- | drivers/media/video/cx231xx/cx231xx-cards.c | 2 | ||||
-rw-r--r-- | drivers/media/video/cx231xx/cx231xx-dvb.c | 39 |
3 files changed, 42 insertions, 1 deletions
diff --git a/drivers/media/video/cx231xx/Kconfig b/drivers/media/video/cx231xx/Kconfig index bb04914983fd..bad836f77758 100644 --- a/drivers/media/video/cx231xx/Kconfig +++ b/drivers/media/video/cx231xx/Kconfig | |||
@@ -30,6 +30,8 @@ config VIDEO_CX231XX_DVB | |||
30 | depends on VIDEO_CX231XX && DVB_CORE | 30 | depends on VIDEO_CX231XX && DVB_CORE |
31 | select VIDEOBUF_DVB | 31 | select VIDEOBUF_DVB |
32 | select MEDIA_TUNER_XC5000 if !DVB_FE_CUSTOMISE | 32 | select MEDIA_TUNER_XC5000 if !DVB_FE_CUSTOMISE |
33 | select MEDIA_TUNER_NXP18271 if !DVB_FE_CUSTOMISE | ||
34 | select DVB_MB86A20S if !DVB_FE_CUSTOMISE | ||
33 | 35 | ||
34 | ---help--- | 36 | ---help--- |
35 | This adds support for DVB cards based on the | 37 | This adds support for DVB cards based on the |
diff --git a/drivers/media/video/cx231xx/cx231xx-cards.c b/drivers/media/video/cx231xx/cx231xx-cards.c index 7dc7a89d8961..4d0ab458fa64 100644 --- a/drivers/media/video/cx231xx/cx231xx-cards.c +++ b/drivers/media/video/cx231xx/cx231xx-cards.c | |||
@@ -410,7 +410,7 @@ struct cx231xx_board cx231xx_boards[] = { | |||
410 | .gpio_pin_status_mask = 0x4001000, | 410 | .gpio_pin_status_mask = 0x4001000, |
411 | .tuner_i2c_master = 2, | 411 | .tuner_i2c_master = 2, |
412 | .demod_i2c_master = 1, | 412 | .demod_i2c_master = 1, |
413 | .has_dvb = 0, /* FIXME: need driver for mb86a20s */ | 413 | .has_dvb = 1, |
414 | .demod_addr = 0x10, | 414 | .demod_addr = 0x10, |
415 | .norm = V4L2_STD_PAL_M, | 415 | .norm = V4L2_STD_PAL_M, |
416 | .input = {{ | 416 | .input = {{ |
diff --git a/drivers/media/video/cx231xx/cx231xx-dvb.c b/drivers/media/video/cx231xx/cx231xx-dvb.c index 5feb3ee640d9..b55e7e0bc245 100644 --- a/drivers/media/video/cx231xx/cx231xx-dvb.c +++ b/drivers/media/video/cx231xx/cx231xx-dvb.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include "tda18271.h" | 33 | #include "tda18271.h" |
34 | #include "s5h1411.h" | 34 | #include "s5h1411.h" |
35 | #include "lgdt3305.h" | 35 | #include "lgdt3305.h" |
36 | #include "mb86a20s.h" | ||
36 | 37 | ||
37 | MODULE_DESCRIPTION("driver for cx231xx based DVB cards"); | 38 | MODULE_DESCRIPTION("driver for cx231xx based DVB cards"); |
38 | MODULE_AUTHOR("Srinivasa Deevi <srinivasa.deevi@conexant.com>"); | 39 | MODULE_AUTHOR("Srinivasa Deevi <srinivasa.deevi@conexant.com>"); |
@@ -88,6 +89,11 @@ static struct tda18271_std_map cnxt_rde253s_tda18271_std_map = { | |||
88 | .if_lvl = 1, .rfagc_top = 0x37, }, | 89 | .if_lvl = 1, .rfagc_top = 0x37, }, |
89 | }; | 90 | }; |
90 | 91 | ||
92 | static struct tda18271_std_map mb86a20s_tda18271_config = { | ||
93 | .dvbt_6 = { .if_freq = 3300, .agc_mode = 3, .std = 4, | ||
94 | .if_lvl = 7, .rfagc_top = 0x37, }, | ||
95 | }; | ||
96 | |||
91 | static struct tda18271_config cnxt_rde253s_tunerconfig = { | 97 | static struct tda18271_config cnxt_rde253s_tunerconfig = { |
92 | .std_map = &cnxt_rde253s_tda18271_std_map, | 98 | .std_map = &cnxt_rde253s_tda18271_std_map, |
93 | .gate = TDA18271_GATE_ANALOG, | 99 | .gate = TDA18271_GATE_ANALOG, |
@@ -135,6 +141,16 @@ static struct tda18271_config hcw_tda18271_config = { | |||
135 | .gate = TDA18271_GATE_DIGITAL, | 141 | .gate = TDA18271_GATE_DIGITAL, |
136 | }; | 142 | }; |
137 | 143 | ||
144 | static const struct mb86a20s_config pv_mb86a20s_config = { | ||
145 | .demod_address = 0x10, | ||
146 | }; | ||
147 | |||
148 | static struct tda18271_config pv_tda18271_config = { | ||
149 | .std_map = &mb86a20s_tda18271_config, | ||
150 | .gate = TDA18271_GATE_DIGITAL, | ||
151 | .small_i2c = TDA18271_03_BYTE_CHUNK_INIT, | ||
152 | }; | ||
153 | |||
138 | static inline void print_err_status(struct cx231xx *dev, int packet, int status) | 154 | static inline void print_err_status(struct cx231xx *dev, int packet, int status) |
139 | { | 155 | { |
140 | char *errmsg = "Unknown"; | 156 | char *errmsg = "Unknown"; |
@@ -687,6 +703,29 @@ static int dvb_init(struct cx231xx *dev) | |||
687 | &hcw_tda18271_config); | 703 | &hcw_tda18271_config); |
688 | break; | 704 | break; |
689 | 705 | ||
706 | case CX231XX_BOARD_PV_PLAYTV_USB_HYBRID: | ||
707 | |||
708 | printk(KERN_INFO "%s: looking for demod on i2c bus: %d\n", | ||
709 | __func__, i2c_adapter_id(&dev->i2c_bus[dev->board.tuner_i2c_master].i2c_adap)); | ||
710 | |||
711 | dev->dvb->frontend = dvb_attach(mb86a20s_attach, | ||
712 | &pv_mb86a20s_config, | ||
713 | &dev->i2c_bus[dev->board.demod_i2c_master].i2c_adap); | ||
714 | |||
715 | if (dev->dvb->frontend == NULL) { | ||
716 | printk(DRIVER_NAME | ||
717 | ": Failed to attach mb86a20s demod\n"); | ||
718 | result = -EINVAL; | ||
719 | goto out_free; | ||
720 | } | ||
721 | |||
722 | /* define general-purpose callback pointer */ | ||
723 | dvb->frontend->callback = cx231xx_tuner_callback; | ||
724 | |||
725 | dvb_attach(tda18271_attach, dev->dvb->frontend, | ||
726 | 0x60, &dev->i2c_bus[dev->board.tuner_i2c_master].i2c_adap, | ||
727 | &pv_tda18271_config); | ||
728 | break; | ||
690 | 729 | ||
691 | default: | 730 | default: |
692 | printk(KERN_ERR "%s/2: The frontend of your DVB/ATSC card" | 731 | printk(KERN_ERR "%s/2: The frontend of your DVB/ATSC card" |