public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* Exposure set bug in stv06xx driver
@ 2009-08-22 19:10 James Blanford
  2009-08-23 12:50 ` James Blanford
  0 siblings, 1 reply; 3+ messages in thread
From: James Blanford @ 2009-08-22 19:10 UTC (permalink / raw)
  To: linux-media

Quickcam Express 046d:0840

Driver versions:  v 2.60 from 2.6.31-rc6 and v 2.70 from 
gspca-c9f3938870ab

Problem:  Overexposure and horizontal orange lines in cam image.
Exposure and gain controls in gqcam and v4l2ucp do not work.  By
varying the default exposure and gain settings in stv06xx.h, the lines
can be orange and/or blue, moving or stationary or a fine grid.

Workaround:  Using the tool set_cam_exp, any exposure setting removes
the visual artefacts and reduces the image brightness for a given 
set of gain and exposure settings.

By default:

Aug 21 14:22:02 blackbart kernel: STV06xx: Writing exposure 5000,
rowexp 0, srowexp 0

Note what happens when I set the default exposure to 1000:

Aug 21 20:44:23 blackbart kernel: STV06xx: Writing exposure 1000,
rowexp 0, srowexp 139438350

By the way, is there any possibility of enabling autogain?

Thanks for your interest,

   -  Jim

-- 
There are two kinds of people.  The innocent and the living.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Exposure set bug in stv06xx driver
  2009-08-22 19:10 Exposure set bug in stv06xx driver James Blanford
@ 2009-08-23 12:50 ` James Blanford
  2009-08-24  8:41   ` Hans de Goede
  0 siblings, 1 reply; 3+ messages in thread
From: James Blanford @ 2009-08-23 12:50 UTC (permalink / raw)
  To: linux-media

Well that was quick.  These issues as well as the stream drops were
remedied in 2.6.31-rc7, except exposure and gain still cannot be set
with v4l2ucp.  As a bonus, I found the autogain white list in
v4l2-apps/libv4l/libv4lconvert/control/libv4lcontrol.c.  Is there a
white list to turn on the gain and exposure manual controls?

While the autogain works great, the autoloss doesn't.  Gain increases
automatically, but is not decreased when light levels rise.  Also,
updating the exposure readout in v4l2ucp decreases the exposure about
10% and incorrectly reports an exposure somewhere between the original
level and the changed level.  E.g., click the exposure update button
and the exposure drops from 20000 to 18000 and reports 19000.

Thanks for all the work.

   -  Jim

On Sat, 22 Aug 2009 15:10:31 -0400
James Blanford <jhblanford@gmail.com> wrote:

> Quickcam Express 046d:0840
> 
> Driver versions:  v 2.60 from 2.6.31-rc6 and v 2.70 from 
> gspca-c9f3938870ab
> 
> Problem:  Overexposure and horizontal orange lines in cam image.
> Exposure and gain controls in gqcam and v4l2ucp do not work.  By
> varying the default exposure and gain settings in stv06xx.h, the lines
> can be orange and/or blue, moving or stationary or a fine grid.
> 
> Workaround:  Using the tool set_cam_exp, any exposure setting removes
> the visual artefacts and reduces the image brightness for a given 
> set of gain and exposure settings.
> 
> By default:
> 
> Aug 21 14:22:02 blackbart kernel: STV06xx: Writing exposure 5000,
> rowexp 0, srowexp 0
> 
> Note what happens when I set the default exposure to 1000:
> 
> Aug 21 20:44:23 blackbart kernel: STV06xx: Writing exposure 1000,
> rowexp 0, srowexp 139438350
> 
> By the way, is there any possibility of enabling autogain?
> 
> Thanks for your interest,
> 
>    -  Jim
> 


-- 
There are two kinds of people.  The innocent and the living.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Exposure set bug in stv06xx driver
  2009-08-23 12:50 ` James Blanford
@ 2009-08-24  8:41   ` Hans de Goede
  0 siblings, 0 replies; 3+ messages in thread
From: Hans de Goede @ 2009-08-24  8:41 UTC (permalink / raw)
  To: James Blanford; +Cc: linux-media

Hi,

On 08/23/2009 02:50 PM, James Blanford wrote:
> Well that was quick.  These issues as well as the stream drops were
> remedied in 2.6.31-rc7,

?? I'm the author of the pb100 (046d:0840) support in
the stv06xx driver, and AFAIK there have been no changes to it
recently.

> except exposure and gain still cannot be set
> with v4l2ucp.

They can be set if you disable autogain first, just uncheck the checkbox.

> As a bonus, I found the autogain white list in
> v4l2-apps/libv4l/libv4lconvert/control/libv4lcontrol.c.  Is there a
> white list to turn on the gain and exposure manual controls?
>

This whitelist is to enable software automatic gain + exposure for camera's
which lack this in hardware (or we don't know how to do this), this is not
relevant for the 046d:0840.

> While the autogain works great, the autoloss doesn't.  Gain increases
> automatically, but is not decreased when light levels rise.

It does, but it is slow when decreasing, give it some time.

> Also,
> updating the exposure readout in v4l2ucp decreases the exposure about
> 10% and incorrectly reports an exposure somewhere between the original
> level and the changed level.  E.g., click the exposure update button
> and the exposure drops from 20000 to 18000 and reports 19000.
>

??? I've not seen any problems like these. Note that the values returned
when reading the controls are cached values of the last value set, not actually
register values. Also the range for exposure is only 0 - 511, where are
you getting values like 18000 - 20000 from ? Are you sure you are using the
in kernel gspcav2 stv06xx driver ?


Hmm, you also write:
"is there any possibility of enabling autogain?" Yet this already is enabled,
does your 046d:0840, perhaps have a different sensor, mine says when plugged
in:
STV06xx: Photobit pb0100 sensor detected

I'm not used to logitech having different camera's with the same usb-id, but you
never know.

Regards,

Hans



> Thanks for all the work.
>
>     -  Jim
>
> On Sat, 22 Aug 2009 15:10:31 -0400
> James Blanford<jhblanford@gmail.com>  wrote:
>
>> Quickcam Express 046d:0840
>>
>> Driver versions:  v 2.60 from 2.6.31-rc6 and v 2.70 from
>> gspca-c9f3938870ab
>>
>> Problem:  Overexposure and horizontal orange lines in cam image.
>> Exposure and gain controls in gqcam and v4l2ucp do not work.  By
>> varying the default exposure and gain settings in stv06xx.h, the lines
>> can be orange and/or blue, moving or stationary or a fine grid.
>>
>> Workaround:  Using the tool set_cam_exp, any exposure setting removes
>> the visual artefacts and reduces the image brightness for a given
>> set of gain and exposure settings.
>>
>> By default:
>>
>> Aug 21 14:22:02 blackbart kernel: STV06xx: Writing exposure 5000,
>> rowexp 0, srowexp 0
>>
>> Note what happens when I set the default exposure to 1000:
>>
>> Aug 21 20:44:23 blackbart kernel: STV06xx: Writing exposure 1000,
>> rowexp 0, srowexp 139438350
>>
>> By the way, is there any possibility of enabling autogain?
>>
>> Thanks for your interest,
>>
>>     -  Jim
>>
>
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-08-24  8:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-22 19:10 Exposure set bug in stv06xx driver James Blanford
2009-08-23 12:50 ` James Blanford
2009-08-24  8:41   ` Hans de Goede

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox