[wdmaudiodev] Bug in usbaudio.sys (XP SP1 as well as SP2) MIDI support

  • From: BlazeAudio Developer <developer@xxxxxxxxxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Sat, 20 Nov 2004 18:43:50 +0530

We have found a rather significant bug in USBAUDIO.SYS that involves USB MIDI support.

The problem is that if a lower filter is attached (below usbaudio.sys), then sysaudio fails to create the CATEGORY_AUDIO_DEVICE filters. And the reason sysaudio fails is that the pins created by usbaudio for MIDI cannot not provide a proper pin name.

After about three days of debugging, and stepping through a fair amount of usbaudio and sysaudio code, we have found the reason for this.

The reason is that Usbaudio.sys tries to obtain the device description of the PDO that it is working on using IoGetDeviceProperty() with DevicePropertyDeviceDescription.

If there is no lower-filter for usabaudio, then this works fine.

However, if there is a lower-filter present, then usbaudio is actually trying to make this call on the Filter Device Object (FiDO) that it thinks is the PDO.

Obviously, the call fails, and ultimately, sysaudio is not able to create a proper filter.

To verify this, we put a breakpoint on the IOGetDeviceProperty() call, and everytime usbaudio.sys was trying to get the device description, we faked a success return, with a fudged up name.

And if we did this, things worked just fine!!!

Going forward, I'm not sure what we can do about this.

I see three options:

a. Wait for Microsoft to fix usbaudio.sys.

b. Hook IoGetDeviceProperty() and modify the PDO parameter when usbaudio is trying to get device description.

c. Find a way to associate a device description property to the FiDO created by the lower filter.

Simplest would be a, but that's the most unpredictable.

b would work, but I'd rather not do that, as it has potential for system unstability.

I'm not sure if c is at all possible. There's no IoSetDeviceProperty(). In fact, I'm not sure if a "hardware" key is even created for a FiDO!

Any help on this matter would be greatly appreciated.

Thanks.
Neetu.

******************

WDMAUDIODEV addresses:
Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx

URL to WDMAUDIODEV page:
http://www.wdmaudiodev.de/

Other related posts: