;-------------------------------------------------------------------------------
; Copyright (c) AVerMedia All rights reserved.
;
; Installation inf file for AVerMedia USB3.0 HD Capture series
;-------------------------------------------------------------------------------

[Version]
signature   ="$CHICAGO$"
Class       =Media
ClassGUID   ={4d36e96c-e325-11ce-bfc1-08002be10318}
Provider    =%ProviderName%
DriverVer   =11/25/2021,3.0.64.146
CatalogFile =CO513EC_x64.cat

[Manufacturer]
%ProviderName% = AVerMedia,NTamd64

[SourceDisksNames]
1="AVerMedia USB3 Drivers",,,""

[SourceDisksFiles]
co513ec_x64.sys = 1
aver_custom_hdcp_protection.bmp=1
aver_custom_no_signal.bmp=1
aver_custom_out_of_range.bmp=1
aver_custom_content_protection.bmp=1
PropPage_FX3.ax = 1
PropPage_FX3_x64.ax = 1

[AVerMedia.NTamd64]
%AVMUSB3.DeviceDesc% = USB3INST, USB\VID_07CA&PID_E513
%AVMUSB3.DeviceDesc% = USB3INST, USB\VID_07CA&PID_0000

[USB3INST]
Include      = ks.inf, kscaptur.inf, ksfilter.inf, wdmaudio.inf, bda.inf
Needs        = KS.Registration, KSCAPTUR.Registration, WDMAUDIO.Registration, BDA.Registration, bda.Installation
AddReg       = USB3MAIN.AddReg, USB3ANALOG.AddReg, PropPage_FX3.AddReg, PropPage_FX3_x64.AddReg
CopyFiles    = AVMUSB3.CopyDrivers, DSFilters_x86.CopyFiles, DSFilters_x64.CopyFiles
;RegisterDlls = DSFilters_x86Inx64.RegDLL     

[USB3INST.NT]
Include      = ks.inf, kscaptur.inf, ksfilter.inf, wdmaudio.inf, bda.inf
Needs        = KS.Registration, KSCAPTUR.Registration.NT, WDMAUDIO.Registration, BDA.Registration, bda.Installation.NT
AddReg       = USB3MAIN.AddReg, USB3ANALOG.AddReg, PropPage_FX3.AddReg, PropPage_FX3_x64.AddReg
CopyFiles    = AVMUSB3.CopyDrivers, DSFilters_x86.CopyFiles, DSFilters_x64.CopyFiles
;RegisterDlls = DSFilters_x86Inx64.RegDLL    

[DestinationDirs]
AVMUSB3.CopyDrivers = 10,system32\drivers
DSFilters_x64.CopyFiles = 10,system32
DSFilters_x86.CopyFiles = 16425

[AVMUSB3.CopyDrivers]
co513ec_x64.sys
aver_custom_hdcp_protection.bmp
aver_custom_no_signal.bmp
aver_custom_out_of_range.bmp
aver_custom_content_protection.bmp

[DSFilters_x64.CopyFiles]
PropPage_FX3_x64.ax,,,0x00000020

[DSFilters_x86.CopyFiles]
PropPage_FX3.ax,,,0x00000020

;[DSFilters_x86Inx64.RegDLL]
;16425,,PropPage_FX3.ax,1
;16425,,PropPage_FX3_x64.ax,1
[PropPage_FX3.AddReg]
HKCR,WOW6432Node\CLSID\{6B3D1223-6E52-414D-9E10-7C834727FAC1},,,"AVerCertificateProp"
HKCR,WOW6432Node\CLSID\{6B3D1223-6E52-414D-9E10-7C834727FAC1}\InprocServer32,,%REG_EXPAND_SZ%,"%%SystemRoot%%\SysWOW64\PropPage_FX3.ax"
HKCR,WOW6432Node\CLSID\{6B3D1223-6E52-414D-9E10-7C834727FAC1}\InprocServer32,ThreadingModel,,"Both"

[PropPage_FX3_x64.AddReg]
HKCR,CLSID\{6B3D1223-6E52-414D-9E10-7C834727FAC1},,,"AVerCertificateProp"
HKCR,CLSID\{6B3D1223-6E52-414D-9E10-7C834727FAC1}\InprocServer32,,%REG_EXPAND_SZ%,"%%SystemRoot%%\System32\PropPage_FX3_x64.ax"
HKCR,CLSID\{6B3D1223-6E52-414D-9E10-7C834727FAC1}\InprocServer32,ThreadingModel,,"Both"

[USB3MAIN.AddReg]
HKLM,%MediaCategories%\%PINNAME_ANALOG_AUDIO_IN%,Name,,%PinName.AudioIn%
HKLM,%MediaCategories%\%PINNAME_AUDIO_OUT%,Name,,%PinName.AudioOut%
HKLM,%MediaCategories%\%PINNAME_AUDIO_CAP_AUDIO_IN%,Name,,%PinName.AudioCapAudioIn%

HKR,,DevLoader,,*ntkern
HKR,,NTMPDriver,,co513ec_x64.sys

; Disable driver page out
HKR,,PageOutWhenUnopened,3,0

HKR,"DriverData","DelayPowerDownSec",    0x00010001, 0x14, 0x00, 0x00, 0x00
;HKR,"DriverData","SSEnable",             0x00010001, 0x01, 0x00, 0x00, 0x00

; Device support mode for create filter
; b0 - ATV
; b1 - Video Capture
; b2 - DVB-T
; b3 - ATSC
HKR,"DriverData","DeviceSupportedMode",  0x00010001, 0x02, 0x00, 0x00, 0x00

HKR,"DriverData","DrvProcType",          0x00010001, 0x03, 0x00, 0x00, 0x00

;define I2C bus 
HKR,"DriverData","GpioI2CEnable",       0x00010001, 0x01, 0x00, 0x00, 0x00
HKR,"DriverData","GpioI2CEnable",       0x00010001, 0x00, 0x00, 0x00, 0x00
HKR,"DriverData","DecoderGpioI2c",      0x00010001, 0x00, 0x00, 0x00, 0x00
;
;HKLM,System\CurrentControlSet\SERVICES\AVMU3\Parameters\CO513EC,VGA,0x00010001,0x00000000
;0: RGB24, 1: YUV422, 2:YUV444
HKLM,System\CurrentControlSet\SERVICES\AVMU3\Parameters\CO513EC,LTCS,0x00010001,0x0000001
HKLM,System\CurrentControlSet\SERVICES\AVMU3\Parameters\CO513EC,ENABLE_SCALER,0x00010001,0x0000001
HKLM,System\CurrentControlSet\SERVICES\AVMU3\Parameters\CO513EC,GPIO_RESET_FPGA,0x00010001,0x0000000
HKLM,System\CurrentControlSet\SERVICES\AVMU3\Parameters\CO513EC,AVIDecompFilter,0x00010001,0x00000001
;RXINDEX 0:6604/7002 1:7604 2:both
;HKLM,System\CurrentControlSet\SERVICES\AVMU3\Parameters\CO513EC,BOARDINDEX,0x00010001,0x00000001
HKLM,System\CurrentControlSet\SERVICES\AVMU3\Parameters\CO513EC,AUDIO_ENDIAN,0x00010001,0x00000000
HKLM,System\CurrentControlSet\SERVICES\AVMU3\Parameters\CO513EC,ENABLE_PS,0x00010001,0x00000000
HKLM,System\CurrentControlSet\SERVICES\AVMU3\Parameters\CO513EC,VIDEO_IN_QUEUE,0x00010001,0x00000030
HKLM,System\CurrentControlSet\SERVICES\AVMU3\Parameters\CO513EC,AUDIO_IN_QUEUE,0x00010001,0x00000019
HKLM,System\CurrentControlSet\SERVICES\AVMU3\Parameters\CO513EC,COLOR_ADJ_EN,0x00010001,0x00000001
HKLM,System\CurrentControlSet\SERVICES\AVMU3\Parameters\CO513EC,POWER_DOWN_LEVEL,0x00010001,0x00000001
;StreamingMode 0: default 1:put StreamPtr in Queue
HKLM,System\CurrentControlSet\SERVICES\AVMU3\Parameters\CO513EC,STREAMINGMODE,0x00010001,0x00000001
;0: disable, 1: enable, 2: user control
HKLM,System\CurrentControlSet\SERVICES\AVMU3\Parameters\CO513EC,SCALER_OP_MODE,0x00010001,0x00000002
HKLM,System\CurrentControlSet\SERVICES\AVMU3\Parameters\CO513EC,ENABLE_AUDIO_CAP,0x00010001,0x00000000
HKLM,System\CurrentControlSet\SERVICES\AVMU3\Parameters\CO513EC,STRHEADER_FLAG,0x00010001,0x00000000
HKLM,System\CurrentControlSet\SERVICES\AVMU3\Parameters\CO513EC,LATENCY,0x00010001,0x00000000
HKLM,System\CurrentControlSet\SERVICES\AVMU3\Parameters\CO513EC,PARAMETER00,0x00010001,0x0000000A
HKLM,System\CurrentControlSet\SERVICES\AVMU3\Parameters\CO513EC,ENABLE_SMART_VIDEO_CAP,0x00010001,0x00000000
HKLM,System\CurrentControlSet\SERVICES\AVMU3\Parameters\CO513EC,PKC,0x00010001,0x00000000
HKLM,System\CurrentControlSet\SERVICES\AVMU3\Parameters\CO513EC,PKCM,0x00010001,0x00000001
HKLM,System\CurrentControlSet\SERVICES\AVMU3\Parameters\CO513EC,FREEZE_CNT,0x00010001,0x00000000
HKLM,System\CurrentControlSet\SERVICES\AVMU3\Parameters\CO513EC,SSEnable,0x00010001,0x00000001
HKLM,System\CurrentControlSet\SERVICES\AVMU3\Parameters\CO513EC,ENABLE_MF_MODE,0x00010001,0x00000000
;Audio mixer setting
HKLM,System\CurrentControlSet\SERVICES\AVMU3\Parameters\CO513EC,ANALOG_INPUT,0x00010001,0x00000000 ;0:line, 1:MIC
HKLM,System\CurrentControlSet\SERVICES\AVMU3\Parameters\CO513EC,PC_GAME_VOLUME,0x00010001,0x00000001
HKLM,System\CurrentControlSet\SERVICES\AVMU3\Parameters\CO513EC,PC_EXTERNAL_VOLUME,0x00010001,0x00000002
HKLM,System\CurrentControlSet\SERVICES\AVMU3\Parameters\CO513EC,TX_GAME_VOLUME,0x00010001,0x00000003
HKLM,System\CurrentControlSet\SERVICES\AVMU3\Parameters\CO513EC,TX_EXTERNAL_VOLUME,0x00010001,0x00000004
HKLM,System\CurrentControlSet\Control\DeviceOverrides\USB#VID_07CA&PID_E513\LocationPaths\*,Removable,0x00010001,0x00000000

;RXINDEX 0:6604/7002 1:7604 2:both
HKR,"DriverData","BoardIndex",			0x00010001, 0x01, 0x00, 0x00, 0x00
;----------------------------------------------------------------------------
;                 Add the Property Pages
;----------------------------------------------------------------------------
HKLM,%MediaSets%\%KSPROPSETID_AV_INPUT_PAGE%\PropertyPages\%GUID.AV_Input_Properties%,,,

[USB3ANALOG.AddReg]


;HKLM,%MediaInterfaces%\{d2185a40-0398-11d3-a53e-00a0c9ef506a},,,"AVerMedia Macrovision Detection Property"
;HKLM,%MediaInterfaces%\{d2185a40-0398-11d3-a53e-00a0c9ef506a},IID,1,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00

