diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2007-08-18 16:46:05 +0200 |
---|---|---|
committer | Hans Verkuil <hverkuil@xs4all.nl> | 2007-08-18 16:46:05 +0200 |
commit | 23c9830c96f5c9ee0b845bd48efd5fc70356d83f (patch) | |
tree | acc797d5a2a22c7a1360411ffb6f38bdc3c38e64 /linux/drivers/media/video/ivtv/ivtv-ioctl.c | |
parent | 28d6ba2f6c58a46a520e1323a0fe8170948bf5fc (diff) | |
download | mediapointer-dvb-s2-23c9830c96f5c9ee0b845bd48efd5fc70356d83f.tar.gz mediapointer-dvb-s2-23c9830c96f5c9ee0b845bd48efd5fc70356d83f.tar.bz2 |
ivtv: fix handling of INITIALIZE_INPUT fw call
From: Hans Verkuil <hverkuil@xs4all.nl>
The CX2341X_ENC_INITIALIZE_INPUT firmware call requires careful handling,
otherwise the computer can freeze or the top-third of the screen can start
flickering. This patch ensures that CX2341X_ENC_INITIALIZE_INPUT is called
at the right time and in the right way.
In addition the stop capture handling was improved so that the last pending
DMA transfer is also processed. Otherwise this would be the first data that
arrived when a new capture was started which is not what you want.
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.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/linux/drivers/media/video/ivtv/ivtv-ioctl.c b/linux/drivers/media/video/ivtv/ivtv-ioctl.c index 7d1a5e434..9a0c3df8d 100644 --- a/linux/drivers/media/video/ivtv/ivtv-ioctl.c +++ b/linux/drivers/media/video/ivtv/ivtv-ioctl.c @@ -912,6 +912,9 @@ int ivtv_v4l2_ioctls(struct ivtv *itv, struct file *filp, unsigned int cmd, void IVTV_DEBUG_INFO("Input unchanged\n"); break; } + if (atomic_read(&itv->capturing) > 0) { + return -EBUSY; + } IVTV_DEBUG_INFO("Changing input from %d to %d\n", itv->active_input, inp); |