Hi Paul,

On Thursday 31 March 2011 08:13:07 Paul Jurczak wrote:
> Hello,
> 
> I'm trying to add dynamic controls for a camera with undocumented XUs (Gear
> Head WC1300). lsusb shows presence of XU: VideoControl Interface
> Descriptor:
>         bLength                28
>         bDescriptorType        36
>         bDescriptorSubtype      6 (EXTENSION_UNIT)
>         bUnitID                 4
>         guidExtensionCode         {e3deaebb-c2ec-4d42-802c-72f2eb3dfb57}
>         bNumControl             8
>         bNrPins                 1
>         baSourceID( 0)          1
>         bControlSize            3
>         bmControls( 0)       0x59
>         bmControls( 1)       0x80
>         bmControls( 2)       0x80
>         iExtension              0
> Documentation of camera processor (Vimicro VC0342) indicates availability
> of image processing on/off and 8/10-bit raw controls. My plan is a brute
> force approach to test all possible values of controls.
> 
> I'm having some problems with the API. Adding a control with
> UVCIOC_CTRL_ADD succeeds even with bogus parameters (e.g. wrong GUID).

On recent kernels UVCIOC_CTRL_ADD is a no-op and will always return -EEXIST. 
On older kernels it will succeed regardless of whether your webcam includes an 
XU with the given GUID, as added controls are not specific to a given webcam.

> Mapping it with UVCIOC_CTRL_MAP succeeds too.

Adding a mapping will succeed even if the camera doesn't implement the given 
control. Set the trace parameter to 65535 before adding mappings, the driver 
will print additional information to the kernel log, including whether the UVC 
control identified by the mapping is found in the device.

> Trying VIDIOC_QUERYCTRL or UVCIOC_CTRL_GET fails with EINVAL. Is it normal
> that UVCIOC_CTRL_ADD works fine with random GUID? In addition to 0 return
> value from UVCIOC_CTRL_ADD, trying to add the same control again produces
> EEXIST error, so it seems that it was accepted by the driver.

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