;==============================================================================
; TerraTec Cinergy 400 TV mobile (MK2)
; BDA Driver Install Script
; Copyright (c) 2005, TerraTec Electronic GmbH
;------------------------------------------------------------------------------
; History:
;------------------------------------------------------------------------------
; 16-Jun-05 FMB 1st version
; 13-Sep-05 Corrected product name to "Cinergy 400 TV mobile FM"
; 21-Oct-05 Reset product name to "Cinergy 400 TV mobile MKII"
            New version 1.3.2020.6915
;------------------------------------------------------------------------------

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

[Manufacturer]
%TerraTec%=TerraTec

[TerraTec]                                                                                              
; Cinergy 400 TV mobile
%Cinergy.DeviceDesc%=3xHybrid,PCI\VEN_1131&DEV_7133&SUBSYS_1165153B

;Monster TV
;%30Hybrid.DeviceDesc%=3xHybrid,PCI\VEN_1131&DEV_7130&SUBSYS_4ef31131
;%34Hybrid.DeviceDesc%=3xHybrid,PCI\VEN_1131&DEV_7134&SUBSYS_4ef31131
;******** the following Id is the same for 7133 and 7135
;%33Hybrid.DeviceDesc%=3xHybrid,PCI\VEN_1131&DEV_7133&SUBSYS_4ef31131

[DestinationDirs]
3xHybrid.CopyCoInst=11
3xHybrid.CopyFiles=10,system32\drivers ; be aware not to use 12 as the drivers directory, 
                                       ; as driver will not work anymore in W98
3xHybrid.Misc.CopyFiles=11             ; if this is changed here, driver has to be changed also

[SourceDisksNames]
1 = %DiskName%,,

[SourceDisksFiles]
34CoInstaller.dll=1
vm3xHybr.sys=1
vmTVRate.dll=1
77_1ram1c.iic=1,i2c
77_1ram2c.iic=1,i2c
nj4g77_1c.iic=1,i2c

[3xHybrid.CopyCoInst]
34CoInstaller.dll

[3xHybrid.CopyFiles]
vm3xHybr.sys

[3xHybrid.Misc.CopyFiles]
vmTVRate.dll
77_1ram1c.iic
77_1ram2c.iic
nj4g77_1c.iic

;
;*** initialization and registry entries
;

[3xHybrid.CoInstallers]
CopyFiles = 3xHybrid.CopyCoInst
AddReg = 3xHybrid.CoInstaller_AddReg

[3xHybrid.ntx86.CoInstallers]
CopyFiles = 3xHybrid.CopyCoInst
AddReg = 3xHybrid.CoInstaller_AddReg

[3xHybrid.CoInstaller_AddReg]
HKR,,CoInstallers32,0x00010000,"34CoInstaller.dll, CoInstallerEntry"

[3xHybrid]
AlsoInstall=KS.Registration(ks.inf), WDMAUDIO.Registration(wdmaudio.inf), KSCAPTUR.Registration(kscaptur.inf), BDA.Installation(bda.inf)
CopyFiles=3xHybrid.CopyFiles, 3xHybrid.Misc.CopyFiles
AddReg=3xHybrid.AddReg, 3xHybrid.Misc.AddReg
RegisterDlls=3xHybrid.Misc.RegisterDlls

[3xHybrid.ntx86]
Include=ks.inf, wdmaudio.inf, kscaptur.inf, bda.inf
Needs=KS.Registration.NT, WDMAUDIO.Registration.NT, KSCAPTUR.Registration.NT, BDA.Installation.NT
CopyFiles=3xHybrid.CopyFiles, 3xHybrid.Misc.CopyFiles
;##### FMB NOTE: Use the section [ForceHWConfig.AddReg] for boards w/o or with incorrect EEPROM settings
;AddReg=3xHybrid.AddReg, 3xHybrid.Misc.AddReg.ntx86, ForceHWConfig.AddReg
AddReg=3xHybrid.AddReg, 3xHybrid.Misc.AddReg.ntx86
RegisterDlls=3xHybrid.Misc.RegisterDlls

