; Copyright(c) 2021 Yamaha Corporation
;
; YARelay.inf
;

[Version]
Signature="$Windows NT$"
Class=MEDIA
Provider=%ProviderName%
ClassGUID={4d36e96c-e325-11ce-bfc1-08002be10318}
DriverVer = 06/06/2021,1.1.0.0
CatalogFile=YARelay.cat
PnpLockDown = 1

[SourceDisksNames]
222="YARelay Driver Disk","",222

[SourceDisksFiles]
YARelay.sys=222

[SignatureAttributes]
YARelay.sys=SignatureAttributes.DRM

[SignatureAttributes.DRM]
DRMLevel=1300

[SignatureAttributes.PETrust]
PETrust=true

[Manufacturer]
%MfgName%=YARelay,NTamd64

[YARelay.NTamd64]
%YARelay_SA.DeviceDesc%=YARelay_SA, Root\YARelay

[DestinationDirs]
YARelay_SA.CopyList=12

;======================================================
; YARelay_SA
;======================================================
[YARelay_SA.CopyList]
YARelay.sys

[YARelay_SA.AddReg]
HKR,,AssociatedFilters,,"wdmaud,swmidi,redbook"
HKR,,Driver,,YARelay.sys

;
; For demo only, please review these power management settings for your architecture. 
;
HKR,PowerSettings,SingleComponentMultiFxStates,3,1,0,0,0  ; Turn on multi Fx support.
HKR,PowerSettings,ConservationIdleTime,3,3,0,0,0          ; 3 seconds for idle power management when on battery
HKR,PowerSettings,PerformanceIdleTime,3,3,0,0,0           ; 3 seconds for idle power management when on AC power
HKR,PowerSettings,IdlePowerState,3,3,0,0,0                ; go to D3 for idle power management

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,,%YARelay_SA.DeviceDesc%
HKR,Drivers\mixer\wdmaud.drv,Description,,%YARelay_SA.DeviceDesc%


;======================================================
; render interfaces: speaker (internal)
;======================================================
[YARelay.I.WaveSpeaker]
AddReg=YARelay.I.WaveSpeaker.AddReg

[YARelay.I.WaveSpeaker.AddReg]
HKR,,CLSID,,%Proxy.CLSID%
HKR,,FriendlyName,,%YARelay.WaveSpeaker.szPname%

[YARelay.I.TopologySpeaker]
AddReg=YARelay.I.TopologySpeaker.AddReg

[YARelay.I.TopologySpeaker.AddReg]
HKR,,CLSID,,%Proxy.CLSID%
HKR,,FriendlyName,,%YARelay.TopologySpeaker.szPname%

HKR,EP\0,%PKEY_AudioEndpoint_Association%,,%KSNODETYPE_ANY%

; The following lines opt-in to pull mode.
HKR,EP\0,%PKEY_AudioEndpoint_Supports_EventDriven_Mode%,0x00010001,0x1
HKR,EP\0,%PKEY_AudioEngine_OEMFormat%,0x00000001,41,00,00,00,28,00,00,00,FE,FF,02,00,80,BB,00,00,00,65,04,00,06,00,18,00,16,00,18,00,03,00,00,00,01,00,00,00,00,00,10,00,80,00,00,AA,00,38,9B,71

;======================================================
; capture interfaces: mic in (external: headphone)
;======================================================
[YARelay.I.WaveMicIn]
AddReg=YARelay.I.WaveMicIn.AddReg
[YARelay.I.WaveMicIn.AddReg]
HKR,,CLSID,,%Proxy.CLSID%
HKR,,FriendlyName,,%YARelay.WaveMicIn.szPname%

[YARelay.I.TopologyMicIn]
AddReg=YARelay.I.TopologyMicIn.AddReg
[YARelay.I.TopologyMicIn.AddReg]
HKR,,CLSID,,%Proxy.CLSID%
HKR,,FriendlyName,,%YARelay.TopologyMicIn.szPname%
; The following lines opt-in to pull mode.
HKR,EP\0,%PKEY_AudioEndpoint_Association%,,%KSNODETYPE_ANY%
HKR,EP\0,%PKEY_AudioEndpoint_Supports_EventDriven_Mode%,0x00010001,0x1
HKR,EP\0,%PKEY_AudioEngine_OEMFormat%,0x00000001,41,00,00,00,28,00,00,00,FE,FF,02,00,80,BB,00,00,00,65,04,00,06,00,18,00,16,00,18,00,03,00,00,00,01,00,00,00,00,00,10,00,80,00,00,AA,00,38,9B,71

;======================================================
; YARelay_SA
;======================================================
[YARelay_SA.NT]
Include=ks.inf,wdmaudio.inf
Needs=KS.Registration, WDMAUDIO.Registration
CopyFiles=YARelay_SA.CopyList
AddReg=YARelay_SA.AddReg

[YARelay_SA.NT.Interfaces]
;
; Interfaces for speaker (internal) render endpoint.
;
AddInterface=%KSCATEGORY_AUDIO%, %KSNAME_WaveSpeaker%, YARelay.I.WaveSpeaker
AddInterface=%KSCATEGORY_RENDER%, %KSNAME_WaveSpeaker%, YARelay.I.WaveSpeaker
AddInterface=%KSCATEGORY_REALTIME%, %KSNAME_WaveSpeaker%, YARelay.I.WaveSpeaker
AddInterface=%KSCATEGORY_AUDIO%, %KSNAME_TopologySpeaker%, YARelay.I.TopologySpeaker
AddInterface=%KSCATEGORY_TOPOLOGY%, %KSNAME_TopologySpeaker%, YARelay.I.TopologySpeaker

;
; Interfaces for microphone (external: headphone) capture endpoint 
;
AddInterface=%KSCATEGORY_AUDIO%,    %KSNAME_WaveMicIn%, YARelay.I.WaveMicIn
AddInterface=%KSCATEGORY_REALTIME%, %KSNAME_WaveMicIn%, YARelay.I.WaveMicIn
AddInterface=%KSCATEGORY_CAPTURE%,  %KSNAME_WaveMicIn%, YARelay.I.WaveMicIn
AddInterface=%KSCATEGORY_AUDIO%,    %KSNAME_TopologyMicIn%, YARelay.I.TopologyMicIn
AddInterface=%KSCATEGORY_TOPOLOGY%, %KSNAME_TopologyMicIn%, YARelay.I.TopologyMicIn

[YARelay_SA.NT.Services]
AddService=YARelay,0x00000002,YARelay_Service_Inst

[YARelay_Service_Inst]
DisplayName=%YARelay.SvcDesc%
ServiceType=1
StartType=3
ErrorControl=1
ServiceBinary=%12%\YARelay.sys

[YARelay_SA.NT.HW]
AddReg = AUDIOHW.AddReg

[AUDIOHW.AddReg]
; FILE_DEVICE_SOUND
HKR,,DeviceType,0x10001,0x0000001D
; SDDL_DEVOBJ_SYS_ALL_ADM_RWX_WORLD_RWX_RES_RWX
HKR,,Security,,"D:P(A;;GA;;;SY)(A;;GRGWGX;;;BA)(A;;GRGWGX;;;WD)(A;;GRGWGX;;;RC)"
HKR,,FriendlyName,,%YARelay.FriendlyName%


;======================================================
; WDF
;======================================================
[YARelay_SA.NT.Wdf]
KmdfService = YARelay, YARelay_SA_WdfSect
[YARelay_SA_WdfSect]
KmdfLibraryVersion = 1.15

;======================================================
; COMMON
;======================================================
[Strings]

;Non-localizable

KSNAME_WaveSpeaker="WaveSpeaker"
KSNAME_TopologySpeaker="TopologySpeaker"

KSNAME_WaveMicIn="WaveMicIn"
KSNAME_TopologyMicIn="TopologyMicIn"

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}"
KSCATEGORY_REALTIME ="{EB115FFC-10C8-4964-831D-6DCB02E6F23F}"
KSCATEGORY_TOPOLOGY = "{DDA54A40-1E4C-11D1-A050-405705C10000}"

KSNODETYPE_ANY   = "{00000000-0000-0000-0000-000000000000}"

PKEY_AudioEndpoint_Association               = "{1DA5D803-D492-4EDD-8C23-E0C0FFEE7F0E},2"
PKEY_AudioEndpoint_Supports_EventDriven_Mode = "{1DA5D803-D492-4EDD-8C23-E0C0FFEE7F0E},7"
;PKEY_AudioEndpoint_Default_VolumeInDb        = "{1DA5D803-D492-4EDD-8C23-E0C0FFEE7F0E},9"
PKEY_AudioEngine_OEMFormat                   ="{E4870E26-3CC5-4CD2-BA46-CA0A9A70ED04},3"

MEDIA_CATEGORIES = "MediaCategories"

;Localizable

ProviderName = "YAMAHA"
MfgName      = "YAMAHA"


YARelay_SA.DeviceDesc="Yamaha Audio Relay"
YARelay.SvcDesc="Yamaha Audio Relay Driver"
YARelay.FriendlyName="Yamaha Audio Relay"

;; friendly names
YARelay.WaveSpeaker.szPname="YARelay Wave Speaker"
YARelay.TopologySpeaker.szPname="YARelay Topology Speaker"

YARelay.WaveMicIn.szPname="YARelay Wave Microphone"
YARelay.TopologyMicIn.szPname="YARelay Topology Microphone"
