Hi Laurent,

First of all thanks for the reply and the support.

>> 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.

>> 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:
./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
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
  Backlight Compensation
  Sharpness
  White Balance Temperature
  Power Line Frequency
  Gain
  White Balance Temperature, Auto
  Saturation
  Contrast
  Brightness


./uvcdynctrl-0.2 -cv
[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
    ID      : 0x00000000,
    Type    : Boolean,
    Flags   : { CAN_READ, CAN_WRITE },
    Values  : [ 0 .. 1, step size: 1 ],
    Default : 0
  Exposure (Absolute)
    ID      : 0x00000000,
    Type    : Dword,
    Flags   : { CAN_READ, CAN_WRITE },
    Values  : [ 1 .. 10000, step size: 1 ],
    Default : 166
  Exposure, Auto
    ID      : 0x00000000,
    Type    : Choice,
    Flags   : { CAN_READ, CAN_WRITE },
    Values  : { 'Auto Mode'[0], 'Manual Mode'[1], 'Shutter Priority
Mode'[2], 'Aperture Priority Mode'[3] },
    Default : 3
  Backlight Compensation
    ID      : 0x0000101c,
    Type    : Dword,
    Flags   : { CAN_READ, CAN_WRITE },
    Values  : [ 0 .. 2, step size: 1 ],
    Default : 1
  Sharpness
    ID      : 0x0000101b,
    Type    : Dword,
    Flags   : { CAN_READ, CAN_WRITE },
    Values  : [ 0 .. 255, step size: 1 ],
    Default : 240
  White Balance Temperature
    ID      : 0x0000101a,
    Type    : Dword,
    Flags   : { CAN_READ, CAN_WRITE },
    Values  : [ 0 .. 10000, step size: 10 ],
    Default : 4000
  Power Line Frequency
    ID      : 0x00001018,
    Type    : Choice,
    Flags   : { CAN_READ, CAN_WRITE },
    Values  : { 'Disabled'[0], '50 Hz'[1], '60 Hz'[2] },
    Default : 2
  Gain
    ID      : 0x00000003,
    Type    : Dword,
    Flags   : { CAN_READ, CAN_WRITE },
    Values  : [ 0 .. 255, step size: 1 ],
    Default : 0
  White Balance Temperature, Auto
    ID      : 0x00000009,
    Type    : Boolean,
    Flags   : { CAN_READ, CAN_WRITE },
    Values  : [ 0 .. 1, step size: 1 ],
    Default : 1
  Saturation
    ID      : 0x00000004,
    Type    : Dword,
    Flags   : { CAN_READ, CAN_WRITE },
    Values  : [ 0 .. 255, step size: 1 ],
    Default : 32
  Contrast
    ID      : 0x00000002,
    Type    : Dword,
    Flags   : { CAN_READ, CAN_WRITE },
    Values  : [ 0 .. 255, step size: 1 ],
    Default : 32
  Brightness
    ID      : 0x00000001,
    Type    : Dword,
    Flags   : { CAN_READ, CAN_WRITE },
    Values  : [ 0 .. 255, step size: 1 ],
    Default : 128

>> 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:

Nov 16 15:53:10 greywolf kernel: [19593.956048] usb 2-1: new high
speed USB device using ehci_hcd and address 6
Nov 16 15:53:10 greywolf kernel: [19594.199827] usb 2-1: configuration
#1 chosen from 1 choice
Nov 16 15:53:11 greywolf kernel: [19594.799199] Linux video capture
interface: v2.00
Nov 16 15:53:11 greywolf kernel: [19594.877731] uvcvideo: Found UVC
1.00 device <unnamed> (046d:09a4)
Nov 16 15:53:11 greywolf kernel: [19594.892850] input: UVC Camera
(046d:09a4) as /devices/pci0000:00/0000:00:02.1/usb2/2-1/2-1:1.0/input/input7
Nov 16 15:53:11 greywolf kernel: [19594.895354] usbcore: registered
new interface driver snd-usb-audio
Nov 16 15:53:11 greywolf kernel: [19594.896082] usbcore: registered
new interface driver uvcvideo
Nov 16 15:53:11 greywolf kernel: [19594.896089] USB Video Class driver (v0.1.0)

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).

If I click on "auto exposure off" I still get "Set Auto Exposure off
error" in stderr.

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).

when luvcview runs it uses the following files (I can't see and config
file accessed unfortunately):

