From patchwork Wed Jan 26 08:49:48 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anatolij Gustschin X-Patchwork-Id: 5698 Return-path: Envelope-to: mchehab@pedra Delivery-date: Wed, 26 Jan 2011 06:59:56 -0200 Received: from mchehab by pedra with local (Exim 4.72) (envelope-from ) id 1Pi1EJ-0001IS-Nw for mchehab@pedra; Wed, 26 Jan 2011 06:59:56 -0200 Received: from casper.infradead.org [85.118.1.10] by pedra with IMAP (fetchmail-6.3.17) for (single-drop); Wed, 26 Jan 2011 06:59:55 -0200 (BRST) Received: from vger.kernel.org ([209.132.180.67]) by casper.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1Pi14Y-0002vQ-Ah; Wed, 26 Jan 2011 08:49:50 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752733Ab1AZIt3 (ORCPT + 1 other); Wed, 26 Jan 2011 03:49:29 -0500 Received: from mail-out.m-online.net ([212.18.0.10]:51410 "EHLO mail-out.m-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752653Ab1AZIt3 (ORCPT ); Wed, 26 Jan 2011 03:49:29 -0500 Received: from frontend1.mail.m-online.net (frontend1.mail.intern.m-online.net [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 9D1861853BB7; Wed, 26 Jan 2011 09:49:27 +0100 (CET) X-Auth-Info: ra5xmaiL40iGncGwZHLXQTJy3iV/R0CveIU3Fsx05LI= Received: from localhost (p4FE3FE9A.dip.t-dialin.net [79.227.254.154]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA id B82321C00108; Wed, 26 Jan 2011 09:49:27 +0100 (CET) From: Anatolij Gustschin To: linux-media@vger.kernel.org Cc: Guennadi Liakhovetski , Dan Williams , linux-arm-kernel@lists.infradead.org, Detlev Zundel , Markus Niebel , Anatolij Gustschin Subject: [PATCH 1/2] v4l: soc-camera: start stream after queueing the buffers Date: Wed, 26 Jan 2011 09:49:48 +0100 Message-Id: <1296031789-1721-2-git-send-email-agust@denx.de> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1296031789-1721-1-git-send-email-agust@denx.de> References: <1296031789-1721-1-git-send-email-agust@denx.de> Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Sender: 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 --- drivers/media/video/soc_camera.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/video/soc_camera.c b/drivers/media/video/soc_camera.c index a66811b..7299de0 100644 --- a/drivers/media/video/soc_camera.c +++ b/drivers/media/video/soc_camera.c @@ -646,11 +646,11 @@ 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); + v4l2_subdev_call(sd, video, s_stream, 1); + return ret; }