;==============================================================================
; TerraTec Cinergy DT USB XS Diversity (MKII)
; Driver Install Script for Windows XP/Vista (64 bit)
; Copyright (c) 2008, TerraTec Electronic GmbH
;------------------------------------------------------------------------------        
; History:
;------------------------------------------------------------------------------
; 23-Jan-08 FMB 1st version for Cinergy DT USB XS Diversity (MKII)
;------------------------------------------------------------------------------

[Version]
Signature   = "$CHICAGO$"
Class       = Media
ClassGUID   = {4d36e96c-e325-11ce-bfc1-08002be10318} 
Provider    = %Provider% 
CatalogFile = Cinergy_DT_USB_XS_Diversity_MKII.cat
DriverVer   = 05/23/2009,3.12.0.0

[SourceDisksNames]
1 = %DiskName%,,

[SourceDisksFiles]
Mod7700.sys        = 1
Modrc.sys          = 1
ModrcCoInstall.dll = 1

[DestinationDirs]
MOD7000.CopyDrivers         = 12
MODRC_CoInstaller_CopyFiles = 11

[ControlFlags]
ExcludeFromSelect    = *
ExcludeFromSelect.NT = *

[Manufacturer]
%Provider% = TerraTec, NTamd64

[TerraTec.NTamd64]

; Cinergy DT USB XS Diversity (Rev. 2)
%Cinergy.DeviceDesc_cap%    = MOD7000.Device,USB\VID_0CCD&PID_0081      ; boot & capture device
%Cinergy.DeviceDesc_ir%     = MODRC,         HID\VID_0CCD&PID_0081&FN_01; IR device 



[MOD7000.Device.NTamd64]
Include    = ks.inf, kscaptur.inf, bda.inf, wdmaudio.inf
Needs      = KS.Registration, KSCAPTUR.Registration.NT, BDA.Installation.NT, WDMAUDIO.Registration.NT
AddReg     = MOD7000.AddReg
CopyFiles  = MOD7000.CopyDrivers

[MOD7000.Device.NTamd64.HW]
AddReg = MOD7000_DEVICE_AddReg


[MOD7000.Device.NTamd64.Services]
AddService = mod7700, 0x00000002, MOD7000.AddService


[MOD7000.AddService]
DisplayName    = %MOD7000.FriendlyName%
ServiceType    = 1                  ; SERVICE_KERNEL_DRIVER
StartType      = 3                  ; SERVICE_DEMAND_START
ErrorControl   = 1                  ; SERVICE_ERROR_NORMAL
ServiceBinary  = %12%\mod7700.sys
LoadOrderGroup = Base
AddReg         = MOD7000.Service.AddReg


[MOD7000.Service.AddReg]
HKR,,DigitalJmp,0x00010001,0x00
HKR,"Parameters","ReducedScanning",0x0000001,0x00


[MOD7000.CopyDrivers]
mod7700.sys
modrc.sys


[MOD7000.AddReg]
HKR,,DevLoader,,*ntkern
HKR,,NTMPDriver,,mod7700.sys
HKR,,PageOutWhenUnopened,3,01

HKLM,System\CurrentControlSet\Control\MediaCategories\{FF7451BA-42F1-4a9e-9908-E12406A48D6D}
HKLM,System\CurrentControlSet\Control\MediaCategories\{FF7451BA-42F1-4a9e-9908-E12406A48D6D},Display,0x00010001,0
HKLM,System\CurrentControlSet\Control\MediaCategories\{FF7451BA-42F1-4a9e-9908-E12406A48D6D},Name,,"Tuner Node"

HKLM,System\CurrentControlSet\Control\MediaCategories\{7969986E-A637-4e4e-8AC8-0BD9A02DFC1F}
HKLM,System\CurrentControlSet\Control\MediaCategories\{7969986E-A637-4e4e-8AC8-0BD9A02DFC1F},Display,0x00010001,0
HKLM,System\CurrentControlSet\Control\MediaCategories\{7969986E-A637-4e4e-8AC8-0BD9A02DFC1F},Name,,"Demodulator Node"

HKLM,System\CurrentControlSet\Control\MediaCategories\{54B37042-5CED-48dd-BF4B-16FF7D6E8C81}
HKLM,System\CurrentControlSet\Control\MediaCategories\{54B37042-5CED-48dd-BF4B-16FF7D6E8C81},Display,0x00010001,0
HKLM,System\CurrentControlSet\Control\MediaCategories\{54B37042-5CED-48dd-BF4B-16FF7D6E8C81},Name,,"Antenna In Pin"

; add audio input and output pinnames
HKLM,SYSTEM\CurrentControlSet\Control\MediaCategories\%HOOK_ANLG_AUDIO_IN_PIN% ,"Name",,"Analog Audio input"
HKLM,SYSTEM\CurrentControlSet\Control\MediaCategories\%HOOK_ANLG_AUDIO_OUT_PIN%,"Name",,"Audio"

