[wdmaudiodev] Re: Device naming ... ?

  • From: Frank Yerrace <Frank.Yerrace@xxxxxxxxxxxxx>
  • To: "wdmaudiodev@xxxxxxxxxxxxx" <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Sun, 3 May 2015 18:29:40 +0000

Just confirming and adding to what Tim has already said:

The filename results from the Name passed from the driver to
PcRegisterSubdevice. Port Class eventually uses this Name as the
ReferenceString to IoRegisterDeviceInterface.

While there is a strong convention for Port Class drivers to use "wave" as the
name, there is definitely no OS requirement here. The driver and its INF could
use anything, as long as it's consistent between the driver and the driver's
INF. In fact, the Microsoft USB Audio driver uses something different.

The AddInterface sections of the INF should match the name/reference strings
used in the driver. Strictly speaking, it's not required, but it's generally
useless to have an AddInterface section that adds an interface that is never
actually registered and enabled by the driver. Conversely, it's also possible
(but not common for audio drivers) to, at runtime, add all the same interface
information that's normally found in the INF. Then the AddInterface section is
not needed.
If you are trying to add some custom IOCTLs to your audio driver, you should
consider adding custom KS properties and/or events instead. Depending on what
you're trying to achieve, it might be easier to stay within the KS framework
instead of "popping out" to IOCTLs.

I'm curious what functionality you're trying to enable through these extra
IOCTLs. I understand you might not be able to reveal that publicly.

Regards,
Frank Yerrace

From: wdmaudiodev-bounce@xxxxxxxxxxxxx
[mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Tim Roberts
Sent: Saturday, May 2, 2015 9:53 PM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Re: Device naming ... ?

On May 2, 2015, at 5:09 AM, Jerry Evans
<jerry@xxxxxxxxxxx<mailto:jerry@xxxxxxxxxxx>> wrote:

For a given device, yes. For all devices everywhere? No.


Just to clarify this. Ignoring the above, if my device is a wave device then
that'll be the string passed in the IRP filename.

I'm debating how to answer this. Technically speaking, you could register your
device as a "blarg" device and have it work just fine. However, the
conventions are strong. In practical terms, yes. It will always be true.


Have to say that having gotten this to work via an IOCTL interface I'm now
thinking that the KS interface looks to be a much more elegant solution. Being
able to simply Read() a pin is much nicer ...


I don't want to burst your bubble, but the KS interface is entirely executed
through ioctls. Reading a stream is done with IOCTL_KS_READ_STREAM. From a
user-mode standpoint, applications almost always use an abstraction API that
handles the KS calls for you: WASAPI, waveIn/waveOut, DirectSound, DirectKS,
etc.
-
Tim Roberts, timr@xxxxxxxxx<mailto:timr@xxxxxxxxx>
Providenza & Boekelheide, Inc.

Other related posts: