diff options
Diffstat (limited to 'drivers/media/video/cx231xx/cx231xx-dvb.c')
-rw-r--r-- | drivers/media/video/cx231xx/cx231xx-dvb.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/drivers/media/video/cx231xx/cx231xx-dvb.c b/drivers/media/video/cx231xx/cx231xx-dvb.c index 5feb3ee640d9..fe59a1c3f064 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,17 @@ 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 | .is_serial = true, | ||
147 | }; | ||
148 | |||
149 | static struct tda18271_config pv_tda18271_config = { | ||
150 | .std_map = &mb86a20s_tda18271_config, | ||
151 | .gate = TDA18271_GATE_DIGITAL, | ||
152 | .small_i2c = TDA18271_03_BYTE_CHUNK_INIT, | ||
153 | }; | ||
154 | |||
138 | static inline void print_err_status(struct cx231xx *dev, int packet, int status) | 155 | static inline void print_err_status(struct cx231xx *dev, int packet, int status) |
139 | { | 156 | { |
140 | char *errmsg = "Unknown"; | 157 | char *errmsg = "Unknown"; |
@@ -687,6 +704,29 @@ static int dvb_init(struct cx231xx *dev) | |||
687 | &hcw_tda18271_config); | 704 | &hcw_tda18271_config); |
688 | break; | 705 | break; |
689 | 706 | ||
707 | case CX231XX_BOARD_PV_PLAYTV_USB_HYBRID: | ||
708 | |||
709 | printk(KERN_INFO "%s: looking for demod on i2c bus: %d\n", | ||
710 | __func__, i2c_adapter_id(&dev->i2c_bus[dev->board.tuner_i2c_master].i2c_adap)); | ||
711 | |||
712 | dev->dvb->frontend = dvb_attach(mb86a20s_attach, | ||
713 | &pv_mb86a20s_config, | ||
714 | &dev->i2c_bus[dev->board.demod_i2c_master].i2c_adap); | ||
715 | |||
716 | if (dev->dvb->frontend == NULL) { | ||
717 | printk(DRIVER_NAME | ||
718 | ": Failed to attach mb86a20s demod\n"); | ||
719 | result = -EINVAL; | ||
720 | goto out_free; | ||
721 | } | ||
722 | |||
723 | /* define general-purpose callback pointer */ | ||
724 | dvb->frontend->callback = cx231xx_tuner_callback; | ||
725 | |||
726 | dvb_attach(tda18271_attach, dev->dvb->frontend, | ||
727 | 0x60, &dev->i2c_bus[dev->board.tuner_i2c_master].i2c_adap, | ||
728 | &pv_tda18271_config); | ||
729 | break; | ||
690 | 730 | ||
691 | default: | 731 | default: |
692 | printk(KERN_ERR "%s/2: The frontend of your DVB/ATSC card" | 732 | printk(KERN_ERR "%s/2: The frontend of your DVB/ATSC card" |