;==============================================================================
; Elgato Video Capture
; Driver Install Script (64 bit)
; Copyright (c) 2008, Elgato Systems GmbH
;------------------------------------------------------------------------------        
; History:
;------------------------------------------------------------------------------
; 11-Nov-08 FMB 1st version 5.07.0622.00
;------------------------------------------------------------------------------
; Notes:
;------------------------------------------------------------------------------
;
;==============================================================================

[Version]
signature   = "$CHICAGO$"
Class       = Media
ClassGUID   = {4d36e96c-e325-11ce-bfc1-08002be10318}
Provider    = %Provider% 
DriverVer   = 08/02/2009, 5.7.0622.0
CatalogFile = Elgato_Video_Capture.cat

[ControlFlags]
ExcludeFromSelect = *

[SourceDisksNames]
1 = %DiskName%,emBDA64.sys,,

[SourceDisksFiles]
emPRP.ax    = 1
emPRP64.ax  = 1
emOEM64.sys   = 1
emBDA64.sys   = 1
emMON.exe   = 1
merlinFW.rom = 1

[DestinationDirs]
DefaultDestDir = 11
EyeTV.CopyDLL    = 10,syswow64
EyeTv.CopyDLL64  = 10,system32
EyeTV.CopySYS    = 10,system32\drivers
UTL.CopyList   = 10

[Manufacturer]
%Provider% = Elgato, NTamd64

[Elgato.NTamd64]
%EyeTV.DeviceDesc% = EyeTV,USB\VID_0FD9&PID_0033


[EyeTV.NTamd64]
Include       = ks.inf, kscaptur.inf, ksfilter.inf, bda.inf, wdmaudio.inf
Needs         = KS.Registration, KSCAPTUR.Registration.NT, BDA.Installation.NT, WDMAUDIO.Registration
DelReg	      = OEM.DelReg, UTL.DelReg
AddReg        = EyeTV.AddReg, OEM.AddReg, OEM.Defaults.AddReg, UTL.AddReg
CopyFiles     = EyeTV.CopySYS, EyeTV.CopyDLL, EyeTV.CopyDLL64, UTL.CopyList

[EyeTV.NTamd64.HW]
AddReg = InstFilter2862NT

[InstFilter2862NT]
HKR,,"LowerFilters",0x00010000,"USB28xxOEM"

[EyeTV.CopySYS]
emBDA64.sys
emOEM64.sys
merlinFW.rom

[EyeTV.CopyDLL]
emPRP.ax
[EyeTV.CopyDLL64]
emPRP64.ax


;===============================================================
;                R e g i s t r y
;===============================================================

[EyeTV.AddReg]
HKR,,HardwareConfig,1,1
HKR,,DevLoader,,*ntkern
HKR,,NTMPDriver,,emBDA64.sys

; IBDA2800CustomProp
HKCR,Wow6432Node\CLSID\{846A4C4E-76D8-42ec-A333-121F365A4DA8},,,%CustomPlugIn%
HKCR,Wow6432Node\CLSID\{846A4C4E-76D8-42ec-A333-121F365A4DA8}\InprocServer32,,,emPRP.ax
HKCR,Wow6432Node\CLSID\{846A4C4E-76D8-42ec-A333-121F365A4DA8}\InprocServer32,ThreadingModel,,Both
HKCR,CLSID\{846A4C4E-76D8-42ec-A333-121F365A4DA8},,,%CustomPlugIn%
HKCR,CLSID\{846A4C4E-76D8-42ec-A333-121F365A4DA8}\InprocServer32,,,emPRP64.ax
HKCR,CLSID\{846A4C4E-76D8-42ec-A333-121F365A4DA8}\InprocServer32,ThreadingModel,,Both
; This IID is aggregated for the filter given the CLSID of the property set
HKLM,System\CurrentControlSet\Control\MediaInterfaces\{846A4C4E-76D8-42ec-A333-121F365A4DA8},,,%CustomPlugIn%
HKLM,System\CurrentControlSet\Control\MediaInterfaces\{846A4C4E-76D8-42ec-A333-121F365A4DA8},IID,1,4e,4c,6A,84, d8,76, ec,42, 0xa3, 0x33, 0x12, 0x1f, 0x36, 0x5a, 0x4d, 0xa8

; Video Image Property Page
HKCR,Wow6432Node\CLSID\{7F229794-410B-4e67-B492-4C80C2843871},,,%CustomPropPage%
HKCR,Wow6432Node\CLSID\{7F229794-410B-4e67-B492-4C80C2843871}\InprocServer32,,,emPRP.ax
HKCR,Wow6432Node\CLSID\{7F229794-410B-4e67-B492-4C80C2843871}\InprocServer32,ThreadingModel,,Both
HKCR,CLSID\{7F229794-410B-4e67-B492-4C80C2843871},,,%CustomPropPage%
HKCR,CLSID\{7F229794-410B-4e67-B492-4C80C2843871}\InprocServer32,,,emPRP64.ax
HKCR,CLSID\{7F229794-410B-4e67-B492-4C80C2843871}\InprocServer32,ThreadingModel,,Both

; Associate property set with property page
HKLM,System\CurrentControlSet\Control\MediaSets\{846A4C4E-76D8-42ec-A333-121F365A4DA8}\PropertyPages\{7F229794-410B-4e67-B492-4C80C2843871},,,%CustomPropPage%

; Audio Pin Names
HKLM,SYSTEM\CurrentControlSet\Control\MediaCategories\%PINNAME_AUDIOIN%,Name,,%Pinname.AudioIN%
HKLM,SYSTEM\CurrentControlSet\Control\MediaCategories\%PINNAME_AUDIOOUT%,Name,,%Pinname.AudioOUT%



;---------------------  U T I L ---------------------------

[UTL.DelReg]
HKLM, %AUTORUN%, emMON

[UTL.AddReg]
;HKLM, %AUTORUN%, emMON,,"emMON.exe"

[UTL.CopyList]
emMON.exe


;-------------------------  O E M  ------------------------

[OEM.DelReg]
HKR,settings\OEMSettings

[OEM.AddReg]
; The sub-section below adds the driver configurations, regardless of
; EEPROM's presence. These configurations are not specified in EEPROM.
;
; =====  BEGIN  =====
;
HKR,settings\OEMSettings,Optimization,0x00010001,1      ; 1=ISO, 2=Bulk
HKR,settings\OEMSettings,FixUpOWC,0x00010001,12         ;
HKR,settings\OEMSettings,FixUpATI,0x00010001,0          ; 1=enabled for multiple root hubs
HKR,settings\OEMSettings,EnablePAL640x576,0x00010001,0  ; For 2820/2840
HKR,settings\OEMSettings,XceiveMTS,0x00010001,0         ; XC3028 Baseband Audio
;;;HKR,settings\OEMSettings,OemID,0x00010001,0          ;
;;;HKR,settings\OEMSettings,BufferCount,0x00010001,16   ; for CAP/VBI
;;;HKR,settings\OEMSettings,BufferCountTS,0x00010001,16 ; for TS
;;;HKR,settings\OEMSettings,BufferCountAudio,0x10001,16 ; for Audio
;;;HKR,settings\OEMSettings,StrictHeader,0x00010001,0   ;
;;;HKR,settings\OEMSettings,PowerControl,0x00010001,0   ;
;;;HKR,settings\OEMSettings,MaximumSS,0x00010001,32     ; Max Signal Strength

; Additional delay required before reading Freq Offset (ms).
;;;HKR,settings\OEMSettings,FreqOffsetDelay,0x00010001,0

; AC97 source balance adjustments - valid range 0..127
;;;HKR,settings\OEMSettings,AC97VolumeTV,0x00010001,64  ;
;;;HKR,settings\OEMSettings,AC97VolumeFM,0x00010001,64  ;
;;;HKR,settings\OEMSettings,AC97VolumeLN,0x00010001,64  ; Line IN

; Demod AGC Target
;;;HKR,settings\OEMSettings,AGCTarget6_352,0x00010001,40; 352, 6 MHz
;;;HKR,settings\OEMSettings,AGCTarget7_352,0x00010001,40; 352, 7 MHz
;;;HKR,settings\OEMSettings,AGCTarget8_352,0x00010001,40; 352, 8 MHz
;;;HKR,settings\OEMSettings,AGCTarget6_353,0x00010001,49; 353, 6 MHz
;;;HKR,settings\OEMSettings,AGCTarget7_353,0x00010001,49; 353, 7 MHz
;;;HKR,settings\OEMSettings,AGCTarget8_353,0x00010001,49; 353, 8 MHz

; VBI Parameters
;;;HKR,settings\OEMSettings,VBIMinStart,0x00010001,454
;;;HKR,settings\OEMSettings,VBIMaxStart,0x00010001,1000
;;;HKR,settings\OEMSettings,VBIActualStart,0x00010001,950
;;;HKR,settings\OEMSettings,VBIActualEnd,0x00010001,6373

; DAT Threshold
;;;HKR,settings\OEMSettings,DATThreshold352,0x00010001,60
;;;HKR,settings\OEMSettings,DATThreshold353,0x00010001,60

; QT1010 LNA & PCB Options
HKR,settings\OEMSettings,QT1010LNA,0x00010001,0         ; 1=enabled
HKR,settings\OEMSettings,QT1010V3,0x00010001,1          ; 0/1/2/3

; GPIO for AM DEMOD
HKR,settings\OEMSettings,AMDEMOD,0x00010001,2           ; 2=GPIO2, 6=GPIO6

; ATSC Default Mode
HKR,settings\OEMSettings,ATSCMode,0x00010001,0          ; 0=VSB8, 1=QAM64, 2=QAM256

; MCE
HKR,settings\OEMSettings,IsMCE,0x00010001,2             ; 1=MCE, 0=non-MCE,
                                                        ; 2=use EEPROM setting

;;;HKLM,SYSTEM\CurrentControlSet\Services\USB28xxBGA\Settings\OEM,MVBroadcast,0x00010001,0

; 2nd instance of anolog video
;;;HKR,settings\OEMSettings,MaxRawFormat,0x00010001,16  ;max bpp allowed
;;;HKR,settings\OEMSettings,EnableVBI2,0x00010001,1     ;default = EnableVBI1

; =====   END   =====


; The following configurations are only needed if EEPROM is not present.
;
; =====  BEGIN  =====
;
;        -----  Board Configurations   -----
HKR,settings\OEMSettings,Composite,0x00010001,1         ; Composite Input
HKR,settings\OEMSettings,SVideo,0x00010001,1            ; S-Video Input
HKR,settings\OEMSettings,SonyOnBoard,0x00010001,0       ; Sony Modules

;        -----  Driver Configurations  -----
HKR,settings\OEMSettings,StrictI2cAccess,0x00010001,0   ; 0=Normal, 1=Strict
HKR,settings\OEMSettings,VideoSwitchMode,0x00010001,1   ; 0=Freeze, 1=Blackout
HKR,settings\OEMSettings,EnableSquarePixel,0x00010001,1 ; 1=enabled
HKR,settings\OEMSettings,Enable704,0x00010001,0         ; 1=enabled
HKR,settings\OEMSettings,DSFineTune,0x00010001,1        ; 1=enabled
HKR,settings\OEMSettings,GPIObyAP,0x00010001,0          ;
HKR,settings\OEMSettings,TVTuneByAP,0x00010001,0        ;
HKR,settings\OEMSettings,PowerOffIfIdle,0x00010001,0    ;

;        ----- OEM Devices Accessed from Applications Directly  -----
HKR,settings\OEMSettings,Oem0I2C,0x00010001,0x60
HKR,settings\OEMSettings,Oem0Type,0x00010001,2
HKR,settings\OEMSettings,Oem1I2C,0x00010001,0x60
HKR,settings\OEMSettings,Oem1Type,0x00010001,2
HKR,settings\OEMSettings,Oem2I2C,0x00010001,0x60
HKR,settings\OEMSettings,Oem2Type,0x00010001,2
HKR,settings\OEMSettings,Oem3I2C,0x00010001,0x60
HKR,settings\OEMSettings,Oem3Type,0x00010001,2

;        ----- Tuner CFG & Overrides  -----
;;;HKR,settings\OEMSettings,TunerIDBase,0x00010001,0
;;;HKR,settings\OEMSettings,TunerID7,0x00010001,21      ;CFG7 = SAM9082

;       ----- USB/Ext Audio Mux for 2820/2840 Only  -----
;;;HKR,settings\OEMSettings,USBAudioMux,0x00010001,1
;;;HKR,settings\OEMSettings,ExtAudioMux,0x00010001,2

; =====   END   =====

;===============================================================
;                I n t e r f a c e s
;===============================================================

[EyeTV.NTamd64.Interfaces]
AddInterface = %KSCATEGORY_AUDIO%,  %WDMAudioFilter%,Audio2862.Interface
AddInterface = %KSCATEGORY_VIDEO%,  %WDMCapFilter%,  Capture2862.Interface
AddInterface = %KSCATEGORY_CAPTURE%,%WDMCapFilter%,  Capture2862.Interface
AddInterface = %KSCATEGORY_TVTUNER%,%WDMTunerFilter%,TVTuner2862.Interface
AddInterface = %KSCATEGORY_TVAUDIO%,%WDMTVAudFilter%,TVAudio2862.Interface
AddInterface = %KSCATEGORY_XBAR%,   %WDMXbarFilter%, Xbar2862.Interface


