;==============================================================================
; TerraTec Cinergy 1400 DVB-T
; BDA Driver Install Script
; Copyright (c) 2005, TerraTec Electronic GmbH
;------------------------------------------------------------------------------
; History:
;------------------------------------------------------------------------------
; 12-Apr-05 FMB 1st version
; 14-Apr-05 FMB Bugfix: Crossbar settings for Composite were wrong
; 25-Apr-05 FMB Commented prototype SSIDs out 
; 12-May-05 FMB New version 5.0.11.0 for WHQL
;------------------------------------------------------------------------------

[Version]
Signature  ="$CHICAGO$"
Class      =Media
ClassGUID  ={4d36e96c-e325-11ce-bfc1-08002be10318}
Provider   =%TerraTec%
DriverVer  =05/12/2005,5.0.11.0
CatalogFile=Cin1400DVBT.cat

[Manufacturer]
%TerraTec%=TerraTec

[TerraTec]																								
; 8800 - video 8811 - audio, 8802 - TS, 8804 - IR

;-------------------------------------------------------------------
; Cinergy 1400 DVB-T
;-------------------------------------------------------------------
%Cin1400DVBT_Cap%  =Cin1400DVBT_Cap,  PCI\VEN_14F1&DEV_8800&SUBSYS_1166153B
%Cin1400DVBT_Null% =NullSection,      PCI\VEN_14F1&DEV_8811&SUBSYS_1166153B
%Cin1400DVBT_TS%   =NullSection,      PCI\VEN_14F1&DEV_8802&SUBSYS_1166153B
%Cin1400DVBT_Null% =NullSection,      PCI\VEN_14F1&DEV_8803&SUBSYS_1166153B
%Cin1400DVBT_Null% =NullSection,      PCI\VEN_14F1&DEV_8804&SUBSYS_1166153B

;-------------------------------------------------------------------
; Stratford2 - DVB-T using Gromit OFDM demod with Thomson Tuner and IR remote
;-------------------------------------------------------------------
;%Cin1400DVBT_Cap%  =Cin1400DVBT_Cap,  PCI\VEN_14F1&DEV_8800&SUBSYS_018714F1
;%Cin1400DVBT_Null% =NullSection,      PCI\VEN_14F1&DEV_8811&SUBSYS_018714F1
;%Cin1400DVBT_TS%   =NullSection,      PCI\VEN_14F1&DEV_8802&SUBSYS_018714F1
;%Cin1400DVBT_Null% =NullSection,      PCI\VEN_14F1&DEV_8803&SUBSYS_018714F1
;%Cin1400DVBT_Null% =NullSection,      PCI\VEN_14F1&DEV_8804&SUBSYS_018714F1


[SourceDisksNames]
1 = %DiskName%,,

[DestinationDirs]
CX880.CopyDrivers=10,system32\drivers

[SourceDisksFiles]
cxavsvid.sys=1

[CX880.CopyDrivers]
cxavsvid.sys

;=============================================================
; Dummy device
;=============================================================
[NullSection]
AddReg = NullSection.AddReg

[NullSection.AddReg]

[NullSection.Services]
AddService = , 2  ; null service install

;=============================================================
; Video capture device
;=============================================================

[Cin1400DVBT_Cap]
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=    CX880.AddReg,Cin1400DVBT.AddReg,Crossbar.AddReg,CXTS.AddReg
CopyFiles= CX880.CopyDrivers

;=============================================================
; Registry settings
;=============================================================
[CX880.AddReg]
HKR,,DevLoader,,*ntkern
HKR,,NTMPDriver,,cxavsvid.sys
HKR,,OkToHibernate,3,01

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

HKLM,%MediaCategories%\%AudioInPinID% ,Name,,%AudioInPinName%
HKLM,%MediaCategories%\%AudioOutPinID%,Name,,%AudioOutPinName%

;FMB TODO: check Wave device?
;Wave in audio device registration
;HKR,Drivers,SubClasses,,"wave"
;HKR,Drivers\wave\wdmaud.drv, Driver,,wdmaud.drv
;HKR,Drivers\wave\wdmaud.drv,Description,,%AudioFriendlyName%


;-------------------------------------------------------------------
; Crossbar AddReg sections
;-------------------------------------------------------------------
; Note: For each pin on the crossbar, specify the following:
; (1) Pin type 
;     0 - SVideo, 1 - Tuner, 2 - Composite, 3 - 656, 
;     4 - audio tuner in, 5 - audio line in
; (2) InputMux (optional) - input mux to use for the selected pin
; (3) RelatedPinIndex: -1 if none 
; (4) GPIOMask (optional) - Mask specifying which GPIO bits to set or clear
; (5) GPIOSettings (optional) - Settings for GPIO bits specified in the mask 
;-------------------------------------------------------------------

