diff options
Diffstat (limited to 'drivers/media/video/cx231xx/cx231xx-dvb.c')
-rw-r--r-- | drivers/media/video/cx231xx/cx231xx-dvb.c | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/drivers/media/video/cx231xx/cx231xx-dvb.c b/drivers/media/video/cx231xx/cx231xx-dvb.c index 130794b971ce..3ff99e9f4a1f 100644 --- a/drivers/media/video/cx231xx/cx231xx-dvb.c +++ b/drivers/media/video/cx231xx/cx231xx-dvb.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include "s5h1432.h" | 32 | #include "s5h1432.h" |
33 | #include "tda18271.h" | 33 | #include "tda18271.h" |
34 | #include "s5h1411.h" | 34 | #include "s5h1411.h" |
35 | #include "lgdt3305.h" | ||
35 | 36 | ||
36 | MODULE_DESCRIPTION("driver for cx231xx based DVB cards"); | 37 | MODULE_DESCRIPTION("driver for cx231xx based DVB cards"); |
37 | MODULE_AUTHOR("Srinivasa Deevi <srinivasa.deevi@conexant.com>"); | 38 | MODULE_AUTHOR("Srinivasa Deevi <srinivasa.deevi@conexant.com>"); |
@@ -110,6 +111,30 @@ static struct s5h1411_config xc5000_s5h1411_config = { | |||
110 | .status_mode = S5H1411_DEMODLOCKING, | 111 | .status_mode = S5H1411_DEMODLOCKING, |
111 | .mpeg_timing = S5H1411_MPEGTIMING_CONTINOUS_NONINVERTING_CLOCK, | 112 | .mpeg_timing = S5H1411_MPEGTIMING_CONTINOUS_NONINVERTING_CLOCK, |
112 | }; | 113 | }; |
114 | |||
115 | static struct lgdt3305_config hcw_lgdt3305_config = { | ||
116 | .i2c_addr = 0x0e, | ||
117 | .mpeg_mode = LGDT3305_MPEG_SERIAL, | ||
118 | .tpclk_edge = LGDT3305_TPCLK_FALLING_EDGE, | ||
119 | .tpvalid_polarity = LGDT3305_TP_VALID_HIGH, | ||
120 | .deny_i2c_rptr = 1, | ||
121 | .spectral_inversion = 1, | ||
122 | .qam_if_khz = 4000, | ||
123 | .vsb_if_khz = 3250, | ||
124 | }; | ||
125 | |||
126 | static struct tda18271_std_map hauppauge_tda18271_std_map = { | ||
127 | .atsc_6 = { .if_freq = 3250, .agc_mode = 3, .std = 4, | ||
128 | .if_lvl = 1, .rfagc_top = 0x58, }, | ||
129 | .qam_6 = { .if_freq = 4000, .agc_mode = 3, .std = 5, | ||
130 | .if_lvl = 1, .rfagc_top = 0x58, }, | ||
131 | }; | ||
132 | |||
133 | static struct tda18271_config hcw_tda18271_config = { | ||
134 | .std_map = &hauppauge_tda18271_std_map, | ||
135 | .gate = TDA18271_GATE_DIGITAL, | ||
136 | }; | ||
137 | |||
113 | static inline void print_err_status(struct cx231xx *dev, int packet, int status) | 138 | static inline void print_err_status(struct cx231xx *dev, int packet, int status) |
114 | { | 139 | { |
115 | char *errmsg = "Unknown"; | 140 | char *errmsg = "Unknown"; |
@@ -639,6 +664,30 @@ static int dvb_init(struct cx231xx *dev) | |||
639 | goto out_free; | 664 | goto out_free; |
640 | } | 665 | } |
641 | break; | 666 | break; |
667 | case CX231XX_BOARD_HAUPPAUGE_EXETER: | ||
668 | |||
669 | printk(KERN_INFO "%s: looking for tuner / demod on i2c bus: %d\n", | ||
670 | __func__, i2c_adapter_id(&dev->i2c_bus[1].i2c_adap)); | ||
671 | |||
672 | dev->dvb->frontend = dvb_attach(lgdt3305_attach, | ||
673 | &hcw_lgdt3305_config, | ||
674 | &dev->i2c_bus[1].i2c_adap); | ||
675 | |||
676 | if (dev->dvb->frontend == NULL) { | ||
677 | printk(DRIVER_NAME | ||
678 | ": Failed to attach LG3305 front end\n"); | ||
679 | result = -EINVAL; | ||
680 | goto out_free; | ||
681 | } | ||
682 | |||
683 | /* define general-purpose callback pointer */ | ||
684 | dvb->frontend->callback = cx231xx_tuner_callback; | ||
685 | |||
686 | dvb_attach(tda18271_attach, dev->dvb->frontend, | ||
687 | 0x60, &dev->i2c_bus[1].i2c_adap, | ||
688 | &hcw_tda18271_config); | ||
689 | break; | ||
690 | |||
642 | 691 | ||
643 | default: | 692 | default: |
644 | printk(KERN_ERR "%s/2: The frontend of your DVB/ATSC card" | 693 | printk(KERN_ERR "%s/2: The frontend of your DVB/ATSC card" |