Hi,

With the current uvc code, class specific setup request are redirected
to userspace.
However, in order to decode these request, userspace needs some information,
that are currently available in the gadget descriptor. Which is kernel code.

Let's take an example request :

bRequestType = 0xa1
bRequest = 0x87 (UVC_GET_DEF)
wValue = 0x200;
wIndex = 0x200;
wLength = 2;

wIndex is (UnitId | Interface)

Interface = 0 means control interface.
Now, to translate wValue into a CS (Control Selector Code), I need to map
UnitId to an entity type.

To do this, I can look in the driver/usb/gadget/webcam.c file, and
find the answer :
 UnitID = 2 means processing unit.

I can (and will) hardcode this mapping (UnitId = 2  <=> Processing Unit) in
my userspace setup request handling code.

But then I make a camera with two input unit, a selector unit,
and my userspace code is broken :(

What's the plan for future enhancement of this code ?

Jean-Philippe François
_______________________________________________
Linux-uvc-devel mailing list
Linux-uvc-devel@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel

Reply via email to