;****************************************************************************************
;   Copyright (c) 2019, MediaTek Technology Corp., All Rights Reserved
;   All Rights Reserved.
;   Developed by MediaTek Technology, Corp. -- http://www.mediatek.com
;****************************************************************************************

[Version]
Signature           = "$Windows NT$"
Class               = Bluetooth
CLASSGUID           = {e0cbf06c-cd8b-4647-bb8a-263b43f0f974}
Provider            = %ProviderName%
DriverVer           = 04/08/2022,1.824.1.172
CatalogFile         = mtkbtfilter.cat
CatalogFile.NTamd64 = mtkbtfilterx.cat

;****************************************************************************************
[Manufacturer]
%MTK%=MTK,NTx86, NTamd64

;****************************************************************************************
[MTK.NTx86]
; DisplayName                   Section                     DeviceID
; -----------                   -------                     --------
;%Generic.DeviceDesc%            = MTKBT_MODE1,              USB\VID_0E8D&PID_7961&MI_00
%Generic.DeviceDesc%            = MTKBT,                    USB\VID_0E8D&PID_7922&MI_00
;%Generic.DeviceDescRZ608ES%     = MTKBT,                    USB\VID_0E8D&PID_A608&MI_00
;%Generic.DeviceDescRZ608%       = MTKBT,                    USB\VID_0E8D&PID_0608&MI_00
%Generic.DeviceDescRZ616%       = MTKBT,                    USB\VID_0E8D&PID_0616&MI_00
;%Generic.DeviceDesc%            = MTKBT_MODE4,              USB\VID_04CA&PID_3812&MI_00
;%Generic.DeviceDesc%            = MTKBT_MODE4,              USB\VID_0489&PID_E0CD&MI_00
;%Generic.DeviceDescRZ608%       = MTKBT_MODE4,              USB\VID_0489&PID_E0D7&MI_00
%Generic.DeviceDescRZ616%       = MTKBT_MODE4,              USB\VID_0489&PID_E0D8&MI_00
%Generic.DeviceDescRZ616%       = MTKBT_MODE4,              USB\VID_0489&PID_E0D9&MI_00
;%Generic.DeviceDesc%            = MTKBT_MODE2,              USB\VID_13D3&PID_3564&MI_00

[MTK.NTamd64]
; DisplayName                   Section                     DeviceID
; -----------                   -------                     --------
;%Generic.DeviceDesc%            = MTKBT_MODE1,              USB\VID_0E8D&PID_7961&MI_00
%Generic.DeviceDesc%            = MTKBT,                    USB\VID_0E8D&PID_7922&MI_00
;%Generic.DeviceDescRZ608ES%     = MTKBT,                    USB\VID_0E8D&PID_A608&MI_00
;%Generic.DeviceDescRZ608%       = MTKBT,                    USB\VID_0E8D&PID_0608&MI_00
%Generic.DeviceDescRZ616%       = MTKBT,                    USB\VID_0E8D&PID_0616&MI_00
;%Generic.DeviceDesc%            = MTKBT_MODE4,              USB\VID_04CA&PID_3812&MI_00
;%Generic.DeviceDesc%            = MTKBT_MODE4,              USB\VID_0489&PID_E0CD&MI_00
;%Generic.DeviceDescRZ608%       = MTKBT_MODE4,              USB\VID_0489&PID_E0D7&MI_00
%Generic.DeviceDescRZ616%       = MTKBT_MODE4,              USB\VID_0489&PID_E0D8&MI_00
%Generic.DeviceDescRZ616%       = MTKBT_MODE4,              USB\VID_0489&PID_E0D9&MI_00
;%Generic.DeviceDesc%            = MTKBT_MODE2,              USB\VID_13D3&PID_3564&MI_00

;****************************************************************************************
[MTKBT.NTx86]
include    = bth.inf
needs      = BthUsb.NT
CopyFiles  = MTKBTFilter.CopyFiles

[MTKBT.NTamd64]
include    = bth.inf
needs      = BthUsb.NT
CopyFiles  = MTKBTFilter.NTamd64.CopyFiles

[MTKBT_MODE1.NTx86]
include    = bth.inf
needs      = BthUsb.NT
CopyFiles  = MTKBTFilter.CopyFiles

