[wdmaudiodev] Re: Unexpected default sound device on Windows

  • From: Roman Kudinov <roman.kudinov@xxxxxxxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Fri, 3 Mar 2017 13:53:37 +0300

I've compiled the pure MSVAD simple driver and it also has such a behavior - it gets set as default right after installation.

I've made tests with USB Audio stick - Windows doesn't remember it as a default sound device. When it's plugged in it is necessary to set is as default manually.


On 02.03.2017 19:32, Matthew van Eerde (Redacted sender Matthew.van.Eerde for DMARC) wrote:


Does the NeverSetAsDefault property show up on your endpoint if you run this tool?

https://blogs.msdn.microsoft.com/matthew_van_eerde/2011/06/13/how-to-enumerate-audio-endpoint-immdevice-properties-on-your-system/

Printers and Devices groups everything by the “Container ID” property. There should be a container with the same name as your computer. If you double-click this and click on the “Hardware” tab you should see all the built-in devices, including the Realtek audio device.

*From: *Roman Kudinov <mailto:roman.kudinov@xxxxxxxxxxxx>
*Sent: *Thursday, March 2, 2017 6:54 AM
*To: *wdmaudiodev@xxxxxxxxxxxxx <mailto:wdmaudiodev@xxxxxxxxxxxxx>
*Subject: *[wdmaudiodev] Re: Unexpected default sound device on Windows

Hi Matthew,

Thank you for your advise, but unfortunately this property has no any effect. Here is a snippet of my INF file:

[MP4RecorderVAD.Interfaces]
AddInterface=%KSCATEGORY_AUDIO%,%KSNAME_Wave%,MP4RecorderVAD.I.Wave
AddInterface=%KSCATEGORY_RENDER%,%KSNAME_Wave%,MP4RecorderVAD.I.Wave
AddInterface=%KSCATEGORY_AUDIO%,%KSNAME_Topology%,MP4RecorderVAD.I.Topo

[MP4RecorderVAD.I.Topo]
AddReg=MP4RecorderVAD.I.Topo.AddReg
[MP4RecorderVAD.I.Topo.AddReg]
HKR,,CLSID,,%Proxy.CLSID%
HKR,,FriendlyName,,%MP4RecorderVAD.Topo.szPname%
HKR,EP\0,%PKEY_AudioEndpoint_Association%,,%KSNODETYPE_ANALOG_CONNECTOR%
HKR,EP\0,%PKEY_AudioDevice_NeverSetAsDefaultEndpoint%,0x00010001,0x00000105
HKR,EP\0,%PKEY_AudioDevice_EnableEndpointByDefault%,0x00010001,0x00000101

[Strings]
.....
KSNODETYPE_ANALOG_CONNECTOR="{DFF21FE1-F70F-11D0-B917-00A0C9223196}"
PKEY_AudioEndpoint_Association="{1DA5D803-D492-4EDD-8C23-E0C0FFEE7F0E},2"
PKEY_AudioDevice_NeverSetAsDefaultEndpoint="{F3E80BEF-1723-4FF2-BCC4-7F83DC5E46D4},3"
PKEY_AudioDevice_EnableEndpointByDefault="{F3E80BEF-1723-4FF2-BCC4-7F83DC5E46D4},4"

I use analog connector to make sure that the properties in INF file are specified correctly. Analog connectors are disabled by default, so I use PKEY_AudioDevice_EnableEndpointByDefault to enable it automatically. This property is applied correctly. Unfortunately PKEY_AudioDevice_NeverSetAsDefaultEndpoint does not have any effect.

The weird thing I noticed in Windows 10 is that in Printers and Devices section of Control Panel there is an endpoint device for my VAD, e.g. either speaker or analog connector. But there is no an appropriate endpoint device for the builtin Realtec audio device. What can be the reason for this behavior?


From: "Matthew van Eerde"<dmarc-noreply@xxxxxxxxxxxxx>  (Redacted sender 
"Matthew.van.Eerde" for DMARC)
Subject: [wdmaudiodev] Re: Unexpected default sound device on Windows 10
Date: Wed, 1 Mar 2017 16:25:02 +0000

You can set this property in your .inf to make your audio device ineligible to 
be default.


PKEY_AudioDevice_NeverSetAsDefaultEndpoint

https://msdn.microsoft.com/en-us/library/windows/hardware/ff537750(v=vs.85).aspx





From: Roman<mailto:dmarc-noreply@xxxxxxxxxxxxx>
Sent: Tuesday, February 28, 2017 11:36 PM
To:wdmaudiodev@xxxxxxxxxxxxx<mailto:wdmaudiodev@xxxxxxxxxxxxx>
Subject: [wdmaudiodev] Unexpected default sound device on Windows 10



Hi,

I have a virtual audio device driver based on MSVAD Simple. It works
pretty well, but I start experiencing the problem on Windows 10. I don't
know if this was the issue before the Anniversary Update as all of my
Windows 10 machines got updated already, but it is definitely works
another way in Windows 7.

The purpose of the VAD is to record audio from own software. Our
software uses a 3rd party component that outputs audio, that needs to be
recorded. The only control we have over this component is the ability to
specify which audio device to output audio to. So my VAD is never
purposed to be a default sound device, it is purposed to work with our
software only.

Basically things work fine, but recently we encountered an unexpected
behavior. If a user accidentally sets our VAD as the default sound
device then Windows 10 remembers this. If a user later changes the
default sound device to a real sound card then things work good until
VAD is re-installed. If the VAD is reinstalled then Windows recalls that
some day this device was set as a default and sets it to be default
automatically. OS reboot after uninstallation of VAD doesn't help. This
is TRUE if and only if VAD was set as a default device at least once.
This is a real problem because all audio on a computer disappears for a
user.

I thought that Microsoft's policy was to never set the default sound
device automatically, only by the explicit user actions. It is true for
Windows 7, but it's not for Windows 10.
As soon as the policy changed, then probably there are new INF sections
or some API that could prohibit setting of my VAD as a default device?
Does anyone here know any information about it?


--
Thanks,
Roman
******************


Other related posts: