diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2007-07-22 16:39:56 +0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-07-30 23:26:34 +0400 |
commit | 5a338c38ced1569a2e67e3c163505cc95429d508 (patch) | |
tree | 5cb87de4a874084f9368faa22b0e9b61ea020ba9 /drivers/media/video/ivtv/ivtv-fileops.c | |
parent | 0b3e29e6d75cbfb8417f449555d40921fd656186 (diff) | |
download | linux-5a338c38ced1569a2e67e3c163505cc95429d508.tar.xz |
V4L/DVB (5918): ivtv: fix TV-out VBI handling, only reset on last close.
While decoding (MPEG or YUV) is active or when VBI output is in use, then
do not clear the VBI output of the saa7127. Only after the last user is
gone can we clear it.
This fixes the case where playback was stopped, another channel was chosen
and playback was restarted, while /dev/vbi16 was used to set the WSS
(widescreen) setting. Without this fix the WSS was reset on every stop
instead of just keeping the last value.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/ivtv/ivtv-fileops.c')
-rw-r--r-- | drivers/media/video/ivtv/ivtv-fileops.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/media/video/ivtv/ivtv-fileops.c b/drivers/media/video/ivtv/ivtv-fileops.c index baa17cbee5e1..5dd519caf81d 100644 --- a/drivers/media/video/ivtv/ivtv-fileops.c +++ b/drivers/media/video/ivtv/ivtv-fileops.c @@ -800,7 +800,16 @@ int ivtv_v4l2_close(struct inode *inode, struct file *filp) ivtv_unmute(itv); ivtv_release_stream(s); } else if (s->type >= IVTV_DEC_STREAM_TYPE_MPG) { + struct ivtv_stream *s_vout = &itv->streams[IVTV_DEC_STREAM_TYPE_VOUT]; + ivtv_stop_decoding(id, VIDEO_CMD_STOP_TO_BLACK | VIDEO_CMD_STOP_IMMEDIATELY, 0); + + /* If all output streams are closed, and if the user doesn't have + IVTV_DEC_STREAM_TYPE_VOUT open, then disable VBI on TV-out. */ + if (itv->output_mode == OUT_NONE && !test_bit(IVTV_F_S_APPL_IO, &s_vout->s_flags)) { + /* disable VBI on TV-out */ + ivtv_disable_vbi(itv); + } } else { ivtv_stop_capture(id, 0); } |