Hi Mauro,
On Sunday 16 November 2008, Mauro Grauso wrote:
> Hi Laurent,
>
> First of all thanks for the reply and the support.
You're welcome.
> >> Basically when there's not enough
> >> light the camera is compensating (very well actually) and the
> >> framerate drops to 3fps, when there's daylight it still compensate and
> >> the framerate is about 15/20fps (@640x480).
> >
> > That's quite usual with webcams. Cheap mass market CMOS sensors are not
> > very light sensitive and perform quite bad under low light conditions.
> > Increasing the exposure time automatically helps but at the cost of image
> > quality (more noise, blurry images, ...).
>
> I can confirm that to you. With low light I still get a very good
> picture, but the framerate is terribly low (the light compensation
> doesn't seem to affect image quality that is always quite good).
>
> >> The odd thing is that sometimes (but I haven't been able to reproduce
> >> it) the camera just doesn't use the auto exposure feature when I plug
> >> it in and, even if the image is darker, I get constant 30fps.
> >
> > That's indeed weird. Auto-exposure should be enabled. How many times have
> > you encountered the issue ?
>
> I've had this camera for only a few days, but this inconsistent
> behaviour showed up only once or twice. Do you know if this camera has
> any eprom to save settings? Is it possible that softwares (I tried
> skype, mplayer and luvcview) overwrite camera's defaults to put their
> settings? This would explain the unconsistent behaviour.
Not that I know of. That would be too expensive.
> >> Now I would really like to know how to turn off and on the auto
> >> exposure and white balance feature of the camera from the driver. If I
> >> try to turn off the auto exposure from the luvcview interface, I get
> >> "Set Auto Exposure off error" in the standard error.
> >
> > Your luvcview version might be outdated. Could you try the latest one
> > (available from quickcamteam.net) or the uvcdynctrl command line tool
> > (from the libwebcam package available on the same website) ?
>
> I'm using luvcview 0.2.4 (latest luvcview ubuntu package).
>
> I compiled the latest uvcdynctrl (0.2) and here is some output:
I'm afraid that's outdated :-/ Could you please check the last version out
from the SVN repository ?
> ./uvcdynctrl-0.2 -l
> [libwebcam] Unknown V4L2 control ID encountered: 10094849
> [libwebcam] Unknown V4L2 control ID encountered: 10094850
> [libwebcam] Unknown V4L2 control ID encountered: 10094851
Those warnings should disappear with the last version.
> Listing available devices:
> video0 UVC Camera (046d:09a4)
>
>
> ./uvcdynctrl-0.2 -c
> [libwebcam] Unknown V4L2 control ID encountered: 10094849
> [libwebcam] Unknown V4L2 control ID encountered: 10094850
> [libwebcam] Unknown V4L2 control ID encountered: 10094851
> Listing available controls for device video0:
> Exposure, Auto Priority
> Exposure (Absolute)
> Exposure, Auto
The controls are properly detected.
> Backlight Compensation
> Sharpness
> White Balance Temperature
> Power Line Frequency
> Gain
> White Balance Temperature, Auto
> Saturation
> Contrast
> Brightness
[snip]
Please try to modify the exposure controls using the -s option to uvcdynctrl.
> >> And sometimes (often, but not always!) I also get the following in
> >> syslog when I plug the cam, but the error doesn't stop the cam from
> >> working:
> >> Nov 15 14:39:34 greywolf kernel: [11981.960176] uvcvideo: Failed to
> >> query (1) UVC control 1 (unit 0) : -110 (exp. 26).
> >
> > I don't like that one, it reminds me of the Logitech firmware bug that is
> > not supposed to happen with that camera :-/
>
> The strange thing is that I usually get this line in syslog only if I
> unplug and then replug the camera. the first time I plug it on a clean
> boot it doesn't show up.
>
> >> Anyways the camera works even if I get these "soft" errors in syslog.
> >
> > I would have thought the last error ("Failed to query...") would prevent
> > the driver from initialising the camera properly. Could you please show
> > me all messages printed by the driver to the kernel log when the problem
> > occurs ?
>
> Ok let's assume that the problem is always present, as the auto
> exposure is usually default to on. I made a clean boot of my pc and on
> first connection of the camera I get the following syslog:
By problem I meant the "Failed to query..." message.
[snip ]
> now if I launch luvcview I get a good picture but low framerate (auto
> exposure on). Important: I can also confirm that the settings are
> saved somewhere because last time I plugged the webcam I tried it with
> kopete, and it did screw all the settings giving an awful picture.
> Plugging the cam now I got the same crappy output (till I clicked on
> "reset to defaults" switch in luvcview).
Set the driver trace parameter to 64 before plugging the camera (echo 64
> /sys/modules/uvcvideo/parameters/trace). The driver will then log a message
when an ioctl is called. Plug the camera and check if a userspace application
invokes VIDIOC_S_CTRL to restore controls.
> If I click on "auto exposure off" I still get "Set Auto Exposure off
> error" in stderr.
Please try to set the auto exposure control with uvcdynctrl.
> If I unplug and replug the camera I get the following syslog:
>
> Nov 16 16:00:26 greywolf kernel: [20030.102631] usb 2-1: USB
> disconnect, address 6
>
> Nov 16 16:00:40 greywolf kernel: [20043.553039] usb 2-1: new high
> speed USB device using ehci_hcd and address 7
> Nov 16 16:00:40 greywolf kernel: [20043.794369] usb 2-1: configuration
> #1 chosen from 1 choice
> Nov 16 16:00:40 greywolf kernel: [20043.794860] uvcvideo: Found UVC
> 1.00 device <unnamed> (046d:09a4)
> Nov 16 16:00:40 greywolf kernel: [20043.828903] input: UVC Camera
> (046d:09a4) as
> /devices/pci0000:00/0000:00:02.1/usb2/2-1/2-1:1.0/input/input8 Nov 16
> 16:00:41 greywolf kernel: [20044.857100] 7:3:1: cannot set freq 16000 to ep
> 0x86
> Nov 16 16:00:41 greywolf kernel: [20045.072108] uvcvideo: Failed to
> query (1) UVC control 1 (unit 0) : -110 (exp. 26).
> Nov 16 16:00:42 greywolf kernel: [20045.521117] uvcvideo: Failed to
> query (1) UVC control 1 (unit 0) : -32 (exp. 26).
> Nov 16 16:00:43 greywolf kernel: [20046.521233] uvcvideo: Failed to
> query (1) UVC control 1 (unit 0) : -110 (exp. 26).
> Nov 16 16:00:44 greywolf kernel: [20047.520218] uvcvideo: Failed to
> query (1) UVC control 1 (unit 0) : -110 (exp. 26).
If those messages were generated from actions taken by the driver during
device initialisation the errors would be fatal. This seems to indicate that
a userspace application tries to access the device. Setting trace to 64 will
confirm that.
[snip]
> I'm almost sure turning off auto exposure is a matter of finding out
> how the cam saves its settings. It's possible that I got the smooth
> output just the first time I plugged the cam in (with factory
> defaults). the driver can't correctly set back the exposure value, so
> the factory setting can't be restored. Also other settings that some
> software changes become the default when the cam is plugged back in.
I really doubt the camera includes an EEPROM to store control values (but I
might of course be wrong). Please try to set auto-exposure off with
uvcdynctrl. If it works the problem is probably in luvcview. If it doesn't
we'll have a look somewhere else.
Best regards,
Laurent Pinchart
_______________________________________________
Linux-uvc-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel