Hi Brandon,

On Friday 12 October 2007, Brandon Philips wrote:
> Hello-
>
> I don't know if I like the idea of needing a udev/hotplug script to map
> my camera features.

Alternative ideas are welcome. I thought about ways to solve the extension 
units controls problem for a while and couldn't come with a better solution. 
Hardcoding all controls in the drivers is not a long term solution.

> However, I reviewed dynctrl.txt it seems reasonable.
>
> I just had one question:
> >     __u32   flags           See below
> >
> >     * struct uvc_xu_control_info flags field
> >
> >     UVC_CONTROL_SET_CUR     Control is writable.
> >     UVC_CONTROL_GET_CUR     Control is readable.
> >     UVC_CONTROL_GET_MIN     Control supports GET MIN queries.
> >     UVC_CONTROL_GET_MAX     Control supports GET MAX queries.
> >     UVC_CONTROL_GET_RES     Control supports GET RES queries.
> >     UVC_CONTROL_GET_DEF     Control supports GET DEF queries.
> >     UVC_CONTROL_RESTORE     Control should be restored when resuming from
> >                             sleep.
>
> Quoting the UVC spec:
>
> "All controls supported by the Extension Unit must support the following
> requests: GET_CUR, GET_MIN, GET_MAX, GET_RES, GET_INFO, GET_DEF,
> GET_LEN"
>
> And the driver can find out about SET_CUR via GET_INFO.  So, besides
> RESTORE what is this flag field needed for?

GET_MIN, GET_MAX, GET_RES and GET_DEF are used internally. XU controls are 
handled like other controls, so the driver needs to remember which requests 
are supported for every control, including the XU controls. UVCIOC_CTRL_ADD 
sets the GET_MIN, GET_MAX, GET_RES and GET_DEF flags.

The current implementation allows applications to add control definitions 
without a corresponding device plugged in the system. This means the driver 
won't be able to query the control using GET_INFO at the time it is added, 
hence the need to set GET_CUR and SET_CUR manually. This is an internal 
implementation issue and I'll try to get rid of it.

> Thanks,
>
>       Brandon
>
> P.S. Is there a Logitech XU spec sheet somewhere?  It would be nice to
> have information on the controls on my device.

There is no public document. I'll see if I can get them to release their 
internal spec, or at least part of them.

Best regards,

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

Reply via email to