[MOD7000_DEVICE_AddReg]
; STK7070PD (2x DIB7070)
HKR,,"ProductId"     ,0x00010001,0x00001EBE
HKR,,"MaskDevicePath",0x00010001,0x00000000

HKR,,"BdaDigCaptureFilterName"   ,0,%DShow.DigitalCapture%
HKR,,"BdaDigTunerFilterName"     ,0,%DShow.DigitalTuner%   
HKR,,"AnlgCaptureFilterName"     ,0,%DShow.AnalogCapture%
HKR,,"AnlgCaptureDefaultStandard",0x00010001,0x00000000
HKR,,"AnlgTunerFilterName"       ,0,%DShow.AnalogTuner%
HKR,,"AnlgXBarFilterName"        ,0,%DShow.AnalogCrossbar%
HKR,,"AnlgTVAudioFilterName"     ,0,%DShow.AnalogTvAudio%
HKR,,"ControlFilterName"         ,0,%DShow.Control%      
HKR,,"AnlgAudioCaptureFilterName",0,%DShow.AudioCapture%      


;===============================================================
;                I R   D e v i c e
;===============================================================


[MODRC.NTamd64]
AddReg    = MODRC_AddReg

[MODRC.NTamd64.Services]
AddService = MODRC,0x00000002,MODRC_ServiceInstall,,,

[MODRC.NTamd64.HW]
AddReg = MODRC_HW_AddReg

[MODRC.NTamd64.CoInstallers]
CopyFiles = MODRC_CoInstaller_CopyFiles
AddReg    = MODRC_CoInstaller_AddReg

[MODRC_CoInstaller_CopyFiles]
ModrcCoInstall.dll

[MODRC_CoInstaller_AddReg]
HKR,,CoInstallers32,0x00010000,"ModrcCoInstall.dll,"


[MODRC_AddReg]
HKR,,DevLoader,,*ntkern
HKR,,NTMPDriver,,modrc.sys

[MODRC_ServiceInstall]
DisplayName   = %MODRC.FriendlyName%
ServiceType   = %SERVICE_KERNEL_DRIVER%
StartType     = %SERVICE_DEMAND_START%
ErrorControl  = %SERVICE_ERROR_NORMAL%
ServiceBinary = %12%\modrc.sys

[MODRC_HW_AddReg]
HKR,,"ReportDescriptor",0x00000001,\
    \ ; Consumer Controls
        0x05,   0x0c,       \ ; Usage Page (Consumer Controls),
        0x09,   0x01,       \ ; Usage (Consumer Control),
        0xA1,   0x01,       \ ; Collection (Application),
        0x85,   0x01,       \ ;  Report Id (1)
        0x19,   0x00,       \ ;  Usage Minimum (0),
        0x2a,   0x3c, 0x02, \ ;  Usage Maximum (23c)  
        0x15,   0x00,       \ ;  Logical Minimum (0),
        0x26,   0x3c, 0x02, \ ;  Logical Maximum (23c)  
        0x95,   0x01,       \ ;  Report Count (1),
        0x75,   0x10,       \ ;  Report Size (16),
        0x81,   0x00,       \ ;  Input (Data, Array), 
        0xC0,               \ ; End Collection 
    \ ; TT Vendor controls
        0x06,   0xcc, 0xff, \ ; Usage Page (Vendor 0xffbc),
        0x09,   0x88,       \ ; Usage (88),
        0xa1,   0x01,       \ ; Collection (Application),
        0x85,   0x02,       \ ;  Report Id (2)
        0x19,   0x01,       \ ;  Usage Minimum (0x01),
        0x29,   0xff,       \ ;  Usage Maximum (0xff),
        0x15,   0x00,       \ ;  Logical Minimum (0),
        0x25,   0x01,       \ ;  Logical Maximum(1),
        0x95,   0x01,       \ ;  Report Count (1),
        0x75,   0x08,       \ ;  Report Size (8),
        0x81,   0x00,       \ ;  Input (Data, Array), 
        0xc0                \ ; End Collection





HKR,,"ReportDataSize",0x00010001,0x00000003