[Crossbar.AddReg]
;Pin 0 - Tuner In
HKR,"DriverData\XBarPin0","PinType"        ,0x00010001, 0x01,0x00,0x00,0x00
HKR,"DriverData\XBarPin0","InputMux"       ,0x00010001, 0x00,0x00,0x00,0x00
HKR,"DriverData\XBarPin0","RelatedPinIndex",0x00010001, 0x03,0x00,0x00,0x00

;Pin 1 - Composite in
HKR,"DriverData\XBarPin1","PinType"        ,0x00010001, 0x02,0x00,0x00,0x00
; FMB NOTE: The Cinergy 1400 DVB-T has a shared SVideo/Composite input 
HKR,"DriverData\XBarPin1","InputMux"       ,0x00010001, 0x02,0x00,0x00,0x00
HKR,"DriverData\XBarPin1","RelatedPinIndex",0x00010001, 0xFF,0xFF,0xFF,0xFF

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

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

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

;-------------------------------------------------------------
; Customization
;-------------------------------------------------------------
[Cin1400DVBT.AddReg]
HKR,"DriverData","VideoStandard"          ,0x00010001, 0x00,0x01,0x00,0x00
HKR,"DriverData","UseCompositeOnSVideo"   ,0x00010001, 0x01,0x00,0x00,0x00
HKR,"DriverData","ColorKillEnable"        ,0x00010001, 0x01,0x00,0x00,0x00

; prevent audio tracking thread from running, card doesn't support
; any audio.  Audio is in mpeg packets.  Setting to I2S audio.
HKR,"DriverData","WWAudioPrimaryStandard",0x00010001, 0x0B,0x00,0x00,0x00

; IR receiver: 0 - disabled, 1 - NEC, 2 - RC5
HKR,"DriverData","IRStandard"            ,0x00010001, 0x01,0x00,0x00,0x00

; Tuner config
HKR,"DriverData","TunerModel"            ,0x00010001, 0x02,0x00,0x00,0x00
HKR,"DriverData","UseFreqOffsetDVBT"     ,0x00010001, 0x00,0x00,0x00,0x00

; TS config
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

[CXTS.AddReg]
HKLM,%MediaCategories%\%TSPinID%,Name,,%TSPinName%
HKLM,%MediaCategories%\%TSPinID%,Display,1, 00,00,00,00

;-------------------------------------------------------------
; Interfaces
;-------------------------------------------------------------

[Cin1400DVBT_Cap.Interfaces]
AddInterface=%KSCATEGORY_CAPTURE%,    %Refguid_Video%   ,VideoCapture_Interface,
AddInterface=%KSCATEGORY_TVAUDIO%,    %Refguid_TvAudio% ,TvAudio_Interface,
AddInterface=%KSCATEGORY_CROSSBAR%,   %Refguid_Crossbar%,Crossbar_Interface,
AddInterface=%KSCATEGORY_BDATUNER%,   %Refguid_Tuner%,   BdaTuner_Interface
AddInterface=%KSCATEGORY_BDARECEIVER%,%Refguid_TS%,      TS_Interface,

[VideoCapture_Interface]
AddReg=VideoCapture_Interface.AddReg

[VideoCapture_Interface.AddReg]
HKR,,CLSID,,%PROXY_CAPTURE%
HKR,,FriendlyName,,%VIDFriendlyName%

[TvAudio_Interface]
AddReg=TvAudio_Interface.AddReg

[TvAudio_Interface.AddReg]
HKR,,CLSID,,%PROXY_TVAUDIO%
HKR,,FriendlyName,,%TVAudioFriendlyName%

[Crossbar_Interface]
AddReg=Crossbar_Interface.AddReg

[Crossbar_Interface.AddReg]
HKR,,CLSID,,%PROXY_CROSSBAR% 
HKR,,FriendlyName,,%CrossbarFriendlyName%

[BdaTuner_Interface]
AddReg = BdaTuner_Interface.AddReg

[BdaTuner_Interface.AddReg]
HKR,,CLSID,,%PROXY_CAPTURE%
HKR,,FriendlyName,,%BdaTunerFriendlyName%

[TS_Interface]
AddReg=TS_Interface.AddReg

[TS_Interface.AddReg]
HKR,,CLSID,,%PROXY_CAPTURE%
HKR,,FriendlyName,,%TSFriendlyName%


;-------------------------------------------------------------
; Services
;-------------------------------------------------------------

[Cin1400DVBT_Cap.Services]
AddService = CX88VID,2,Cin1400DVBT_Cap.ServiceInstall

[Cin1400DVBT_Cap.ServiceInstall]
DisplayName   = %Service_VideoCapture%
ServiceType   = %SERVICE_KERNEL_DRIVER%
StartType     = %SERVICE_DEMAND_START%
ErrorControl  = %SERVICE_ERROR_NORMAL%
ServiceBinary = %10%\system32\drivers\cxavsvid.sys


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

[Strings]

;---------------------------------------------------------------
; Non-Localizable (Windows)
;---------------------------------------------------------------
; Service loader
; Service - StartType
SERVICE_BOOT_START     = 0x0 
SERVICE_SYSTEM_START   = 0x1 
SERVICE_AUTO_START     = 0x2 
SERVICE_DEMAND_START   = 0x3 
SERVICE_DISABLED       = 0x4 

; Service - ServiceType
SERVICE_KERNEL_DRIVER  = 0x1 

; Service - Error control
SERVICE_ERROR_IGNORE   = 0x0 
SERVICE_ERROR_NORMAL   = 0x1 
SERVICE_ERROR_SEVERE   = 0x2
SERVICE_ERROR_CRITICAL = 0x3 


; Device manager classes
DEVCLASS_MEDIA     = "{4d36e96c-e325-11ce-bfc1-08002be10318}"
DEVCLASS_IMAGE     = "{6bdd1fc6-810f-11d0-bec7-08002be2092f}"

; Proxies                     
PROXY_CAPTURE      = "{17CCA71B-ECD7-11D0-B908-00A0C9223196}"
PROXY_CROSSBAR     = "{71F96460-78F3-11D0-A18C-00A0C9118956}"
PROXY_TVAUDIO      = "{71F96462-78F3-11D0-A18C-00A0C9118956}"
PROXY_TVTUNER      = "{266EEE40-6C63-11CF-8A03-00AA006ECB65}"

; WDM filter categories
KSCATEGORY_AUDIO   = "{6994AD04-93EF-11D0-A3CC-00A0C9223196}"
KSCATEGORY_VIDEO   = "{6994AD05-93EF-11D0-A3CC-00A0C9223196}"
KSCATEGORY_CAPTURE = "{65E8773D-8F56-11D0-A3B9-00A0C9223196}"
KSCATEGORY_CROSSBAR= "{a799a801-A46D-11D0-A18C-00a02401dcd4}"
KSCATEGORY_TVAUDIO = "{a799a802-A46D-11D0-A18C-00a02401dcd4}"
KSCATEGORY_TVTUNER = "{a799a800-A46D-11D0-A18C-00a02401dcd4}"
KSCATEGORY_VBICODEC= "{07dad660-22f1-11D1-a9f4-00c04fbbde8f}"

; BDA filter categories (defined in <ddk>\inc\wxp\bdamedia.h)
KSCATEGORY_BDARECEIVER = "{FD0A5AF4-B41D-11d2-9C95-00C04F7971E0}"
KSCATEGORY_BDATUNER    = "{71985F48-1CA1-11d3-9CC8-00C04F7971E0}"

MediaCategories    = "SYSTEM\CurrentControlSet\Control\MediaCategories"


;---------------------------------------------------------------
; Non-Localizable (this driver)
;---------------------------------------------------------------

Refguid_Video      = "{9B365890-165F-11D0-A195-0020AFD156E4}"
Refguid_TvAudio    = "{991182D5-71A2-4b5c-9817-F551FBBC8232}"
Refguid_Crossbar   = "{77F656DA-696D-407c-BA1C-50E4457C12E8}"
Refguid_TS         = "{5ea9c066-1dfe-41c5-a2de-bf766e83c98e}"
Refguid_Tuner      ="{91B0CC87-9905-4d65-A0D1-5861C6F22CBF}"

; Our pin names & GUIDs
AudioInPinID        = "{04394D28-52A7-4c46-AED0-65D62CC64DA6}"
AudioInPinName      = "Analog Audio In"

AudioOutPinID      = "{9DA02733-7910-40f2-95DD-0441676C9A9B}"
AudioOutPinName    = "Audio Out"

TSPinID            = "{5237C937-0A21-4f7e-B338-DE0D0793D03F}"
TSPinName          = "TS Out"


;---------------------------------------------------------------
; Localizable
;---------------------------------------------------------------

TerraTec            = "TerraTec "
DiskName            = "Cinergy Driver CD"

; Device manager names
Cin1400DVBT_Null    = "Cinergy 1400 DVB-T" 
Cin1400DVBT_Cap     = "Cinergy 1400 DVB-T Video Capture"
Cin1400DVBT_TS      = "Cinergy 1400 DVB-T TS"

; Service names
Service_VideoCapture= "Cinergy 1400 DVB-T Video Capture"

; Filter names
VIDFriendlyName     = "Cinergy 1400 DVB-T Video Capture"
TVAudioFriendlyName = "Cinergy 1400 DVB-T TvAudio"
CrossbarFriendlyName= "Cinergy 1400 DVB-T Crossbar"
BdaTunerFriendlyName= "Cinergy 1400 DVB-T Tuner"
TSFriendlyName      = "Cinergy 1400 DVB-T TS"
AudioFriendlyName   = "Cinergy 1400 DVB-T Audio Capture"

