summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7164/saa7164-buffer.c
diff options
context:
space:
mode:
authorSteven Toth <stoth@kernellabs.com>2010-07-31 20:06:49 +0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-10-21 11:54:50 +0200
commit9230acaac461c492ff9dea24bbe6a7f568b62cf6 (patch)
tree87e073c93af1d28a88db076a13f00414857703e0 /drivers/media/video/saa7164/saa7164-buffer.c
parent[media] saa7164: allow variable length GOP sizes and switch encoder default t... (diff)
downloadlinux-9230acaac461c492ff9dea24bbe6a7f568b62cf6.tar.xz
linux-9230acaac461c492ff9dea24bbe6a7f568b62cf6.zip
[media] saa7164: patches to monitor TS payload for inconsistencies
... and report errors to console. (Debugging a DMA buffering issue). These are made optional in later patches. 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-buffer.c')
-rw-r--r--drivers/media/video/saa7164/saa7164-buffer.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/media/video/saa7164/saa7164-buffer.c b/drivers/media/video/saa7164/saa7164-buffer.c
index 5fccecd588ce..0760891d5fa8 100644
--- a/drivers/media/video/saa7164/saa7164-buffer.c
+++ b/drivers/media/video/saa7164/saa7164-buffer.c
@@ -180,6 +180,20 @@ int saa7164_buffer_dealloc(struct saa7164_buffer *buf)
return SAA_OK;
}
+int saa7164_buffer_zero_offsets(struct saa7164_port *port, int i)
+{
+ struct saa7164_dev *dev = port->dev;
+
+ if ((i < 0) || (i >= port->hwcfg.buffercount))
+ return -EINVAL;
+
+ dprintk(DBGLVL_BUF, "%s(idx = %d)\n", __func__, i);
+
+ saa7164_writel(port->bufoffset + (sizeof(u32) * i), 0);
+
+ return 0;
+}
+
/* Write a buffer into the hardware */
int saa7164_buffer_activate(struct saa7164_buffer *buf, int i)
{