; Copyright (c) AVerMedia All rights reserved.
;
; Installation inf file for AVerMedia C038 USB Video Capture card series
;

[Version]
signature           ="$CHICAGO$"
Class               =Media
ClassGUID           ={4d36e96c-e325-11ce-bfc1-08002be10318}
Provider            =%ProviderName%
DriverVer           =07/01/2009,2.0.64.124
CatalogFile.NTamd64 =AVerFx2hbtv64.cat

[Manufacturer]
%ProviderName% = AVerMedia,NTamd64

[SourceDisksNames]
1="AVerMedia USB Hybrid Drivers",,,""

[SourceDisksFiles]
AVerFx2hbtv64.sys = 1
MVDetection64.ax  = 1

[AVerMedia.NTamd64]
%AVerHybrid.DeviceDesc%=HYBRID,  USB\VID_07ca&PID_c038

[HYBRID]
Include      = ks.inf, kscaptur.inf, ksfilter.inf, wdmaudio.inf, bda.inf
Needs        = KS.Registration, KSCAPTUR.Registration, WDMAUDIO.Registration, BDA.Registration, bda.Installation
AddReg       = HYBRID.AddReg, HybridVID.AddReg
CopyFiles    = AVerHybrid.CopyDrivers, DSFilters.CopyFiles
RegisterDlls = DSFilters.RegDLL    

[HYBRID.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       = HYBRID.AddReg, HybridVID.AddReg
CopyFiles    = AVerHybrid.CopyDrivers, DSFilters.CopyFiles
RegisterDlls = DSFilters.RegDLL    

[DestinationDirs]
AVerHybrid.CopyDrivers = 10,system32\drivers
DSFilters.CopyFiles    = 10,SysWOW64

[AVerHybrid.CopyDrivers]
AVerFx2hbtv64.sys

[DSFilters.CopyFiles]
MVDetection64.ax

[DSFilters.RegDLL]
10,SysWOW64,MVDetection64.ax,1

[HybridVID.AddReg]
HKR,,DevLoader,,*ntkern
HKR,,NTMPDriver,,AVerFx2hbtv64.sys

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

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


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, 1 - NTSC, 2 - PAL, 3 - SECAM
HKR,"DriverData","TBrightness_1",        0x00010001, 0x03, 0x00, 0x00, 0x00
HKR,"DriverData","TContrast_1",          0x00010001, 0xF9, 0xFF, 0xFF, 0xFF
HKR,"DriverData","THue_1",               0x00010001, 0x02, 0x00, 0x00, 0x00
HKR,"DriverData","TSaturation_1",        0x00010001, 0x10, 0x00, 0x00, 0x00
HKR,"DriverData","TSharpness_1",         0x00010001, 0x00, 0x00, 0x00, 0x00
HKR,"DriverData","CBrightness_1",        0x00010001, 0x00, 0x00, 0x00, 0x00
HKR,"DriverData","CContrast_1",          0x00010001, 0xF4, 0xFF, 0xFF, 0xFF
HKR,"DriverData","CHue_1",               0x00010001, 0x00, 0x00, 0x00, 0x00
HKR,"DriverData","CSaturation_1",        0x00010001, 0x13, 0x00, 0x00, 0x00
HKR,"DriverData","CSharpness_1",         0x00010001, 0x00, 0x00, 0x00, 0x00
HKR,"DriverData","SBrightness_1",        0x00010001, 0xFC, 0xFF, 0xFF, 0xFF
HKR,"DriverData","SContrast_1",          0x00010001, 0xEF, 0xFF, 0xFF, 0xFF
HKR,"DriverData","SHue_1",               0x00010001, 0x00, 0x00, 0x00, 0x00
HKR,"DriverData","SSaturation_1",        0x00010001, 0x14, 0x00, 0x00, 0x00
HKR,"DriverData","SSharpness_1",         0x00010001, 0x00, 0x00, 0x00, 0x00
HKR,"DriverData","TBrightness_2",        0x00010001, 0xFB, 0xFF, 0xFF, 0xFF
HKR,"DriverData","TContrast_2",          0x00010001, 0xF7, 0xFF, 0xFF, 0xFF
HKR,"DriverData","THue_2",               0x00010001, 0x00, 0x00, 0x00, 0x00
HKR,"DriverData","TSaturation_2",        0x00010001, 0x13, 0x00, 0x00, 0x00
HKR,"DriverData","TSharpness_2",         0x00010001, 0x00, 0x00, 0x00, 0x00
HKR,"DriverData","CBrightness_2",        0x00010001, 0xFB, 0xFF, 0xFF, 0xFF
HKR,"DriverData","CContrast_2",          0x00010001, 0xF7, 0xFF, 0xFF, 0xFF
HKR,"DriverData","CHue_2",               0x00010001, 0x18, 0x00, 0x00, 0x00
HKR,"DriverData","CSaturation_2",        0x00010001, 0x2D, 0x00, 0x00, 0x00
HKR,"DriverData","CSharpness_2",         0x00010001, 0x00, 0x00, 0x00, 0x00
HKR,"DriverData","SBrightness_2",        0x00010001, 0xFC, 0xFF, 0xFF, 0xFF
HKR,"DriverData","SContrast_2",          0x00010001, 0xFC, 0xFF, 0xFF, 0xFF
HKR,"DriverData","SHue_2",               0x00010001, 0x00, 0x00, 0x00, 0x00
HKR,"DriverData","SSaturation_2",        0x00010001, 0x16, 0x00, 0x00, 0x00
HKR,"DriverData","SSharpness_2",         0x00010001, 0x00, 0x00, 0x00, 0x00
HKR,"DriverData","TBrightness_3",        0x00010001, 0xFB, 0xFF, 0xFF, 0xFF
HKR,"DriverData","TContrast_3",          0x00010001, 0xF7, 0xFF, 0xFF, 0xFF
HKR,"DriverData","THue_3",               0x00010001, 0x00, 0x00, 0x00, 0x00
HKR,"DriverData","TSaturation_3",        0x00010001, 0x13, 0x00, 0x00, 0x00
HKR,"DriverData","TSharpness_3",         0x00010001, 0x00, 0x00, 0x00, 0x00
HKR,"DriverData","CBrightness_3",        0x00010001, 0xFB, 0xFF, 0xFF, 0xFF
HKR,"DriverData","CContrast_3",          0x00010001, 0xF7, 0xFF, 0xFF, 0xFF
HKR,"DriverData","CHue_3",               0x00010001, 0x18, 0x00, 0x00, 0x00
HKR,"DriverData","CSaturation_3",        0x00010001, 0x2D, 0x00, 0x00, 0x00
HKR,"DriverData","CSharpness_3",         0x00010001, 0x00, 0x00, 0x00, 0x00
HKR,"DriverData","SBrightness_3",        0x00010001, 0xFC, 0xFF, 0xFF, 0xFF
HKR,"DriverData","SContrast_3",          0x00010001, 0xFC, 0xFF, 0xFF, 0xFF
HKR,"DriverData","SHue_3",               0x00010001, 0x00, 0x00, 0x00, 0x00
HKR,"DriverData","SSaturation_3",        0x00010001, 0x16, 0x00, 0x00, 0x00
HKR,"DriverData","SSharpness_3",         0x00010001, 0x00, 0x00, 0x00, 0x00
HKR,"DriverData","TVol",                 0x00010001, 0x00, 0x00, 0x00, 0x00
HKR,"DriverData","FVol",                 0x00010001, 0x00, 0x00, 0x00, 0x00
HKR,"DriverData","LVol",                 0x00010001, 0xF9, 0xFF, 0xFF, 0xFF
;------------------------------

;define I2C bus 
HKR,"DriverData","GpioI2CEnable",        0x00010001, 0x01, 0x00, 0x00, 0x00
HKR,"DriverData","DecoderGpioI2c",       0x00010001, 0x00, 0x00, 0x00, 0x00

;IR1 - b0, IR2 - b1
HKR,"DriverData","IREnable",             0x00010001, 0x01, 0x00, 0x00, 0x00

[HYBRID.AddReg]
;For TV standard detection
HKR,"DriverData","StandardDetectEnable", 0x00010001, 0x00, 0x00, 0x00, 0x00
;For Sync
HKR,"DriverData","SyncEnable",           0x00010001, 0x01, 0x00, 0x00, 0x00

;Tuner input is the default
HKR,"DriverData","VideoInputPin",        0x00010001, 0x01, 0x00, 0x00, 0x00

;HKR,"DriverData","DelayPowerDownSec",    0x00010001, 0x1E, 0x00, 0x00, 0x00
HKR,"DriverData","DelayPowerDownSec",    0x00010001, 0x14, 0x00, 0x00, 0x00
HKR,"DriverData","SSEnable",             0x00010001, 0x00, 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

;
; Interfaces installation
;

;
; Video
;

[HYBRID.Interfaces]
AddInterface = {a799a801-a46d-11d0-a18c-00a02401dcd4}, {FEB5C989-C7BD-46e6-ACF8-927C245BD623}, AVer_XbarInterface,
AddInterface = {65e8773d-8f56-11d0-a3b9-00a0c9223196}, {9B365890-165F-11D0-A195-0020AFD156E4}, AVer_VideoCaptureInterface,

[HYBRID.NT.Interfaces]
AddInterface = {a799a801-a46d-11d0-a18c-00a02401dcd4}, {FEB5C989-C7BD-46e6-ACF8-927C245BD623}, AVer_XbarInterface,
AddInterface = {65e8773d-8f56-11d0-a3b9-00a0c9223196}, {9B365890-165F-11D0-A195-0020AFD156E4}, AVer_VideoCaptureInterface,

;
; Analog Interface
;


[AVer_XbarInterface]
AddReg=AVer_XbarInterface.AddReg

[AVer_XbarInterface.AddReg]
HKR,,CLSID,,%CLSID_CrossbarFilter%
HKR,,FriendlyName,,%HybridXBARFriendlyName%

[AVer_VideoCaptureInterface]
AddReg=AVer_VideoCaptureInterface.AddReg

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



;
; Services installation
;

[HYBRID.Services]
AddService = AVerFx2hbtv64,2,HybridVID.ServiceInstall

[HYBRID.NT.Services]
AddService = AVerFx2hbtv64,2,HybridVID.ServiceInstall


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

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

[Strings]

;
; Device Names
;
AVerHybrid.DeviceDesc                = "AVerMedia C038 USB Capture Card"
AVerHybrid.ServiceName               = "AVerMedia C038 USB Capture Card"
;
; Friendly Names
;
HybridVIDFriendlyName              = "AVerMedia C038 USB Capture Card"
HybridAudioFriendlyName            = "AVerMedia C038 USB Audio Capture"
HybridXBARFriendlyName             = "AVerMedia C038 USB Crossbar"



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

;
; Pin Names
;
PinName.AnalogAudioOut            = "Audio Out"
Pin.p2AnalogAudioIn               = "Audio In"

;
; 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."
