Hi Samir,

please CC the list when answering.

On Monday 26 November 2007, Samir Ibradzic wrote:
> Laurent, thanks for very fast reply!
>
> I applied the patch, it still fails at second request (129). Any further
> patches and/or tests i could try?
>
> dmsg output (when tried with 'modprobe uvcvideo trace=15'):
>
[snip]
> [  223.544000] uvcvideo: Probing generic UVC device 1
> [  223.544000] uvcvideo: Found format MJPEG.
> [  223.544000] uvcvideo: - 320x240 (15.0 fps)
> [  223.544000] uvcvideo: Found UVC 1.10 device au W33SA (0474:0722)
> [  223.544000] uvcvideo: Scanning UVC chain: OT 3 <- PU 2 <- IT 1
> [  223.544000] uvcvideo: Found a valid video chain (1 -> 3).
> [  223.556000] uvcvideo: Failed to query (129) UVC control 1 (unit 0) :
> -32 (exp. 34).
> [  223.556000] uvcvideo: Failed to initialize the device (-5).
> [  223.556000] usbcore: registered new interface driver uvcvideo
> [  223.556000] USB Video Class driver (v0.1.0)

Let's try something else then. The attached patch writes the video streaming 
probe with a dummy value (all 0's) before attempting to retrieve it. Let me 
know if it helps.

Best regards,

Laurent Pinchart
Index: uvc_video.c
===================================================================
--- uvc_video.c	(revision 147)
+++ uvc_video.c	(working copy)
@@ -897,9 +897,15 @@
 	/* Some webcams don't suport GET_DEF request on the probe control. We
 	 * fall back to GET_CUR if GET_DEF fails.
 	 */
-	if ((ret = uvc_get_video_ctrl(video, probe, 1, GET_DEF)) < 0 &&
-	    (ret = uvc_get_video_ctrl(video, probe, 1, GET_CUR)) < 0)
+	memset(probe, 0, sizeof *probe);
+	if ((ret = uvc_set_video_ctrl(video, probe, 1, SET_CUR)) < 0) {
+		uvc_printk(KERN_INFO, "Failed to initialize probe control.\n");
 		return ret;
+	}
+	if ((ret = uvc_get_video_ctrl(video, probe, 1, GET_CUR)) < 0) {
+		uvc_printk(KERN_INFO, "Failed to read probe control.\n");
+		return ret;
+	}
 
 	/* Check if the default format descriptor exists. Use the first
 	 * available format otherwise.
_______________________________________________
Linux-uvc-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel

Reply via email to