; FMB NOTE 14-Aug-06: for keys that don't need to be repeated we need to set the two LSBs
; so that a second press on the same key is detected
HKR,,"ReportMappingTable",0x00000001,\
     0x01,0x14,0xEB,0x41, 0x04, 0x02,0x41,0x00,  \ ; App menu (Home)
     0x01,0x14,0xEB,0x01, 0x04, 0x02,0x01,0x00,  \ ; Power
    \
     0x01,0x14,0xEB,0x02, 0x04, 0x02,0x02,0x00,  \ ; 1
     0x01,0x14,0xEB,0x03, 0x04, 0x02,0x03,0x00,  \ ; 2
     0x01,0x14,0xEB,0x04, 0x04, 0x02,0x04,0x00,  \ ; 3
     0x01,0x14,0xEB,0x05, 0x04, 0x02,0x05,0x00,  \ ; 4
     0x01,0x14,0xEB,0x06, 0x04, 0x02,0x06,0x00,  \ ; 5
     0x01,0x14,0xEB,0x07, 0x04, 0x02,0x07,0x00,  \ ; 6
     0x01,0x14,0xEB,0x08, 0x04, 0x02,0x08,0x00,  \ ; 7
     0x01,0x14,0xEB,0x09, 0x04, 0x02,0x09,0x00,  \ ; 8
     0x01,0x14,0xEB,0x0a, 0x04, 0x02,0x0a,0x00,  \ ; 9
     0x01,0x14,0xEB,0x0c, 0x04, 0x02,0x0c,0x00,  \ ; 0
    \
     0x01,0x14,0xEB,0x42, 0x04, 0x02,0x42,0x00,  \ ; DVD Menu
     0x01,0x14,0xEB,0x43, 0x04, 0x02,0x43,0x00,  \ ; Subtitles
     0x01,0x14,0xEB,0x44, 0x04, 0x02,0x44,0x00,  \ ; Teletext
    \
     0x01,0x14,0xEB,0x45, 0x04, 0x02,0x45,0x02,  \ ; Delete
     0x01,0x14,0xEB,0x0b, 0x04, 0x02,0x0b,0x00,  \ ; AV
     0x01,0x14,0xEB,0x0d, 0x04, 0x02,0x0d,0x00,  \ ; A-B
    \
     0x01,0x14,0xEB,0x46, 0x04, 0x02,0x46,0x00,  \ ; TV
     0x01,0x14,0xEB,0x47, 0x04, 0x02,0x47,0x00,  \ ; DVD 
     0x01,0x14,0xEB,0x49, 0x04, 0x02,0x49,0x00,  \ ; Videos
     0x01,0x14,0xEB,0x4a, 0x04, 0x02,0x4a,0x00,  \ ; Music
     0x01,0x14,0xEB,0x4b, 0x04, 0x02,0x4b,0x00,  \ ; Pictures
    \
     0x01,0x14,0xEB,0x10, 0x08, 0x02,0x10,0x00,  \ ; up arrow
     0x01,0x14,0xEB,0x11, 0x08, 0x02,0x11,0x00,  \ ; left arrow
     0x01,0x14,0xEB,0x13, 0x08, 0x02,0x13,0x00,  \ ; right arrow
     0x01,0x14,0xEB,0x14, 0x08, 0x02,0x14,0x00,  \ ; down arrow
     0x01,0x14,0xEB,0x12, 0x04, 0x02,0x12,0x00,  \ ; return (OK)
    \
     0x01,0x14,0xEB,0x0f, 0x04, 0x02,0x0f,0x00,  \ ; EPG  - program guide 
     0x01,0x14,0xEB,0x16, 0x04, 0x02,0x16,0x00,  \ ; info - program guide (EPG current/next)
     0x01,0x14,0xEB,0x4d, 0x04, 0x02,0x4d,0x00,  \ ; Back
    \
     0x01,0x14,0xEB,0x1c, 0x08, 0x02,0x1c,0x00,  \ ; volume up
     0x01,0x14,0xEB,0x1e, 0x08, 0x02,0x1e,0x00,  \ ; volume down
     0x01,0x14,0xEB,0x4c, 0x04, 0x02,0x4c,0x00,  \ ; Media play
     0x01,0x14,0xEB,0x1d, 0x04, 0x02,0x1d,0x00,  \ ; volume mute
     0x01,0x14,0xEB,0x1b, 0x04, 0x02,0x1b,0x00,  \ ; channel up
     0x01,0x14,0xEB,0x1f, 0x04, 0x02,0x1f,0x00,  \ ; channel down
    \
     0x01,0x14,0xEB,0x17, 0x04, 0x02,0x17,0x00,  \ ; FLOF1 (Red)
     0x01,0x14,0xEB,0x18, 0x04, 0x02,0x18,0x00,  \ ; FLOF2 (Green)
     0x01,0x14,0xEB,0x19, 0x04, 0x02,0x19,0x00,  \ ; FLOF3 (Yellow)
     0x01,0x14,0xEB,0x1A, 0x04, 0x02,0x1A,0x00,  \ ; FLOF4 (Blue)
    \
     0x01,0x14,0xEB,0x58, 0x04, 0x02,0x58,0x00,  \ ; Media record
     0x01,0x14,0xEB,0x48, 0x04, 0x02,0x48,0x00,  \ ; Media Stop
     0x01,0x14,0xEB,0x40, 0x04, 0x02,0x40,0x00,  \ ; Media pause
    \
     0x01,0x14,0xEB,0x54, 0x04, 0x02,0x54,0x00,  \ ; Media previous track
     0x01,0x14,0xEB,0x4e, 0x04, 0x02,0x4e,0x00,  \ ; Media FREW
     0x01,0x14,0xEB,0x4f, 0x04, 0x02,0x4f,0x00,  \ ; Media FFRWD
     0x01,0x14,0xEB,0x5c, 0x04, 0x02,0x5c,0x00   \ ; Media next track


