Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5a338c38ced1569a2e67e3c163505cc95429d508
Commit:     5a338c38ced1569a2e67e3c163505cc95429d508
Parent:     0b3e29e6d75cbfb8417f449555d40921fd656186
Author:     Hans Verkuil <[EMAIL PROTECTED]>
AuthorDate: Sun Jul 22 09:39:56 2007 -0300
Committer:  Mauro Carvalho Chehab <[EMAIL PROTECTED]>
CommitDate: Mon Jul 30 16:26:34 2007 -0300

    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 <[EMAIL PROTECTED]>
    Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
---
 drivers/media/video/ivtv/ivtv-fileops.c |    9 +++++++++
 drivers/media/video/ivtv/ivtv-streams.c |   11 +----------
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/media/video/ivtv/ivtv-fileops.c 
b/drivers/media/video/ivtv/ivtv-fileops.c
index baa17cb..5dd519c 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);
        }
diff --git a/drivers/media/video/ivtv/ivtv-streams.c 
b/drivers/media/video/ivtv/ivtv-streams.c
index 322b347..51df3f8 100644
--- a/drivers/media/video/ivtv/ivtv-streams.c
+++ b/drivers/media/video/ivtv/ivtv-streams.c
@@ -603,10 +603,6 @@ static int ivtv_setup_v4l2_decode_stream(struct 
ivtv_stream *s)
 
        IVTV_DEBUG_INFO("Setting some initial decoder settings\n");
 
-       /* disable VBI signals, if the MPEG stream contains VBI data,
-          then that data will be processed automatically for you. */
-       ivtv_disable_vbi(itv);
-
        /* set audio mode to left/stereo  for dual/stereo mode. */
        ivtv_vapi(itv, CX2341X_DEC_SET_AUDIO_MODE, 2, 
itv->audio_bilingual_mode, itv->audio_stereo_mode);
 
@@ -639,7 +635,7 @@ static int ivtv_setup_v4l2_decode_stream(struct ivtv_stream 
*s)
        }
        if (ivtv_vapi(itv, CX2341X_DEC_SET_DECODER_SOURCE, 4, datatype,
                        itv->params.width, itv->params.height, 
itv->params.audio_properties)) {
-               IVTV_DEBUG_WARN("COULDN'T INITIALIZE DECODER SOURCE\n");
+               IVTV_DEBUG_WARN("Couldn't initialize decoder source\n");
        }
        return 0;
 }
@@ -909,11 +905,6 @@ int ivtv_stop_v4l2_decode_stream(struct ivtv_stream *s, 
int flags, u64 pts)
        clear_bit(IVTV_F_S_STREAMING, &s->s_flags);
        ivtv_flush_queues(s);
 
-       if (!test_bit(IVTV_F_S_PASSTHROUGH, &s->s_flags)) {
-               /* disable VBI on TV-out */
-               ivtv_disable_vbi(itv);
-       }
-
        /* decrement decoding */
        atomic_dec(&itv->decoding);
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to