Commit 9a766d55 authored by Ian Armstrong's avatar Ian Armstrong Committed by Mauro Carvalho Chehab

V4L/DVB: ivtv: Really stop capture on device close

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: default avatarIan Armstrong <ian@iarmst.demon.co.uk>
Signed-off-by: default avatarAndy Walls <awalls@radix.net>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 283328c2
...@@ -829,6 +829,10 @@ int ivtv_stop_v4l2_encode_stream(struct ivtv_stream *s, int gop_end) ...@@ -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); 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); wake_up(&s->waitq);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment