Discussion:
[linux-uvc-devel] UVC extension unit guid endianness
Kristoffer Koch
2016-03-10 08:56:49 UTC
Permalink
Hi,

We're developing a USB UVC camera, and created an extension unit for
tuning various settings in our image pipeline.

Our descriptor is listed with lsusb as
VideoControl Interface Descriptor:
bLength 27
bDescriptorType 36
bDescriptorSubtype 6 (EXTENSION_UNIT)
bUnitID 4
guidExtensionCode {29c8acf6-dbac-11e5-8424-f39068f75511}

We tried adding the controls to v4l with uvcdynctrl, but only got
ENOENT (which is a strange error code to get when no files are
involved). We instrumented uvc_ctrl.c with some traces, and found out
that while lsusb lists our guid as above, the kernel compares against
f6acc829-acdb-e511-8424-f39068f75511, which seems like an endianess
issue.

It could be an issue with uvcdynctrl, but for me it seems like a
kernel issue, as the parameter sent from uvcdynctrl is printed
correctly in the kernel log.

Anyway, many thanks to the linux community for letting us have a very
pleasant platform for developing hardware on.

Best regards,
--
Kristoffer E. Koch
Kubicam
Paulo Assis
2016-03-10 14:30:55 UTC
Permalink
Hi,
I don't think you need to add the controls any more, you just need to
map them with UVCIOC_CTRL_MAP

You can also use uvcdynctrl to get/set the controls without mapping
them altogether:

uvcdynctrl -G unit_id:selector
uvcdynctrl -S unit_id:selector value

in your case for selector 1, something like:

uvcdynctrl -G 4:1

Regards,
Paulo
Post by Kristoffer Koch
Hi,
We're developing a USB UVC camera, and created an extension unit for
tuning various settings in our image pipeline.
Our descriptor is listed with lsusb as
bLength 27
bDescriptorType 36
bDescriptorSubtype 6 (EXTENSION_UNIT)
bUnitID 4
guidExtensionCode {29c8acf6-dbac-11e5-8424-f39068f75511}
We tried adding the controls to v4l with uvcdynctrl, but only got
ENOENT (which is a strange error code to get when no files are
involved). We instrumented uvc_ctrl.c with some traces, and found out
that while lsusb lists our guid as above, the kernel compares against
f6acc829-acdb-e511-8424-f39068f75511, which seems like an endianess
issue.
It could be an issue with uvcdynctrl, but for me it seems like a
kernel issue, as the parameter sent from uvcdynctrl is printed
correctly in the kernel log.
Anyway, many thanks to the linux community for letting us have a very
pleasant platform for developing hardware on.
Best regards,
--
Kristoffer E. Koch
Kubicam
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140
_______________________________________________
Linux-uvc-devel mailing list
https://lists.sourceforge.net/lists/listinfo/linux-uvc-devel
Kristoffer Koch
2016-03-10 14:41:52 UTC
Permalink
Hi, yes we were puzzled that -G/-S worked (uvc_xu_ctrl_query() in
uvc_ctrl.c), but not the uuid mapping (uvc_ctrl_add_mapping()).

However, we wanted to get the controls in qv4l2 for fiddling around
with our image, and we were able to do the mapping if we
endian-inverted the guid in the xml for uvcdynctrl. We think that this
is a bug with the uuid handling in uvc_ctrl.c.

Best regards, Kristoffer
Post by Paulo Assis
Hi,
I don't think you need to add the controls any more, you just need to
map them with UVCIOC_CTRL_MAP
You can also use uvcdynctrl to get/set the controls without mapping
uvcdynctrl -G unit_id:selector
uvcdynctrl -S unit_id:selector value
uvcdynctrl -G 4:1
Regards,
Paulo
Post by Kristoffer Koch
Hi,
We're developing a USB UVC camera, and created an extension unit for
tuning various settings in our image pipeline.
Our descriptor is listed with lsusb as
bLength 27
bDescriptorType 36
bDescriptorSubtype 6 (EXTENSION_UNIT)
bUnitID 4
guidExtensionCode {29c8acf6-dbac-11e5-8424-f39068f75511}
We tried adding the controls to v4l with uvcdynctrl, but only got
ENOENT (which is a strange error code to get when no files are
involved). We instrumented uvc_ctrl.c with some traces, and found out
that while lsusb lists our guid as above, the kernel compares against
f6acc829-acdb-e511-8424-f39068f75511, which seems like an endianess
issue.
It could be an issue with uvcdynctrl, but for me it seems like a
kernel issue, as the parameter sent from uvcdynctrl is printed
correctly in the kernel log.
Anyway, many thanks to the linux community for letting us have a very
pleasant platform for developing hardware on.
Best regards,
--
Kristoffer E. Koch
Kubicam
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140
_______________________________________________
Linux-uvc-devel mailing list
https://lists.sourceforge.net/lists/listinfo/linux-uvc-devel
--
Kristoffer E. Koch
Kubicam
Loading...