[Version]
signature="$CHICAGO$"
Class=Media
ClassGUID={4d36e96c-e325-11ce-bfc1-08002be10318}
Provider="AVerMedia TECHNOLOGIES, Inc."
DriverVer=08/20/2009,1.7.64.100
CatalogFile.NTamd64=averhbtv.cat

[Manufacturer]
"AVerMedia TECHNOLOGIES, Inc."=AVerMedia,NTamd64

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

[SourceDisksFiles]
averhbtv.sys=1
MVDetect.ax=1
avtvrate.dll=1
uyvycnvt.ax=1
merlinB_new.rom=1
merlinc_new.rom=1
merlinc_old.rom=1

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

[HYBRID]
Include=    ks.inf, kscaptur.inf,ksfilter.inf, wdmaudio.inf, bda.inf
Needs=      KS.Registration, KSCAPTUR.Registration,MSPCLOCK.Installation, WDMAUDIO.Registration, BDA.Registration, bda.Installation
AddReg=     HYBRID.AddReg,HybridVID.AddReg,PhilipsDVBT.AddReg,AVerDVBT.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,MSPCLOCK.Installation, WDMAUDIO.Registration, BDA.Registration, bda.Installation.NT
AddReg=     HYBRID.AddReg,HybridVID.AddReg,PhilipsDVBT.AddReg,AVerDVBT.AddReg
CopyFiles=  AVerHybrid.CopyDrivers,DSFilters.CopyFiles
RegisterDlls=DSFilters.RegDLL    


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

[AVerHybrid.CopyDrivers]
averhbtv.sys
merlinB_new.rom
merlinc_new.rom
merlinc_old.rom

[DSFilters.CopyFiles]
MVDetect.ax
avtvrate.dll
uyvycnvt.ax

[DSFilters.RegDLL]
10,SysWOW64,MVDetect.ax,1
10,SysWOW64,avtvrate.dll,1
10,SysWOW64,uyvycnvt.ax,1

[HybridVID.AddReg]
HKR,,DevLoader,,*ntkern
HKR,,NTMPDriver,,averhbtv.sys
HKR,,OkToHibernate,3,01
; Disable driver page out
HKR,,PageOutWhenUnopened,3,0
;HKR,,PageOutWhenUnopened,3,01
HKR,,DontSuspendIfStreamsAreRunning,3,01
HKLM,%MediaCategories%\%HYBRID_GUID.PINNAME_ANALOG_AUDIO_IN%,Name,,%Pin.p2AnalogAudioIn%
HKLM,%MediaCategories%\%HYBRID_GUID.PINNAME_AUDIO_OUT%,Name,,%PinName.AnalogAudioOut%

HKLM,%MediaInterfaces%\{0A7AF963-6805-4f99-B284-29B680975542},,,"Copy Protect Notification Filter"
HKLM,%MediaInterfaces%\{0A7AF963-6805-4f99-B284-29B680975542},IID,1,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00

;Wave in audio device registration
HKR,Drivers,SubClasses,,"wave"
HKR,Drivers\wave\wdmaud.drv, Driver,,wdmaud.drv
HKR,Drivers\wave\wdmaud.drv,Description,,%HybridAudioFriendlyName%

;Copy protection method enforced by driver
;HKR,"DriverData","CpMethod",0x00010001, 0x03, 0x00, 0x00, 0x00
HKR,"DriverData","CpMethod",0x00010001, 0x04, 0x00, 0x00, 0x00
HKR,"DriverData","MVDetectEnable",0x00010001, 0x01, 0x00, 0x00, 0x00
HKR,"DriverData","CGMSADetectEnable",0x00010001, 0x00, 0x00, 0x00, 0x00

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

;---Tuner registry values------
;Tuner Type - Philips FMD1216ME
HKR,"DriverData","TunerType",0x00010001, 0x1A, 0x00, 0x00, 0x00
HKR,"DriverData","TunerI2CAddress",0x00010001, 0xC2, 0x00, 0x00, 0x00
HKR,"DriverData","Tuner2IFAddress",0x00010001, 0x86, 0x00, 0x00, 0x00
;For XC3018 FM input
HKR,"DriverData","FmInputPin",0x00010001, 0x01, 0x00, 0x00, 0x00
;For Country Code Default value
HKR,"DriverData","TunerCountryCode",0x00010001, 0x31, 0x00, 0x00, 0x00
HKR,"DriverData","LpFreqCount",0x00010001, 0x03, 0x00, 0x00, 0x00
HKR,"DriverData\LpFreqTab","0",0x00010001, 0x70, 0xAD, 0x52, 0x03
HKR,"DriverData\LpFreqTab","1",0x00010001, 0x20, 0x28, 0x9B, 0x03
HKR,"DriverData\LpFreqTab","2",0x00010001, 0x70, 0xBF, 0xCC, 0x03

;For TV standard detection
HKR,"DriverData","StandDetectEnable",0x00010001, 0x1, 0x00, 0x00, 0x00
;Copy Protection
HKR,"DriverData","CopyProtectionMCounter",0x00010001, 0x5, 0x00, 0x00, 0x00
;------------------------------

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

[HYBRID.AddReg]
HKR,"DriverData","BoardType",0x00010001, 0x01, 0x00, 0x00, 0x00
; Sony format = 1, Philips format = 0
HKR,"DriverData","I2SInputFormat",0x00010001, 0x00, 0x00, 0x00, 0x00
;HKR,"DriverData","EnableAFAudio",0x00010001, 0x01, 0x00, 0x00, 0x00
HKR,"DriverData","EnableAFAudio",0x00010001, 0x00, 0x00, 0x00, 0x00
HKR,"DriverData","GpioMaskFM",0x00010001, 0x01, 0x00, 0x00, 0x00
HKR,"DriverData","GpioSettingFM",0x00010001, 0x01, 0x00, 0x00, 0x00

;Gain has 7 levels in volume up and down directions. each level gives 6db gain or attenuation
;for attenuation we need to use 2's complement values. 
;for Gain we use levels 1-7, for attenuation we use levels 0x9(-7) - 0xF (-1)
HKR,"DriverData","FMAudioGain",0x00010001, 0x1, 0x00, 0x00, 0x00

;Power down parameter
HKR,"DriverData","DelayPowerDownSec",0x00010001, 0x14, 0x00, 0x00, 0x00

;AV sync
HKR,"DriverData","AVDataSyncEnable",0x00010001, 0x1, 0x00, 0x00, 0x00

;-------------------------------------------------------------------
; Crossbar AddReg sections
;
;---Crossbar registry values---
;
; Note: For each pin on the crossbar, specify the following:
; (1) Pin type
;     0 - SVIDEO
;     1 - Tuner
;     2 - Composite
;     3 - audio tuner in
;     4 - audio line in
; (2) InputMux (required for Falcon 2) - input mux to use for the selected pin
; (3) RelatedPinIndex
;-------------------------------------------------------------------


;---Crossbar registry values---
;Pin 0 - Tuner In
HKR,"DriverData\XBarPin0","PinType",0x00010001, 0x01,0x00,0x00,0x00
HKR,"DriverData\XBarPin0","InputMux",0x00010001, 0x02,0x05,0x00,0x00
HKR,"DriverData\XBarPin0","RelatedPinIndex",0x00010001, 0x03,0x00,0x00,0x00

;Pin 1 - Composite in
HKR,"DriverData\XBarPin1","PinType",0x00010001, 0x02,0x00,0x00,0x00
HKR,"DriverData\XBarPin1","InputMux",0x00010001, 0x01,0x00,0x00,0x00
HKR,"DriverData\XBarPin1","RelatedPinIndex",0x00010001, 0x04,0x00,0x00,0x00

;Pin 2 - S-Video in
HKR,"DriverData\XBarPin2","PinType",0x00010001, 0x00,0x00,0x00,0x00
HKR,"DriverData\XBarPin2","InputMux",0x00010001, 0x03,0x04,0x00,0x00
HKR,"DriverData\XBarPin2","RelatedPinIndex",0x00010001, 0x04,0x00,0x00,0x00

;Pin 3 - Tuner Audio
HKR,"DriverData\XBarPin3","PinType",0x00010001, 0x03,0x00,0x00,0x00
HKR,"DriverData\XBarPin3","RelatedPinIndex",0x00010001, 0x00,0x00,0x00,0x00

;Pin 4 - Audio Line in
HKR,"DriverData\XBarPin4","PinType",0x00010001, 0x04,0x00,0x00,0x00
HKR,"DriverData\XBarPin4","RelatedPinIndex",0x00010001, 0x01,0x00,0x00,0x00
HKR,"DriverData\XBarPin4","GpioMask",0x00010001, 0x01,0x00,0x00,0x00
HKR,"DriverData\XBarPin4","GpioSettings",0x00010001, 0x00,0x00,0x00,0x00

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


[AVerDVBT.AddReg]
HKLM,System\CurrentControlSet\Control\MediaCategories\%TSPinID%,Display,1, 00,00,00,00
HKLM,System\CurrentControlSet\Control\MediaCategories\%TSPinID%,Name,,%TSPinName%

[PhilipsDVBT.AddReg]
HKR,"DriverData","TunerModel",0x00010001, 0x06,0x00,0x00,0x00
HKR,"DriverData","UseFreqOffsetDVBT",0x00010001, 0x00, 0x00, 0x00, 0x00
HKR,"DriverData","DemodType",0x00010001, 0x02, 0x00, 0x00, 0x00
HKR,"DriverData","VideoStandard",0x00010001, 0x00,0x01,0x00,0x00
HKR,"DriverData","ColorKillEnable",0x00010001, 0x01,0x00,0x00,0x00
; Country code is Great Britain = 44
HKR,"DriverData","WWAudioCountryCode",0x00010001, 0x2C,0x00,0x00,0x00
HKR,"DriverData","BlackbirdType",0x00010001, 0x04,0x00,0x00,0x00
; TS filter parameters
HKR,"DriverData","dwTS_GEN_CNTRL",0x00010001,     0x04,0x00,0x00,0x00
HKR,"DriverData","dwIsTSStream",0x00010001,       0x00,0x00,0x00,0x00
HKR,"DriverData","dwTP_PACKET_SIZE",0x00010001,   0xBC,0x00,0x00,0x00
;
; Interfaces installation
;

;
; Video
;

[HYBRID.Interfaces]
AddInterface={65e8773d-8f56-11d0-a3b9-00a0c9223196},%KsNameFilter%,VID_HybridInterface,
AddInterface={a799a802-a46d-11d0-a18c-00a02401dcd4},%HybridTVAudioReferenceGuid%,TvAudio_HybridInterface,
AddInterface={a799a801-a46d-11d0-a18c-00a02401dcd4},%HybridXBARReferenceGUID%,AVerXBAR_HybridInterface,
AddInterface={a799a800-a46d-11d0-a18c-00a02401dcd4},%HybridTunerReferenceGuid%,AVerTUNE_HybridInterface,
AddInterface=%KSCATEGORY_AUDIO%,%HybridAudioReferenceGuid%,AUD_HybridInterface
;BDA Tuner
AddInterface=%KSCATEGORY_BDATUNER%,%KSSTRING_BdaHybridSWTunerFilter%,AVerBDATUNE_Interface,
;PhilipsDVBT.Interfaces
AddInterface={FD0A5AF4-B41D-11d2-9C95-00C04F7971E0},%KsTSNameFilter%,TS_Interface

[HYBRID.NT.Interfaces]
AddInterface={65e8773d-8f56-11d0-a3b9-00a0c9223196},%KsNameFilter%,VID_HybridInterface,
AddInterface={a799a802-a46d-11d0-a18c-00a02401dcd4},%HybridTVAudioReferenceGuid%,TvAudio_HybridInterface,
AddInterface={a799a801-a46d-11d0-a18c-00a02401dcd4},%HybridXBARReferenceGUID%,AVerXBAR_HybridInterface,
AddInterface={a799a800-a46d-11d0-a18c-00a02401dcd4},%HybridTunerReferenceGuid%,AVerTUNE_HybridInterface,
AddInterface=%KSCATEGORY_AUDIO%,%HybridAudioReferenceGuid%,AUD_HybridInterface,
;BDA Tuner
AddInterface =%KSCATEGORY_BDATUNER%,%KSSTRING_BdaHybridSWTunerFilter%,AVerBDATUNE_Interface,
;PhilipsDVBT.Interfaces
AddInterface={FD0A5AF4-B41D-11d2-9C95-00C04F7971E0},%KsTSNameFilter%,TS_Interface


[AVerBDATUNE_Interface]
AddReg = AVerBDATUNE_Interface.AddReg

[AVerBDATUNE_Interface.AddReg]
HKR,,CLSID,,%Proxy.CLSID%
HKR,,FriendlyName,,%BdaTunerFriendlyName_PhilipsDVBT%
;add tunerInstanceID entry
HKR,,TunerInstanceID,0x00010001,10

[VID_HybridInterface]
AddReg=VID_HybridInterface.AddReg
AddReg=HYBRID_DESCRIPTION.AddReg

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

[HYBRID_DESCRIPTION.AddReg]
HKR,,Description,,%AVerHybrid.DeviceDesc%

[AUD_HybridInterface]
AddReg=AUD_HybridInterface.AddReg

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


[TvAudio_HybridInterface]
AddReg=TvAudio_HybridInterface.AddReg

[TvAudio_HybridInterface.AddReg]
HKR,,CLSID,,%CLSID_TVAudioFilter%
HKR,,FriendlyName,,%HybridTVAudioFriendlyName%

[AVerXBAR_HybridInterface]
AddReg=AVerXBAR_HybridInterface.AddReg

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

[AVerTUNE_HybridInterface]
AddReg=AVerTUNE_HybridInterface.AddReg

[AVerTUNE_HybridInterface.AddReg]
HKR,,CLSID,,%CLSID_CTVTunerFilter%
HKR,,FriendlyName,,%HybridTunerFriendlyName%
;add tunerInstanceID entry
HKR,,TunerInstanceID,0x00010001,10

[TS_Interface]
AddReg=TS_Interface.AddReg

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


;
; Services installation
;

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

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


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

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

[Strings]

;
; Device Names
;
AVerHybrid.DeviceDesc                = "AVerTV Hybrid+FM Volar (A828)"
AVerHybrid.ServiceName                = "AVerMedia Hybrid Tuner (NTSC/PAL/SECAM/DVB-T/FM)"
;
; Friendly Names
;
HybridVIDFriendlyName              = "AVerMedia Hybrid TV Video Capture"
HybridTVAudioFriendlyName          = "AVerMedia Hybrid TV Audio"
HybridTunerFriendlyName            = "AVerMedia Hybrid TV Tuner"
HybridAudioFriendlyName            = "AVerMedia Hybrid TV Audio Capture"
HybridXBARFriendlyName             = "AVerMedia Hybrid TV Crossbar"
BdaTunerFriendlyName_PhilipsDVBT  = "AVerMedia Hybrid TV BDA Tuner (XC3018)"
;
; Reference GUIDS
;
KsNameFilter                      = "{9B365890-165F-11D0-A195-0020AFD156E4}"
HybridTVAudioReferenceGuid         = "{D8D86791-A570-4a10-8457-08C957E90ECD}"
HybridXBARReferenceGUID            = "{47B00748-34A2-4000-A892-BA2ABF2E2BE4}"
HybridTunerReferenceGuid           = "{F7CCD5C2-8766-4401-BF9D-ECF5FE0A07C0}"
HybridAudioReferenceGuid           = "{5EAF914D-2212-4034-8C4C-02CAFD15D68A}"
;
; Pin Name GUIDS
;
HYBRID_GUID.PINNAME_ANALOG_AUDIO_IN = "{3E2D189F-B15C-4447-96F1-BD1D64FB99BA}"
HYBRID_GUID.PINNAME_AUDIO_OUT       = "{9DA02733-7910-40f2-95DD-0441676C9A9B}"

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

;
; Other Strings
;

KSCATEGORY_AUDIO             = "{6994AD04-93EF-11D0-A3CC-00A0C9223196}"
CLSID_TVAudioFilter          = "{71F96462-78F3-11d0-A18C-00A0C9118956}"
CLSID_CrossbarFilter         = "{71F96460-78F3-11d0-A18C-00A0C9118956}"
CLSID_CTVTunerFilter         = "{266EEE40-6C63-11cf-8A03-00AA006ECB65}"

GUID.Encoder                 = "{19689BF6-C384-48fd-AD51-90E58C79F70B}"
GUID.Multiplexer             = "{7A5DE1D3-01A1-452c-B481-4FA2B96271E8}"

Category_Encoders            = "WDM Streaming Encoder Devices"
Category_Multiplexers        = "WDM Streaming Multiplexer Devices"
Node.Encoder                 = "Encoder"
Node.Multiplexer             = "Multiplexer"

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

ActiveMovieCategories        = "CLSID\{da4e3da0-d07d-11d0-bd50-00a0c911ce86}\Instance"
MediaCategories              = "SYSTEM\CurrentControlSet\Control\MediaCategories"
MediaSets                    = "System\CurrentControlSet\Control\MediaSets"
MediaInterfaces              = "System\CurrentControlSet\Control\MediaInterfaces"


; Specify the GUID for the BDA Source Filters category in GraphEdit.
;
KSCATEGORY_BDATUNER="{71985F48-1CA1-11d3-9CC8-00C04F7971E0}"

; Specify the GUID for the digital tuner Filter.
;
; NOTE!  This must match the reference guid specified in the driver's filter
;        descriptor.
;
KSSTRING_BdaHybridSWTunerFilter="{972B7BB1-8149-4a72-B891-83E3C7DFE596}"
;
; Specify the GUID for the tuner device's SW PnP ID
;
BdaSWTuner.DeviceId =   "{828B00F0-9A04-4692-8573-535B05DFF3F4}"

TSPinID             =   "{5237C937-0A21-4f7e-B338-DE0D0793D03F}"
TSPinName           =   "TS Out"
TSFriendlyName      = 	"AVerMedia Hybrid TV BDA TS Capture"
KsTSNameFilter      =   "{452660BD-3B39-4e34-9B97-3D3BC054AF5D}"