[3xHybrid.Services]
AddService=vm3xHybr, 0x00000002, 3xHybrid.ServiceInstall

[3xHybrid.ntx86.Services]
AddService=vm3xHybr, 0x00000002, 3xHybrid.ServiceInstall

[3xHybrid.ServiceInstall]
DisplayName  =%DISPLAY_NAME%
Description  =%SERVICE_DESCRIPTION%
ServiceType  =%SERVICE_KERNEL_DRIVER%
StartType    =%SERVICE_DEMAND_START%
ErrorControl =%SERVICE_ERROR_IGNORE%
ServiceBinary=%12%\vm3xHybr.sys
; [StartName=driver-object-name]
; [AddReg=add-registry-section[, add-registry-section] ...]
; [DelReg=del-registry-section[, del-registry-section] ...]
; [BitReg=bit-registry-section[,bit-registry-section] ...]
; [LoadOrderGroup=load-order-group-name]
; [Dependencies=depend-on-item-name[,depend-on-item-name]...]

[3xHybrid.AddReg]
HKR,,DevLoader,,*NTKERN
HKR,,NTMPDriver,,vm3xHybr.sys

;##### FMB NOTE: disable the audio driver section to avoid confusion with audio pin and device
;##### FMB NOTE: enable the audio driver section to let other applications handle audio
;-------------------------------------------------------------
; audio capture registry entries
;-------------------------------------------------------------
HKR,,AssociatedFilters,,"wdmaud,swmidi,redbook"
HKR,,Driver,,vm3xHybr.sys

HKR,Drivers,SubClasses,,"wave,mixer"

HKR,Drivers\wave\wdmaud.drv,Driver,,wdmaud.drv
HKR,Drivers\mixer\wdmaud.drv,Driver,,wdmaud.drv

HKR,Drivers\wave\wdmaud.drv,Description,,%Cinergy.Wave%
HKR,Drivers\mixer\wdmaud.drv,Description,,%Cinergy.Wave%

; Set prefix for DShow filter names
;##### FMB NOTE: For using the EEPROM and URD tools this line must be commented out
HKR,"Parameters", "Prefix",,%Cinergy.Prefix%

HKR,"Parameters","VM0001",0x00010001,1
HKR,"Parameters","VM0100",0x00010001,1
HKR,"Parameters","VM0110",0x00010001,400000
HKR,"Parameters","VM0200",0x00010001,1

;-------------------------------------------------------------
;>>> decoder defaults for tuner input
;-------------------------------------------------------------
HKR, "Decoder\SRC0", "Brightness",0x00010001,0x80
HKR, "Decoder\SRC0", "Contrast",0x00010001,0x44
HKR, "Decoder\SRC0", "Saturation",0x00010001,0x40
HKR, "Decoder\SRC0", "HUE",0x00010001,0x00
HKR, "Decoder\SRC0", "Sharpness",0x00010001,0x00
HKR, "Decoder\SRC0", "Source Type",0x00010001,0x02
HKR, "Decoder\SRC0", "Y-Filter",0x00010001,0x01
HKR, "Decoder\SRC0", "C-Filter",0x00010001,0x01
HKR, "Decoder\SRC0", "C-Bypass",0x00010001,0x00
HKR, "Decoder\SRC0", "White Peak Control",0x00010001,0x01
HKR, "Decoder\SRC0", "Gain Auto",0x00010001,0x01
HKR, "Decoder\SRC0", "Gain1",0x00010001,0x7F
HKR, "Decoder\SRC0", "Gain2",0x00010001,0x7F