[Audio2862.Interface]
AddReg = Audio.2862.AddReg

[Capture2862.Interface]
AddReg = Capture.2862.AddReg

[TVTuner2862.Interface]
AddReg = TVTuner.2862.AddReg

[TVAudio2862.Interface]
AddReg = TVAudio.2862.AddReg

[Xbar2862.Interface]
AddReg = Xbar.2862.AddReg


[Audio.2862.AddReg]
HKR,,CLSID,,%ProxyVCap.CLSID%
HKR,,FriendlyName,,%Audio.2862.Name%

[Capture.2862.AddReg]
HKR,,CLSID,,%ProxyVCap.CLSID%
HKR,,FriendlyName,,%EyeTV.DeviceDesc%
HKLM,%Name.Key%,"DSName",0,%EyeTV.DeviceDesc%
HKLM,%Name.Key64%,"DSName",0,%EyeTV.DeviceDesc%


; IAMVideoCompression installed as static interface on both output pins
HKR,PinFactory\0\Interfaces\{C6E13343-30AC-11d0-A18C-00A0C9118956},,,{C6E13343-30AC-11d0-A18C-00A0C9118956}
HKR,PinFactory\1\Interfaces\{C6E13343-30AC-11d0-A18C-00A0C9118956},,,{C6E13343-30AC-11d0-A18C-00A0C9118956}

[TVTuner.2862.AddReg]
HKR,,CLSID,,%ProxyTVTuner.CLSID%
HKR,,FriendlyName,,%TVTuner.2862.Name%

[TVAudio.2862.AddReg]
HKR,,CLSID,,%ProxyTVAudio.CLSID%
HKR,,FriendlyName,,%TVAudio.2862.Name%

[Xbar.2862.AddReg]
HKR,,CLSID,,%ProxyXbar.CLSID%
HKR,,FriendlyName,,%Xbar.2862.Name%



;===============================================================
;                S e r v i c e s
;===============================================================
[EyeTv.NTamd64.Services]
AddService = USB28xxBGA,0x00000002,EyeTV.ServiceInstall
AddService = USB28xxOEM,0x00000000,OEMInstall2862

[EyeTV.ServiceInstall]
DisplayName   = %EyeTV.DeviceDesc%
ServiceType   = 1		;SERVICE_KERNEL_DRIVER
StartType     = 3		;SERVICE_DEMAND_START
ErrorControl  = 1		;SERVICE_ERROR_NORMAL
ServiceBinary = %12%\emBDA64.sys

[OEMInstall2862]
DisplayName   = %OEM.DeviceDesc%
ServiceType   = 1		;SERVICE_KERNEL_DRIVER
StartType     = 3		;SERVICE_DEMAND_START
ErrorControl  = 1		;SERVICE_ERROR_NORMAL
ServiceBinary = %12%\emOEM64.sys



; This section provides property defaults for the BDA driver.
;
; If EEPROM is on board, some of these property defaults are provided
; by EEPROM. The remaining perperty defaults are specified here.
;
; A property default is only meaningful if the corresponding property
; is not yet defined in the system registry.
;
[OEM.Defaults.AddReg]
HKR,settings\PropDefaults,Brightness,0x00010001,128     ;
HKR,settings\PropDefaults,Contrast,0x00010001,32        ;
HKR,settings\PropDefaults,Hue,0x00010001,64             ;
HKR,settings\PropDefaults,Saturation,0x00010001,32      ;
HKR,settings\PropDefaults,Sharpness,0x00010001,2        ;
HKR,settings\PropDefaults,Gamma,0x00010001,50           ;

HKR,settings\PropDefaults,Mirror,0x00010001,0           ; 0=OFF, 1=ON
HKR,settings\PropDefaults,Flip,0x00010001,0             ; 0=OFF, 1=ON
HKR,settings\PropDefaults,AutoExposure,0x00010001,1     ; 0=OFF, 1=ON
HKR,settings\PropDefaults,AEMode,0x00010001,1           ; 0=Dark, 1=Normal
HKR,settings\PropDefaults,AE_Level,0x00010001,3         ; Target AE (0-6)
HKR,settings\PropDefaults,Exposure,0x00010001,4         ;
HKR,settings\PropDefaults,LightTemperature,0x00010001,0 ;
HKR,settings\PropDefaults,LightFreq,0x00010001,0        ; 0=60Hz, 1=50Hz
HKR,settings\PropDefaults,AutoWhiteBalance,0x00010001,1 ; 0=OFF , 1=ON
HKR,settings\PropDefaults,AWB_R,0x00010001,32           ;
HKR,settings\PropDefaults,AWB_B,0x00010001,32           ;
HKR,settings\PropDefaults,WindowSize,0x00010001,0       ; 0=640x480, 1=320x240, 2=1280x960
HKR,settings\PropDefaults,MonitorType,0x00010001,0      ; 0=CRT,  1=LCD
HKR,settings\PropDefaults,Volume,0x00010001,0           ;

