Hi Pedro,
On Wednesday 30 September 2009 11:09:59 Pedro Fragoso wrote:
> Is there any workaround or patch for this ?
Could you please try the attached patch ? It should print an informational
message to the kernel log similar to
"uvcvideo: device X videostreaming interface 1 has 18 bytes of trailing
descriptor garbage."
Your device should then be correctly recognized by the driver.
Make sure you load the driver with trace=2 (or any mask that has the second
right-most bit set) otherwise the message won't be printed.
Once you confirm the patch fixes your problem I'll commit it to my tree and
send a pull request.
--
Regards,
Laurent Pinchart
diff -r d91c850bad98 linux/drivers/media/video/uvc/uvc_driver.c
--- a/linux/drivers/media/video/uvc/uvc_driver.c Sun Sep 27 16:30:34 2009 +0800
+++ b/linux/drivers/media/video/uvc/uvc_driver.c Thu Oct 01 01:51:53 2009 +0200
@@ -426,7 +426,9 @@
/* Parse the frame descriptors. Only uncompressed, MJPEG and frame
* based formats have frame descriptors.
*/
- while (buflen > 2 && buffer[2] == ftype) {
+ while (buflen > 2 && buffer[1] == USB_DT_CS_INTERFACE &&
+ buffer[2] == ftype)
+ {
frame = &format->frame[format->nframes];
if (ftype != UVC_VS_FRAME_FRAME_BASED)
n = buflen > 25 ? buffer[25] : 0;
@@ -503,12 +505,16 @@
buffer += buffer[0];
}
- if (buflen > 2 && buffer[2] == UVC_VS_STILL_IMAGE_FRAME) {
+ if (buflen > 2 && buffer[1] == USB_DT_CS_INTERFACE &&
+ buffer[2] == UVC_VS_STILL_IMAGE_FRAME)
+ {
buflen -= buffer[0];
buffer += buffer[0];
}
- if (buflen > 2 && buffer[2] == UVC_VS_COLORFORMAT) {
+ if (buflen > 2 && buffer[1] == USB_DT_CS_INTERFACE &&
+ buffer[2] == UVC_VS_COLORFORMAT)
+ {
if (buflen < 6) {
uvc_trace(UVC_TRACE_DESCR, "device %d videostreaming "
"interface %d COLORFORMAT error\n",
@@ -749,6 +755,11 @@
buffer += buffer[0];
}
+ if (buflen)
+ uvc_trace(UVC_TRACE_DESCR, "device %d videostreaming interface "
+ "%d has %u bytes of trailing descriptor garbage.\n",
+ dev->udev->devnum, alts->desc.bInterfaceNumber, buflen);
+
/* Parse the alternate settings to find the maximum bandwidth. */
for (i = 0; i < intf->num_altsetting; ++i) {
struct usb_host_endpoint *ep;
_______________________________________________
Linux-uvc-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel