Re: [Linux-uvc-devel] Minoru stereo webcam

2009-02-01 Thread Jan Ciger
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello,

I have also got the Minoru stereo webcam, the same as described by Yann
on 31.1. and with the same problem (unable to stream from both cameras
at once), regardless of which USB port is used. It doesn't work even if
the camera is attached to a separate USB controller with nothing else on it.

The webcam contains actually two Vimicro cameras connected to an
internal USB hub, together with a USB microphone. In Windows on the same
machine it works OK, albeit a bit slow (framerate throttling?).

I have tried to reduce the framerate (only 30 and 15fps are supported)
and all resolutions besides the 640x480 maximum (the Windows driver
claims 800x600, but that looks interpolated) and still the second camera
will not stream if the first one is already doing so.

Is there a way to get two UVC cameras to stream at the same time?

Regards,

Jan
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mandriva - http://enigmail.mozdev.org

iD8DBQFJhgbnn11XseNj94gRAnbmAKCCZ7bQs17hK7w+0TU9TKQnoUXtRACg3LeM
tDpg1CdD3YX9sAWQJFczvmw=
=8wul
-END PGP SIGNATURE-
___
Linux-uvc-devel mailing list
Linux-uvc-devel@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel


Re: [Linux-uvc-devel] Minoru stereo webcam

2009-02-01 Thread Laurent Pinchart
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,
 video-vdev-name);
 			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
Linux-uvc-devel@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel


Re: [Linux-uvc-devel] Minoru stereo webcam

2009-02-01 Thread Jan Ciger
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Laurent,

I have applied your patch and here are the data:

- - luvcview -s 640x480 -i 30 -d /dev/video0
uvcvideo: device Vimicro USB2.0 PC Camera requested 3072 bytes per payload.

- - luvcview -s 320x240 -i 30 -d /dev/video0
uvcvideo: device Vimicro USB2.0 PC Camera requested 3072 bytes per payload.

- - luvcview -s 176x144 -i 30 -d /dev/video0
uvcvideo: device Vimicro USB2.0 PC Camera requested 3072 bytes per payload.

- - luvcview -s 160x120 -i 30 -d /dev/video0
uvcvideo: device Vimicro USB2.0 PC Camera requested 3072 bytes per payload.

It makes no difference whether I am asking for 30 or 15fps neither -
always 3072 bytes are requested.

Regards,

Jan


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mandriva - http://enigmail.mozdev.org

iD8DBQFJhjGun11XseNj94gRAqdFAKCKcWQ6tQO3ndMMYD6oAohNSdM0NQCgi6zv
mG8ior07wtd6eRenWtKX2L0=
=0NcE
-END PGP SIGNATURE-
___
Linux-uvc-devel mailing list
Linux-uvc-devel@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel