summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/ivtv/ivtv-ioctl.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2007-08-20 21:26:40 +0200
committerHans Verkuil <hverkuil@xs4all.nl>2007-08-20 21:26:40 +0200
commit5abb311d5219789c3c53358c4787a989686e763e (patch)
tree6410137d80b7ce83ab061ba07daf6e2cee2e21be /linux/drivers/media/video/ivtv/ivtv-ioctl.c
parent3fc385d8f4e2e1404a59e12eefda5193eb5f6bc2 (diff)
downloadmediapointer-dvb-s2-5abb311d5219789c3c53358c4787a989686e763e.tar.gz
mediapointer-dvb-s2-5abb311d5219789c3c53358c4787a989686e763e.tar.bz2
ivtv: prevent changing VBI format while capture is in progress.
From: Hans Verkuil <hverkuil@xs4all.nl> Changing the VBI format requires a CX2341X_ENC_INITIALIZE_INPUT firmware call. This can only be done if no capture is in progress. So return -EBUSY if the encoder is busy. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux/drivers/media/video/ivtv/ivtv-ioctl.c')
-rw-r--r--linux/drivers/media/video/ivtv/ivtv-ioctl.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/linux/drivers/media/video/ivtv/ivtv-ioctl.c b/linux/drivers/media/video/ivtv/ivtv-ioctl.c
index d5a559073..f47834d89 100644
--- a/linux/drivers/media/video/ivtv/ivtv-ioctl.c
+++ b/linux/drivers/media/video/ivtv/ivtv-ioctl.c
@@ -590,9 +590,7 @@ static int ivtv_try_or_set_fmt(struct ivtv *itv, int streamtype,
/* set raw VBI format */
if (fmt->type == V4L2_BUF_TYPE_VBI_CAPTURE) {
- if (set_fmt && streamtype == IVTV_ENC_STREAM_TYPE_VBI &&
- itv->vbi.sliced_in->service_set &&
- atomic_read(&itv->capturing) > 0) {
+ if (set_fmt && atomic_read(&itv->capturing) > 0) {
return -EBUSY;
}
if (set_fmt) {
@@ -630,7 +628,7 @@ static int ivtv_try_or_set_fmt(struct ivtv *itv, int streamtype,
return 0;
if (set == 0)
return -EINVAL;
- if (atomic_read(&itv->capturing) > 0 && itv->vbi.sliced_in->service_set == 0) {
+ if (atomic_read(&itv->capturing) > 0) {
return -EBUSY;
}
itv->video_dec_func(itv, VIDIOC_S_FMT, fmt);