HKR,settings\PropDefaults,VideoStandard,0x00010001,16   ; 1=NTSC, 0x10=PAL_B, 0x40000=SECAM_L
HKR,settings\PropDefaults,Deinterlace,0x00010001,1      ; 1=Weave, 2=Bob
HKR,settings\PropDefaults,VCRMask,0x00010001,0          ; # of lines masked out
HKR,settings\PropDefaults,MaskColor,0x00010001,1        ; 0=Gray, 1=Black



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

[Strings]
;---------------
;Non-Localizable
;---------------
KSCATEGORY_AUDIO        = "{33D9A762-90C8-11D0-BD43-00A0C911CE86}"
KSCATEGORY_VIDEO        = "{6994AD05-93EF-11D0-A3CC-00A0C9223196}"
KSCATEGORY_CAPTURE      = "{65E8773D-8F56-11D0-A3B9-00A0C9223196}"
KSCATEGORY_TVTUNER      = "{a799a800-a46d-11d0-a18c-00a02401dcd4}"
KSCATEGORY_TVAUDIO      = "{a799a802-a46d-11d0-a18c-00a02401dcd4}"
KSCATEGORY_XBAR         = "{a799a801-a46d-11d0-a18c-00a02401dcd4}"
KSCATEGORY_BDA_RECEIVER = "{FD0A5AF4-B41D-11d2-9C95-00C04F7971E0}"
KSCATEGORY_BDA_TUNER    = "{71985F48-1CA1-11d3-9CC8-00C04F7971E0}"

ProxyVCap.CLSID         = "{17CCA71B-ECD7-11D0-B908-00A0C9223196}"
ProxyTVTuner.CLSID      = "{266EEE40-6C63-11cf-8A03-00AA006ECB65}"
ProxyTVAudio.CLSID      = "{71F96462-78F3-11d0-A18C-00A0C9118956}"
ProxyXbar.CLSID         = "{71F96460-78F3-11d0-A18C-00A0C9118956}"

WDMAudioFilter          = "{8DBF1283-572E-4b01-BFCC-14CFEB772501}"
WDMCapFilter            = "{54353D15-E717-4d94-B574-685CE1A209E9}"
WDMTunerFilter          = "{12AF27FC-0911-461f-B190-D31117E603D0}"
WDMTVAudFilter          = "{08D111EA-EE84-4ddc-99B5-8885C6C64FCB}"
WDMXbarFilter           = "{C2C9FB1B-795C-4b12-ADBE-D87C6A1D08FC}"
BDACapFilter            = "{BC102ACB-6095-451d-8ED6-16CF3C832EBC}"
BDATunerFilter          = "{7C8095AB-C110-40e5-9F4D-310858BBBF64}"

PINNAME_AUDIOIN         = "{78BA1331-8888-4246-BA66-232430A6A8B7}"
PINNAME_AUDIOOUT        = "{8E09372B-3FC8-47c9-B1D3-1DF12A7817FC}"

Name.Key                = "Software\Wow6432Node\USB2800\BDA"
Name.Key64              = "Software\USB2800\BDA"
CustomPlugIn            = "emPRP Custom Interface"
CustomPropPage          = "emPRP Custom Property Page"

AUTORUN                 = "Software\Microsoft\Windows\CurrentVersion\Run"

;---------------
;Localizable
;---------------
Provider           = "Elgato Systems"
DiskName          = "Elgato Video Capture Driver Disk"
OEM.DeviceDesc     = "USB 28xx OEM Filter"
Pinname.AudioIN    = "Analog Audio In"
Pinname.AudioOUT   = "Audio"



EyeTV.DeviceDesc = "Elgato Video Capture"
Audio.2862.Name    = "Elgato Video Capture Audio"
TVTuner.2862.Name  = "Elgato Video Capture TVTuner"
TVAudio.2862.Name  = "Elgato Video Capture TVAudio"
Xbar.2862.Name     = "Elgao Video Capture Crossbar"

