Hi Gabriel,

On Tuesday 30 December 2008, Gabriel Schulhof wrote:
> Hi!
>
> I have just bought such a camera, and it worked out of the box with a
> laptop running Fedora 9. Excellent!
>
> The camera has to work for a person who is over 60 years old and is only
> now (very enthusiastic about) learning to use a computer. Thus, I would
> like to configure a few things to make the camera work more reliably:
>
> 1. == This is a bit of a bug report: after recovering from hibernation,
> the camera has to be unplugged/plugged back in. Does/Will uvcvideo have
> hibernate/suspend support?

The uvcvideo driver should already support suspend/resume. Please give us a 
more detailed report of what goes wrong.

> 2. == Sometimes, when the camera comes back to life, it forgets the
> brightness/contrast/etc. settings it used to have.

The driver is supposed to restore control values when a device is resumed (I'm 
not sure if the camera itself is supposed to retain those settings or not, I 
guess it depends if the computer removes power from the USB ports during 
suspend). Please have a look at the kernel log (using dmesg) when this 
happens to see if the driver prints any error or informational message.

> Thus, I was wondering 
> if there is a console-based utility that I can run, setting reasonable
> default values either automatically or at the click of a button.
> Currently, I can use ekiga or xawtv to set brightness, contrast, and
> colour intensity. However, I think it's too complicated to teach. Thus,
> the utility would have to accept brightness/contrast/colour intensity
> values on the command line and (probably) use v4l2 to set the values.
>
> For example the quickcam messenger driver had a utility called qc-set,
> whose command line allowed me to specify values for brightness, contrast,
> colour, etc. and which would set up the camera accordingly.

The v4l2-ctl utility (found in the v4l-dvb repository on http://linuxtv.org/) 
can be used to set V4L2 controls on the command line.

> Alternatively, can I specify such values using module parameters? I
> noticed that uvcvideo (v0.1.0, according to modinfo) doesn't have any
> brightness/contrast/etc. module parameters:
>
> parm:           quirks:Forced device quirks (uint)
> parm:           trace:Trace level bitmask (uint)
>
> Is it possible to add such parameters to the module so as to specify
> default brightness/contrast/etc. values? I realize that the module may be
> responsible for multiple webcams, so addressing the
> brightness/contrast/etc. values to the right webcam may not be a trivial
> task.

Module parameters are not really suited for that job. You should use a command 
line application instead, possibly in relation with udev/hal.

> 3. == I have observed that, after multiple hibernate/resume cycles,
> /dev/video0 stops working. Even after
>
>   1. Unplugging the camera
>   2. modprobe -r uvcvideo
>   3. Plugging in the camera
>
> the resulting /dev/video0 does not work. mplayer tv:// says:
>
> MPlayer dev-SVN-r27514-4.3.0 (C) 2000-2008 MPlayer Team
> CPU: Mobile AMD Sempron(tm) Processor 2600+ (Family: 15, Model: 8,
> Stepping: 2)
> CPUflags:  MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 1
> Compiled with runtime CPU detection.
> mplayer: could not connect to socket
> mplayer: No such file or directory
> Failed to open LIRC support. You will not be able to use your remote
> control.
>
> Playing tv://.
> TV file format detected.
> Selected driver: v4l2
>  name: Video 4 Linux 2 input
>  author: Martin Olschewski <[email protected]>
>  comment: first try, more to come ;-)
> v4l2: your device driver does not support VIDIOC_G_STD ioctl,
> VIDIOC_G_PARM was used instead.
> Selected device: UVC Camera (046d:09a4)
>  Capabilites:  video capture  streaming
>  supported norms:
>  inputs: 0 = Camera 1;
>  Current input: 0
>  Current format: MJPEG
> v4l2: ioctl set format failed: Input/output error
> v4l2: ioctl set mute failed: Invalid argument
> v4l2: 0 frames successfully processed, 0 frames dropped.
>
> Is there a way to reset the camera so that it continues to work after
> arbitrary numbers of hibernate/resume cycles?

Please check the kernel log for error messages that could help diagnose this 
problem.

Best regards,

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

Reply via email to