summaryrefslogtreecommitdiff
path: root/linux/drivers/media/common/saa7146_video.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/common/saa7146_video.c')
-rw-r--r--linux/drivers/media/common/saa7146_video.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/linux/drivers/media/common/saa7146_video.c b/linux/drivers/media/common/saa7146_video.c
index e1ce84f4d..cdeeada3b 100644
--- a/linux/drivers/media/common/saa7146_video.c
+++ b/linux/drivers/media/common/saa7146_video.c
@@ -1100,8 +1100,8 @@ int buffer_activate (struct saa7146_dev *dev,
return 0;
}
-static
-int buffer_prepare(struct file *file, struct videobuf_buffer *vb)
+static
+int buffer_prepare(struct file *file, struct videobuf_buffer *vb, enum v4l2_field field)
{
struct saa7146_fh *fh = file->private_data;
struct saa7146_dev *dev = fh->dev;
@@ -1128,7 +1128,8 @@ int buffer_prepare(struct file *file, struct videobuf_buffer *vb)
fh->video_fmt.width,fh->video_fmt.height,size,v4l2_field_names[fh->video_fmt.field]));
if (buf->vb.width != fh->video_fmt.width ||
buf->vb.height != fh->video_fmt.height ||
- buf->vb.size != size ||
+ buf->vb.size != size ||
+ buf->vb.field != field ||
buf->vb.field != fh->video_fmt.field ||
buf->fmt != &fh->video_fmt) {
saa7146_dma_free(dev,buf);
@@ -1140,6 +1141,7 @@ int buffer_prepare(struct file *file, struct videobuf_buffer *vb)
buf->vb.width = fh->video_fmt.width;
buf->vb.height = fh->video_fmt.height;
buf->vb.size = size;
+ buf->vb.field = field;
buf->fmt = &fh->video_fmt;
buf->vb.field = fh->video_fmt.field;
@@ -1266,6 +1268,7 @@ void video_open(struct saa7146_dev *dev, struct saa7146_fh *fh)
videobuf_queue_init(&fh->video_q, &video_qops,
dev->pci, &dev->slock,
V4L2_BUF_TYPE_VIDEO_CAPTURE,
+ V4L2_FIELD_INTERLACED,
sizeof(struct saa7146_buf));
init_MUTEX(&fh->video_q.lock);