OvlK_Wait() fails for iso EP poll rate >1ms
Børge Strand-Bergesen <[email protected]>
| Newsgroups | gmane.comp.lib.libusb.devel.windows |
|---|---|
| Message-ID | <CAE9Na6EaPSxithoHAg2WTmq-Jcg85PjR2S3YwUus0QLaQygong@mail.gmail.com> |
Hi guys, I'm working on a USB ASIO driver based on libusbK. It uses an isochronous IN endpont for a feedback from the Device. Descriptor dump is attached. The ASIO driver fails when the IN endpoint's poll rate becomes >1ms. (See w5.txt line 220.) Rapid polling isn't needed in the application, and I'd like to make it slower. Values of 4 and below work as expected in libusbK and mimic what I see in Linux. 4 gives 1ms polling rate, 3->1/2ms, 2->1/4ms etc. But on Linux I also have 5->2ms, 6->4ms, 7->8ms, 8->16ms. (Testing on OS X roughly tracks what I see on Linux, but with fewer transitions. There may be bugs in the descriptors which cause libusbK and OS X to misunderstand them in different ways, where Linux seems to be OK.) What seems to happen is a failure in OvlK_Wait(). When called, GetLastErrorInternal(); returns 00000057h. The calling code is line 138 of: https://github.com/nikkov/Win-Widget/blob/experimental/uaclib/UsbDevice.h I use the latest libusbK 3.0.7.0 which I downloaded, linked to and installed today. The built .dll is a 32-bit application. My system is Win7-64. One thing I notice is that OvlK_Wait() parameter TransferredLength is now PUINT. In the ASIO driver code it was PULONG for a while, but I believe I have fixed that in all of the code now. I hope you can help me out with this issue. I hope device performance will be better on weaker computers with slower polling. Let me know if you need more details about my system. Thanks, Børge ------------------------------------------------------------------------------ Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/ _______________________________________________ Libusb-win32-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
w5.txt
(text/plain, 12 KB)
Information for device Henry Audio USB DAC 128 (VID=0x16D0 PID=0x075D): Connection Information: ------------------------------ Connection status: Device connected Device actual bus speed: High Device is hub: No Device adress: 0x0005 Current configuration value: 0x01 Number of open pipes: 4 Device Descriptor: ------------------------------ 0x12 bLength 0x01 bDescriptorType 0x0200 bcdUSB 0xEF bDeviceClass (Miscellaneous device) 0x02 bDeviceSubClass 0x01 bDeviceProtocol 0x40 bMaxPacketSize0 (64 Bytes) 0x16D0 idVendor 0x075D idProduct 0x1000 bcdDevice 0x01 iManufacturer "Audio-Widget" 0x02 iProduct "Henry Audio USB DAC 128 " 0x03 iSerialNumber "2014082000BSB" 0x01 bNumConfigurations Device Qualifier Descriptor: ------------------------------ 0x0A bLength 0x06 bDescriptorType 0x0200 bcdUSB 0xEF bDeviceClass (Miscellaneous device) 0x02 bDeviceSubClass 0x01 bDeviceProtocol 0x40 bMaxPacketSize0 (64 Bytes) 0x01 bNumConfigurations 0x00 bReserved Configuration Descriptor: ------------------------------ 0x09 bLength 0x02 bDescriptorType 0x00C1 wTotalLength 0x04 bNumInterfaces 0x01 bConfigurationValue 0x00 iConfiguration 0x80 bmAttributes (Bus-powered Device) 0xFA bMaxPower (500 mA) Interface Descriptor: ------------------------------ 0x09 bLength 0x04 bDescriptorType 0x00 bInterfaceNumber 0x00 bAlternateSetting 0x00 bNumEndPoints 0x00 bInterfaceClass 0x00 bInterfaceSubClass 0x00 bInterfaceProtocol 0x00 iInterface Interface Association Descriptor: ------------------------------ 0x08 bLength 0x0B bDescriptorType 0x01 bFirstInterface 0x02 bInterfaceCount 0x01 bFunctionClass (Audio Device Class) 0x00 bFunctionSubClass 0x20 bFunctionProtocol 0x00 iFunction Interface Descriptor: ------------------------------ 0x09 bLength 0x04 bDescriptorType 0x01 bInterfaceNumber 0x00 bAlternateSetting 0x00 bNumEndPoints 0x01 bInterfaceClass (Audio Device Class) 0x01 bInterfaceSubClass (Audio Control Interface) 0x20 bInterfaceProtocol 0x07 iInterface "Henry Audio USB DAC 128 " AC Interface Header Descriptor: ------------------------------ 0x09 bLength 0x24 bDescriptorType 0x01 bDescriptorSubtype 0x0200 bcdADC 0x04 bCategory 0x0040 wTotalLength 0x00 bmControls AC Clock Source Descriptor: ------------------------------ 0x08 bLength 0x24 bDescriptorType 0x0A bDescriptorSubtype 0x05 bClockID 0x01 bmAttributes 0x07 bmControls 0x03 bAssocTerminal 0x05 iClockSource "Clock 2" AC Input Terminal Descriptor: ------------------------------ 0x11 bLength 0x24 bDescriptorType 0x02 bDescriptorSubtype 0x11 bTerminalID 0x0101 wTerminalType (USB Streaming) 0x00 bAssocTerminal 0x05 bCSourceID 0x02 bNrChannels 0x00000003 bmChannelConfig 0x00 iChannelNames 0x00 bmControls 0x08 iTerminal "Audio-widget" AC Feature Unit Descriptor: ------------------------------ 0x12 bLength 0x24 bDescriptorType 0x06 bDescriptorSubtype 0x12 bUnitID 0x11 bSourceID 0x00000003 bmaControls(0) 0x00000003 bmaControls(1) 0x00000003 bmaControls(2) 0x00 iFeature AC Output Terminal Descriptor: ------------------------------ 0x0C bLength 0x24 bDescriptorType 0x03 bDescriptorSubtype 0x13 bTerminalID 0x0302 wTerminalType (Headphones) 0x00 bAssocTerminal 0x12 bSourceID 0x05 bCSourceID 0x0000 bmControls 0x00 iTerminal Interface Descriptor: ------------------------------ 0x09 bLength 0x04 bDescriptorType 0x02 bInterfaceNumber 0x00 bAlternateSetting 0x00 bNumEndPoints 0x01 bInterfaceClass (Audio Device Class) 0x02 bInterfaceSubClass (Audio Streaming Interface) 0x20 bInterfaceProtocol 0x00 iInterface Interface Descriptor: ------------------------------ 0x09 bLength 0x04 bDescriptorType 0x02 bInterfaceNumber 0x01 bAlternateSetting 0x02 bNumEndPoints 0x01 bInterfaceClass (Audio Device Class) 0x02 bInterfaceSubClass (Audio Streaming Interface) 0x20 bInterfaceProtocol 0x00 iInterface AS Interface Descriptor: ------------------------------ 0x10 bLength 0x24 bDescriptorType 0x01 bDescriptorSubtype 0x11 bTerminalLink 0x07 bmControls 0x01 bFormatType 0x00000001 bmFormats 0x02 bNrChannels 0x00000003 bmChannelConfig 0x00 iChannelNames AS Format Type 1 Descriptor: ------------------------------ 0x06 bLength 0x24 bDescriptorType 0x02 bDescriptorSubtype 0x01 bFormatType 0x04 bSubslotSize 0x18 bBitResolution (24 Bits/sample) Endpoint Descriptor: ------------------------------ 0x07 bLength 0x05 bDescriptorType 0x02 bEndpointAddress (OUT Endpoint) 0x05 bmAttributes (Transfer: Isochronous / Synch: Asynchronous / Usage: Data) 0x0188 wMaxPacketSize (392 Bytes) 0x02 bInterval AS Isochronous Data Endpoint Descriptor: ------------------------------ 0x08 bLength 0x25 bDescriptorType 0x01 bDescriptorSubtype 0x00 bmAttributes 0x00 bmControls 0x00 bLockDelayUnits (Undefined) 0x0000 wLockDelay Endpoint Descriptor: ------------------------------ 0x07 bLength 0x05 bDescriptorType 0x81 bEndpointAddress (IN Endpoint) 0x11 bmAttributes (Transfer: Isochronous / Synch: None / Usage: Feedback) 0x0004 wMaxPacketSize (4 Bytes) 0x05 bInterval Interface Descriptor: ------------------------------ 0x09 bLength 0x04 bDescriptorType 0x03 bInterfaceNumber 0x00 bAlternateSetting 0x02 bNumEndPoints 0x03 bInterfaceClass (Human Interface Device Class) 0x00 bInterfaceSubClass 0x00 bInterfaceProtocol 0x00 iInterface HID Descriptor: ------------------------------ 0x09 bLength 0x21 bDescriptorType 0x0111 bcdHID 0x00 bCountryCode 0x01 bNumDescriptors 0x22 bDescriptorType (Report descriptor) 0x0043 bDescriptorLength Endpoint Descriptor: ------------------------------ 0x07 bLength 0x05 bDescriptorType 0x84 bEndpointAddress (IN Endpoint) 0x03 bmAttributes (Transfer: Interrupt / Synch: None / Usage: Data) 0x0008 wMaxPacketSize (8 Bytes) 0x05 bInterval Endpoint Descriptor: ------------------------------ 0x07 bLength 0x05 bDescriptorType 0x05 bEndpointAddress (OUT Endpoint) 0x03 bmAttributes (Transfer: Interrupt / Synch: None / Usage: Data) 0x0008 wMaxPacketSize (8 Bytes) 0x05 bInterval Other Speed Configuration Descriptor: ------------------------------ 0x09 bLength 0x07 bDescriptorType 0x00C1 wTotalLength 0x04 bNumInterfaces 0x01 bConfigurationValue 0x00 iConfiguration 0x80 bmAttributes (Bus-powered Device) 0xFA bMaxPower (500 mA) Interface Descriptor: ------------------------------ 0x09 bLength 0x04 bDescriptorType 0x00 bInterfaceNumber 0x00 bAlternateSetting 0x00 bNumEndPoints 0x00 bInterfaceClass 0x00 bInterfaceSubClass 0x00 bInterfaceProtocol 0x00 iInterface Interface Association Descriptor: ------------------------------ 0x08 bLength 0x0B bDescriptorType 0x01 bFirstInterface 0x02 bInterfaceCount 0x01 bFunctionClass (Audio Device Class) 0x01 bFunctionSubClass (Audio Control Interface) 0x20 bFunctionProtocol 0x07 iFunction "Henry Audio USB DAC 128 " Interface Descriptor: ------------------------------ 0x09 bLength 0x04 bDescriptorType 0x01 bInterfaceNumber 0x00 bAlternateSetting 0x00 bNumEndPoints 0x01 bInterfaceClass (Audio Device Class) 0x01 bInterfaceSubClass (Audio Control Interface) 0x20 bInterfaceProtocol 0x07 iInterface "Henry Audio USB DAC 128 " AC Interface Header Descriptor: ------------------------------ 0x09 bLength 0x24 bDescriptorType 0x01 bDescriptorSubtype 0x0200 bcdADC 0x04 bCategory 0x0040 wTotalLength 0x00 bmControls AC Clock Source Descriptor: ------------------------------ 0x08 bLength 0x24 bDescriptorType 0x0A bDescriptorSubtype 0x05 bClockID 0x01 bmAttributes 0x07 bmControls 0x01 bAssocTerminal 0x00 iClockSource AC Input Terminal Descriptor: ------------------------------ 0x11 bLength 0x24 bDescriptorType 0x02 bDescriptorSubtype 0x11 bTerminalID 0x0101 wTerminalType (USB Streaming) 0x00 bAssocTerminal 0x05 bCSourceID 0x02 bNrChannels 0x00000003 bmChannelConfig 0x00 iChannelNames 0x00 bmControls 0x00 iTerminal AC Feature Unit Descriptor: ------------------------------ 0x12 bLength 0x24 bDescriptorType 0x06 bDescriptorSubtype 0x12 bUnitID 0x11 bSourceID 0x00000003 bmaControls(0) 0x00000003 bmaControls(1) 0x00000003 bmaControls(2) 0x00 iFeature AC Output Terminal Descriptor: ------------------------------ 0x0C bLength 0x24 bDescriptorType 0x03 bDescriptorSubtype 0x13 bTerminalID 0x0302 wTerminalType (Headphones) 0x00 bAssocTerminal 0x12 bSourceID 0x05 bCSourceID 0x0000 bmControls 0x00 iTerminal Interface Descriptor: ------------------------------ 0x09 bLength 0x04 bDescriptorType 0x02 bInterfaceNumber 0x00 bAlternateSetting 0x00 bNumEndPoints 0x01 bInterfaceClass (Audio Device Class) 0x02 bInterfaceSubClass (Audio Streaming Interface) 0x20 bInterfaceProtocol 0x00 iInterface Interface Descriptor: ------------------------------ 0x09 bLength 0x04 bDescriptorType 0x02 bInterfaceNumber 0x01 bAlternateSetting 0x02 bNumEndPoints 0x01 bInterfaceClass (Audio Device Class) 0x02 bInterfaceSubClass (Audio Streaming Interface) 0x20 bInterfaceProtocol 0x00 iInterface AS Interface Descriptor: ------------------------------ 0x10 bLength 0x24 bDescriptorType 0x01 bDescriptorSubtype 0x11 bTerminalLink 0x07 bmControls 0x01 bFormatType 0x00000001 bmFormats 0x02 bNrChannels 0x00000003 bmChannelConfig 0x00 iChannelNames AS Format Type 1 Descriptor: ------------------------------ 0x06 bLength 0x24 bDescriptorType 0x02 bDescriptorSubtype 0x01 bFormatType 0x04 bSubslotSize 0x18 bBitResolution (24 Bits/sample) Endpoint Descriptor: ------------------------------ 0x07 bLength 0x05 bDescriptorType 0x02 bEndpointAddress (OUT Endpoint) 0x05 bmAttributes (Transfer: Isochronous / Synch: Asynchronous / Usage: Data) 0x0188 wMaxPacketSize (392 Bytes) 0x01 bInterval AS Isochronous Data Endpoint Descriptor: ------------------------------ 0x08 bLength 0x25 bDescriptorType 0x01 bDescriptorSubtype 0x00 bmAttributes 0x00 bmControls 0x00 bLockDelayUnits (Undefined) 0x0000 wLockDelay Endpoint Descriptor: ------------------------------ 0x07 bLength 0x05 bDescriptorType 0x81 bEndpointAddress (IN Endpoint) 0x11 bmAttributes (Transfer: Isochronous / Synch: None / Usage: Feedback) 0x0004 wMaxPacketSize (4 Bytes) 0x01 bInterval Interface Descriptor: ------------------------------ 0x09 bLength 0x04 bDescriptorType 0x03 bInterfaceNumber 0x00 bAlternateSetting 0x02 bNumEndPoints 0x03 bInterfaceClass (Human Interface Device Class) 0x00 bInterfaceSubClass 0x00 bInterfaceProtocol 0x00 iInterface HID Descriptor: ------------------------------ 0x09 bLength 0x21 bDescriptorType 0x0111 bcdHID 0x00 bCountryCode 0x01 bNumDescriptors 0x22 bDescriptorType (Report descriptor) 0x0043 bDescriptorLength Endpoint Descriptor: ------------------------------ 0x07 bLength 0x05 bDescriptorType 0x84 bEndpointAddress (IN Endpoint) 0x03 bmAttributes (Transfer: Interrupt / Synch: None / Usage: Data) 0x0008 wMaxPacketSize (8 Bytes) 0x05 bInterval Endpoint Descriptor: ------------------------------ 0x07 bLength 0x05 bDescriptorType 0x05 bEndpointAddress (OUT Endpoint) 0x03 bmAttributes (Transfer: Interrupt / Synch: None / Usage: Data) 0x0008 wMaxPacketSize (8 Bytes) 0x05 bInterval String Descriptor Table -------------------------------- Index LANGID String 0x00 0x0000 0x0409 0x01 0x0409 "Audio-Widget" 0x02 0x0409 "Henry Audio USB DAC 128 " 0x03 0x0409 "2014082000BSB" 0x04 0x0409 "Clock 1" 0x05 0x0409 "Clock 2" 0x06 0x0409 "Select clock" 0x07 0x0409 "Henry Audio USB DAC 128 " 0x08 0x0409 "Audio-widget" 0x09 0x0409 "Audio Out Trm" 0x0A 0x0409 "Widget-Lite" 0x0B 0x0409 "Audio In Alt" ------------------------------ Connection path for device: Intel(R) 7 Series/C216 Chipset Family USB Enhanced Host Controller - 1E2D Root Hub Generic USB Hub Henry Audio USB DAC 128 (VID=0x16D0 PID=0x075D) Brought to you by TDD v1.82.0, Aug 20 2013, 17:17:20