Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Home NTDEV

Before Posting...

Please check out the Community Guidelines in the Announcements and Administration Category.

More Info on Driver Writing and Debugging


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/


WdfUsbInterfaceSelectSetting returning STATUS_INSUFFICIENT_RESOURCES for iso ep on HS USB2 port

wdwd Member - All Emails Posts: 36

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!

Comments

  • wdwd Member - All Emails Posts: 36

    (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!

  • Tim_RobertsTim_Roberts Member - All Emails Posts: 14,349

    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.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.

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!
Writing WDF Drivers 12 September 2022 Live, Online
Internals & Software Drivers 23 October 2022 Live, Online
Kernel Debugging 14 November 2022 Live, Online
Developing Minifilters 5 December 2022 Live, Online