; Microsoft Bluetooth Hfp Driver Inf that installs BthHfAud driver and copies drivers common for both roles
; Copyright (c) Microsoft Corporation.  All rights reserved.
[Version]
Signature="$Windows NT$"
Class=MEDIA
Provider=%Microsoft%
ClassGUID={4d36e96c-e325-11ce-bfc1-08002be10318}
PnpLockdown = 1
DriverVer = 05/21/2024,10.0.22621.3672

[SourceDisksNames]
3426=windows cd

[SourceDisksFiles]
BthHfAud.sys = 3426
BthHfEnum.sys = 3426

[DestinationDirs]
Common_BthHfAud_Install.CopyFiles = 12                   ;DIRID_DRIVERS
Common_BthHfEnum_Install.CopyFiles = 12                   ;DIRID_DRIVERS

[SignatureAttributes]
BthHfAud.sys=SignatureAttributes.DRM
BthHfEnum.sys=SignatureAttributes.DRM

[SignatureAttributes.DRM]
DRMLevel=1300

[Manufacturer]
%Microsoft%=Microsoft, NTamd64

[Microsoft.NTamd64]
;HS/HF on BthHfEnum
%HfAudInstallation%=Common_BthHfAud_Install, BTHHFENUM\BthHFPAudio ; SCO over HCI (in-band) handsfree audio device
%HfEnumInstallation%=Common_BthHfEnum_Install

[Common_BthHfAud_Install]
Include = ks.inf, wdmaudio.inf, BtaMpm.inf
Needs = KS.Registration, WDMAUDIO.Registration, BtaMPM.CopyFilesOnly, MsApoFxProxy.Registration
CopyFiles=Common_BthHfAud_Install.CopyFiles

[Common_BthHfAud_Install.CopyFiles]
BthHfAud.sys,,,0x100

[Common_BthHfAud_Install.Services]
AddService=BthHFAud, 0x00000002, Common_BthHfAud_Install.ServiceInstall

[Common_BthHfAud_Install.ServiceInstall]
DisplayName=%BTHHFAUD_DISPLAY_NAME%
ServiceType=%SERVICE_KERNEL_DRIVER%
StartType=%SERVICE_DEMAND_START%
ErrorControl=%SERVICE_ERROR_IGNORE%
ServiceBinary=%12%\BthHfAud.sys

[Common_BthHfAud_Install.Interfaces]
AddInterface=%KSCATEGORY_AUDIO%, %BTHAUDIOHF_FILTER_REF_GUID_WAVE%, Common_BthHfAud_Install.AnlgACapture.Wave

[Common_BthHfAud_Install.AnlgACapture.Wave]
AddReg=Common_BthHfAud_Install.EPProperties.AddReg

[Common_BthHfAud_Install.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

[Common_BthHfEnum_Install]
CopyFiles=Common_BthHfEnum_Install.CopyFiles

[Common_BthHfEnum_Install.HW]
AddReg=Common_BthHfEnum_Install.AddReg

[Common_BthHfEnum_Install.CopyFiles]
BthHfEnum.sys,,,0x100

[Common_BthHfEnum_Install.AddReg]
HKR,,DeviceCharacteristics,0x10001,0x0100 ; Use same security checks on relative opens
; Allow generic-all access to built-in administrators and local system, generic rwx access for local service, generic rwx for BTAGService
HKR,,Security,,"D:P(A;;GA;;;BA)(A;;GA;;;SY)(A;;GRGWGX;;;LS)(A;;GRGWGX;;;S-1-5-80-3316959809-2577409367-488518535-1805171532-1438653141)"

[Common_BthHfEnum_Install.Services]
AddService = BthHFEnum,0x00000002, Common_BthHfEnum_Install.ServiceInstall

[Common_BthHfEnum_Install.ServiceInstall]
DisplayName = %BTHHFENUM_DISPLAY_NAME%
ServiceType = %SERVICE_KERNEL_DRIVER%
StartType = %SERVICE_DEMAND_START%
ErrorControl = %SERVICE_ERROR_NORMAL%
ServiceBinary = %12%\bthhfenum.sys
LoadOrderGroup = Extended Base

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

;General
;localizable
HfAudInstallation = "Microsoft Bluetooth Hands-Free Audio device" ; {Placeholder="Microsoft Bluetooth"}
HfEnumInstallation = "Microsoft Bluetooth Hands-Free Profile device" ; {Placeholder="Microsoft Bluetooth"}
BTHHFAUD_DISPLAY_NAME = "Microsoft Bluetooth Hands-Free Audio driver" ; {Placeholder="Microsoft Bluetooth"}
BTHHFENUM_DISPLAY_NAME = "Microsoft Bluetooth Hands-Free Profile driver" ; {Placeholder="Microsoft Bluetooth"}

; Filter GUIDs
;
;Non-Localizable
BTHAUDIOHF_FILTER_REF_GUID_WAVE = "Wave"

; system defines
;
SERVICE_BOOT_START   = 0x0 
SERVICE_SYSTEM_START = 0x1 
SERVICE_AUTO_START   = 0x2 
SERVICE_DEMAND_START = 0x3 
SERVICE_DISABLED     = 0x4 

SERVICE_KERNEL_DRIVER  = 0x1 

SERVICE_ERROR_IGNORE   = 0x0 
SERVICE_ERROR_NORMAL   = 0x1 
SERVICE_ERROR_SEVERE   = 0x2
SERVICE_ERROR_CRITICAL = 0x3 

FLG_REGSVR_DLLREGISTER = 0x00000001

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

;Information for FX PropertyKeys
;Non-localizable
PKEY_FX_Association         = "{D04E05A6-594B-4fb6-A80D-01AF5EED7D1D},0"
PKEY_FX_ModeEffectClsid     = "{D04E05A6-594B-4fb6-A80D-01AF5EED7D1D},6"
PKEY_FX_EndpointEffectClsid = "{D04E05A6-594B-4fb6-A80D-01AF5EED7D1D},7"

; Proxy GUIDs
;Non-Localizable
FX_DISCOVER_EFFECTS_APO_CLSID  = "{889C03C8-ABAD-4004-BF0A-BC7BB825E166}"

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

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