Hi Tharindu,
On Friday 19 October 2007 11:25, Tharindu Rukshan Bamunuarachchi wrote:
> Dear Laurent,
>
> This is what I got... Is it something wrong with my camera or how I have
> compiled my kernel?
There might be something wrong with the camera, but the driver shouldn't crash
so there's also a bug there.
I attached an updated patch. It prevents the driver from crashing but won't
fix the issue. Could you please try it and report the new messages printed in
the kernel log ?
Thanks.
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;
@@ -74,6 +77,10 @@
if (ret < 0)
return ret;
+ uvc_printk(KERN_INFO, "GET_%s(%s)\n",
+ queries[query & 0x07], probe ? "probe" : "commit");
+ uvc_print_streaming_control(ctrl);
+
ctrl->bmHint = le16_to_cpup((__le16*)&data[0]);
ctrl->bFormatIndex = data[2];
ctrl->bFrameIndex = data[3];
@@ -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