Re: Advice needed concerning ISOC transactions for a webcam
Alan Stern <[email protected]>
| Newsgroups | gmane.linux.usb.devel |
|---|---|
| Message-ID | <[email protected]> |
On Sun, 7 Oct 2007, Ilyes Gouta wrote: > Hi Alan, > > Thanks for the reply. > > Well, the webcam (0402:5602) is a USB 2.0 Camera that comes embedded into laptops (ex: Acer). > Here is the output of lsusb -v: > > Bus 001 Device 003: ID 0402:5602 ALi Corp. > Device Descriptor: > bLength 18 > bDescriptorType 1 > bcdUSB 2.00 > bDeviceClass 0 (Defined at Interface level) > bDeviceSubClass 0 > bDeviceProtocol 0 > bMaxPacketSize0 64 > idVendor 0x0402 ALi Corp. > idProduct 0x5602 > bcdDevice 1.00 > iManufacturer 0 > iProduct 1 USB2.0 Camera > iSerial 0 > bNumConfigurations 1 > Configuration Descriptor: > bLength 9 > bDescriptorType 2 > wTotalLength 101 > bNumInterfaces 1 > bConfigurationValue 1 > iConfiguration 0 > bmAttributes 0xa0 > Remote Wakeup > MaxPower 500mA > Interface Descriptor: > bLength 9 > bDescriptorType 4 > bInterfaceNumber 0 > bAlternateSetting 0 > bNumEndpoints 2 > bInterfaceClass 255 Vendor Specific Class > bInterfaceSubClass 255 Vendor Specific Subclass > bInterfaceProtocol 255 Vendor Specific Protocol > iInterface 0 > Endpoint Descriptor: > bLength 7 > bDescriptorType 5 > bEndpointAddress 0x81 EP 1 IN > bmAttributes 1 > Transfer Type Isochronous > Synch Type None > Usage Type Data > wMaxPacketSize 0x0000 1x 0 bytes > bInterval 1 A maxpacket size of 0 is unusual but it's legal. And for Isochronous endpoints in altsetting 0, it is the _only_ legal size. This means that Iso transfers require the altsetting to be different from 0. > Endpoint Descriptor: > bLength 7 > bDescriptorType 5 > bEndpointAddress 0x82 EP 2 IN > bmAttributes 3 > Transfer Type Interrupt > Synch Type None > Usage Type Data > wMaxPacketSize 0x0000 1x 0 bytes > bInterval 4 An interrupt endpoint with a maxpacket size of 0 is rather unusual. I guess it just shows the camera doesn't expect to be used for anything while it is in altsetting 0. The rest of the descriptors looked more or less normal. > The camera is high-speed capable But are you _running_ it at high speed? Judging by the descriptors, it looks like you are. > and I'm not really managing any polling interval (and why I need this? ISOCs should be > self-sustainable). Yes you are. The polling interval is one of the fields you have to fill in before submitting URBs (urb->interval). The descriptors show the interval to be 1 microframe. > I start by allocating ISOCs URBs, fill the fields accordingly and submit them. Once an ISOC URB comes > back the system calls my completion handler, I process it and resubmit it. Standard procedure. The problem is that > sometimes, URBs don't come back (or seems so). Is it possible that I'm using the wrong alternate setting? I have to > check this... Certainly it's possible that you're using the wrong altsetting, but that shouldn't prevent your URBs from coming back. Have you tried using usbmon to see what's happening? Instructions are in the kernel source file Documentation/usb/usbmon.txt. Alan Stern ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ [email protected] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel