[wdmaudiodev] Re: How to set a driver's default sampling frequency and num channels

  • From: "Paul Titchener" <pt@xxxxxxxxxxx>
  • To: <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Tue, 3 Jul 2012 19:08:40 -0700

Hi Paul,

For Vista and later platforms, you can use PKEY_AudioEngine_OEMFormat in the 
INF file to do this. This is documented in the WDK under Media-Class INF 
Extensions 
(http://msdn.microsoft.com/en-us/library/windows/hardware/ff537752(v=vs.85).aspx).

Jeff

I’m not having any luck getting this to work.
As described in the link above, I added the section below to the driver’s .inf 
file:
[OEMSettingsOverride.AddReg]
HKR,"EP\\0", %PKEY_AudioEndpoint_Association%,,%KSNODETYPE_SPEAKER%
; Should set default to 48khz, 2 channel, 16 bits
HKR,"EP\\0", %PKEY_AudioEngine_OEMFormat%, %REG_BINARY%, 
41,00,00,00,28,00,00,00,FE,FF,02,00,80,BB,00,00,00,EE,02,00,04,00,10,00,16,00,10,00,03,00,00,00,01,00,00,00,00,00,10,00,80,00,00,AA,00,38,9B,71

I’m calling this added section as shown below:
[NEW_Device.NT]
Include=ks.inf,wdmaudio.inf
Needs=KS.Registration, WDMAUDIO.Registration
CopyFiles=NEW_Device.CopyList
AddReg=NEW_Device.AddReg, OEMSettingsOverride.AddReg

[Strings]
PKEY_AudioEndpoint_Association          = 
"{1DA5D803-D492-4EDD-8C23-E0C0FFEE7F0E},2"
PKEY_AudioEngine_OEMFormat              = 
"{E4870E26-3CC5-4CD2-BA46-CA0A9A70ED04},3"

After running the installation, on the Properties files for the driver regedit 
doesn’t show any lines with the E4870E26-3CC5-4CD2-BA46-CA0A9A70ED04 format key.

But if I use the Sound panel to manually change the sampling frequency, then as 
expected the lines with the E48 ... key value show up, holding the binary 
format info.

Am I doing something wrong or is there some other trick to get this to work?

Other related posts: