diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-17 18:49:20 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-17 18:49:20 -0300 |
commit | 0b6b95207782b70cfdcc315edbffdf3792b6a497 (patch) | |
tree | 8ac74f8e7cd63f439ad7981feffe2b064f2793cd /linux/drivers/media | |
parent | 5253757b29d1cd54ddd9d2f874794c907430acc8 (diff) | |
download | mediapointer-dvb-s2-0b6b95207782b70cfdcc315edbffdf3792b6a497.tar.gz mediapointer-dvb-s2-0b6b95207782b70cfdcc315edbffdf3792b6a497.tar.bz2 |
em28xx-dvb: Properly selects digital mode at the right place
From: Mauro Carvalho Chehab <mchehab@infradead.org>
The driver should be switched to digital mode, when tring to access the
frontend or when streaming.
This patch provides the correct code to support this feature.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media')
-rw-r--r-- | linux/drivers/media/video/em28xx/em28xx-dvb.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/linux/drivers/media/video/em28xx/em28xx-dvb.c b/linux/drivers/media/video/em28xx/em28xx-dvb.c index ad384b34e..5c9941d92 100644 --- a/linux/drivers/media/video/em28xx/em28xx-dvb.c +++ b/linux/drivers/media/video/em28xx/em28xx-dvb.c @@ -210,6 +210,18 @@ static int stop_feed(struct dvb_demux_feed *feed) } + +/* ------------------------------------------------------------------ */ +static int em28xx_dvb_bus_ctrl(struct dvb_frontend *fe, int acquire) +{ + struct em28xx *dev = fe->dvb->priv; + + if (acquire) + return em28xx_set_mode(dev, EM28XX_DIGITAL_MODE); + else + return em28xx_set_mode(dev, EM28XX_MODE_UNDEFINED); +} + /* ------------------------------------------------------------------ */ static struct lgdt330x_config em2880_lgdt3303_dev = { @@ -277,6 +289,10 @@ int register_dvb(struct em28xx_dvb *dvb, dev->name, result); goto fail_adapter; } + + /* Ensure all frontends negotiate bus access */ + dvb->frontend->ops.ts_bus_ctrl = em28xx_dvb_bus_ctrl; + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 12)) dvb->adapter.priv = dev; @@ -303,6 +319,7 @@ int register_dvb(struct em28xx_dvb *dvb, dvb->demux.feednum = 256; dvb->demux.start_feed = start_feed; dvb->demux.stop_feed = stop_feed; + result = dvb_dmx_init(&dvb->demux); if (result < 0) { printk(KERN_WARNING "%s: dvb_dmx_init failed (errno = %d)\n", |