;
; Copyright (c) 2013
; This file installs BDA driver for the TechnoTrend TT-budget CT2-4500 CI
;

[Version]
signature="$CHICAGO$"
Class=Media
ClassGUID={4d36e96c-e325-11ce-bfc1-08002be10318}
Provider=%ProviderCompany%
DriverVer=02/20/2014,4.0.0.4
CatalogFile=ttBudget4500.cat

[Manufacturer]
%ProviderCompany%=TechnoTrend, NTx86, NTamd64

[SourceDisksNames]
1=%TechnoTrend.Cx23885.Drivers.Disk%,,,""

[SourceDisksFiles]
ttBudget4500.sys=1
ttBudget4500_64.sys=1

[TechnoTrend.NTamd64]
%CX23885.TT4500CI%   =CX23885.TT4500CI, 	PCI\VEN_14F1&DEV_8852&SUBSYS_301313C2   ;DVB-T/T2/C with CI

[TechnoTrend.NTx86]
%CX23885.TT4500CI%   =CX23885.TT4500CI, 	PCI\VEN_14F1&DEV_8852&SUBSYS_301313C2   ;DVB-T/T2/C with CI

[CX23885.TT4500CI.NTamd64]
Include=    ks.inf, kscaptur.inf, wdmaudio.inf, bda.inf
Needs=      KS.Registration.NT,KSCAPTUR.Registration.NT, WDMAUDIO.Registration, BDA.Registration,bda.Installation.NT
AddReg=     CX885.AddReg.NTamd64,CX885XBAR.AddReg,TT4500CI.AddReg,CXTS.AddReg
CopyFiles=  CX885.CopyDrivers.NTamd64

[CX23885.TT4500CI.NTx86]
Include=    ks.inf, kscaptur.inf, wdmaudio.inf, bda.inf
Needs=      KS.Registration.NT,KSCAPTUR.Registration.NT, WDMAUDIO.Registration, BDA.Registration,bda.Installation.NT
AddReg=     CX885.AddReg.NTx86,CX885XBAR.AddReg,TT4500CI.AddReg,CXTS.AddReg
CopyFiles=  CX885.CopyDrivers.NTx86

[DestinationDirs]
CX885.CopyDrivers.NTamd64=10,system32\drivers
CX885.CopyDrivers.NTx86=10,system32\drivers

[CX885.CopyDrivers.NTamd64]
ttBudget4500_64.sys

[CX885.CopyDrivers.NTx86]
ttBudget4500.sys

[CX885.AddReg.NTamd64]
HKR,,DevLoader,,*ntkern
HKR,,NTMPDriver,,ttBudget4500_64.sys
HKR,,OkToHibernate,3,01
; Disable driver page out
HKR,,PageOutWhenUnopened,3,0
;HKR,,PageOutWhenUnopened,3,01
HKR,,DontSuspendIfStreamsAreRunning,3,01
HKLM,%MediaCategories%\%GUID.PINNAME_ANALOG_AUDIO_IN%,Name,,%Pin.p2AnalogAudioIn%
HKLM,%MediaCategories%\%GUID.PINNAME_AUDIO_OUT%,Name,,%PinName.AnalogAudioOut%
;Copy protection method enforced by driver
HKR,"DriverData","CpMethod",0x00010001, 0xFE, 0x00, 0x00, 0x00

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,,%AudioFriendlyName%

; these registry keys for 3D comb filter enable
; use3DComb entry allows the use of the 3D Comb feature, currently connected to the color enable
; property of the capture filter
HKR,"DriverData","Use3DComb",0x00010001, 0x00,0x00,0x00,0x00

; this entry sets the initial state of the 3D comb enable when use3DComb is specified
HKR,"DriverData","Enable3DComb",0x00010001, 0x00,0x00,0x00,0x00
HKR,"DriverData","FriendlyName",, %BDATuneFriendlyName% 
HKR,"DriverData","MultiDevice",0x00010001, 0x01,0x00,0x00,0x00

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[CX885.AddReg.NTx86]
HKR,,DevLoader,,*ntkern
HKR,,NTMPDriver,,ttBudget4500.sys
HKR,,OkToHibernate,3,01
; Disable driver page out
HKR,,PageOutWhenUnopened,3,0
;HKR,,PageOutWhenUnopened,3,01
HKR,,DontSuspendIfStreamsAreRunning,3,01
HKLM,%MediaCategories%\%GUID.PINNAME_ANALOG_AUDIO_IN%,Name,,%Pin.p2AnalogAudioIn%
HKLM,%MediaCategories%\%GUID.PINNAME_AUDIO_OUT%,Name,,%PinName.AnalogAudioOut%
;Copy protection method enforced by driver
HKR,"DriverData","CpMethod",0x00010001, 0xFE, 0x00, 0x00, 0x00

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,,%AudioFriendlyName%

