aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx231xx/cx231xx-dvb.c
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@kernellabs.com>2010-07-06 17:23:53 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-10-20 23:17:11 -0400
commit1a50fddefd17ec1359d08cd23c77da42fabbb4a7 (patch)
tree2467c087a5ba145e004d5de30fa0e950bbdaf359 /drivers/media/video/cx231xx/cx231xx-dvb.c
parent64fbf44455260684fa5bfdd3121af3d0ef0b48dd (diff)
[media] cx231xx: add support for Hauppauge EXETER
Add support for various Hauppauge EXETER designs. Note by DJH: fixed a few minor 'make checkpatch' warnings before commit. Signed-off-by: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Devin Heitmueller <dheitmueller@hauppauge.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx231xx/cx231xx-dvb.c')
-rw-r--r--drivers/media/video/cx231xx/cx231xx-dvb.c49
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
36MODULE_DESCRIPTION("driver for cx231xx based DVB cards"); 37MODULE_DESCRIPTION("driver for cx231xx based DVB cards");
37MODULE_AUTHOR("Srinivasa Deevi <srinivasa.deevi@conexant.com>"); 38MODULE_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
115static 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
126static 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
133static struct tda18271_config hcw_tda18271_config = {
134 .std_map = &hauppauge_tda18271_std_map,
135 .gate = TDA18271_GATE_DIGITAL,
136};
137
113static inline void print_err_status(struct cx231xx *dev, int packet, int status) 138static 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"