HKR,,"KeyEmulationMask",0x00000001,\
     0xFF,0x00,0x00                                ; No Event

HKR,,"SkipRepeatCounter",0x00010001,0x00000002

; For Media Center compatibility only
;HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Media Center\Remote Controls","HID\VID_0CCD&PID_005A&FN_01",0x00000000,""    



;===============================================================
;                S t r i n g s
;===============================================================
[Strings]
;---------------------------------------------------------------
; Non-Localizable (Windows)
;---------------------------------------------------------------

;
; The following items should be moved to KS_registration - TCP
;

MediaCategories         = "SYSTEM\CurrentControlSet\Control\MediaCategories"
   

;
; ServiceType values
SERVICE_KERNEL_DRIVER            = 0x00000001
SERVICE_FILE_SYSTEM_DRIVER       = 0x00000002
SERVICE_ADAPTER                  = 0x00000004
SERVICE_RECOGNIZER_DRIVER        = 0x00000008
SERVICE_WIN32_OWN_PROCESS        = 0x00000010
SERVICE_WIN32_SHARE_PROCESS      = 0x00000020
SERVICE_INTERACTIVE_PROCESS      = 0x00000100
SERVICE_INTERACTIVE_SHARE_PROCESS= 0x00000120

; StartType values
SERVICE_BOOT_START          = 0x00000000
SERVICE_SYSTEM_START        = 0x00000001
SERVICE_AUTO_START          = 0x00000002
SERVICE_DEMAND_START        = 0x00000003
SERVICE_DISABLED            = 0x00000004

; ErrorControl values
SERVICE_ERROR_IGNORE        = 0x00000000
SERVICE_ERROR_NORMAL        = 0x00000001
SERVICE_ERROR_SEVERE        = 0x00000002
SERVICE_ERROR_CRITICAL      = 0x00000003

; Characteristic flags
NCF_VIRTUAL                 = 0x0001
NCF_WRAPPER                 = 0x0002
NCF_PHYSICAL                = 0x0004
NCF_HIDDEN                  = 0x0008
NCF_NO_SERVICE              = 0x0010
NCF_NOT_USER_REMOVABLE      = 0x0020
NCF_HAS_UI                  = 0x0080
NCF_MODEM                   = 0x0100

; Registry types
REG_SZ                      = 0x00000
REG_MULTI_SZ                = 0x10000
REG_EXPAND_SZ               = 0x20000
REG_DWORD                   = 0x10001

; Win9x Compatible Types
REG_BINARY                  = 17

; Service install flags
SPSVCINST_TAGTOFRONT        = 0x1
SPSVCINST_ASSOCSERVICE      = 0x2

; Pin IDs
HOOK_ANLG_AUDIO_IN_PIN      = "{356A9E15-B6B8-4066-A381-B531C606A200}"
HOOK_ANLG_AUDIO_OUT_PIN     = "{0A95FEC0-4617-4f93-9861-91C9E59E1C09}"

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

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

; Service strings
MOD7000.FriendlyName    = "Cinergy DT USB XS Diversity (MKII) Capture Service"
MODRC.FriendlyName      = "Cinergy DT USB XS Diversity (MKII) IR Service"

;Device Manager
Cinergy.DeviceDesc_cap  = "Cinergy DT USB XS Diversity (MKII) Capture"
Cinergy.DeviceDesc_ir   = "Cinergy DT USB XS Diversity (MKII) IR"

;                          0         1         2         3         4
;DirectShow                01234567890123456789012345678901234567890123456789
DShow.DigitalCapture    = "Cinergy DT USB XS Diversity (MKII) Digital Capture"
DShow.DigitalTuner      = "Cinergy DT USB XS Diversity (MKII) Digital Tuner"
DShow.AnalogCapture     = "Cinergy DT USB XS Diversity (MKII) Analog Capture"
DShow.AnalogTuner       = "Cinergy DT USB XS Diversity (MKII) Analog TV Tuner"
DShow.AnalogCrossbar    = "Cinergy DT USB XS Diversity (MKII) Analog Crossbar"
DShow.AnalogTvAudio     = "Cinergy DT USB XS Diversity (MKII) Analog TV Audio"
DShow.Control           = "Cinergy DT USB XS Diversity (MKII) Control Filter"
DShow.AudioCapture      = "Cinergy DT USB XS Diversity (MKII) Audio"
