diff options
author | Steven Toth <stoth@kernellabs.com> | 2011-10-10 10:09:54 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-10-14 16:12:01 -0400 |
commit | 24465b448546e10666ad6021be0615214a258cbc (patch) | |
tree | 304fb686a109a7fdb950894dd784ad9c76cc66b9 /drivers/media/video/cx23885 | |
parent | af76e9f625b235f46d2a2002c4102f6f1249dcf4 (diff) |
[media] cx23885: ensure video is streaming before allowing vbi to stream
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx23885')
-rw-r--r-- | drivers/media/video/cx23885/cx23885-video.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/media/video/cx23885/cx23885-video.c b/drivers/media/video/cx23885/cx23885-video.c index a182e829c8d0..44a63c4de122 100644 --- a/drivers/media/video/cx23885/cx23885-video.c +++ b/drivers/media/video/cx23885/cx23885-video.c | |||
@@ -1100,6 +1100,14 @@ static int vidioc_streamon(struct file *file, void *priv, | |||
1100 | 1100 | ||
1101 | if (unlikely(!res_get(dev, fh, get_resource(fh)))) | 1101 | if (unlikely(!res_get(dev, fh, get_resource(fh)))) |
1102 | return -EBUSY; | 1102 | return -EBUSY; |
1103 | |||
1104 | /* Don't start VBI streaming unless vida streaming | ||
1105 | * has already started. | ||
1106 | */ | ||
1107 | if ((fh->type == V4L2_BUF_TYPE_VBI_CAPTURE) && | ||
1108 | ((cx_read(VID_A_DMA_CTL) & 0x11) == 0)) | ||
1109 | return -EINVAL; | ||
1110 | |||
1103 | return videobuf_streamon(get_queue(fh)); | 1111 | return videobuf_streamon(get_queue(fh)); |
1104 | } | 1112 | } |
1105 | 1113 | ||