[wdmaudiodev] Re: Unwanted FriendlyName uniquifying number prefix for USB PortCls MIDI miniport

  • From: Andrew Vogan <andrewvog@xxxxxxxxx>
  • To: wdmaudiodev <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Wed, 9 Sep 2015 11:19:14 -0400

Hello Matthew,

The counterpart functionality is actually an ASIO device, so it's outside
the Windows audio stack, and the device name is maintained under
HKLM\Software\Asio\<drivername> where ASIO clients query for it. So I have
to maintain it manually to match my PortCls MIDI miniport device name.



On Wed, Sep 9, 2015 at 11:14 AM, Matthew van Eerde <
Matthew.van.Eerde@xxxxxxxxxxxxx> wrote:

Rather than relying on the friendly names matching, it would be better for
apps to use the container ID property to link up audio devices MIDI devices.



*From:* wdmaudiodev-bounce@xxxxxxxxxxxxx [mailto:
wdmaudiodev-bounce@xxxxxxxxxxxxx] *On Behalf Of *Andrew Vogan
*Sent:* Tuesday, September 8, 2015 9:59 PM
*To:* wdmaudiodev
*Subject:* [wdmaudiodev] Re: Unwanted FriendlyName uniquifying number
prefix for USB PortCls MIDI miniport



Still trying to programmatically read the Windows audio stack's "2- ", "3-
" etc. prefixes which it adds into duplicate device names. This is in the
context of a PortCls MIDI miniport driver for a USB device.



In Device Manager's device properties dialog, on the properties list, I
noticed the following...



{b3f8fa53-0004-438e-9003-51a46e139bfc}[7]



...the value of which appears to be an integer that ascends from zero and
seems to reliably correspond to Microsoft's prefixed integer on the device
name. Does anybody know where and how I can access this property for my
own device, from my kernel driver?



It doesn't appear to be part of the
MMDevices/Audio/Capture/<guid>/Properties registry key.







On Sat, Aug 1, 2015 at 8:49 AM, Andrew Vogan <andrewvog@xxxxxxxxx> wrote:

OK, if nobody knows how to change it, is there at least a way to detect
from my kernel driver what numeric prefix the audio stack is adding to my
friendly name? The reason is that I am exposing a (third party standard)
ASIO audio device in addition to the native Windows MIDI device. Obviously
I have complete control over the ASIO device name, and ideally I'd like the
ASIO and MIDI device names to match.





Regards,

Andrew







On Thu, Jul 16, 2015 at 1:10 PM, Andrew Vogan <andrewvog@xxxxxxxxx> wrote:

My client wants to override the friendly MIDI device name specified in the
INF and follow a scheme like the following when multiple identical devices
are connected...



"My Device"

"My Device (2)"

"My Device (3)"



... and so on. However, the audio stack is inserting a uniquifying prefix
of "2- " onto the device name. Where does that come from, and is there a
way to override it?



I can already change the FriendlyName successfully
via IoOpenDeviceInterfaceRegistryKey following IoGetDeviceInterfaces with
the PDO. This sends me to the following registry location, at least on
Win8.1:



Key:
Control\DeviceClasses\{6994ad04-93ef-11d0-a3cc-00a0c9223196}\##?#USB#VID_<myvid>&PID_<mypid>#<myserial>#{6994ad04-93ef-11d0-a3cc-00a0c9223196}\#Uart\Device
Parameters



Value name "FriendlyName" of type: REG_SZ



When I change the FriendlyName value, I can successfully see the new name
as I enumerate MIDI devices, however I also still see the unwanted, and in
my opinion, no longer necessary prefix of "2- ", so I end up with a device
name of "2- My Device (2)" and so on. Ideas?





Regards,

Andrew





Other related posts: