diff options
author | Steven Toth <stoth@kernellabs.com> | 2010-07-31 19:43:07 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-10-21 11:54:33 +0200 |
commit | add3f580a4342b8bca7e0fb4737fe9eeaefa4319 (patch) | |
tree | 370dbc9d7b9d81666c168f87000f41027c168ee4 /drivers/media/video/saa7164/saa7164-core.c | |
parent | [media] saa7164: Add some encoder firmwares message types and structs (diff) | |
download | linux-add3f580a4342b8bca7e0fb4737fe9eeaefa4319.tar.xz linux-add3f580a4342b8bca7e0fb4737fe9eeaefa4319.zip |
[media] saa7164: convert buffering structs to be more generic
Current structs assume transport, making a number of changes to
switch to generic functions allowing a smoother integration
for the analog encoder.
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/saa7164/saa7164-core.c')
-rw-r--r-- | drivers/media/video/saa7164/saa7164-core.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/media/video/saa7164/saa7164-core.c b/drivers/media/video/saa7164/saa7164-core.c index 1bd1e62f9896..88c36bd2bd1d 100644 --- a/drivers/media/video/saa7164/saa7164-core.c +++ b/drivers/media/video/saa7164/saa7164-core.c @@ -74,7 +74,7 @@ static void saa7164_work_cmdhandler(struct work_struct *w) static void saa7164_buffer_deliver(struct saa7164_buffer *buf) { - struct saa7164_tsport *port = buf->port; + struct saa7164_port *port = buf->port; /* Feed the transport payload into the kernel demux */ dvb_dmx_swfilter_packets(&port->dvb.demux, (u8 *)buf->cpu, @@ -82,7 +82,7 @@ static void saa7164_buffer_deliver(struct saa7164_buffer *buf) } -static irqreturn_t saa7164_irq_ts(struct saa7164_tsport *port) +static irqreturn_t saa7164_irq_ts(struct saa7164_port *port) { struct saa7164_dev *dev = port->dev; struct saa7164_buffer *buf; @@ -107,7 +107,7 @@ static irqreturn_t saa7164_irq_ts(struct saa7164_tsport *port) if (i++ > port->hwcfg.buffercount) BUG(); - if (buf->nr == rp) { + if (buf->idx == rp) { /* Found the buffer, deal with it */ dprintk(DBGLVL_IRQ, "%s() wp: %d processing: %d\n", __func__, wp, rp); @@ -446,20 +446,18 @@ static int saa7164_dev_setup(struct saa7164_dev *dev) /* Transport port A Defaults / setup */ dev->ts1.dev = dev; dev->ts1.nr = 0; + dev->ts1.type = SAA7164_MPEG_UNDEFINED; mutex_init(&dev->ts1.dvb.lock); INIT_LIST_HEAD(&dev->ts1.dmaqueue.list); - INIT_LIST_HEAD(&dev->ts1.dummy_dmaqueue.list); mutex_init(&dev->ts1.dmaqueue_lock); - mutex_init(&dev->ts1.dummy_dmaqueue_lock); /* Transport port B Defaults / setup */ dev->ts2.dev = dev; dev->ts2.nr = 1; + dev->ts2.type = SAA7164_MPEG_UNDEFINED; mutex_init(&dev->ts2.dvb.lock); INIT_LIST_HEAD(&dev->ts2.dmaqueue.list); - INIT_LIST_HEAD(&dev->ts2.dummy_dmaqueue.list); mutex_init(&dev->ts2.dmaqueue_lock); - mutex_init(&dev->ts2.dummy_dmaqueue_lock); if (get_resources(dev) < 0) { printk(KERN_ERR "CORE %s No more PCIe resources for " |