;>>>  decoder defaults for composite 1 source
HKR, "Decoder\SRC1", "Brightness",0x00010001,0x80
HKR, "Decoder\SRC1", "Contrast",0x00010001,0x44
HKR, "Decoder\SRC1", "Saturation",0x00010001,0x40
HKR, "Decoder\SRC1", "HUE",0x00010001,0x00
HKR, "Decoder\SRC1", "Sharpness",0x00010001,0x00
HKR, "Decoder\SRC1", "Source Type",0x00010001,0x01
HKR, "Decoder\SRC1", "Y-Filter",0x00010001,0x01
HKR, "Decoder\SRC1", "C-Filter",0x00010001,0x01
HKR, "Decoder\SRC1", "C-Bypass",0x00010001,0x00
HKR, "Decoder\SRC1", "White Peak Control",0x00010001,0x01
HKR, "Decoder\SRC1", "Gain Auto",0x00010001,0x01
HKR, "Decoder\SRC1", "Gain1",0x00010001,0x7F
HKR, "Decoder\SRC1", "Gain2",0x00010001,0x7F

;>>>  decoder defaults for composite 2 source
HKR, "Decoder\SRC2", "Brightness",0x00010001,0x80
HKR, "Decoder\SRC2", "Contrast",0x00010001,0x44
HKR, "Decoder\SRC2", "Saturation",0x00010001,0x40
HKR, "Decoder\SRC2", "HUE",0x00010001,0x00
HKR, "Decoder\SRC2", "Sharpness",0x00010001,0x00
HKR, "Decoder\SRC2", "Source Type",0x00010001,0x02
HKR, "Decoder\SRC2", "Y-Filter",0x00010001,0x01
HKR, "Decoder\SRC2", "C-Filter",0x00010001,0x01
HKR, "Decoder\SRC2", "C-Bypass",0x00010001,0x00
HKR, "Decoder\SRC2", "White Peak Control",0x00010001,0x01
HKR, "Decoder\SRC2", "Gain Auto",0x00010001,0x01
HKR, "Decoder\SRC2", "Gain1",0x00010001,0x7F
HKR, "Decoder\SRC2", "Gain2",0x00010001,0x7F

;>>>  decoder defaults for SVHS 1 source
HKR, "Decoder\SRC3", "Brightness",0x00010001,0x80
HKR, "Decoder\SRC3", "Contrast",0x00010001,0x44
HKR, "Decoder\SRC3", "Saturation",0x00010001,0x40
HKR, "Decoder\SRC3", "HUE",0x00010001,0x00
HKR, "Decoder\SRC3", "Sharpness",0x00010001,0x00
HKR, "Decoder\SRC3", "Source Type",0x00010001,0x02
HKR, "Decoder\SRC3", "Y-Filter",0x00010001,0x00
HKR, "Decoder\SRC3", "C-Filter",0x00010001,0x01
HKR, "Decoder\SRC3", "C-Bypass",0x00010001,0x01
HKR, "Decoder\SRC3", "White Peak Control",0x00010001,0x01
HKR, "Decoder\SRC3", "Gain Auto",0x00010001,0x01
HKR, "Decoder\SRC3", "Gain1",0x00010001,0x7F
HKR, "Decoder\SRC3", "Gain2",0x00010001,0x7F

;>>>  decoder defaults for SVHS 2 source
HKR, "Decoder\SRC4", "Brightness",0x00010001,0x80
HKR, "Decoder\SRC4", "Contrast",0x00010001,0x44
HKR, "Decoder\SRC4", "Saturation",0x00010001,0x40
HKR, "Decoder\SRC4", "HUE",0x00010001,0x00
HKR, "Decoder\SRC4", "Sharpness",0x00010001,0x00
HKR, "Decoder\SRC4", "Source Type",0x00010001,0x02
HKR, "Decoder\SRC4", "Y-Filter",0x00010001,0x00
HKR, "Decoder\SRC4", "C-Filter",0x00010001,0x01
HKR, "Decoder\SRC4", "C-Bypass",0x00010001,0x01
HKR, "Decoder\SRC4", "White Peak Control",0x00010001,0x01
HKR, "Decoder\SRC4", "Gain Auto",0x00010001,0x01
HKR, "Decoder\SRC4", "Gain1",0x00010001,0x7F
HKR, "Decoder\SRC4", "Gain2",0x00010001,0x7F