[MTKBT_MODE1.NTamd64]
include    = bth.inf
needs      = BthUsb.NT
CopyFiles  = MTKBTFilter.NTamd64.CopyFiles

[MTKBT_MODE2.NTx86]
include    = bth.inf
needs      = BthUsb.NT
CopyFiles  = MTKBTFilter.CopyFiles

[MTKBT_MODE2.NTamd64]
include    = bth.inf
needs      = BthUsb.NT
CopyFiles  = MTKBTFilter.NTamd64.CopyFiles

[MTKBT_MODE3.NTx86]
include    = bth.inf
needs      = BthUsb.NT
CopyFiles  = MTKBTFilter.CopyFiles

[MTKBT_MODE3.NTamd64]
include    = bth.inf
needs      = BthUsb.NT
CopyFiles  = MTKBTFilter.NTamd64.CopyFiles

[MTKBT_MODE4.NTx86]
include    = bth.inf
needs      = BthUsb.NT
CopyFiles  = MTKBTFilter.CopyFiles

[MTKBT_MODE4.NTamd64]
include    = bth.inf
needs      = BthUsb.NT
CopyFiles  = MTKBTFilter.NTamd64.CopyFiles

;****************************************************************************************
[MTKBT.NTx86.HW]
include    = bth.inf
needs      = BthUsb.NT.HW
AddReg     = MTKBTFilter.HW.AddReg

[MTKBT.NTamd64.HW]
include    = bth.inf
needs      = BthUsb.NT.HW
AddReg     = MTKBTFilterx64.HW.AddReg

[MTKBT_MODE1.NTx86.HW]
include    = bth.inf
needs      = BthUsb.NT.HW
needs      = BthLEExtendedAdvertisingOptIn.HW
AddReg     = MTKBTFilter.HW.AddReg

[MTKBT_MODE1.NTamd64.HW]
include    = bth.inf
needs      = BthUsb.NT.HW
needs      = BthLEExtendedAdvertisingOptIn.HW
AddReg     = MTKBTFilterx64.HW.AddReg

[MTKBT_MODE2.NTx86.HW]
include    = bth.inf
needs      = BthUsb.NT.HW
needs      = BthLEExtendedAdvertisingOptIn.HW
AddReg     = MTKBTFilter.HW.AddReg

[MTKBT_MODE2.NTamd64.HW]
include    = bth.inf
needs      = BthUsb.NT.HW
needs      = BthLEExtendedAdvertisingOptIn.HW
AddReg     = MTKBTFilterx64.HW.AddReg

[MTKBT_MODE3.NTx86.HW]
include    = bth.inf
needs      = BthUsb.NT.HW
AddReg     = MTKBTFilter.HW.AddReg

[MTKBT_MODE3.NTamd64.HW]
include    = bth.inf
needs      = BthUsb.NT.HW
AddReg     = MTKBTFilterx64.HW.AddReg

[MTKBT_MODE4.NTx86.HW]
include    = bth.inf
needs      = BthUsb.NT.HW
AddReg     = MTKBTFilter.HW.AddReg

[MTKBT_MODE4.NTamd64.HW]
include    = bth.inf
needs      = BthUsb.NT.HW
AddReg     = MTKBTFilterx64.HW.AddReg

;****************************************************************************************
[MTKBT.NTx86.Services]
include    = bth.inf
needs      = BthUsb.NT.Services
AddService = MTKBTFilter,,MTKBTFilterService

[MTKBT.NTamd64.Services]
include    = bth.inf
needs      = BthUsb.NT.Services
AddService = MTKBTFilterx64,,MTKBTFilterService.NTamd64

[MTKBT_MODE1.NTx86.Services]
include    = bth.inf
needs      = BthUsb.NT.Services
AddService = MTKBTFilter,,MTKBTFilterService_MODE1

[MTKBT_MODE1.NTamd64.Services]
include    = bth.inf
needs      = BthUsb.NT.Services
AddService = MTKBTFilterx64,,MTKBTFilterService_MODE1.NTamd64

[MTKBT_MODE2.NTx86.Services]
include    = bth.inf
needs      = BthUsb.NT.Services
AddService = MTKBTFilter,,MTKBTFilterService

[MTKBT_MODE2.NTamd64.Services]
include    = bth.inf
needs      = BthUsb.NT.Services
AddService = MTKBTFilterx64,,MTKBTFilterService.NTamd64

[MTKBT_MODE3.NTx86.Services]
include    = bth.inf
needs      = BthUsb.NT.Services
AddService = MTKBTFilter,,MTKBTFilterService_MODE3

[MTKBT_MODE3.NTamd64.Services]
include    = bth.inf
needs      = BthUsb.NT.Services
AddService = MTKBTFilterx64,,MTKBTFilterService_MODE3.NTamd64

[MTKBT_MODE4.NTx86.Services]
include    = bth.inf
needs      = BthUsb.NT.Services
AddService = MTKBTFilter,,MTKBTFilterService_MODE4

[MTKBT_MODE4.NTamd64.Services]
include    = bth.inf
needs      = BthUsb.NT.Services
AddService = MTKBTFilterx64,,MTKBTFilterService_MODE4.NTamd64

;****************************************************************************************
[MTKBTFilter.HW.AddReg]
HKR,,"LowerFilters",0x00010000,"MTKBTFilter"
HKR,,"VsMsftOpCode",0x00010001,0xFD30

[MTKBTFilterx64.HW.AddReg]
HKR,,"LowerFilters",0x00010000,"MTKBTFilterX64"
HKR,,"VsMsftOpCode",0x00010001,0xFD30

;****************************************************************************************
[MTKBTFilterService]
DisplayName    = %Service.DispName%
ServiceType    = 1               ; SERVICE_KERNEL_DRIVER
StartType      = 3               ; SERVICE_DEMAND_START
ErrorControl   = 1               ; SERVICE_ERROR_NORMAL
ServiceBinary  = %12%\mtkbtfilter.sys
AddReg         = MTKBTFilter.AddReg, MTKBTFilterLED0.AddReg, MTKBTFilterSSKU0.AddReg

[MTKBTFilterService.NTamd64]
DisplayName    = %Service.DispName%
ServiceType    = 1               ; SERVICE_KERNEL_DRIVER
StartType      = 3               ; SERVICE_DEMAND_START
ErrorControl   = 1               ; SERVICE_ERROR_NORMAL
ServiceBinary  = %12%\mtkbtfilterx.sys
AddReg         = MTKBTFilter.AddReg, MTKBTFilterLED0.AddReg, MTKBTFilterSSKU0.AddReg

[MTKBTFilterService_MODE1]
DisplayName    = %Service.DispName%
ServiceType    = 1               ; SERVICE_KERNEL_DRIVER
StartType      = 3               ; SERVICE_DEMAND_START
ErrorControl   = 1               ; SERVICE_ERROR_NORMAL
ServiceBinary  = %12%\mtkbtfilter.sys
AddReg         = MTKBTFilter.AddReg, MTKBTFilterLED0.AddReg, MTKBTFilterSSKU1.AddReg

[MTKBTFilterService_MODE1.NTamd64]
DisplayName    = %Service.DispName%
ServiceType    = 1               ; SERVICE_KERNEL_DRIVER
StartType      = 3               ; SERVICE_DEMAND_START
ErrorControl   = 1               ; SERVICE_ERROR_NORMAL
ServiceBinary  = %12%\mtkbtfilterx.sys
AddReg         = MTKBTFilter.AddReg, MTKBTFilterLED0.AddReg, MTKBTFilterSSKU1.AddReg

[MTKBTFilterService_MODE3]
DisplayName    = %Service.DispName%
ServiceType    = 1               ; SERVICE_KERNEL_DRIVER
StartType      = 3               ; SERVICE_DEMAND_START
ErrorControl   = 1               ; SERVICE_ERROR_NORMAL
ServiceBinary  = %12%\mtkbtfilter.sys
AddReg         = MTKBTFilter.AddReg, MTKBTFilterLED1.AddReg, MTKBTFilterSSKU0.AddReg

