Skip to content

Commit

Permalink
[media] V4L: soc-camera: start stream after queueing the buffers
Browse files Browse the repository at this point in the history
Some camera systems have strong requirement for capturing
an exact number of frames after starting the stream and do
not tolerate losing captured frames. By starting the stream
after the videobuf has queued the buffers, we ensure that
no frame will be lost.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Anatolij Gustschin authored and Mauro Carvalho Chehab committed Mar 21, 2011
1 parent ed5b65d commit 7fdbd85
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/media/video/soc_camera.c
Original file line number Diff line number Diff line change
Expand Up @@ -655,10 +655,10 @@ static int soc_camera_streamon(struct file *file, void *priv,
if (icd->streamer != file)
return -EBUSY;

v4l2_subdev_call(sd, video, s_stream, 1);

/* This calls buf_queue from host driver's videobuf_queue_ops */
ret = videobuf_streamon(&icd->vb_vidq);
if (!ret)
v4l2_subdev_call(sd, video, s_stream, 1);

return ret;
}
Expand Down

0 comments on commit 7fdbd85

Please sign in to comment.