Hi Moreno,

On Sunday 13 July 2008, Moreno Marzolla wrote:
> Hi all,
>
> I'm trying to play around with the manual exposure settings of my
> Creative Live! Cam Optia (the non-AF version), in order to address the
> everexposure issues I described in another post
> (https://lists.berlios.de/pipermail/linux-uvc-devel/2008-June/003658.html).
> Unfortunately, there seems to be problems with manual exposure on this
> camera: I am experiencing the exact same problem described here:
> http://www.mail-archive.com/linux-uvc-devel@lists.berlios.de/msg02799.html,
> that is, manual exposure can be set, but every value results in an
> overexposed image no matter what value I use (lower ones or higher ones
> do not matter).
>
> I'm working on a debian 4.0 machine (debian kernel 2.6.18-6-686) with
> the latest (as far as I know) version of the uvcvideo module:
>
> [EMAIL PROTECTED]:~$ /sbin/modinfo uvcvideo
> filename:       /lib/modules/2.6.18-6-686/usb/media/uvcvideo.ko
> version:        SVN r228
>
> I'm also using the latest svn version of uvcdynctrl
>
> [EMAIL PROTECTED]:~$ uvcdynctrl --version
> uvcdynctrl 0.2
>
> This is the output of uvcdynctrl -c -v:
>
> ----------
>
> Listing available controls for device video0:
>    Exposure, Auto Priority
>      ID      : 0x00000010,
>      Type    : Boolean,
>      Flags   : { CAN_READ, CAN_WRITE },
>      Values  : [ 20 .. 5000, step size: 1 ],
>      Default : 79
>    Exposure (Absolute)
>      ID      : 0x00000011,
>      Type    : Dword,
>      Flags   : { CAN_READ, CAN_WRITE },
>      Values  : [ 20 .. 5000, step size: 1 ],
>      Default : 79
>    Exposure, Auto
>      ID      : 0x0000000f,
>      Type    : Choice,
>      Flags   : { CAN_READ, CAN_WRITE },
>      Values  : { 'Manual Mode'[0], 'Auto Mode'[1], 'Shutter Priority
> Mode'[2], 'Aperture Priority Mode'[3] },
>      Default : 1
>    Sharpness
>      ID      : 0x00000007,
>      Type    : Dword,
>      Flags   : { CAN_READ, CAN_WRITE },
>      Values  : [ 0 .. 96, step size: 1 ],
>      Default : 40
>    Power Line Frequency
>      ID      : 0x0000000d,
>      Type    : Choice,
>      Flags   : { CAN_READ, CAN_WRITE },
>      Values  : { 'Disabled'[0], '50 Hz'[1], '60 Hz'[2] },
>      Default : 0
>    Gamma
>      ID      : 0x00000006,
>      Type    : Dword,
>      Flags   : { CAN_READ, CAN_WRITE },
>      Values  : [ 0 .. 7, step size: 1 ],
>      Default : 3
>    Hue
>      ID      : 0x00000005,
>      Type    : Dword,
>      Flags   : { CAN_READ, CAN_WRITE },
>      Values  : [ -4 .. 4, step size: 1 ],
>      Default : 0
>    Saturation
>      ID      : 0x00000004,
>      Type    : Dword,
>      Flags   : { CAN_READ, CAN_WRITE },
>      Values  : [ 0 .. 8, step size: 1 ],
>      Default : 3
>    Contrast
>      ID      : 0x00000002,
>      Type    : Dword,
>      Flags   : { CAN_READ, CAN_WRITE },
>      Values  : [ 0 .. 6, step size: 1 ],
>      Default : 2
>    Brightness
>      ID      : 0x00000001,
>      Type    : Dword,
>      Flags   : { CAN_READ, CAN_WRITE },
>      Values  : [ 0 .. 100, step size: 1 ],
>      Default : 30
>
> ----------
>
> There is something I don't understand: the Exposure (Auto Priority)
> control:
>
>    Exposure, Auto Priority
>      ID      : 0x00000010,
>      Type    : Boolean,
>      Flags   : { CAN_READ, CAN_WRITE },
>      Values  : [ 20 .. 5000, step size: 1 ],
>      Default : 79
>
> is reported of being of type Boolean, but the allowable values are
> described as integers;

The V4L2 spec states, about the minimum and maximum values,

"This field gives a lower (upper) bound for V4L2_CTRL_TYPE_INTEGER controls.
It may not be valid for any other type of control [...]."

The driver didn't clear unused fields in the v4l2_queryctrl structure, so 
boolean controls would report lower and upper bounds from the previously 
queried control.

Although not exactly required by the spec, I've fixed the driver in SVN to 
return 0 and 1 as the lower and upper bounds for boolean controls.

> nevertheless, I'm unable to change its value in 
> any way, and also getting its current value returns an error:
>
> [EMAIL PROTECTED]:~$ uvcdynctrl -g "Exposure, Auto Priority"
> ERROR: Unable to retrieve control value: A Video4Linux2 API call
> returned an unexpected error 5. (Code: 12)
>
> dmesg says:
>
> uvcvideo: Failed to query (129) UVC control 3 (unit 1) : -32 (exp. 1).
>
> However, this is likely a problem with uvcdynctrl rather than with the
> uvcvideo module.

This seems to be a webcam problem. The camera claims to support the "Exposure, 
Auto Priority" control but any attempt to get or set the control value 
returns an error. You can probably ignore that control.

> Now, as far as manual exposure is concerned, I'm doing this:
>
> [EMAIL PROTECTED]:~$ uvcdynctrl -s "Exposure, Auto" 0
> [EMAIL PROTECTED]:~$ uvcdynctrl -g "Exposure, Auto"
> 0
> [EMAIL PROTECTED]:~$ uvcdynctrl -s "Exposure (Absolute)" 20
> [EMAIL PROTECTED]:~$ uvcdynctrl -g "Exposure (Absolute)"
> 20
>
> After that, the image shown by luvcview is completely overexposed; the
> same happens if I set the Exposure (Absolute) control with a high value:
>
> [EMAIL PROTECTED]:~$ uvcdynctrl -s "Exposure (Absolute)" 4000
> [EMAIL PROTECTED]:~$ uvcdynctrl -g "Exposure (Absolute)"
> 4000
>
> I also tried to play around with the "Shutter Priority" and "Aperture
> Priority" values for the "Exposure, Auto" control, but without any
> apparent effect.
>
> If I set "Exposure, Auto" to 1 (Auto mode) and run luvcview, I can see
> that setting any value to the "Exposure (Absolute)" control results in
> the image becoming immediately overexposed, and then quickly coming back
> to normal as the camera automatically adjusts the exposure.
>
> Has any body been able to manually set the exposure on the Creative
> Live! Cam Optia (non-AF)?

My Live! Cam Optia suffers from the same problem. My guess would be a hardware 
issue. I don't think there's much I can do :-/ You could try to contact 
Creative Labs, they might have more information. I don't know if Windows 
supports manual exposure, but if you have access to a Windows box it might be 
interesting to see if it works there.

Best regards,

Laurent Pinchart
_______________________________________________
Linux-uvc-devel mailing list
Linux-uvc-devel@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel

Reply via email to