;-------------------------------------------------------------
; Venice board settings
;-------------------------------------------------------------
HKR,"Venice","uCCountryCode",0x00010001,81
HKR,"Venice","Reg0",0x00010001,0x07
HKR,"Venice","Reg1",0x00010001,0x9E
HKR,"Venice","Reg2",0x00010001,0x00
HKR,"Venice","Reg3",0x00010001,0x02
HKR,"Venice","Reg4",0x00010001,0x00
HKR,"Venice","Reg5",0x00010001,0x00
HKR,"Venice","Reg6",0x00010001,0x28
HKR,"Venice","Reg7",0x00010001,0x23
HKR,"Venice","Reg8",0x00010001,0x26
HKR,"Venice","Reg9",0x00010001,0x0E
HKR,"Venice","Reg10",0x00010001,0x1C
HKR,"Venice","Reg11",0x00010001,0xE0
HKR,"Venice","Reg12",0x00010001,0x50
HKR,"Venice","Reg13",0x00010001,0x54
HKR,"Venice","Reg14",0x00010001,0x10
HKR,"Venice","Reg15",0x00010001,0x00
HKR,"Venice","Reg16",0x00010001,0x9D
HKR,"Venice","Reg17",0x00010001,0x9B
HKR,"Venice","Reg18",0x00010001,0xB9
HKR,"Venice","Reg19",0x00010001,0xF4
HKR,"Venice","Reg20",0x00010001,0x0D
HKR,"Venice","Reg21",0x00010001,0x78
HKR,"Venice","Reg22",0x00010001,0x19
HKR,"Venice","Reg23",0x00010001,0x0C
HKR,"Venice","Reg24",0x00010001,0x19
HKR,"Venice","Reg25",0x00010001,0x0C
HKR,"Venice","Reg26",0x00010001,0x24
HKR,"Venice","Reg27",0x00010001,0x1F
HKR,"Venice","Reg28",0x00010001,0x1F
HKR,"Venice","Reg29",0x00010001,0xDF
HKR,"Venice","Reg30",0x00010001,0xCA
HKR,"Venice","Reg31",0x00010001,0x45
HKR,"Venice","Reg32",0x00010001,0x00
HKR,"Venice","Reg33",0x00010001,0x00
HKR,"Venice","Reg34",0x00010001,0x00
HKR,"Venice","Reg35",0x00010001,0x00
HKR,"Venice","Reg36",0x00010001,0x4C
HKR,"Venice","Reg37",0x00010001,0x9C
HKR,"Venice","Reg38",0x00010001,0x40
HKR,"Venice","Reg39",0x00010001,0x00
HKR,"Venice","Reg40",0x00010001,0x00
HKR,"Venice","Reg41",0x00010001,0x0A
HKR,"Venice","Reg42",0x00010001,0x10
HKR,"Venice","Reg43",0x00010001,0x50
HKR,"Venice","Reg44",0x00010001,0x85
HKR,"Venice","Reg45",0x00010001,0x85
HKR,"Venice","Reg46",0x00010001,0x02
HKR,"Venice","Reg47",0x00010001,0x86
HKR,"Venice","Reg48",0x00010001,0x0A
HKR,"Venice","Reg49",0x00010001,0x20
HKR,"Venice","Reg50",0x00010001,0x1F
HKR,"Venice","Reg51",0x00010001,0x59
HKR,"Venice","Reg52",0x00010001,0x3A
HKR,"Venice","Reg53",0x00010001,0x5C
HKR,"Venice","Reg54",0x00010001,0x7F
HKR,"Venice","Reg55",0x00010001,0x20
HKR,"Venice","Reg56",0x00010001,0x28
HKR,"Venice","Reg57",0x00010001,0x1C
HKR,"Venice","Reg58",0x00010001,0x03
HKR,"Venice","Reg59",0x00010001,0x1E
HKR,"Venice","Reg60",0x00010001,0x16
HKR,"Venice","Reg61",0x00010001,0x4A
HKR,"Venice","Reg62",0x00010001,0x59
HKR,"Venice","Reg63",0x00010001,0x9F
HKR,"Venice","Reg64",0x00010001,0x14
HKR,"Venice","Reg65",0x00010001,0xB8
HKR,"Venice","Reg66",0x00010001,0x72
HKR,"Venice","Reg67",0x00010001,0x00
HKR,"Venice","Reg68",0x00010001,0x3E
HKR,"Venice","Reg69",0x00010001,0x00
HKR,"Venice","Reg70",0x00010001,0x80
HKR,"Venice","Reg71",0x00010001,0x10
HKR,"Venice","Reg72",0x00010001,0x88
HKR,"Venice","Reg73",0x00010001,0x04
HKR,"Venice","Reg74",0x00010001,0xF2
HKR,"Venice","Reg75",0x00010001,0x07
HKR,"Venice","Reg76",0x00010001,0x07
HKR,"Venice","Reg77",0x00010001,0x80
HKR,"Venice","Reg78",0x00010001,0x03
HKR,"Venice","Reg79",0x00010001,0x50
HKR,"Venice","Reg80",0x00010001,0xEB
HKR,"Venice","Reg81",0x00010001,0x00
HKR,"Venice","Reg82",0x00010001,0x33
HKR,"Venice","Reg83",0x00010001,0x01
HKR,"Venice","Reg84",0x00010001,0x03
HKR,"Venice","Reg85",0x00010001,0x50
HKR,"Venice","Reg86",0x00010001,0xEB
HKR,"Venice","Reg87",0x00010001,0x74
HKR,"Venice","Reg88",0x00010001,0x00
HKR,"Venice","Reg89",0x00010001,0x1A

