From patchwork Mon Mar 1 11:53:34 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Ospite X-Patchwork-Id: 82910 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o21BrqpD029703 for ; Mon, 1 Mar 2010 11:53:52 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751242Ab0CALxv (ORCPT ); Mon, 1 Mar 2010 06:53:51 -0500 Received: from smtp-out04.alice.it ([85.37.17.100]:1526 "EHLO smtp-out04.alice.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751192Ab0CALxu (ORCPT ); Mon, 1 Mar 2010 06:53:50 -0500 Received: from FBCMMO03.fbc.local ([192.168.68.197]) by smtp-out04.alice.it with Microsoft SMTPSVC(6.0.3790.3959); Mon, 1 Mar 2010 12:53:48 +0100 Received: from FBCMCL01B08.fbc.local ([192.168.171.46]) by FBCMMO03.fbc.local with Microsoft SMTPSVC(6.0.3790.3959); Mon, 1 Mar 2010 12:53:48 +0100 Received: from badebec ([87.3.28.51]) by FBCMCL01B08.fbc.local with Microsoft SMTPSVC(6.0.3790.3959); Mon, 1 Mar 2010 12:53:47 +0100 Received: by badebec with local (Exim 4.71) (envelope-from ) id 1Nm4Bw-0007cC-2x; Mon, 01 Mar 2010 12:53:40 +0100 From: Antonio Ospite To: linux-media@vger.kernel.org Cc: Antonio Ospite , Jean-Francois Moine , Max Thrun Subject: [PATCH v2 05/11] ov534: Fix and document setting manual exposure Date: Mon, 1 Mar 2010 12:53:34 +0100 Message-Id: <1267444414-29248-1-git-send-email-ospite@studenti.unina.it> X-Mailer: git-send-email 1.7.0 In-Reply-To: <20100301121035.8677f284.ospite@studenti.unina.it> References: <20100301121035.8677f284.ospite@studenti.unina.it> X-OriginalArrivalTime: 01 Mar 2010 11:53:47.0984 (UTC) FILETIME=[DA44FD00:01CAB935] Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Mon, 01 Mar 2010 11:53:52 +0000 (UTC) Index: gspca/linux/drivers/media/video/gspca/ov534.c =================================================================== --- gspca.orig/linux/drivers/media/video/gspca/ov534.c +++ gspca/linux/drivers/media/video/gspca/ov534.c @@ -686,6 +686,15 @@ struct sd *sd = (struct sd *) gspca_dev; u8 val; + if (sd->aec) + return; + + /* 'val' is one byte and represents half of the exposure value we are + * going to set into registers, a two bytes value: + * + * MSB: ((u16) val << 1) >> 8 == val >> 7 + * LSB: ((u16) val << 1) & 0xff == val << 1 + */ val = sd->exposure; sccb_reg_write(gspca_dev, 0x08, val >> 7); sccb_reg_write(gspca_dev, 0x10, val << 1);