Hi,

On Tuesday 07 July 2009 15:24:19 fsulima wrote:
> Hi all.
>
> MediaTek MT6227 on Philips 9...@9u do not work. It looks like this:
>
> $ dmesg | tail
> [94425.741948] uvcvideo: Failed to query (135) UVC control 1 (unit 0) :
> -110 (exp. 26).
> [94425.743941] uvcvideo: Failed to query (129) UVC control 1 (unit 0) :
> -71 (exp. 26).
> [94425.743946] uvcvideo: Failed to initialize the device (-5).
> [94429.128037] usb 7-2: USB disconnect, address 8
> [94436.384010] usb 7-2: new full speed USB device using uhci_hcd and
> address 9
> [94436.849070] usb 7-2: configuration #1 chosen from 7 choices
> [94436.859998] uvcvideo: Found UVC 1.00 device 9...@9u    (0e8d:0004)
> [94437.861939] uvcvideo: Failed to query (135) UVC control 1 (unit 0) :
> -110 (exp. 26).
> [94437.863947] uvcvideo: Failed to query (129) UVC control 1 (unit 0) :
> -71 (exp. 26).
> [94437.863952] uvcvideo: Failed to initialize the device (-5).

That's weird. The camera seem to crash when queried with GET_DEF. Could you 
please try the attached patch ? It might require some tweaking if you don't 
apply it on top of the latest driver version.

> $ lsusb -d 0e8d:0004 -v

[snip]

The device descriptors look *really* weird. The device exposes 7 
configurations, and the only difference between them is the power consumption. 
Are you sure you haven't received a development prototype ? :-)

> It looks I'm not the only one having this problem:
> http://ubuntuforums.org/showthread.php?t=1164520
>
> Is there any remedy for this?

Try the attached patch and let me know if it helps.

Best regards,

Laurent Pinchart


diff -r 1af5233017e6 linux/drivers/media/video/uvc/uvc_driver.c
--- a/linux/drivers/media/video/uvc/uvc_driver.c	Sun Jul 05 15:27:33 2009 -0300
+++ b/linux/drivers/media/video/uvc/uvc_driver.c	Sat Jul 11 00:59:23 2009 +0200
@@ -1868,7 +1868,8 @@
 	  .bInterfaceClass	= USB_CLASS_VIDEO,
 	  .bInterfaceSubClass	= 1,
 	  .bInterfaceProtocol	= 0,
-	  .driver_info		= UVC_QUIRK_PROBE_MINMAX },
+	  .driver_info		= UVC_QUIRK_PROBE_MINMAX
+	  			| UVC_QUIRK_PROBE_DEF },
 	/* Syntek (HP Spartan) */
 	{ .match_flags		= USB_DEVICE_ID_MATCH_DEVICE
 				| USB_DEVICE_ID_MATCH_INT_INFO,
diff -r 1af5233017e6 linux/drivers/media/video/uvc/uvc_video.c
--- a/linux/drivers/media/video/uvc/uvc_video.c	Sun Jul 05 15:27:33 2009 -0300
+++ b/linux/drivers/media/video/uvc/uvc_video.c	Sat Jul 11 00:59:23 2009 +0200
@@ -128,6 +128,9 @@
 	if (data == NULL)
 		return -ENOMEM;
 
+	if ((video->dev->quirks & UVC_QUIRK_PROBE_DEF) && query == UVC_GET_DEF)
+		return -EIO;
+
 	ret = __uvc_query_ctrl(video->dev, query, 0, video->streaming->intfnum,
 		probe ? UVC_VS_PROBE_CONTROL : UVC_VS_COMMIT_CONTROL, data,
 		size, UVC_CTRL_STREAMING_TIMEOUT);
diff -r 1af5233017e6 linux/drivers/media/video/uvc/uvcvideo.h
--- a/linux/drivers/media/video/uvc/uvcvideo.h	Sun Jul 05 15:27:33 2009 -0300
+++ b/linux/drivers/media/video/uvc/uvcvideo.h	Sat Jul 11 00:59:23 2009 +0200
@@ -157,6 +157,7 @@
 #define UVC_QUIRK_STREAM_NO_FID		0x00000010
 #define UVC_QUIRK_IGNORE_SELECTOR_UNIT	0x00000020
 #define UVC_QUIRK_FIX_BANDWIDTH		0x00000080
+#define UVC_QUIRK_PROBE_DEF		0x00000100
 
 /* Format flags */
 #define UVC_FMT_FLAG_COMPRESSED		0x00000001
_______________________________________________
Linux-uvc-devel mailing list
Linux-uvc-devel@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel

Reply via email to