; Setting FM radio of the Silicon tuner via SIF (GPIO 21 in use/ 5.5MHz)
HKR, "Audio", "FM Radio IF",0x00010001,0x729555

;-------------------------------------------------------------
; Pin names
;-------------------------------------------------------------
; add audio input and output pinnames
HKLM,SYSTEM\CurrentControlSet\Control\MediaCategories\%VAMP_ANLG_AUDIO_IN_PIN% ,"Name",,"Analog Audio Input"
HKLM,SYSTEM\CurrentControlSet\Control\MediaCategories\%VAMP_ANLG_AUDIO_OUT_PIN%,"Name",,"Audio"
HKLM,SYSTEM\CurrentControlSet\Control\MediaCategories\%VAMP_ANLG_VIDEO_ITU_PIN%,"Name",,"Analog ITU Video"
HKLM,SYSTEM\CurrentControlSet\Control\MediaCategories\%VAMP_ANLG_AUDIO_I2S_PIN%,"Name",,"I2S Audio"
HKLM,SYSTEM\CurrentControlSet\Control\MediaCategories\%VAMP_MPEG_AES_PIN%      ,"Name",,"MPEG Audio ES"
HKLM,SYSTEM\CurrentControlSet\Control\MediaCategories\%VAMP_MPEG_VES_PIN%      ,"Name",,"MPEG Video ES"
HKLM,SYSTEM\CurrentControlSet\Control\MediaCategories\%VAMP_MPEG_PS_PIN%       ,"Name",,"MPEG2 Program"

[ForceHWConfig.AddReg]
; FMB NOTE: See Cinergy 250 PCI INF file for options

[3xHybrid.Misc.AddReg]
;FMB TODO: Never use fixed pathes
; Venice board settings
HKR,"Venice","uCFilePath",,"c:\windows\system32\"

