All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean-Francois Moine <moinejf@free.fr>
To: Xavion <xavion.0@gmail.com>
Cc: "Linux Kernel (Media) ML" <linux-media@vger.kernel.org>
Subject: Re: My Microdia (SN9C201) webcam succumbs to glare in Linux
Date: Fri, 16 Mar 2012 20:40:05 +0100	[thread overview]
Message-ID: <20120316204005.58f64d41@tele> (raw)
In-Reply-To: <CAKnx8Y6Qa-9CTNoH3MfbH3TdypswL1avZdcN3Wy_qW1xK6o6ag@mail.gmail.com>

On Fri, 16 Mar 2012 08:53:51 +1100
Xavion <xavion.0@gmail.com> 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:

-- 
Ken ar c'hentañ	|	      ** Breizh ha Linux atav! **
Jef		|		http://moinejf.free.fr/

  reply	other threads:[~2012-03-16 19:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAKnx8Y5_amjNv7YjTGUqBoSYU99tGYJLw0G63ha8TZDq3n7Sgw@mail.gmail.com>
2012-03-15 21:53 ` My Microdia (SN9C201) webcam succumbs to glare in Linux Xavion
2012-03-16 19:40   ` Jean-Francois Moine [this message]
2012-03-17  0:33     ` Xavion

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120316204005.58f64d41@tele \
    --to=moinejf@free.fr \
    --cc=linux-media@vger.kernel.org \
    --cc=xavion.0@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.