COMMAND     PID       USER   FD      TYPE     DEVICE     SIZE     NODE NAME
luvcview  13660      chrom  cwd       DIR        8,3      440    16997
/home/chrom/Desktop/libwebcam-0.1.1
luvcview  13660      chrom  rtd       DIR        8,2      632        2
/
luvcview  13660      chrom  txt       REG        8,2    76856   166590
/usr/bin/luvcview
luvcview  13660      chrom  DEL       REG        0,9          51216433
/SYSV00000000
luvcview  13660      chrom  DEL       REG        0,9          51183660
/SYSV00000000
luvcview  13660      chrom  mem       CHR       81,0            279320
/dev/video0
luvcview  13660      chrom  mem       REG        8,2    33152   164822
/usr/lib/libXcursor.so.1.0.2
luvcview  13660      chrom  mem       REG        8,2   254076   168440
/usr/lib/locale/en_US.utf8/LC_CTYPE
luvcview  13660      chrom  mem       REG        8,2   921214   168439
/usr/lib/locale/en_US.utf8/LC_COLLATE
luvcview  13660      chrom  mem       REG        8,2    25912   164848
/usr/lib/libXrandr.so.2.1.0
luvcview  13660      chrom  mem       REG        8,2    55772   164828
/usr/lib/libXext.so.6.4.0
luvcview  13660      chrom  mem       REG        8,2    95676   165979
/usr/lib/libxcb.so.1.0.0
luvcview  13660      chrom  mem       REG        8,2   971436   164811
/usr/lib/libX11.so.6.2.0
luvcview  13660      chrom  mem       REG        8,2    14128   164830
/usr/lib/libXfixes.so.3.1.0
luvcview  13660      chrom  mem       REG        8,2       54   168445
/usr/lib/locale/en_US.utf8/LC_NUMERIC
luvcview  13660      chrom  mem       REG        8,2     2451   168448
/usr/lib/locale/en_US.utf8/LC_TIME
luvcview  13660      chrom  mem       REG        8,2      286   168443
/usr/lib/locale/en_US.utf8/LC_MONETARY
luvcview  13660      chrom  mem       REG        8,2       52   168449
/usr/lib/locale/en_US.utf8/LC_MESSAGES/SYS_LC_MESSAGES
luvcview  13660      chrom  mem       REG        8,2       34   168446
/usr/lib/locale/en_US.utf8/LC_PAPER
luvcview  13660      chrom  mem       REG        8,2       77   168444
/usr/lib/locale/en_US.utf8/LC_NAME
luvcview  13660      chrom  mem       REG        8,2      155   168438
/usr/lib/locale/en_US.utf8/LC_ADDRESS
luvcview  13660      chrom  mem       REG        8,2       59   168447
/usr/lib/locale/en_US.utf8/LC_TELEPHONE
luvcview  13660      chrom  mem       REG        8,2       23   168442
/usr/lib/locale/en_US.utf8/LC_MEASUREMENT
luvcview  13660      chrom  mem       REG        8,2    26040   167059
/usr/lib/gconv/gconv-modules.cache
luvcview  13660      chrom  mem       REG        8,2      373   168441
/usr/lib/locale/en_US.utf8/LC_IDENTIFICATION
luvcview  13660      chrom  mem       REG        8,2    34720   162017
/lib/tls/i686/cmov/librt-2.8.90.so
luvcview  13660      chrom  mem       REG        8,2   116457   162013
/lib/tls/i686/cmov/libpthread-2.8.90.so
luvcview  13660      chrom  mem       REG        8,2    79736   165024
/usr/lib/libdirect-1.0.so.0.1.0
luvcview  13660      chrom  mem       REG        8,2    30020   165086
/usr/lib/libfusion-1.0.so.0.1.0
luvcview  13660      chrom  mem       REG        8,2   412840   165026
/usr/lib/libdirectfb-1.0.so.0.1.0
luvcview  13660      chrom  mem       REG        8,2     9676   161993
/lib/tls/i686/cmov/libdl-2.8.90.so
luvcview  13660      chrom  mem       REG        8,2   149332   161995
/lib/tls/i686/cmov/libm-2.8.90.so
luvcview  13660      chrom  mem       REG        8,2   813216   164926
/usr/lib/libasound.so.2.0.0
luvcview  13660      chrom  mem       REG        8,2  1425800   161987
/lib/tls/i686/cmov/libc-2.8.90.so
luvcview  13660      chrom  mem       REG        8,2   426488   164805
/usr/lib/libSDL-1.2.so.0.11.1
luvcview  13660      chrom  mem       REG        8,2    34352   164850
/usr/lib/libXrender.so.1.3.0
luvcview  13660      chrom  mem       REG        8,2    16628   164826
/usr/lib/libXdmcp.so.6.0.0
luvcview  13660      chrom  mem       REG        8,2     7408   164815
/usr/lib/libXau.so.6.0.0
luvcview  13660      chrom  mem       REG        8,2     5364   165975
/usr/lib/libxcb-xlib.so.0.0.0
luvcview  13660      chrom  mem       REG        8,2   113252     2342
/lib/ld-2.8.90.so
luvcview  13660      chrom    0u      CHR      136,2                 4
/dev/pts/2
luvcview  13660      chrom    1u      CHR      136,2                 4
/dev/pts/2
luvcview  13660      chrom    2u      CHR      136,2                 4
/dev/pts/2
luvcview  13660      chrom    3u     unix 0xc6ac7180            283571 socket
luvcview  13660      chrom    4u     unix 0xf568f500             17323 socket
luvcview  13660      chrom    5u     unix 0xc6ac6fc0            283573 socket
luvcview  13660      chrom    6u      CHR       81,0            279320
/dev/video0
luvcview  13660      chrom    9u     unix 0xf50fe380             17376
/tmp/ksocket-chrom/kdeinit4__0
luvcview  13660      chrom   10u     unix 0xf568f500             17323 socket
luvcview  13660      chrom   14u     unix 0xf568f500             17323 socket
luvcview  13660      chrom   17u     unix 0xf568f500             17323 socket
luvcview  13660      chrom   21u     unix 0xf568f500             17323 socket


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.

Looking forward to read your impressions.


Mauro
_______________________________________________
Linux-uvc-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel

Reply via email to