Hi Laurent,
Many thanks for getting back to me :)
On Friday 06 June 2008 23:12:50 Laurent Pinchart wrote:
..
> *sigh*. I hate protocol errors. They are most of the time caused by buggy
> devices, and buggy devices mean I have to find a software workaround :-S
I guessed that might be the case :-/
> Could you please try to blindly ignore the usb_set_interface return value ?
> I'd like to know if the second call is really required.
I've tried changing it to specifically ignore that error:
Index: uvc_video.c
===================================================================
--- uvc_video.c (revision 213)
+++ uvc_video.c (working copy)
@@ -750,8 +750,10 @@
if (i >= intf->num_altsetting)
return -EIO;
- if ((ret = usb_set_interface(video->dev->udev, intfnum, i)) < 0)
- return ret;
+ if ((ret = usb_set_interface(video->dev->udev, intfnum, i)) <
0) {
+ if (ret != -71) // Let's try blindly ignoring protocol
errors as requested
+ return ret;
+ }
ret = uvc_init_video_isoc(video, ep);
} else {
Any when I now retry, I get the following error:
~/> ./WebCam.py
Traceback (most recent call last):
File "./WebCam.py", line 214, in <module>
VideoCapturePlayer().run() # Runs at full speed - basic test case
File "./WebCam.py", line 27, in __init__
self.camera.start()
EnvironmentError: ioctl(VIDIOC_STREAMON) failure : 90, Message too long
For good measure I also tried this ...
Index: uvc_video.c
===================================================================
--- uvc_video.c (revision 213)
+++ uvc_video.c (working copy)
@@ -749,10 +749,13 @@
if (i >= intf->num_altsetting)
return -EIO;
+
+ ret = usb_set_interface(video->dev->udev, intfnum, i);
+// if ((ret = usb_set_interface(video->dev->udev, intfnum, i)) <
0) {
+// if (ret != -71) // Let's try blindly ignoring protocol
errors as requested
+// return ret;
+// }
- if ((ret = usb_set_interface(video->dev->udev, intfnum, i)) < 0)
- return ret;
-
ret = uvc_init_video_isoc(video, ep);
} else {
/* Bulk endpoint, proceed to URB initialization. */
... ie completely ignoring the return code, and again I get this error:
~/> ./WebCam.py
Traceback (most rcall last):
File "./WebCam.py", line 214, in <module>
VideoCapturePlayer().run() # Runs at full speed - basic test case
File "./WebCam.py", line 27, in __init__
self.camera.start()
EnvironmentError: ioctl(VIDIOC_STREAMON) failure : 90, Message too long
Making it simply retry just seems to work.
> What kernel version are you running ?
This is the output from uname -a & /proc/version
~/> uname -a
Linux kamaelia-NG 2.6.22.17-0.1-default #1 SMP 2008/02/10 20:01:04 UTC i686
i686 i386 GNU/Linux
~/> more /proc/version
Linux version 2.6.22.17-0.1-default ([EMAIL PROTECTED]) (gcc version 4.2.1
(SUSE Linux)) #1 SMP 2008/02/10 20:01:04 UTC
> > BTW, many thanks for writing this module - it's great/really useful :-)
>
> You're welcome. Now if we could convince webcam manufacturers to use the
> Linux driver for testing purpose I'd be much happier :-)
:-)
Many thanks,
Michael
_______________________________________________
Linux-uvc-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel