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

  • From: "Paul Titchener" <pt@xxxxxxxxxxx>
  • To: <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Wed, 4 Jul 2012 11:30:15 -0700

Hi Jeff-

Thanks for the suggestions but this is still kicking my rear, I tried following 
your tips but its still not changing the default sampling frequency.

But I’m just learning how .inf files work and probably know just enough to be 
dangerous and likely there is still something wrong in my .inf file.

I copied it below, if you could be nice enough to take a look at it to see what 
is still bungled I would really appreciated it. I compiled this by looking at 
several different examples so its very likely I messed something up.

Also I wouldn’t think this would matter, but for this development work I’m 
using devcon.exe to do the installs but I wouldn’t think that would make any 
difference, am I wrong about that?

Thanks,

Paul

[Version]
Signature="$CHICAGO$"
Class=MEDIA
Provider=%FXMN%
ClassGUID={4d36e96c-e325-11ce-bfc1-08002be10318}
DriverVer = 07/02/2012, 1.0.0.0
CatalogFile=new1.cat
CatalogFile.NTx86=new1NTx86.cat
CatalogFile.NTAMD64=new1NTAMD64.cat
CatalogFile.NTIA64 = new1NTIA64.cat

[Manufacturer]
%MfgName%=NEW,NTamd64

[NEW]
%NEW_Device.DeviceDesc%=NEW_Device,,*NEW1Device

[NEW.NTamd64]
%NEW_Device.DeviceDesc%=NEW_Device,,*NEW1Device

;-----------------------------------------------------------------------------
;
; 2k+ Installation
;
;-----------------------------------------------------------------------------
[NEW_Device.NT]
Include=ks.inf,wdmaudio.inf
Needs=KS.Registration, WDMAUDIO.Registration
CopyFiles=NEW_Device.CopyList
AddReg=NEW_Device.AddReg
AddProperty=NEW_1AddPropertySection

[NEW_Device.NT.Interfaces]
AddInterface=%KSCATEGORY_AUDIO%,%KSNAME_Wave%,NEW_Device.I.Wave
AddInterface=%KSCATEGORY_RENDER%,%KSNAME_Wave%,NEW_Device.I.Wave
AddInterface=%KSCATEGORY_CAPTURE%,%KSNAME_Wave%,NEW_Device.I.Wave
AddInterface=%KSCATEGORY_AUDIO%,%KSNAME_Topology%,NEW_Device.I.Topo

[NEW_Device.NT.Services]
AddService=NEW1Device,0x00000002,NEW_Device_Service_Inst

[NEW_Device_Service_Inst]
DisplayName=%NEW_Device.SvcDesc%
ServiceType=1
StartType=3
ErrorControl=1
ServiceBinary=%10%\system32\drivers\new.sys

;-----------------------------------------------------------------------------
;
; 98SE+ Installation
;
;-----------------------------------------------------------------------------
[NEW_Device]
AlsoInstall=ks.registration(ks.inf),wdmaudio.registration(wdmaudio.inf)
CopyFiles=NEW_Device.CopyList
AddReg=NEW_Device.AddReg

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

;-----------------------------------------------------------------------------
;
; Common registry data
;
;-----------------------------------------------------------------------------
[NEW_Device.AddReg]
HKR,,AssociatedFilters,,"wdmaud,swmidi,redbook"
HKR,,Driver,,new.sys

HKR,Drivers,SubClasses,,"wave,midi,mixer"

HKR,Drivers\wave\wdmaud.drv,Driver,,wdmaud.drv
HKR,Drivers\midi\wdmaud.drv,Driver,,wdmaud.drv
HKR,Drivers\mixer\wdmaud.drv,Driver,,wdmaud.drv

HKR,Drivers\wave\wdmaud.drv,Description,,%NEW_Device.DeviceDesc%
HKR,Drivers\midi\wdmaud.drv,Description,,%NEW_Device_MIDI%
HKR,Drivers\mixer\wdmaud.drv,Description,,%NEW_Device.DeviceDesc%

HKLM,%MediaCategories%\%GUID.DSPEAKERS%,Name,,%Name.DSPEAKERS%

[NEW_Device.I.Wave]
AddReg=NEW_Device.I.Wave.AddReg

[NEW_Device.I.Wave.AddReg]
HKR,,CLSID,,%Proxy.CLSID%
HKR,,FriendlyName,,%NEW_Device.Wave.szPname%

[NEW_Device.I.Topo]
AddReg=NEW_Device.I.Topo.AddReg, OEMSettingsOverride.AddReg

[NEW_Device.I.Topo.AddReg]
HKR,,CLSID,,%Proxy.CLSID%
HKR,,FriendlyName,,%NEW_Device.Topo.szPname%

[NEW_1AddPropertySection]
DeviceIcon,,,,%NEW_1_Icon_File%
DeviceBrandingIcon,,,,%NEW_1_Icon_File%

;;
;; All EP\\0 entries in the same grouping
;;
;; Set default format to 48kHz, 16-bit, Stereo
;;
[OEMSettingsOverride.AddReg]
HKR,"EP\\0", %PKEY_AudioEndpoint_Association%,,%KSNODETYPE_SPEAKER%
; Should set 48khz, 2 channel, 16 bits
HKR,"EP\\0", %PKEY_AudioEngine_OEMFormat%, 0x00000001, 
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

;-----------------------------------------------------------------------------
;
; Files
;
;-----------------------------------------------------------------------------
[SourceDisksNames]
222="NEW Driver Disc","",222

[SourceDisksFiles.x86]
new.sys=222

[SourceDisksFiles.amd64]
new.sys=222

[DestinationDirs]
NEW_Device.CopyList=10,system32\drivers

[NEW_Device.CopyList]
new.sys

;======================================================
;  Strings
;======================================================
[Strings]
FXMN="www.new.com"
MfgName="www.new.com"

NEW_Device.DeviceDesc="NEW Driver"

NEW_1_Icon_File="c:\windows\system32\drivers\new1.ico"

NEW_Device.Wave.szPname="NEW Wave"
NEW_Device.Topo.szPname="NEW Topology"
NEW_Device_MIDI="NEW -> Midi Device"

Proxy.CLSID="{17CCA71B-ECD7-11D0-B908-00A0C9223196}"
KSCATEGORY_AUDIO="{6994AD04-93EF-11D0-A3CC-00A0C9223196}"
KSCATEGORY_RENDER="{65E8773E-8F56-11D0-A3B9-00A0C9223196}"
KSCATEGORY_CAPTURE="{65E8773D-8F56-11D0-A3B9-00A0C9223196}"

KSNAME_Wave="NEW Wave"
KSNAME_Topology="NEW Topology"

NEW_Device.SvcDesc="NEW Audio Driver"

GUID.DSPEAKERS="{94c5c56a-06cf-43be-8dd5-33f7e2b20e5d}"
Name.DSPEAKERS="NEW Speakers"
MediaCategories="SYSTEM\CurrentControlSet\Control\MediaCategories"

MediaCategories="SYSTEM\CurrentControlSet\Control\MediaCategories"

REG_BINARY="0x00000001"
KSNODETYPE_SPEAKER  = "{DFF21CE1-F70F-11D0-B917-00A0C9223196}"
PKEY_AudioEndpoint_ControlPanelProvider = 
"{1DA5D803-D492-4EDD-8C23-E0C0FFEE7F0E},1"
PKEY_AudioEndpoint_Association          = 
"{1DA5D803-D492-4EDD-8C23-E0C0FFEE7F0E},2"
PKEY_AudioEngine_OEMFormat              = 
"{E4870E26-3CC5-4CD2-BA46-CA0A9A70ED04},3"

AUDIOENDPOINT_EXT_UI_CLSID = "{6C57B2A2-91F5-4b90-93D5-FAB82485ECA6}"
;AUDIOENDPOINT_EXT_UI_CLSID = "{31A53A7B-E0D8-4f99-B950-F6C8F25E6731}"

Other related posts: