[Version]
Signature   = "$WINDOWS NT$"
Class       = Extension
ClassGuid   = {e2f84ce7-8efa-411c-aa69-97454ca4cb57}
Provider    = %ProviderName%
ExtensionId = {1d641578-54d2-404d-85de-79bb01461ac2}
DriverVer   = 02/22/2016,1.0.0.1
CatalogFile = sysvad.cat
PnpLockDown = 1

[Manufacturer]
%MfgName% = DeviceExtensions,NT$ARCH$

[DeviceExtensions.NT$ARCH$]
%Device.ExtensionDesc% = DeviceExtension_Install,Root\sysvad_ComponentizedAudioSample 

[DeviceExtension_Install]

[DeviceExtension_Install.HW]
AddReg = FriendlyName_AddReg

[FriendlyName_AddReg]
HKR,,FriendlyName,,%ExtendedFriendlyName%

[DeviceExtension_Install.Components]
AddComponent = SwapApo,,Apo_AddComponent

[Apo_AddComponent]
ComponentIDs = VEN_SMPL&CID_APO
Description = "Audio Proxy APO Sample"


[DeviceExtensions.I.APO]
AddReg = APO.I.Association0.AddReg

;======================================================
; APO per-interface registry
;======================================================
[APO.I.Association0.AddReg]
; Instruct audio endpoint builder to set the CLSIDs for stream, mode, and endpoint APOs
; into the effects property store
HKR,FX\0,%PKEY_CompositeFX_StreamEffectClsid%,0x00010000,%SWAP_FX_STREAM_CLSID%,%DELAY_FX_STREAM_CLSID%
HKR,FX\0,%PKEY_CompositeFX_ModeEffectClsid%,0x00010000,%SWAP_FX_MODE_CLSID%,%DELAY_FX_MODE_CLSID%

; Driver developer would replace the list of supported processing modes here
; Concatenate GUIDs for DEFAULT, MEDIA, MOVIE stream effects
HKR,FX\0,%PKEY_SFX_ProcessingModes_Supported_For_Streaming%,%REG_MULTI_SZ%,%AUDIO_SIGNALPROCESSINGMODE_DEFAULT%,%AUDIO_SIGNALPROCESSINGMODE_MEDIA%,%AUDIO_SIGNALPROCESSINGMODE_MOVIE%

; Concatenate GUIDs for DEFAULT, MEDIA, MOVIE mode effects
HKR,FX\0,%PKEY_MFX_ProcessingModes_Supported_For_Streaming%,%REG_MULTI_SZ%,%AUDIO_SIGNALPROCESSINGMODE_DEFAULT%,%AUDIO_SIGNALPROCESSINGMODE_MEDIA%,%AUDIO_SIGNALPROCESSINGMODE_MOVIE%

;HKR,FX\0,%PKEY_EFX_ProcessingModes_Supported_For_Streaming%,0x00010000,%AUDIO_SIGNALPROCESSINGMODE_DEFAULT%

[DeviceExtensions.I.TopologyMicArray2]
AddReg=DeviceExtensions.I.TopologyMicArray2.AddReg

[DeviceExtensions.I.TopologyMicArray2.AddReg]
; Uncomment the following lines to mark the rear microphone array as a far field microphone.
;HKR,EP\1,%PKEY_AudioEndpoint_Association%,,%KSNODETYPE_ANY%
;HKR,EP\1,%PKEY_Devices_AudioDevice_Microphone_IsFarField%,0x00010001,0x1

HKR,FX\0,%PKEY_FX_Association%,,%KSNODETYPE_ANY%

; The following line adds the Keyword Spotter APO to the keyword spotter pin on this endpoint
HKR,FX\0,%PKEY_FX_KeywordDetector_EndpointEffectClsid%,,%KWS_FX_ENDPOINT_CLSID%

; An EFX APO must support default mode to be loaded. This does not mean the keyword burst pin must support default mode, it
; may still run in some other mode like speech mode. This simply means that the KWS EFX APO supports default mode.
HKR,FX\0,%PKEY_EFX_KeywordDetector_ProcessingModes_Supported_For_Streaming%,%REG_MULTI_SZ%,%AUDIO_SIGNALPROCESSINGMODE_DEFAULT%

[DeviceExtension_Install.Interfaces]
; Interfaces for speaker (internal) render endpoint.
AddInterface = %KSCATEGORY_AUDIO%,    %KSNAME_TopologySpeaker%,   DeviceExtensions.I.APO
AddInterface = %KSCATEGORY_TOPOLOGY%, %KSNAME_TopologySpeaker%,   DeviceExtensions.I.APO
AddInterface = %KSCATEGORY_AUDIO%,    %KSNAME_TopologyMicArray2%, DeviceExtensions.I.TopologyMicArray2
AddInterface = %KSCATEGORY_TOPOLOGY%, %KSNAME_TopologyMicArray2%, DeviceExtensions.I.TopologyMicArray2

[Strings]
MfgName              = "TODO-Set-Manufacturer"
ProviderName         = "TODO-Set-Provider"
Device.ExtensionDesc = "Sample Device Extension"
ExtendedFriendlyName = "SYSVAD (with APO Extensions)"

PKEY_FX_Association                 = "{D04E05A6-594B-4FB6-A80D-01AF5EED7D1D},0"

PKEY_CompositeFX_StreamEffectClsid  = "{D04E05A6-594B-4fb6-A80D-01AF5EED7D1D},13"
PKEY_CompositeFX_ModeEffectClsid    = "{D04E05A6-594B-4fb6-A80D-01AF5EED7D1D},14"
PKEY_FX_KeywordDetector_EndpointEffectClsid = "{D04E05A6-594B-4fb6-A80D-01AF5EED7D1D},10"

; Driver developers would replace these CLSIDs with those of their own APOs
SWAP_FX_STREAM_CLSID    = "{B48DEA3F-D962-425a-8D9A-9A5BB37A9904}"
SWAP_FX_MODE_CLSID      = "{06687E71-F043-403A-BF49-CB591BA6E103}"
DELAY_FX_STREAM_CLSID   = "{77802b45-a5a0-455a-8204-3dba30eee7b4}"
DELAY_FX_MODE_CLSID     = "{b6c7032b-1f17-4cc6-bcdb-fd96deabc8a9}"
KWS_FX_ENDPOINT_CLSID   = "{9D89F614-F9D6-40DD-9F21-5E69FA3981ED}"

KSNODETYPE_ANY   = "{00000000-0000-0000-0000-000000000000}"

KSNAME_TopologySpeaker   = "TopologySpeaker"
KSNAME_TopologyMicArray2 = "TopologyMicArray2"

KSCATEGORY_AUDIO = "{6994AD04-93EF-11D0-A3CC-00A0C9223196}"
KSCATEGORY_TOPOLOGY = "{DDA54A40-1E4C-11D1-A050-405705C10000}"

PKEY_SFX_ProcessingModes_Supported_For_Streaming = "{D3993A3F-99C2-4402-B5EC-A92A0367664B},5"
PKEY_MFX_ProcessingModes_Supported_For_Streaming = "{D3993A3F-99C2-4402-B5EC-A92A0367664B},6"
;PKEY_EFX_ProcessingModes_Supported_For_Streaming = "{D3993A3F-99C2-4402-B5EC-A92A0367664B},7"
PKEY_EFX_KeywordDetector_ProcessingModes_Supported_For_Streaming =  "{D3993A3F-99C2-4402-B5EC-A92A0367664B},10"

PKEY_AudioEndpoint_Association = "{1DA5D803-D492-4EDD-8C23-E0C0FFEE7F0E},2"
PKEY_Devices_AudioDevice_Microphone_IsFarField = "{8943B373-388C-4395-B557-BC6DBAFFAFDB},6"

REG_MULTI_SZ = 0x00010000 ; FLG_ADDREG_TYPE_MULTI_SZ

AUDIO_SIGNALPROCESSINGMODE_DEFAULT = "{C18E2F7E-933D-4965-B7D1-1EEF228D2AF3}"
AUDIO_SIGNALPROCESSINGMODE_MEDIA   = "{4780004E-7133-41D8-8C74-660DADD2C0EE}"
AUDIO_SIGNALPROCESSINGMODE_MOVIE   = "{B26FEB0D-EC94-477C-9494-D1AB8E753F6E}"

