Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results
The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.
Check out The OSR Learning Library at: https://www.osr.com/osr-learning-library/
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!
Upcoming OSR Seminars | ||
---|---|---|
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead! | ||
Kernel Debugging | 16-20 October 2023 | Live, Online |
Developing Minifilters | 13-17 November 2023 | Live, Online |
Internals & Software Drivers | 4-8 Dec 2023 | Live, Online |
Writing WDF Drivers | 10-14 July 2023 | Live, Online |
Comments
(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.
Tim Roberts, [email protected]
Providenza & Boekelheide, Inc.