; these registry keys for 3D comb filter enable
; use3DComb entry allows the use of the 3D Comb feature, currently connected to the color enable
; property of the capture filter
HKR,"DriverData","Use3DComb",0x00010001, 0x00,0x00,0x00,0x00

; this entry sets the initial state of the 3D comb enable when use3DComb is specified
HKR,"DriverData","Enable3DComb",0x00010001, 0x00,0x00,0x00,0x00
HKR,"DriverData","FriendlyName",, %BDATuneFriendlyName% 
HKR,"DriverData","MultiDevice",0x00010001, 0x01,0x00,0x00,0x00

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[TT4500CI.AddReg]

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

;Enable TS capture and BDA filter registration
HKR,"DriverData","Enable_BDA",0x00010001, 0x01, 0x00, 0x00, 0x00
HKR,"DriverData","BDA_Demod_Tuner_type",0x00010001, 0x08, 0x00, 0x00, 0x00
HKR,"DriverData","DemodI2CAddress",0x00010001, 0x1E, 0x00, 0x00, 0x00
; this registry keys for the FixNMI option which takes care of the BSODs in the 
; ICH6/7 chipsets
HKR,"DriverData","FixNMIBit",0x00010001, 0x00,0x00,0x00,0x00
;IR Support
HKR,"DriverData","EnableIR",0x00010001, 0x01, 0x00, 0x00, 0x00
;NEC standard
HKR,"DriverData","IRStandard",0x00010001, 0x02, 0x00, 0x00, 0x00
; GPIO Pin values 
HKR,"DriverData","mode_select_gpio_bit", 0x00010001, 0xff, 0x00, 0x00, 0x00
HKR,"DriverData","tuner_reset_gpio_bit", 0x00010001, 0xff, 0x00, 0x00, 0x00
HKR,"DriverData","demod_reset_gpio_bit", 0x00010001, 0x02, 0x00, 0x00, 0x00
HKR,"DriverData","tuner_sif_fm_gpio_bit",0x00010001, 0xff, 0x00, 0x00, 0x00
HKR,"DriverData","comp_select_gpio_bit", 0x00010001, 0xff, 0x00, 0x00, 0x00
HKR,"DriverData","comp_select_panel",    0x00010001, 0xff, 0x00, 0x00, 0x00

;Demod Comm mode : 0x00 = Serial, 0x01 = Parallel
HKR,"DriverData","DemodTransferMode",0x00010001, 0x01, 0x00, 0x00, 0x00

HKR,"DriverData","TS1CLK",0x00010001, 0x00, 0x00, 0x00, 0x00
HKR,"DriverData","TSMODE",0x00010001, 0x02, 0x00, 0x00, 0x00

;BoardType Sonora353 = 0x03
HKR,"DriverData","BoardType",0x00010001, 0x24, 0x00, 0x00, 0x00
HKR,"DriverData","VideoStandard",0x00010001, 0x01,0x00,0x00,0x00

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;-------------------------------------------------------------------
; Crossbar AddReg sections
;
;---Crossbar registry values---
;
; Note: For each pin on the crossbar, specify the following:
; (1) Pin type 
;     0 - TunerIn
;     1 - Composite 1
;     2 - SVideo 1
;     3 - Component
;     4 - Composite 2
;     5 - SVideo 2
;     6 - Audio from Tuner
;     7 - Audio from Line In
;     8 - Audio from Line In 2
; (2) InputMux (optional) - input mux to use for the selected pin
;     in 0xAA, 0xBB, 0xCC, 0x00 format
;     where AA is the input mux for Composite/S-Video Luma/Component Luma
;           BB is the input mux for Tuner Audio/S-Video Chroma/Component YPr
;           CC is the input mux for Component YPb
; (3) InputChannel (optional, but required if InputMux present) - Input channel 
;     to use for mux in 0xAA, 0xBB, 0xCC, 0xDD format
;     where AA is the input channel for Composite/S-Video Luma/Component Luma
;           BB is the input channel for Tuner Audio/S-Video Chroma/Component YPr
;           CC is the input channel for Component YPb 
;           DD = 1 if dual ADC2 mode required, zero if single mode
; (4) RelatedPinIndex 

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

[CX885XBAR.AddReg]

;Pin  - Composite
HKR,"DriverData\XBarPin0","PinType",0x00010001, 0x01,0x00,0x00,0x00
HKR,"DriverData\XBarPin0","InputMux",0x00010001, 0x08,0x00,0x00,0x00
HKR,"DriverData\XBarPin0","InputChannel",0x00010001, 0x01,0x00,0x00,0x00
HKR,"DriverData\XBarPin0","RelatedPinIndex",0x00010001, 0x03,0x00,0x00,0x00

;Pin  - S-Video
HKR,"DriverData\XBarPin1","PinType",0x00010001, 0x02,0x00,0x00,0x00
HKR,"DriverData\XBarPin1","InputMux",0x00010001, 0x03,0x04,0x00,0x00
HKR,"DriverData\XBarPin1","InputChannel",0x00010001, 0x01,0x02,0x00,0x00
HKR,"DriverData\XBarPin1","RelatedPinIndex",0x00010001, 0x03,0x00,0x00,0x00

