Hi Adrian,

please keep the list CC'ed.

On Friday 25 April 2008, Adrian Sergiu Darabant wrote:
> > Bus 005 Device 009: ID 174f:8a51
> >
> > Iguess it is made by syntek ?!?! but not covered by their drivers ? Itis
> > a 2 MP camera. It works perfectly with Windows XP without driversbut not
> > in Linux. Are there any hopes to make it work ? No device is created as
> > it is not recognized correctly
> > usb 5-5: USB disconnect, address 9
> > usb 5-5: new high speed USB device using ehci_hcd and address 10
> > usb 5-5: new device found, idVendor=174f, idProduct=8a51
> > usb 5-5: new device strings: Mfr=2, Product=3, SerialNumber=4
> > usb 5-5: Product: USB2.0 UVC PC Camera Apr 23 01:24:35 core2
> > usb 5-5: Manufacturer: Syntek
> > usb 5-5: SerialNumber: 0001
> > usb 5-5: configuration #1 chosen from 1
> > uvcvideo: Found UVC 1.00 device USB2.0 UVC PC Camera (174f:8a51)
> > uvcvideo: Failed to query (135) UVC control 1 (unit 0) : -32 (exp. 26).
>
> This error is not fatal and can probably be ignored.
>
> > uvcvideo: Failed to query (1) UVC control 2 (unit 0) : -110 (exp. 26).
>
> For some reason the device didn't answer a request and the driver timed
> out. Either the device got confused or crashed from a previous request, or
> the request comes too fast after the previous one.
>
> > uvcvideo: Failed to initialize the device (-5).
> >
> > can't get device qualifier: Connection timed out
> > can't get debug descriptor: Connection timed out
> > cannot read device status, Connection timed out (110)
> >
> >This is quite interesting as well. Even standard requests to read the
> >descriptors time out.
>
> Your camera seems really buggy. It might be possible to work around the
> problem by adding delays. Could you please add a msleep(1000) at the end of
> __uvc_query_ctrl in uvc_ctrl.c and see if it helps (you will have to
> include linux/delay.h) ? If it doesn't try to increase the sleep time up to
> 5000 by 1000 steps.
>
> Ok so here is what I've done :
>
> static int __uvc_query_ctrl(struct uvc_device *dev, __u8 query, __u8 unit,
>             __u8 intfnum, __u8 cs, void *data, __u16 size,
>             int timeout)
> {
>     __u8 type = USB_TYPE_CLASS | USB_RECIP_INTERFACE;
>     unsigned int pipe;
>     int ret;
>
>     pipe = (query & 0x80) ? usb_rcvctrlpipe(dev->udev, 0)
>
>                   : usb_sndctrlpipe(dev->udev, 0);
>
>     type |= (query & 0x80) ? USB_DIR_IN : USB_DIR_OUT;
>
>     ret = usb_control_msg(dev->udev, pipe, query, type, cs << 8,
>             unit << 8 | intfnum, data, size, timeout);
>     msleep(1000); /* trough 5000 tested */
>     if (ret != size) {
>         uvc_printk(KERN_ERR, "Failed to query (%u) UVC control %u "
>             "(unit %u) : %d (exp. %u).\n", query, cs, unit, ret,
>             size);
>         return -EIO;
>     }
>     return 0;
> }
>
> The problem is that I get in the logs the same messages - of course with
> the added pauses in between. Methodology:
> 1) compiled  SVN r205
> 2) rmmod uvcvideo
> 3) insmod uvcvideo.ko
> 4) plug in camera
> ...modifiefied code + repeat steps 1)-4)
>
> Any other suggestions ?
> I am ready to send somebody that could help me one camera for testing as I
> have 9 pieces left (I broke one) :) I have only the electronic and the
> cable (it has no enclosure)

Just a wild guess: maybe the first failing request that I described as non 
fatal confuses the camera. Could you please try the attached patch ?

Best regards,

Laurent Pinchart
Index: uvc_video.c
===================================================================
--- uvc_video.c	(revision 205)
+++ uvc_video.c	(working copy)
@@ -857,8 +857,7 @@
 	/* Some webcams don't suport GET_DEF request on the probe control. We
 	 * fall back to GET_CUR if GET_DEF fails.
 	 */
-	if ((ret = uvc_get_video_ctrl(video, probe, 1, GET_DEF)) < 0 &&
-	    (ret = uvc_get_video_ctrl(video, probe, 1, GET_CUR)) < 0)
+	if ((ret = uvc_get_video_ctrl(video, probe, 1, GET_CUR)) < 0)
 		return ret;
 
 	/* Check if the default format descriptor exists. Use the first
_______________________________________________
Linux-uvc-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel

Reply via email to