[wdmaudiodev] Re: Driver model for multi-client MIDI

  • From: Andrew Vogan <andrewvog@xxxxxxxxx>
  • To: wdmaudiodev <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Tue, 5 May 2015 17:00:57 -0400

Tim Roberts wrote:

Just as a side note, it's not at all clear that a Port-class miniport is
any less work than an AVStream miniport. If you're already comfortable
with Port-class, that may be a good enough reason to make a decision.


While trying to decide between AVStream and PortCls, I found the following
tidbit from MSDN:

*"Port class drivers [...] Do not support external buses (for example,
USB)."*

This is quoted from:
https://msdn.microsoft.com/en-us/library/windows/hardware/ff536829%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396

Since I'm coding for USB, that makes me think I should focus on AVStream.
What makes me a little uncomfortable here is how little documentation there
is for doing MIDI via AVStream, in particular the expected pin setup and
registry/installation steps. All the MIDI samples are for PortCls. Also,
from my googling, it seems like the already-sparse online questions
regarding AVStream MIDI tend to go ignored/unanswered.

It seems odd that Microsoft's UsbAudio.sys is built on PortCls.sys, at
least on Windows 8.1 per Device Manager. Seems like a contradiction to the
MSDN quote above, but no doubt there's a piece of this I'm not seeing.

KsStudio has been a really useful tool to study UsbAudio.sys's MIDI setup
for my device (it supports it fine, just isn't multi-client). It's not
quite as good as having a sample AVStream MIDI driver, though, if such a
thing existed.

Other related posts: