;-----------------------------------------------------
; Installation file (.inf)
;
; Copyright (c) AVerMedia TECHNOLOGIES, Inc.
;-----------------------------------------------------

[Version]
signature="$CHICAGO$"
Class=MEDIA
ClassGUID={4d36e96c-e325-11ce-bfc1-08002be10318}
Provider=%ProviderName%
CatalogFile=AVXGC573_x64.cat
DriverVer=11/18/2020,2.2.64.89

[Manufacturer]
%ProviderName%=AVXGC573,NTAMD64 

[AVXGC573.NTAMD64]
%AVXGC573Cap.DeviceDesc%=AVXGC573Cap,PCI\VEN_1461&DEV_0054&SUBSYS_57301461

[DestinationDirs]
System32.CopyBins=10,system32
AVXGC573Cap.CopyFiles=10,system32\drivers ; be aware not to use 12 as the drivers directory, 
                                         ; as driver will not work anymore in W98

[SourceDisksNames]
1 = %AVSTRM_INSTALLATION_DISK%,,

[SourceDisksFiles]
AVXGC573_x64.sys     = 1
nosignal.v210 = 1
aver_custom_no_signal.bmp = 1
aver_custom_out_of_range.bmp = 1
aver_custom_hdcp_protection.bmp = 1
customer_AVXGC573.bin = 1
customer_edidGC573.bin = 1
customer_DTDGC573.bin = 1
customer_LEDgc573.txt = 1

[AVXGC573Cap.CopyFiles]
AVXGC573_x64.sys
nosignal.v210
aver_custom_no_signal.bmp
aver_custom_out_of_range.bmp
aver_custom_hdcp_protection.bmp
customer_AVXGC573.bin
customer_edidGC573.bin
customer_DTDGC573.bin
customer_LEDgc573.txt

[System32.CopyBins]
customer_AVXGC573.bin

;
;*** initialisation and registry entries
;

[AVXGC573Cap.nt]
Include=ks.inf, kscaptur.inf, wdmaudio.inf, bda.inf
Needs=KS.Registration,KSCAPTUR.Registration.NT,wdmaudio.Registration.NT,BDA.Registration.NT,bda.Installation.NT,bdacap.Installation.NT
CopyFiles=AVXGC573Cap.CopyFiles,System32.CopyBins
AddReg=AVXGC573Cap.AddReg

[AVXGC573Cap.nt.HW]
AddReg	     = AVXGC573Cap.HW.AddReg

[AVXGC573Cap.nt.Services]
AddService=AVXGC573Cap, 0x00000002, AVXGC573Cap.ServiceInstall

[AVXGC573Cap.ServiceInstall]
DisplayName=%DISPLAY_NAME%
Description=%SERVICE_DESCRIPTION%
ServiceType=%SERVICE_KERNEL_DRIVER%
StartType=%SERVICE_DEMAND_START%
ErrorControl=%SERVICE_ERROR_NORMAL%
ServiceBinary=%12%\AVXGC573_x64.sys
; [StartName=driver-object-name]
; [AddReg=add-registry-section[, add-registry-section] ...]
; [DelReg=del-registry-section[, del-registry-section] ...]
; [BitReg=bit-registry-section[,bit-registry-section] ...]
; [LoadOrderGroup=load-order-group-name]
; [Dependencies=depend-on-item-name[,depend-on-item-name]...]

[AVXGC573Cap.HW.AddReg]
; enable MSISupported
HKR,Interrupt Management,,0x00000010
HKR,Interrupt Management\MessageSignaledInterruptProperties,,0x00000010
HKR,Interrupt Management\MessageSignaledInterruptProperties,MSISupported,0x00010001,1
HKR,Interrupt Management\MessageSignaledInterruptProperties,MessageNumberLimit,0x00010001,1

[AVXGC573Cap.AddReg]
HKR,,DevLoader,,*NTKERN
HKR,,NTMPDriver,,AVXGC573_x64.sys

; audio capture registry entries

HKR,,AssociatedFilters,,"wdmaud,swmidi,redbook"
HKR,,Driver,,AVXGC573_x64.sys
HKR,Drivers,SubClasses,,"wave,mixer"
HKR,Drivers\wave\wdmaud.drv, Driver,,wdmaud.drv
HKR,Drivers\mixer\wdmaud.drv, Driver,,wdmaud.drv
HKR,Drivers\wave\wdmaud.drv,Description,,"AVerMedia audio capture device"
HKR,Drivers\mixer\wdmaud.drv,Description,,"AVerMedia audio capture device"

; add audio input and output pinnames

HKLM,SYSTEM\CurrentControlSet\Control\MediaCategories\%AVER_ANLG_AUDIO_IN_PIN%,"Name",,"Analog Audioinput"
HKLM,SYSTEM\CurrentControlSet\Control\MediaCategories\%AVER_ANLG_AUDIO_OUT_PIN%,"Name",,"Audio"
HKLM,SYSTEM\CurrentControlSet\Control\MediaCategories\%AVER_ANLG_AUDIO_MIXER_OUT_PIN%,"Name",,"Audio Mixer"
HKLM,SYSTEM\CurrentControlSet\Control\MediaCategories\%AVER_ANLG_AUDIO_CAP_IN_PIN1%,"Name",,%AVXGC573Cap.AnlgAudioCapName1%
HKLM,SYSTEM\CurrentControlSet\Control\MediaCategories\%AVER_ANLG_AUDIO_CAP_IN_PIN2%,"Name",,%AVXGC573Cap.AnlgAudioCapName2%
HKLM,SYSTEM\CurrentControlSet\Control\MediaCategories\%AVER_ANLG_AUDIO_CAP_OUT_PIN%,"Name",,"AVerAudio Capture"

; Driver behaveior
HKR, "Software\Default", "Analog Stream Support",              0x00010001, 1
HKR, "Software\Default", "Analog VideoPinType1",               0x00010001, 5
HKR, "Software\Default", "Analog Xbar1",                       0x00010001, 0
HKR, "Software\Default", "AVIDecompressor1",                   0x00010001, 0
HKR, "Software\Default", "Install Driver",                     0x00010001, 1

; LED Command behaveior
HKR, "Software\Default", "LedDriverLoad1",                      0x00010001, 0x13
HKR, "Software\Default", "LedStreaming1",                       0x00010001, 0x13

;Audio path setting
HKR, "Software\Default\AudioOutput1", "CustomChannels",        0x00010001, 2
HKR, "Software\Default\AudioOutput1", "CustomBitsPerSample",   0x00010001, 24
HKR, "Software\Default\AudioOutput1", "CustomSampleFrequncy",  0x00010001, 48000

HKR, "Software\Default\AudioOutput1", "CustomMapping",  	   0x00010001, 0


;----------------------------------------------------------------------------
;                 Add the Property Pages
;----------------------------------------------------------------------------

[AVXGC573Cap.nt.Interfaces]
AddInterface=%KSCATEGORY_CAPTURE%,%AVER_ANLG_CAP_FILTER1%,AVXGC573Cap.AnlgCap1,0
AddInterface=%KSCATEGORY_VIDEO%,%AVER_ANLG_CAP_FILTER1%,AVXGC573Cap.AnlgCap1,0

AddInterface=%KSCATEGORY_AUDIO%,%AVER_ANLG_AUDIO_CAP_FILTER1%,AVXGC573Cap.AnlgACapture1,0
AddInterface=%KSCATEGORY_AUDIO%,%AVER_ANLG_AUDIO_CAP_FILTER2%,AVXGC573Cap.AnlgACapture2,0

AddInterface=%KSCATEGORY_CROSSBAR%,%AVER_ANLG_XBAR_FILTER1%,AVXGC573Cap.AnlgXBar1,0



[AVXGC573Cap.AnlgCap1]
AddReg=AVXGC573Cap.AnlgCap1.AddReg

[AVXGC573Cap.AnlgCap1.AddReg]
HKR,,CLSID,,%KSProxy.CLSID%
HKR,,FriendlyName,,%AVXGC573Cap.AnlgCaptureName1%

[AVXGC573Cap.AnlgACapture1]
AddReg=AVXGC573Cap.AnlgACapture1.AddReg

[AVXGC573Cap.AnlgACapture1.AddReg]
HKR,,CLSID,,%KSProxy.CLSID%
HKR,,FriendlyName,,%AVXGC573Cap.AnlgAudioCapName1%
HKR,"EP\\0",%PKEY_AudioEndpoint_Association%,,%AVER_ANLG_AUDIO_CAP_IN_PIN1%
HKR,"EP\\0",%PKEY_AudioDevice_NeverSetAsDefaultEndpoint%,0x00010001,0x00000305
HKR,"EP\\0",%PKEY_AudioEngine_OEMFormat%,0x00000001, 41,00,00,00,28,00,00,00,FE,FF,02,00,80,BB,00,00,00,EE,02,00,04,00,10,00,16,00,10,00,03,00,00,00,01,00,00,00,00,00,10,00,80,00,00,AA,00,38,9B,71
HKR,"EP\\0",%PKEY_AudioEndpoint_ControlPanelProvider%,,%AUDIOENDPOINT_EXT_UI_CLSID%

[AVXGC573Cap.AnlgACapture2]
AddReg=AVXGC573Cap.AnlgACapture2.AddReg

[AVXGC573Cap.AnlgACapture2.AddReg]
HKR,,CLSID,,%KSProxy.CLSID%
HKR,,FriendlyName,,%AVXGC573Cap.AnlgAudioCapName2%
HKR,"EP\\0",%PKEY_AudioEndpoint_Association%,,%AVER_ANLG_AUDIO_CAP_IN_PIN2%
HKR,"EP\\0",%PKEY_AudioDevice_NeverSetAsDefaultEndpoint%,0x00010001,0x00000305
HKR,"EP\\0",%PKEY_AudioEngine_OEMFormat%,0x00000001, 41,00,00,00,28,00,00,00,FE,FF,02,00,80,BB,00,00,00,EE,02,00,04,00,10,00,16,00,10,00,03,00,00,00,01,00,00,00,00,00,10,00,80,00,00,AA,00,38,9B,71
HKR,"EP\\0",%PKEY_AudioEndpoint_ControlPanelProvider%,,%AUDIOENDPOINT_EXT_UI_CLSID%


[AVXGC573Cap.AnlgXBar1]
AddReg=AVXGC573Cap.AnlgXBar1.AddReg

[AVXGC573Cap.AnlgXBar1.AddReg]
HKR,,CLSID,,%KSXBar.CLSID%
HKR,,FriendlyName,,%AVXGC573Cap.AnlgXBarName1%

;
;*** strings, GUIDs and names
;

[Strings]

; Proxy GUIDs

KSProxy.CLSID   = "{17CCA71B-ECD7-11D0-B908-00A0C9223196}"
KSXBar.CLSID    = "{71F96460-78F3-11d0-A18C-00A0C9118956}"
MediaSets       = "System\CurrentControlSet\Control\MediaSets"

; Category GUIDs

KSCATEGORY_CAPTURE                = "{65E8773D-8F56-11D0-A3B9-00A0C9223196}"
KSCATEGORY_VIDEO                  = "{6994AD05-93EF-11D0-A3CC-00A0C9223196}"
KSCATEGORY_AUDIO                  = "{6994AD04-93EF-11D0-A3CC-00A0C9223196}"
KSCATEGORY_CROSSBAR               = "{a799a801-a46d-11d0-a18c-00a02401dcd4}"
KSCATEGORY_BDA_RECEIVER_COMPONENT = "{FD0A5AF4-B41D-11d2-9C95-00C04F7971E0}"
KSCATEGORY_BDA_NETWORK_TUNER      = "{71985F48-1CA1-11d3-9CC8-00C04F7971E0}"

; Our Pin GUIDs

AVER_ANLG_AUDIO_IN_PIN  = "{09C97F71-FB6E-44C8-9831-CC2FADCAB2BC}"
AVER_ANLG_AUDIO_OUT_PIN = "{486EF378-4174-4802-9755-F203BADA7493}"
AVER_ANLG_AUDIO_MIXER_OUT_PIN = "{8F2AA3F0-7FCD-410E-90F5-95FBEA8F8E7D}"
AVER_ANLG_AUDIO_CAP_IN_PIN1  = "{AD670DFF-2B9D-4543-8A4E-C22635C4F87E}"
AVER_ANLG_AUDIO_CAP_IN_PIN2  = "{fc81058b-bcac-4d37-a711-df9a1ba9f280}"
AVER_ANLG_AUDIO_CAP_OUT_PIN = "{85DDCB05-9F3B-4A85-8505-4D4F7794B2F7}"

; Our Filter GUIDs

AVER_ANLG_CAP_FILTER1	  = "{ADEF4CB5-1401-4177-84EE-FE8B26C13A5B}"
AVER_ANLG_AUDIO_CAP_FILTER1 = "{74F144D4-1C4B-4A08-A6D3-9110AE9F3088}"
AVER_ANLG_AUDIO_CAP_FILTER2 = "{cc88502e-8771-49df-9ac9-fef940542fbc}"
AVER_ANLG_XBAR_FILTER1    = "{7F54145B-702E-4D62-84FC-86695AF71EF6}"


; Our Interface GUIDs

AUDIOENDPOINT_EXT_UI_CLSID	= "{6C57B2A2-91F5-4B90-93D5-FAB82485ECA6}"
PKEY_AudioEndpoint_ControlPanelProvider = "{1DA5D803-D492-4EDD-8C23-E0C0FFEE7F0E},1"
PKEY_AudioEndpoint_Association          = "{1DA5D803-D492-4EDD-8C23-E0C0FFEE7F0E},2"
PKEY_AudioEngine_OEMFormat              = "{E4870E26-3CC5-4CD2-BA46-CA0A9A70ED04},3"
PKEY_AudioDevice_NeverSetAsDefaultEndpoint = "{F3E80BEF-1723-4FF2-BCC4-7F83DC5E46D4},3"

; 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 

;Our strings

ProviderName="AVerMedia TECHNOLOGIES, Inc."
AVerMedia="AVerMedia TECHNOLOGIES, Inc."
AVXGC573Cap.DeviceDesc   = "AVerMedia Live Gamer 4K"
AVSTRM_INSTALLATION_DISK = "AVStrm installation disk"
DISPLAY_NAME             = "AVerMedia GC573 service"
SERVICE_DESCRIPTION      = "The AVerMedia capture driver"

;Our Friendly Names
AVXGC573Cap.AnlgCaptureName1 = "AVerMedia GC573 1 Capture"
AVXGC573Cap.AnlgAudioCapName1  = "AVerMedia HDMI Audio"
AVXGC573Cap.AnlgAudioCapName2  = "AVerMedia Line-In Audio"
AVXGC573Cap.AnlgXBarName1 = "AVerMedia GC573 1 Xbar"