[MTKBTFilterService_MODE3.NTamd64]
DisplayName    = %Service.DispName%
ServiceType    = 1               ; SERVICE_KERNEL_DRIVER
StartType      = 3               ; SERVICE_DEMAND_START
ErrorControl   = 1               ; SERVICE_ERROR_NORMAL
ServiceBinary  = %12%\mtkbtfilterx.sys
AddReg         = MTKBTFilter.AddReg, MTKBTFilterLED1.AddReg, MTKBTFilterSSKU0.AddReg

[MTKBTFilterService_MODE4]
DisplayName    = %Service.DispName%
ServiceType    = 1               ; SERVICE_KERNEL_DRIVER
StartType      = 3               ; SERVICE_DEMAND_START
ErrorControl   = 1               ; SERVICE_ERROR_NORMAL
ServiceBinary  = %12%\mtkbtfilter.sys
AddReg         = MTKBTFilter.AddReg, MTKBTFilterLED0.AddReg, MTKBTFilterSSKU1.AddReg

[MTKBTFilterService_MODE4.NTamd64]
DisplayName    = %Service.DispName%
ServiceType    = 1               ; SERVICE_KERNEL_DRIVER
StartType      = 3               ; SERVICE_DEMAND_START
ErrorControl   = 1               ; SERVICE_ERROR_NORMAL
ServiceBinary  = %12%\mtkbtfilterx.sys
AddReg         = MTKBTFilter.AddReg, MTKBTFilterLED0.AddReg, MTKBTFilterSSKU1.AddReg

;****************************************************************************************
[MTKBTFilter.AddReg]
HKR,Parameters,FirmwareBinFolder,0x00000,"\SystemRoot\System32\drivers\"
HKR,Parameters,BtFilterWakeUpEnable,0x00010003,0
HKR,Parameters,BtFilterDeviceDetection,0x00010003,0
HKLM,Software\mtkbt,FWVer,0x00000,"xxxxyyzzaabbcc"
HKLM,Software\mtkbt,LogPath,0x00000,"\SystemRoot\System32\LogFiles\MediaTek\"
HKLM,Software\mtkbt\snooplog,output,0x00010001,0
HKLM,Software\mtkbt\snooplog,save,0x00010001,0
HKLM,Software\mtkbt\snooplog,size,0x00010001,128
HKLM,Software\mtkbt\dbg,level,0x00010001,4
HKLM,Software\mtkbt\dbg,uart,0x00010001,255
HKLM,Software\mtkbt\picus,level,0x00010001,0
HKLM,Software\mtkbt\picus,type,0x00010001,2
HKLM,Software\mtkbt\picus,size,0x00010001,64
HKLM,Software\mtkbt\coex,switch,0x00010001,0
HKLM,Software\mtkbt\coex,adv_interval,0x00010001,100
HKLM,Software\Policies\Microsoft\Windows\SwiftPair,SwiftPairDefault,0x00010001,1
HKLM,Software\mtkbt\dbg_reset_cmd,n9_cpu_pc_enable,0x00010001,1
HKLM,Software\mtkbt\dbg_reset_cmd,n9_cpu_pc_rd_num,0x00010001,5
HKLM,Software\mtkbt\dbg_reset_cmd,n9_cpu_pc_wr,0x00010001,0x74000A0C
HKLM,Software\mtkbt\dbg_reset_cmd,n9_cpu_pc_wr_value,0x00010001,0x185
HKLM,Software\mtkbt\dbg_reset_cmd,n9_cpu_pc_rd,0x00010001,0x74000A08

