WdfUsbInterfaceSelectSetting returning STATUS_INSUFFICIENT_RESOURCES for iso ep on HS USB2 port

We have a USB2 Highspeed high bandwidth device with an AS In and an AS out interface. The device will use from 1 - 3 (total) transfers per uFrame depending on the alt setting selected. We have been able to stream audio with channel counts requiring 2 transfers per uFrame, but when the channel count exceeds a threshold, STATUS_INSUFFICIENT_RESOURCES is returned when calling WdfUsbInterfaceSelectSetting () on the AS OUT interface. Interestingly, the increase in channel count DOES NOT require a change the number of transfers or wMaxPacketSize Is there any extra usb-specific logging that can be enabled? We’re calculating our bandwidth consumption be about 56% os the 480mb available.

The framework log for our driver is not particularly enlightening.

Thanks for your time!

(Sorry for this but I was unable to edit because of a timeout):

We have a USB2 Highspeed high bandwidth device with an AS In and an AS out interface. The device will use from 1 - 3 (total) transfers per uFrame depending on the alt setting selected. The WdfUsbInterfaceSelectSetting() call succeeds with channel counts requiring 2 transfers per uFrame, but when the channel count exceeds a threshold, STATUS_INSUFFICIENT_RESOURCES is returned when calling WdfUsbInterfaceSelectSetting () on the AS OUT interface. When the failure threshold is reached wMaxPacketSize is no different than the working case (nor does it need to be as the increased channels still fit at the given wMaxPacketSize).

Q1:
Is there any extra usb-specific logging that can be enabled? (We’re calculating our bandwidth consumption be about 56% of the 480mb available.)

Q2:
How would changing the channel count matter to selecting an interface? My understanding is that selecting an interface is agnostic with respect to the underlying device class and the only consideration is bandwidth required by the EP given wMaxPacketSize.packetSize and wMaxPacketSize.Transactions. Is this not the case?

Thanks for your time!

I’m not sure about your mathematics. A maximum bandwidth isochronous endpoint reserves 3072 x 8 bytes per frame, which is 24MB/s, about 40% of the bus. A certain percentage of the frame time is reserved for control and bulk endpoints, and you probably have USB HID devices (mice and keyboards) which have reservations for their interrupt endpoints. As a result, it’s often impossible to select two max bandwidth interfaces. In Device Manager, if you can find your root port, there’s a page that shows the current reservation percentage.

Do you have a custom driver? As far as I know, usbaudio.sys does not know how to handle endpoints with more than 1 transaction per microframe.

1 Like