summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/em28xx
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-04-17 18:37:40 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-04-17 18:37:40 -0300
commit6029d122aef16cc161df58a184ccef1be33ff399 (patch)
treea6fdddfb95ed0a13ee8f218304f4435cc6cff7f3 /linux/drivers/media/video/em28xx
parent58ea6a25312b60c94e22b8d4d2893c26f27b9c24 (diff)
downloadmediapointer-dvb-s2-6029d122aef16cc161df58a184ccef1be33ff399.tar.gz
mediapointer-dvb-s2-6029d122aef16cc161df58a184ccef1be33ff399.tar.bz2
em28xx-dvb: Add support for HVR950
From: Mauro Carvalho Chehab <mchehab@infradead.org> This patch adds DVB support for Hauppauge HVR950. Thanks to Michael Krufky <mkrufky@linuxtv.org> for getting those values. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video/em28xx')
-rw-r--r--linux/drivers/media/video/em28xx/Kconfig1
-rw-r--r--linux/drivers/media/video/em28xx/em28xx-cards.c29
-rw-r--r--linux/drivers/media/video/em28xx/em28xx-dvb.c17
3 files changed, 45 insertions, 2 deletions
diff --git a/linux/drivers/media/video/em28xx/Kconfig b/linux/drivers/media/video/em28xx/Kconfig
index 5a0f97767..2bc5e6be0 100644
--- a/linux/drivers/media/video/em28xx/Kconfig
+++ b/linux/drivers/media/video/em28xx/Kconfig
@@ -31,6 +31,7 @@ config VIDEO_EM28XX_ALSA
config VIDEO_EM28XX_DVB
tristate "DVB/ATSC Support for em28xx based TV cards"
depends on VIDEO_EM28XX && DVB_CORE
+ select DVB_LGDT330X if !DVB_FE_CUSTOMISE
select VIDEOBUF_DVB
select FW_LOADER
---help---
diff --git a/linux/drivers/media/video/em28xx/em28xx-cards.c b/linux/drivers/media/video/em28xx/em28xx-cards.c
index 680a41b2d..dfb693913 100644
--- a/linux/drivers/media/video/em28xx/em28xx-cards.c
+++ b/linux/drivers/media/video/em28xx/em28xx-cards.c
@@ -181,6 +181,7 @@ struct em28xx_board em28xx_boards[] = {
.tuner_type = TUNER_XC2028,
.mts_firmware = 1,
.has_12mhz_i2s = 1,
+ .has_dvb = 1,
.decoder = EM28XX_TVP5150,
.input = { {
.type = EM28XX_VMUX_TELEVISION,
@@ -195,6 +196,32 @@ struct em28xx_board em28xx_boards[] = {
.vmux = TVP5150_SVIDEO,
.amux = 1,
} },
+ .analog_gpio = {
+ { /* xc3028 reset seq */
+ .reg = 0x08,
+ .val = 0x3d,
+ .rst = 0x2d,
+ .t1 = 5,
+ .t2 = 10,
+ .t3 = 5,
+ },
+ },
+ .digital_gpio = {
+ { /* xc3028 reset seq */
+ .reg = 0x08,
+ .val = 0x3e,
+ .rst = 0x2e,
+ .t1 = 6,
+ .t2 = 6,
+ .t3 = 6,
+ }, { /* demod reset seq */
+ .reg = 0x04,
+ .val = 0x0c,
+ .rst = 0x04,
+ .t2 = 10,
+ .t3 = 10,
+ }
+ },
},
[EM2880_BOARD_TERRATEC_HYBRID_XS] = {
.name = "Terratec Hybrid XS",
@@ -522,7 +549,7 @@ void em28xx_pre_card_setup(struct em28xx *dev)
/* Put xc2028 tuners and demods into a sane state */
if (dev->tuner_type == TUNER_XC2028) {
- dev->mode = EM28XX_DIGITAL_MODE;
+ dev->mode = EM28XX_ANALOG_MODE;
em28xx_tuner_callback(dev, XC2028_TUNER_RESET, 0);
};
}
diff --git a/linux/drivers/media/video/em28xx/em28xx-dvb.c b/linux/drivers/media/video/em28xx/em28xx-dvb.c
index 95bd104f8..0372dc07c 100644
--- a/linux/drivers/media/video/em28xx/em28xx-dvb.c
+++ b/linux/drivers/media/video/em28xx/em28xx-dvb.c
@@ -59,7 +59,10 @@ buffer_setup(struct videobuf_queue *vq, unsigned int *count, unsigned int *size)
/* ------------------------------------------------------------------ */
-/* Add demods here */
+static struct lgdt330x_config em2880_lgdt3303_dev = {
+ .demod_address = 0x0e,
+ .demod_chip = LGDT3303,
+};
/* ------------------------------------------------------------------ */
@@ -71,6 +74,7 @@ static int attach_xc3028(u8 addr, struct em28xx *dev)
.i2c_adap = &dev->i2c_adap,
.i2c_addr = addr,
.ctrl = &ctl,
+ .callback = em28xx_tuner_callback,
};
if (!dev->dvb.frontend) {
@@ -110,6 +114,17 @@ static int dvb_init(struct em28xx *dev)
/* init frontend */
switch (dev->model) {
+ case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_950:
+ /* Enable lgdt330x */
+ dev->mode = EM28XX_ANALOG_MODE;
+ em28xx_tuner_callback(dev, XC2028_TUNER_RESET, 0);
+
+ dev->dvb.frontend = dvb_attach(lgdt330x_attach,
+ &em2880_lgdt3303_dev,
+ &dev->i2c_adap);
+ if (attach_xc3028(0x61, dev) < 0)
+ return -EINVAL;
+ break;
default:
printk(KERN_ERR "%s/2: The frontend of your DVB/ATSC card"
" isn't supported yet\n",