Skip to content

Commit

Permalink
V4L/DVB: ivtv: Really stop capture on device close
Browse files Browse the repository at this point in the history
When a capture is started, the firmware also appears to start a secondary
stream. Unless this secondary stream is also stopped, the encoder will remain
active and not reinitialise for the next capture. Unfortunately, setting up
the video source can glitch the encoder and result in undesirable effects that
this initialisation will clear.

Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk>
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Ian Armstrong authored and Mauro Carvalho Chehab committed May 18, 2010
1 parent 283328c commit 9a766d5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/media/video/ivtv/ivtv-streams.c
Original file line number Diff line number Diff line change
Expand Up @@ -829,6 +829,10 @@ int ivtv_stop_v4l2_encode_stream(struct ivtv_stream *s, int gop_end)
ivtv_set_irq_mask(itv, IVTV_IRQ_ENC_VIM_RST);
}

/* Raw-passthrough is implied on start. Make sure it's stopped so
the encoder will re-initialize when next started */
ivtv_vapi(itv, CX2341X_ENC_STOP_CAPTURE, 3, 1, 2, 7);

wake_up(&s->waitq);

return 0;
Expand Down

0 comments on commit 9a766d5

Please sign in to comment.