[3xHybrid.Misc.AddReg.ntx86]
; Venice board settings
HKR,"Venice","uCFilePath",,"\SystemRoot\system32\"

[3xHybrid.Misc.RegisterDlls]
11,,vmTVRate.dll,1

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

[Strings]
;---------------------------------------------------------------
; Non-Localizable (Windows)
;---------------------------------------------------------------

FLG_REGSVR_DLLREGISTER = 0x00000001
REG_EXPAND_SZ          = 0x00020000
REG_DWORD              = 0x00010001

; Service loader
SERVICE_BOOT_START     = 0x0 
SERVICE_SYSTEM_START   = 0x1 
SERVICE_AUTO_START     = 0x2 
SERVICE_DEMAND_START   = 0x3 
SERVICE_DISABLED       = 0x4 

SERVICE_KERNEL_DRIVER  = 0x1 

SERVICE_ERROR_IGNORE   = 0x0 
SERVICE_ERROR_NORMAL   = 0x1 
SERVICE_ERROR_SEVERE   = 0x2
SERVICE_ERROR_CRITICAL = 0x3 

; Proxy GUIDs

; Proxies                     
KSProxy.CLSID   = "{17CCA71B-ECD7-11D0-B908-00A0C9223196}"
KSXBar.CLSID    = "{71F96460-78F3-11d0-A18C-00A0C9118956}"
KSTVAudio.CLSID = "{71F96462-78F3-11d0-A18C-00A0C9118956}"
KSTvTune.CLSID  = "{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}"

;---------------------------------------------------------------
; Non-Localizable (This driver)
;---------------------------------------------------------------
; Our Pin Name GUIDs

VAMP_ANLG_AUDIO_IN_PIN   = "{7BB284B9-714D-493d-A101-B1B028E782BD}"
VAMP_ANLG_AUDIO_OUT_PIN  = "{5582E657-E596-42b5-9DB3-541B27A2355F}"
VAMP_ANLG_AUDIO_I2S_PIN  = "{C2E46358-F032-4d88-B802-06B59D162730}"
VAMP_ANLG_VIDEO_ITU_PIN  = "{82631A2E-403C-4581-A4B0-EC173D004410}"

VAMP_MPEG_AES_PIN        = "{9DEC84B9-BCEF-4aac-997E-43EDD0A2D6C7}"
VAMP_MPEG_VES_PIN        = "{181CF87E-7741-47ba-8629-22347E03C64C}"
VAMP_MPEG_PS_PIN         = "{DDA87B83-65DB-4aec-82D0-79FBE67D2BB6}"

; Our Filter GUIDs

VAMP_ANLG_AUDIO_FILTER   = "{F3B951E7-8619-4ff3-91CA-03910E4BB900}"
VAMP_ANLG_CAP_FILTER     = "{BBEFB6C7-2FC4-4139-BB8B-A58BBA724000}"



;---------------------------------------------------------------
; Localizable
;---------------------------------------------------------------
TerraTec            = "TerraTec "
DiskName            = "Cinergy Driver CD"

; Service strings
DISPLAY_NAME        = "Cinergy 400 TV mobile MKII service"
SERVICE_DESCRIPTION = "Cinergy 400 TV mobile MKII driver"

; Device Manager strings
Cinergy.DeviceDesc  = "Cinergy 400 TV mobile MKII"
30Hybrid.DeviceDesc = "Cinergy 400 TV mobile MKII(SAA7130)"    ; prototypes
34Hybrid.DeviceDesc = "Cinergy 400 TV mobile MKII(SAA7134)"    ; prototypes
33Hybrid.DeviceDesc = "Cinergy 400 TV mobile MKII(SAA7133/35)" ; prototypes 

Cinergy.Prefix      = "Cinergy 400 TV mobile"         ; DirectShow filter names (prefix only)
Cinergy.Wave        = "Cinergy 400 TV mobile Audio"   ; Audio device name