;For TV standard detection, 1-Enable, 0-Disable
;HKR,"DriverData","StandardDetectEnable", 0x00010001, 0x00, 0x00, 0x00, 0x00
;For Sync, 1-Enable, 0-Disable
;HKR,"DriverData","SyncEnable",           0x00010001, 0x01, 0x00, 0x00, 0x00

;HDMI input is default 0:HDMI, 1:CMP
;HKR,"DriverData","VideoInputPin",        0x00010001, 0x00, 0x00, 0x00, 0x00


;HKR,"DriverData","MVDetectEnable",       0x00010001, 0x01, 0x00, 0x00, 0x00
;HKR,"DriverData","CGMSADetectEnable",    0x00010001, 0x00, 0x00, 0x00, 0x00
;HKR,"DriverData","SampleSleepTime",      0x00010001, 0x06, 0x00, 0x00, 0x00
;HKR,"DriverData","CGMSASampleCount",     0x00010001, 0x0a, 0x00, 0x00, 0x00
;HKR,"DriverData","MVSampleCount",        0x00010001, 0x03, 0x00, 0x00, 0x00
;HKR,"DriverData","AutoCPScreenControl",  0x00010001, 0x01, 0x00, 0x00, 0x00

;------------------------------

;HKR,"DriverData","DisableTuner",         0x00010001, 0x01, 0x00, 0x00, 0x00
;HKR,"DriverData","DecoderVideoStandard", 0x00010001, 0x00, 0x01, 0x00, 0x00

;Color and Volume
HKR,"DriverData","HDMI_Brightness",	 	 0x00010001, 0x00, 0x00, 0x00, 0x00
HKR,"DriverData","HDMI_Contrast",        0x00010001, 0x80, 0x00, 0x00, 0x00
HKR,"DriverData","HDMI_Hue",        	 0x00010001, 0x00, 0x00, 0x00, 0x00
HKR,"DriverData","HDMI_Saturation",      0x00010001, 0x80, 0x00, 0x00, 0x00
HKR,"DriverData","CMP_Brightness",	 	 0x00010001, 0x00, 0x00, 0x00, 0x00
HKR,"DriverData","CMP_Contrast",         0x00010001, 0x80, 0x00, 0x00, 0x00
HKR,"DriverData","CMP_Hue",        	 	 0x00010001, 0x00, 0x00, 0x00, 0x00
HKR,"DriverData","CMP_Saturation",       0x00010001, 0x80, 0x00, 0x00, 0x00
HKR,"DriverData","ColorRange",       	 0x00010001, 0x02, 0x00, 0x00, 0x00

HKR,"DriverData","TVol",                 0x00010001, 0x05, 0x00, 0x00, 0x00
HKR,"DriverData","FVol",                 0x00010001, 0x05, 0x00, 0x00, 0x00
HKR,"DriverData","LVol",                 0x00010001, 0x05, 0x00, 0x00, 0x00
HKR,"DriverData","Mute",                 0x00010001, 0x00, 0x00, 0x00, 0x00
;Scaler
HKR,"DriverData","UserEnableScaler",     0x00010001, 0x00, 0x00, 0x00, 0x00
;HDCP
HKR,"DriverData","HDCPHandshake",     	 0x00010001, 0x01, 0x00, 0x00, 0x00

;------------------------------
;
; Interfaces installation
;

;
; Video
;

[USB3INST.Interfaces]
AddInterface = {E5323777-F976-4f5b-9B55-B94699C46E44}, {8EC460C4-0D2E-46FD-AD9B-331FF33DE3B6}, AVer_VideoCaptureInterface,0
AddInterface = {65e8773d-8f56-11d0-a3b9-00a0c9223196}, {8EC460C4-0D2E-46FD-AD9B-331FF33DE3B6}, AVer_VideoCaptureInterface,0
AddInterface = {6994AD05-93EF-11D0-A3CC-00A0C9223196}, {8EC460C4-0D2E-46FD-AD9B-331FF33DE3B6}, AVer_VideoCaptureInterface,0

[USB3INST.NT.Interfaces]
AddInterface = {E5323777-F976-4f5b-9B55-B94699C46E44}, {8EC460C4-0D2E-46FD-AD9B-331FF33DE3B6}, AVer_VideoCaptureInterface,0
AddInterface = {65e8773d-8f56-11d0-a3b9-00a0c9223196}, {8EC460C4-0D2E-46FD-AD9B-331FF33DE3B6}, AVer_VideoCaptureInterface,0
AddInterface = {6994AD05-93EF-11D0-A3CC-00A0C9223196}, {8EC460C4-0D2E-46FD-AD9B-331FF33DE3B6}, AVer_VideoCaptureInterface,0

;
; Analog Interface
;

[AVer_VideoCaptureInterface]
AddReg=AVer_VideoCaptureInterface.AddReg

[AVer_VideoCaptureInterface.AddReg]
HKR,,CLSID,,%Proxy.CLSID%       ; {17CCA71B-ECD7-11D0-B908-00A0C9223196}
HKR,,FriendlyName,,%HybridVIDFriendlyName%

;
; Services installation
;

[USB3INST.Services]
AddService = AVMU3CO513EC64,2,HybridVID.ServiceInstall

[USB3INST.NT.Services]
AddService = AVMU3CO513EC64,2,HybridVID.ServiceInstall

[HybridVID.ServiceInstall]
DisplayName   = %AVMUSB3.ServiceName%
ServiceType   = 1
StartType     = 3
ErrorControl  = 1
ServiceBinary = %10%\system32\drivers\co513ec_x64.sys

;---------------------------------------------------------------
;                S t r i n g s
;---------------------------------------------------------------

[Strings]
; Property page GUIDS
;
GUID.AV_Input_Properties		= "{6B3D1223-6E52-414D-9E10-7C834727FAC1}"

; PROPSETIDs in the driver
;
KSPROPSETID_AV_INPUT_PAGE 		= "{A0F8A4F5-29DB-4b21-AB99-978BE4A5922D}"

;
; Device Names
;
AVMUSB3.DeviceDesc				= "AVerMedia CO513EC USB Device"
AVMUSB3.ServiceName				= "AVerMedia CO513EC USB Device Service"

;
; Friendly Names
;
;
HybridVIDFriendlyName              = "AVerMedia CO513EC Video Capture"
HybridAudioFriendlyName            = "AVT AudCap CO513EC"
HybridXBARFriendlyName             = "AVerMedia CO513EC Crossbar"

;
; Pin Name GUIDS
;
PINNAME_ANALOG_AUDIO_IN = "{77990C6E-86E2-4ba2-9DC2-E04FD37FF427}"
PINNAME_AUDIO_OUT       = "{D4CA64B2-8AB7-474d-946A-123CE5B2E08A}"
PINNAME_AUDIO_CAP_AUDIO_IN = "{E8F27612-FFEA-4b07-8D2A-3F3B79ABB4B1}"

;
; Pin Names
;
PinName.AudioOut            = "Audio Out"
PinName.AudioIn               = "Audio In"
PinName.AudioCapAudioIn       = "AVerMedia Ain"

;
; Other Strings
;

CLSID_TVAudioFilter          = "{71F96462-78F3-11d0-A18C-00A0C9118956}"
CLSID_CrossbarFilter         = "{71F96460-78F3-11d0-A18C-00A0C9118956}"
CLSID_CTVTunerFilter         = "{266EEE40-6C63-11cf-8A03-00AA006ECB65}"


Proxy.CLSID                  = "{17CCA71B-ECD7-11D0-B908-00A0C9223196}"

MediaCategories              = "SYSTEM\CurrentControlSet\Control\MediaCategories"
MediaSets                    = "System\CurrentControlSet\Control\MediaSets"
MediaInterfaces              = "System\CurrentControlSet\Control\MediaInterfaces"


; Our strings

AVerMedia                    = "AVerMedia TECHNOLOGIES, Inc."
ProviderName                 = "AVerMedia TECHNOLOGIES, Inc."

REG_EXPAND_SZ				 = 0x00020000