;For customer branch out should notice the value of FileMax and MaxFileSize.
HKLM,SYSTEM\CurrentControlSet\Control\WMI\AutoLogger\MTKBT, Start, 0x00010001, 0x0
HKLM,SYSTEM\CurrentControlSet\Control\WMI\AutoLogger\MTKBT, BufferSize, 0x00010001, 0xa0
HKLM,SYSTEM\CurrentControlSet\Control\WMI\AutoLogger\MTKBT, ClockType, 0x00010001, 0x1
HKLM,SYSTEM\CurrentControlSet\Control\WMI\AutoLogger\MTKBT, FileMax, 0x00010001, 0x8
HKLM,SYSTEM\CurrentControlSet\Control\WMI\AutoLogger\MTKBT, FileName, 0, "%%SystemRoot%%\System32\LogFiles\WMI\MTK\mtkbt.etl"
HKLM,SYSTEM\CurrentControlSet\Control\WMI\AutoLogger\MTKBT, Guid, 0, "{BCC3D898-9C36-4D75-AC12-84924F2572FD}"
HKLM,SYSTEM\CurrentControlSet\Control\WMI\AutoLogger\MTKBT, LogFileMode, 0x00010001, 0x2
HKLM,SYSTEM\CurrentControlSet\Control\WMI\AutoLogger\MTKBT, MaxFileSize, 0x00010001, 0xc8
HKLM,SYSTEM\CurrentControlSet\Control\WMI\AutoLogger\MTKBT, MaximumBuffers, 0x00010001, 0x28
HKLM,SYSTEM\CurrentControlSet\Control\WMI\AutoLogger\MTKBT, MinimumBuffers, 0x00010001, 0x2
HKLM,SYSTEM\CurrentControlSet\Control\WMI\AutoLogger\MTKBT\{BCC3D898-9C36-4D75-AC12-84924F2572FD}, Enabled, 0x00010001, 0x1
HKLM,SYSTEM\CurrentControlSet\Control\WMI\AutoLogger\MTKBT\{BCC3D898-9C36-4D75-AC12-84924F2572FD}, EnableLevel, 0x00010001, 0x5
HKLM,SYSTEM\CurrentControlSet\Control\WMI\AutoLogger\MTKBT\{BCC3D898-9C36-4D75-AC12-84924F2572FD}, EnableFlags, 0x00010001, 0x7fffffff

[MTKBTFilterLED0.AddReg]
HKLM,Software\mtkbt,LED,0x00010001,0

[MTKBTFilterLED1.AddReg]
HKLM,Software\mtkbt,LED,0x00010001,1

[MTKBTFilterSSKU0.AddReg]
HKLM,Software\mtkbt\region,switch,0x00010001,0

[MTKBTFilterSSKU1.AddReg]
HKLM,Software\mtkbt\region,switch,0x00010001,1

;****************************************************************************************
[MTKBTFilter.CopyFiles]
mtkbtfilter.sys
BT_RAM_CODE_MT7961_1_2_hdr.bin
BT_RAM_CODE_MT7922_1_1_hdr.bin
mtkbt0.dat

[MTKBTFilter.NTamd64.CopyFiles]
mtkbtfilterx.sys
BT_RAM_CODE_MT7961_1_2_hdr.bin
BT_RAM_CODE_MT7922_1_1_hdr.bin
mtkbt0.dat

;****************************************************************************************
[DestinationDirs]
MTKBTFilter.CopyFiles         = 12
MTKBTFilter.NTamd64.CopyFiles = 12
DefaultDestDir                = 11

;****************************************************************************************
[SourceDisksNames]
1 = %DISK_NAME%,,,

[SourceDisksNames.amd64]
1 = %DISK_NAME%,,,

;****************************************************************************************
[SourceDisksFiles]
mtkbtfilter.sys=1
BT_RAM_CODE_MT7961_1_2_hdr.bin=1
BT_RAM_CODE_MT7922_1_1_hdr.bin=1
mtkbt0.dat=1

[SourceDisksFiles.amd64]
mtkbtfilterx.sys=1
BT_RAM_CODE_MT7961_1_2_hdr.bin=1
BT_RAM_CODE_MT7922_1_1_hdr.bin=1
mtkbt0.dat=1

;****************************************************************************************
[Strings]
ProviderName              = "Mediatek Inc."
MTK                       = "Mediatek Inc."
Generic.DeviceDesc        = "MediaTek Bluetooth Adapter"
Generic.DeviceDescRZ608ES = "RZ608ES Bluetooth(R) Adapter"
Generic.DeviceDescRZ608   = "RZ608 Bluetooth(R) Adapter"
Generic.DeviceDescRZ616   = "RZ616 Bluetooth(R) Adapter"
Generic.DeviceDescExA     = "MediaTek Bluetooth MT7921"

Service.DispName          = "MTK BT Filter Driver"
DISK_NAME                 = "MTK BT Filter Driver"
