From patchwork Fri Mar 16 19:40:05 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jean-Francois Moine X-Patchwork-Id: 10378 Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1S8d0T-0007Io-52 for patchwork@linuxtv.org; Fri, 16 Mar 2012 20:40:09 +0100 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.75/mailfrontend-4) with esmtp for id 1S8d0S-0000Ty-B7; Fri, 16 Mar 2012 20:40:08 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756899Ab2CPTkF (ORCPT ); Fri, 16 Mar 2012 15:40:05 -0400 Received: from smtp1-g21.free.fr ([212.27.42.1]:49941 "EHLO smtp1-g21.free.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754798Ab2CPTkE convert rfc822-to-8bit (ORCPT ); Fri, 16 Mar 2012 15:40:04 -0400 Received: from tele (unknown [IPv6:2a01:e35:2f5c:9de0:212:bfff:fe1e:9ce4]) by smtp1-g21.free.fr (Postfix) with ESMTP id 64B1894018A; Fri, 16 Mar 2012 20:39:53 +0100 (CET) Date: Fri, 16 Mar 2012 20:40:05 +0100 From: Jean-Francois Moine To: Xavion Cc: "Linux Kernel (Media) ML" Subject: Re: My Microdia (SN9C201) webcam succumbs to glare in Linux Message-ID: <20120316204005.58f64d41@tele> In-Reply-To: References: X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Mime-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2012.3.16.193017 X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' HTML_00_01 0.05, HTML_00_10 0.05, MIME_LOWER_CASE 0.05, MSGID_ADDED_BY_MTA 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1600_1699 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, CT_TEXT_PLAIN_UTF8_CAPS 0, INVALID_MSGID_NO_FQDN 0, __ANY_URI 0, __BOUNCE_CHALLENGE_SUBJ 0, __BOUNCE_NDR_SUBJ_EXEMPT 0, __CP_URI_IN_BODY 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __FRAUD_BODY_WEBMAIL 0, __FRAUD_WEBMAIL 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __HAS_X_MAILING_LIST 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0, __SUBJ_ALPHA_END 0, __TO_MALFORMED_2 0, __URI_NO_WWW 0, __URI_NS ' On Fri, 16 Mar 2012 08:53:51 +1100 Xavion wrote: > As you can probably gather from the attached screenshots, I'm > attempting to use my SN9C201 webcam for home security.  The problem is > that it succumbs to external glare during the middle hours of sunny > days when used in Linux. > > The same problem doesn't occur in Windows, probably since the software > automatically adjusts to the current lighting conditions.  These > screenshots were taken only five minutes apart and the sunlight > intensity didn't change much in-between. > > No amount of adjusting the webcam's settings (via V4L2-UCP) seemed to > make any significant difference.  For this reason, I'm guessing that > there's at least one other adjustable setting that the GSPCA driver > isn't tapping into yet. [snip] Hi Xavion, It seems that the exposure is not set correctly. May you try the patch below? (to be applied to the gspca test version 2.15.7 - the exposure may be too low at init time, set it to 800) --- build/sn9c20x.c~ +++ build/sn9c20x.c @@ -1650,10 +1650,9 @@ case SENSOR_OV7670: case SENSOR_OV9655: case SENSOR_OV9650: - exp[0] |= (3 << 4); - exp[2] = 0x2d; - exp[3] = expo; - exp[4] = expo >> 8; + exp[0] |= (2 << 4); + exp[2] = 0x10; /* AECH */ + exp[3] = expo * 255 / 0x1780; break; case SENSOR_MT9M001: case SENSOR_MT9V112: