; Microsoft Bluetooth A2dp Driver Inf
; Copyright (c) Microsoft Corporation.  All rights reserved.
[Version]
Signature="$Windows NT$"
Class=MEDIA
Provider=%Microsoft%
ClassGUID={4d36e96c-e325-11ce-bfc1-08002be10318}
PnpLockdown=1
DriverVer = 08/19/2024,10.0.22621.4111

[SourceDisksNames]
3426=windows cd

[SourceDisksFiles]
btha2dp.sys = 3426

[DestinationDirs]
Common_BthA2dp_Install.CopyFiles = 12                   ;DIRID_DRIVERS

[SignatureAttributes]
btha2dp.sys=SignatureAttributes.DRM

[SignatureAttributes.DRM]
DRMLevel=1300

[Manufacturer]
%Microsoft%=Microsoft, NTamd64

[Microsoft.NTamd64]
%A2dpInstallation%=Common_BthA2dp_Install

[Common_BthA2dp_Install]
Include = ks.inf, wdmaudio.inf, BtaMpm.inf
Needs = KS.Registration, WDMAUDIO.Registration, BtaMPM.CopyFilesOnly, mssysfx.CopyFilesAndRegisterCapX
CopyFiles=Common_BthA2dp_Install.CopyFiles
AddReg=BthA2dp.AddReg

[Common_BthA2dp_Install.CopyFiles]
BthA2dp.sys,,,0x100

[BthA2dp.AddReg]
HKR,,Driver,,BthA2dp.sys

[Common_BthA2dp_Install.Services]
AddService = BthA2dp, 0x00000002, Common_BthA2dp_ServiceInstall

[Common_BthA2dp_ServiceInstall]
DisplayName = %BthA2dp.ServiceDescription%
ServiceType = 1 ;SERVICE_KERNEL_DRIVER
StartType = 3 ;SERVICE_DEMAND_START
ErrorControl = 1 ;SERVICE_ERROR_NORMAL
ServiceBinary = %12%\BthA2dp.sys

[Common_BthA2dp_Install.Interfaces]
AddInterface=%KSCATEGORY_AUDIO%, %A2dpSrcInterfaceRefString%, BthA2dpSrc_AudioInterfaces
AddInterface=%KSCATEGORY_AUDIO%, %A2dpSnkInterfaceRefString%, BthA2dpSnk_AudioInterfaces


[BthA2dpSrc_AudioInterfaces]
AddReg=Common_BthA2dp_EpProperties_AddReg, BthA2dpSrc_SysFx_Render_AddReg

; Settings for system effect begins
;
; System Effects settings
[BthA2dpSrc_SysFx_Render_AddReg]
;; Note: MSFX\\n is reserved for Microsoft inbox inf use ONLY. 
;; To avoid nondeterministic result, 3rd party driver INF should use FX\\n instead. 
HKR,"MSFX\\0",%PKEY_ItemNameDisplay%,,%FX_FriendlyName%
HKR,"MSFX\\0",%PKEY_FX_StreamEffectClsid%,,%FX_STREAM_CLSID%
HKR,"MSFX\\0",%PKEY_FX_ModeEffectClsid%,,%FX_MODE_CLSID%
HKR,"MSFX\\0",%PKEY_FX_UiClsid%,,%FX_UI_CLSID%
HKR,"MSFX\\0\\%WMALFXGFXAPO_Context%",%PKEY_FX_Association%,,%KSNODETYPE_ANY%
HKR,"MSFX\\0\\%WMALFXGFXAPO_Context%\\User",,,
HKR,"MSFX\\0",%PKEY_SFX_ProcessingModes_Supported_For_Streaming%,%FLG_ADDREG_TYPE_MULTI_SZ%,%AUDIO_SIGNALPROCESSINGMODE_DEFAULT%
HKR,"MSFX\\0",%PKEY_MFX_ProcessingModes_Supported_For_Streaming%,%FLG_ADDREG_TYPE_MULTI_SZ%,%AUDIO_SIGNALPROCESSINGMODE_DEFAULT%
; Settings for system effect ends

[BthA2dpSnk_AudioInterfaces]
AddReg=Common_BthA2dp_EpProperties_AddReg, BthA2dpSnk_ListenTo_AddReg

[BthA2dpSnk_ListenTo_AddReg]
; 'ListenTo' properties
; BOOL properties needs to be captured as 'SERIALIZED_VARIANT' stored as binary type
; When storing VT_BOOL, it is important to understand that TRUE = -1 and FALSE = 0
HKR,"MSEP\\0", %PKEY_MonitorEnabled%,%FLG_ADDREG_BINVALUETYPE%,0b,00,00,00,00,00,00,00,ff,ff,ff,ff
HKR,"MSEP\\0", %PKEY_MonitorPauseOnBattery%,%FLG_ADDREG_BINVALUETYPE%,0b,00,00,00,00,00,00,00,00,00,00,00

; We should never allow a2dp snk endpoints to be the default capture device so that modern apps will 
; not gain access to them even when this is the only capture device
; This value is a bit mask representing the roles and flow direction for which this endpoint should not be set as default
; Choose all roles - ROLE_MASK_CONSOLE(0x00000001) | ROLE_MASK_MULTIMEDIA(0x00000002) | ROLE_MASK_COMMUNICATION(0x00000004)
; And choose the flow - FLOW_MASK_CAPTURE (0x00000200)
HKR,"MSEP\\0", %PKEY_AudioDevice_NeverSetAsDefaultEndpoint%,%FLG_ADDREG_TYPE_DWORD%,0x207


[Common_BthA2dp_EpProperties_AddReg]
;// EP Properties
;//
;// support (opt-in) to event driven mode
;//
;; Note: MSEP\\n is reserved for Microsoft inbox inf use ONLY. 
;; To avoid undeterminitic result, 3rd party driver INF should use EP\\n instead. 
HKR,"MSEP\\0",%PKEY_AudioEndpoint_Association%,,%KSNODETYPE_ANY%
HKR,"MSEP\\0",%PKEY_AudioEndpoint_Supports_EventDriven_Mode%,%FLG_ADDREG_TYPE_DWORD%,0x1


[Strings]
;Non-Localizable
Microsoft = "Microsoft"

BthA2dp.DeviceDescription = "Microsoft Bluetooth Stereo" ; {Placeholder="Microsoft Bluetooth"}
BthA2dp.ServiceDescription = "Microsoft Bluetooth A2dp driver" ; {Placeholder="Microsoft Bluetooth"}
A2dpInstallation = "A2DP driver installation"
A2dpCopyFiles = "A2DP driver files "
A2dpServiceInstallation = "A2DP service installation"
A2dpInterfaceInstallation = "A2DP interface installation"

; A2DP interface reference Strings
;Non-Localizable
A2DPSrcInterfaceRefString = "SRC"
A2DPSnkInterfaceRefString = "SNK"

;Non-Localizable
;
PKEY_AudioEndpoint_Association            = "{1DA5D803-D492-4EDD-8C23-E0C0FFEE7F0E},2" 
PKEY_AudioEndpoint_Supports_EventDriven_Mode = "{1DA5D803-D492-4EDD-8C23-E0C0FFEE7F0E},7"

KSNODETYPE_ANY = "{00000000-0000-0000-0000-000000000000}"
KSCATEGORY_AUDIO = "{6994AD04-93EF-11D0-A3CC-00A0C9223196}"

;Information for FX PropertyKeys
;Non-localizable
PKEY_FX_Association         = "{D04E05A6-594B-4fb6-A80D-01AF5EED7D1D},0"
PKEY_FX_UiClsid             = "{D04E05A6-594B-4fb6-A80D-01AF5EED7D1D},3"
PKEY_FX_StreamEffectClsid   = "{D04E05A6-594B-4fb6-A80D-01AF5EED7D1D},5"
PKEY_FX_ModeEffectClsid     = "{D04E05A6-594B-4fb6-A80D-01AF5EED7D1D},6"
PKEY_FX_EndpointEffectClsid = "{D04E05A6-594B-4fb6-A80D-01AF5EED7D1D},7"
PKEY_ItemNameDisplay        = "{B725F130-47EF-101A-A5F1-02608C9EEBAC},10"
PKEY_SFX_ProcessingModes_Supported_For_Streaming = "{D3993A3F-99C2-4402-B5EC-A92A0367664B},5"
PKEY_MFX_ProcessingModes_Supported_For_Streaming = "{D3993A3F-99C2-4402-B5EC-A92A0367664B},6"
AUDIO_SIGNALPROCESSINGMODE_DEFAULT = "{C18E2F7E-933D-4965-B7D1-1EEF228D2AF3}"
WMALFXGFXAPO_Context        = "{B13412EE-07AF-4C57-B08B-E327F8DB085B}"

FX_UI_CLSID      = "{5860E1C5-F95C-4a7a-8EC8-8AEF24F379A1}"
FX_STREAM_CLSID  = "{C9453E73-8C5C-4463-9984-AF8BAB2F5447}"
FX_MODE_CLSID    = "{13AB3EBD-137E-4903-9D89-60BE8277FD17}"

;Localizable
FX_FriendlyName  = "Microsoft Audio Home Theater Effects"

; Capture Monitor Properties
; Non-Localizable
PKEY_MonitorEnabled = "{24DBB0FC-9311-4B3D-9CF0-18FF155639D4},1"
PKEY_MonitorPauseOnBattery = "{24DBB0FC-9311-4B3D-9CF0-18FF155639D4},2"

; Never set as Default property
PKEY_AudioDevice_NeverSetAsDefaultEndpoint = "{F3E80BEF-1723-4FF2-BCC4-7F83DC5E46D4},3"

; Registry Flags
; Non-Localizable
FLG_ADDREG_TYPE_DWORD = 0x00010001
FLG_ADDREG_TYPE_SZ = 0x00000000
FLG_ADDREG_TYPE_MULTI_SZ = 0x00010000
FLG_ADDREG_BINVALUETYPE = 0x00000001
