[wdmaudiodev] Re: [EXTERNAL] Problem with Friendly Names in Audio Driver

  • From: "Matthew van Eerde" <dmarc-noreply@xxxxxxxxxxxxx> ("Matthew.van.Eerde")
  • To: "wdmaudiodev@xxxxxxxxxxxxx" <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Wed, 22 Dec 2021 17:46:23 +0000

Here's a sample that shows how to enumerate all kinds of devices:

https://github.com/microsoft/Windows-universal-samples/tree/main/Samples/DeviceEnumerationAndPairing

To enumerate audio devices, use one of the selectors from the 
Windows.Media.Device.MediaDevice class

https://docs.microsoft.com/en-us/uwp/api/windows.media.devices.mediadevice?view=winrt-22000

-----Original Message-----
From: wdmaudiodev-bounce@xxxxxxxxxxxxx <wdmaudiodev-bounce@xxxxxxxxxxxxx> On 
Behalf Of Jamie Finch
Sent: Monday, December 20, 2021 10:49 AM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [EXTERNAL] [wdmaudiodev] Problem with Friendly Names in Audio Driver

[Some people who received this message don't often get email from 
jfi@xxxxxxxxx. Learn why this is important at 
http://aka.ms/LearnAboutSenderIdentification.]

We have a video and audio software only drivers we use to send data from our 
main application to Skype, Teams, VLC, Zoom, Google Hangout.... ect.

We have channels set up so that the source from our application can be 
different.
Presently the channels can be from 0 to 3.  Set by a data item when you send 
the IOCTL.

The video driver has a FriendlyName section that works as expected.
In the applicatons the selection for the video will be Video #1 to Video #4, 
the FriendlyNames.

The desired affect in the application popups for the microphone is:
Audio #1, Audio #2, Audio #3, Audio #4.

This article indicates we can do the same thing for the audio.
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows-hardware%2Fdrivers%2Faudio%2Fmultiple-audio-subdevices&amp;data=04%7C01%7CMatthew.van.Eerde%40microsoft.com%7C2b75107ffe4441e62aad08d9c3e968bf%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637756230518298636%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=rwvlVPoasHGgJ2GONQPUPQYFz%2FwmLpYv%2BxVQDDZC4Qk%3D&amp;reserved=0
What we see instead of the FriendlyNames, is the device name.

When we call InstallSubdevice() we are using sting constants, so we cannot be 
tripping the bug that it only remembers the address, reported on your forums.
static wchar_t* szNameWave[4]     = { L"Wave_0", L"Wave_1",
L"Wave_2",     L"Wave_3"     };
static wchar_t* szNameTopology[4] = { L"Topology_0", L"Topology_1", 
L"Topology_2", L"Topology_3" };

We have as expected, interface sections in the INF file that look like:

[NewTek_AudioPortClass.NT$ARCH$.Interfaces]
AddInterface=%KSCATEGORY_AUDIO%,%KSNAME_Wave0%,NewTek_AudioPortClass.AddInterfaceSection.Aud0
AddInterface=%KSCATEGORY_AUDIO%,%KSNAME_Wave1%,NewTek_AudioPortClass.AddInterfaceSection.Aud1
AddInterface=%KSCATEGORY_AUDIO%,%KSNAME_Wave2%,NewTek_AudioPortClass.AddInterfaceSection.Aud2
AddInterface=%KSCATEGORY_AUDIO%,%KSNAME_Wave3%,NewTek_AudioPortClass.AddInterfaceSection.Aud3
ect....

[NewTek_AudioPortClass.AddInterfaceSection.Aud0]
AddReg=NewTek_AudioPortClass.AddInterfaceSection.Aud0.AddReg
[NewTek_AudioPortClass.AddInterfaceSection.Aud0.AddReg]
HKR,,CLSID,,%Proxy.CLSID%
HKR,,FriendlyName,,%NewTek_AudioPortClass.Aud0.FriendlyName%
ect...

I have been looking at the DDK audio samples and they have FriendlyNames, but 
the device name seems to show up instead of them.
In the DDK SimpleAudioSample, it has a FriendlyName of "Simple Audio Sample 
Wave Microphone Array - Front", but what I see in the Zoom popup is "Virutal 
Audio Device (WDM) - Simple Audio Sample".

Can you point me to an audio example, where the FriendlyName is used when 
selecting the device?
Also is there another method that I can accomplish the same thing?
It appears I am missing something.


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

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:
https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.wdmaudiodev.com%2F&amp;data=04%7C01%7CMatthew.van.Eerde%40microsoft.com%7C2b75107ffe4441e62aad08d9c3e968bf%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637756230518298636%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=pKVr8UWulUU92%2F9VOTyneRRgI1USQj2Hopen%2BR5ERJA%3D&amp;reserved=0

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

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.com/

Other related posts: