From: Anatolij Gustschin Date: Mon, 31 Jan 2011 12:19:32 +0000 (-0300) Subject: [media] V4L: soc-camera: start stream after queueing the buffers X-Git-Tag: v2.6.39-rc2~24^2~292 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7fdbd85bce033e2d0f74e5d326ab43906653cb81;p=profile%2Fivi%2Fkernel-x86-ivi.git [media] V4L: soc-camera: start stream after queueing the buffers 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 Signed-off-by: Guennadi Liakhovetski Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/soc_camera.c b/drivers/media/video/soc_camera.c index a7820a5..67611ad 100644 --- a/drivers/media/video/soc_camera.c +++ b/drivers/media/video/soc_camera.c @@ -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; }