summaryrefslogtreecommitdiff
path: root/drivers/media/video/em28xx/em28xx-dvb.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-04-17 21:37:40 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-04-24 14:09:41 -0300
commit227ad4ab9058ef2624934183e8083886cf64bf56 (patch)
tree8cc10b3cc1ea7b23c54411c007581e5cd9ec6217 /drivers/media/video/em28xx/em28xx-dvb.c
parentee6e3a865a469c78daa93a1e6cdbaca3a102f9c8 (diff)
V4L/DVB (7596): em28xx-dvb: Add support for HVR950
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 'drivers/media/video/em28xx/em28xx-dvb.c')
-rw-r--r--drivers/media/video/em28xx/em28xx-dvb.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/media/video/em28xx/em28xx-dvb.c b/drivers/media/video/em28xx/em28xx-dvb.c
index 1ffe64f62095..1645021191a8 100644
--- a/drivers/media/video/em28xx/em28xx-dvb.c
+++ b/drivers/media/video/em28xx/em28xx-dvb.c
@@ -58,7 +58,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,
+};
/* ------------------------------------------------------------------ */
@@ -70,6 +73,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) {
@@ -109,6 +113,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",