Hi Yann,

On Saturday 31 January 2009, Yann LeCun wrote:
> Laurent and all,
> I just got one of those new Minoru stereo webcams.  At 90 bucks from
> Amazon, the Minoru is several times cheaper than any alternative, and
> there are lots of cool things you could do with a stereo camera under
> Linux (see http://www.minoru3d.com/ ).
> The good news is that uvcvideo recognizes the stereo camera as two
> separate cameras (which appear as /dev/video0 and /dev/video1 in my
> laptop with Ubuntu 8.10). I can grab video from the left and right
> camera separately with no problem.  I'm using the standard uvcvideo
> driver that comes with Ubuntu 8.10 Intrepid.
> The problem is that I cannot seem to be able to grab from both cameras
> simultaneously.  If I turn on streaming on one camera, the second
> camera refuses to turn on streaming. In other words "
> ioctl(fd, VIDIOC_STREAMON, &type)" with
> "type = V4L2_BUF_TYPE_VIDEO_CAPTURE" fails (it returns -2).
> dmesg says:
> uvcvideo: Failed to submit URB 0 (-28).
> Similarly, if I have luvcview running on one camera and I try to start
> luvcview on the other camera, I get the error message:
> "Unable to start capture: No space left on device"
> I suspect this is a problem with the USB bus bandwidth.

That's right. The webcams request more bandwidth than the USB can allocate (or 
the driver mistakenly believes so).

> The problem with luvcview occurs even if I reduce the
> resolution to 160x120 with "luvcview -d /dev/video0 -s 160x120"
> Is there an easy fix? A difficult fix?

Could you please apply the attached patch ? It adds a print statement to log 
the requested bandwidth when starting the video stream. Please check the 
kernel log (using dmesg) after starting luvcview in various resolutions and 
report the requested bandwidths.

Best regards,

Laurent Pinchart
diff -r a98f3ecba7a1 linux/drivers/media/video/uvc/uvc_video.c
--- a/linux/drivers/media/video/uvc/uvc_video.c	Sun Jan 18 21:46:30 2009 +0100
+++ b/linux/drivers/media/video/uvc/uvc_video.c	Sun Feb 01 22:50:47 2009 +0100
@@ -897,6 +897,9 @@
 				"bandwidth, defaulting to lowest.\n",
 			bandwidth = 1;
+		} else {
+			uvc_printk(KERN_INFO, "device %s requested %u bytes "
+				"per payload.\n", video->vdev->name, bandwidth);
 		for (i = 0; i < intf->num_altsetting; ++i) {
Linux-uvc-devel mailing list

Reply via email to