;Pin  - Component
HKR,"DriverData\XBarPin2","PinType",0x00010001, 0x03,0x00,0x00,0x00
HKR,"DriverData\XBarPin2","InputMux",0x00010001, 0x01,0x06,0x07,0x00
HKR,"DriverData\XBarPin2","InputChannel",0x00010001, 0x01,0x02,0x03,0x01
HKR,"DriverData\XBarPin2","RelatedPinIndex",0x00010001, 0x03,0x00,0x00,0x00

;Pin  - Audio Line In 1
HKR,"DriverData\XBarPin3","PinType",0x00010001, 0x07,0x00,0x00,0x00
HKR,"DriverData\XBarPin3","RelatedPinIndex",0x00010001, 0x00,0x00,0x00,0x00


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


;-------------------------------------------------------------------
; AddReg sections for TS filter
;-------------------------------------------------------------------
[CXTS.AddReg]
HKLM,%MediaCategories%\%TSPinID%,Display,1, 00,00,00,00
HKLM,%MediaCategories%\%TSPinID%,Name,,%TSPinName%

;
; Interfaces installation
;
[CX23885.TT4500CI.NTamd64.Interfaces]
AddInterface={71985F48-1CA1-11d3-9CC8-00C04F7971E0},%BDATuneReferenceGuid%,BDATUNE_Interface,
AddInterface={FD0A5AF4-B41D-11d2-9C95-00C04F7971E0},%TSReferenceGuid%,TS_Interface,

[CX23885.TT4500CI.NTx86.Interfaces]
AddInterface={71985F48-1CA1-11d3-9CC8-00C04F7971E0},%BDATuneReferenceGuid%,BDATUNE_Interface,
AddInterface={FD0A5AF4-B41D-11d2-9C95-00C04F7971E0},%TSReferenceGuid%,TS_Interface,

[BDATUNE_Interface]
AddReg=BDATUNE_Interface.AddReg

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

[TS_Interface]
AddReg=TS_Interface.AddReg

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


;
; Services installation
;
[CX23885.TT4500CI.NTamd64.Services]
AddService = ttBudget4500CI_64,2,VID.ServiceInstall.NTamd64

[VID.ServiceInstall.NTamd64]
DisplayName   = %SERVICE_DISPLAY_NAME%
Description   = %SERVICE_DESCRIPTION%
ServiceType   = 1
StartType     = 3
ErrorControl  = 1
ServiceBinary = %10%\system32\drivers\ttBudget4500_64.sys

[CX23885.TT4500CI.NTx86.Services]
AddService = ttBudget4500CI,2,VID.ServiceInstall.NTx86

[VID.ServiceInstall.NTx86]
DisplayName   = %SERVICE_DISPLAY_NAME%
Description   = %SERVICE_DESCRIPTION%
ServiceType   = 1
StartType     = 3
ErrorControl  = 1
ServiceBinary = %10%\system32\drivers\ttBudget4500.sys

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

[Strings]
TechnoTrend.Cx23885.Drivers.Disk="TT-budget CT2-4500 CI Drivers"
ProviderCompany		     = "CityCom GmbH"
SERVICE_DISPLAY_NAME         = "TT-budget CT2-4500 CI (BDA) Service"
SERVICE_DESCRIPTION	     = "TT-budget CT2-4500 CI (BDA) Driver"
Proxy.CLSID                  = "{17CCA71B-ECD7-11D0-B908-00A0C9223196}"
MediaCategories              = "SYSTEM\CurrentControlSet\Control\MediaCategories"
GUID.PINNAME_ANALOG_AUDIO_IN = "{04394D28-52A7-4c46-AED0-65D62CC64DA6}"
Pin.p2AnalogAudioIn          = "Analog Audio In"
GUID.PINNAME_AUDIO_OUT       = "{9DA02733-7910-40f2-95DD-0441676C9A9B}"
PinName.AnalogAudioOut       = "Audio Out"
TSPinID                      = "{5237C937-0A21-4f7e-B338-DE0D0793D03F}"
TSPinName                    = "TS Out"
BDATuneReferenceGuid         = "{E01E1072-3DF3-4c23-B99F-6A27A7CC7CD2}"
TSReferenceGuid              = "{5ea9c066-1dfe-41c5-a2de-bf766e83c98e}"
AudioFriendlyName            = "Conexant 23885 Audio Capture"
AudioReferenceGuid           = "{AB766B70-AFB3-4461-A4DE-22E9C516B7FE}"
MediaInterfaces              = "System\CurrentControlSet\Control\MediaInterfaces"
TSFriendlyName               = "AVStream TS Capture"
BDATuneFriendlyName          = "TT-budget CT2-4500 CI"
CX23885.TT4500CI             = "TT-budget CT2-4500 CI (BDA)"
