Hi Tharindu,

On Friday 19 October 2007 15:18, Tharindu Rukshan Bamunuarachchi wrote:
> Dear Laurent,
>
> this is the dmesg out put when did i run ...
>
>  luvcview -s 352x288 -i 20 -f yuv -w
>
> is it something wrong with camera??

Oops, my bad, I made a mistake in the patch. Could you pleas try this one ? We 
are hopefully getting closer :-)

Best regards,

Laurent Pinchart
Index: uvc_driver.c
===================================================================
--- uvc_driver.c	(revision 137)
+++ uvc_driver.c	(working copy)
@@ -85,8 +85,8 @@
 	},
 };
 
-#if 0
-static void uvc_print_streaming_control(struct uvc_streaming_control *ctrl)
+#if 1
+void uvc_print_streaming_control(struct uvc_streaming_control *ctrl)
 {
 	printk(KERN_DEBUG "bmHint:                      0x%04x\n", ctrl->bmHint);
 	printk(KERN_DEBUG "bFormatIndex:                   %3u\n", ctrl->bFormatIndex);
Index: uvc_video.c
===================================================================
--- uvc_video.c	(revision 137)
+++ uvc_video.c	(working copy)
@@ -59,9 +59,12 @@
 				UVC_CTRL_CONTROL_TIMEOUT);
 }
 
+extern void uvc_print_streaming_control(struct uvc_streaming_control *ctrl);
+
 static int uvc_get_video_ctrl(struct uvc_video_device *video,
 	struct uvc_streaming_control *ctrl, int probe, __u8 query)
 {
+	static const char *queries[] = {"UNK", "CUR", "MIN", "MAX", "RES", "LEN", "INFO", "DEF"};
 	__u8 data[34];
 	__u8 size;
 	int ret;
@@ -117,6 +120,10 @@
 		}
 	}
 
+	uvc_printk(KERN_INFO, "GET_%s(%s)\n",
+		queries[query & 0x07], probe ? "probe" : "commit");
+	uvc_print_streaming_control(ctrl);
+	
 	return 0;
 }
 
@@ -773,6 +780,8 @@
 	if (intf->num_altsetting > 1) {
 		/* Isochronous endpoint, select the alternate setting. */
 		bandwidth = video->streaming->ctrl.dwMaxPayloadTransferSize;
+		if (bandwidth == 0)
+			return -EIO;
 
 		for (i = 0; i < intf->num_altsetting; ++i) {
 			alts = &intf->altsetting[i];
@@ -794,6 +803,9 @@
 		if ((ret = usb_set_interface(video->dev->udev, intfnum, i)) < 0)
 			return ret;
 
+		uvc_printk(KERN_INFO, "Selected altsetting %u, "
+			  "wMaxPacketSize is 0x%04x\n", i,
+			   le16_to_cpu(ep->desc.wMaxPacketSize));
 		return uvc_init_video_isoc(video, ep);
 	} else {
 		/* Bulk endpoint, proceed to URB initialization. */
_______________________________________________
Linux-uvc-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel

Reply via email to