;------------------------------------------------------------------------
;
;   Copyright and Disclaimer:
;
;       ---------------------------------------------------------------
;       This software is provided "as is" without warranty of any kind,
;       either expressed or implied, including but not limited to the
;       implied warranties of merchantability and/or fitness for a
;       particular purpose.
;
;       Copyright (c) 2009 TBS Systems, Inc.
;       All Rights Reserved.
;       ---------------------------------------------------------------
;
;   Abstract:
;
;
;------------------------------------------------------------------------

[Version]
signature="$CHICAGO$"
Class=Media
ClassGUID={4d36e96c-e325-11ce-bfc1-08002be10318}
Provider="TBS"
DriverVer=03/18/2011,2.0.0.18
CatalogFile=TBS6981.cat

[Manufacturer]
"TBS"=TBS, NTamd64

[SourceDisksNames]
1="TBS 6981 Drivers",,,""

[SourceDisksFiles]
tbs6981.sys=1

[ControlFlags]
ExcludeFromSelect	= *
ExcludeFromSelect.NT	= *

[TBS]

%tbsBDA.tbs6981%=tbsBDA.tbs6981,PCI\VEN_14F1&DEV_8852&SUBSYS_88886981

[TBS.NTamd64]

%tbsBDA.tbs6981%=tbsBDA.tbs6981,PCI\VEN_14F1&DEV_8852&SUBSYS_88886981

[tbsBDA.tbs6981]
Include=    ks.inf, kscaptur.inf, wdmaudio.inf, bda.inf
Needs=      KS.Registration,KSCAPTUR.Registration.NT, WDMAUDIO.Registration, BDA.Registration,bda.Installation.NT
AddReg=     tbs885.AddReg,tbs6981XBAR.AddReg,tbsBDA.Xceive.AddReg,Xceive.AddReg,CXTS.AddReg
CopyFiles=  tbs885.CopyDrivers,DSFilters.CopyFiles
RegisterDlls=DSFilters.RegDLL




[DestinationDirs]
tbs885.CopyDrivers=10,system32\drivers
DSFilters.CopyFiles=11

[tbs885.CopyDrivers]
tbs6981.sys

[tbs885.AddReg]
HKR,,DevLoader,,*ntkern
HKR,,NTMPDriver,,tbs6981.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

; The following entries just for testing BDA driver
; No demod for now
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, 0x01, 0x00, 0x00, 0x00
HKR,"DriverData","DemodI2CAddress",0x00010001, 0x1E, 0x00, 0x00, 0x00

; these registry keys for TS filter
; DebugTS entry forces creation of TS capture filter without a demod
;HKR,"DriverData","DebugTS",0x00010001, 0x01,0x00,0x00,0x00
; Next line enables the software TS packetizer
;HKR,"DriverData","dwIsTSStream",0x00010001,0x01,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, 0x01, 0x00, 0x00, 0x00

;Add the property pages
;HKCR,CLSID\%GUID.General_Properties%\InprocServer32,,,cxcorona.ax
;HKCR,CLSID\%GUID.General_Properties%\InprocServer32,ThreadingModel,,Both
;HKLM,%MediaSets%\%GUID.CORONA_VERSION_PROPERTIES%\PropertyPages\%GUID.General_Properties%,,,

; GPIO Pin values
; IMPORTANT !!! if any GPIO is not used - just delete the corresponding entry !!!
HKR,"DriverData","tuner_reset_gpio_bit", 0x00010001, 0x02, 0x00, 0x00, 0x00
HKR,"DriverData","tuner_sif_fm_gpio_bit",0x00010001, 0x01, 0x00, 0x00, 0x00
HKR,"DriverData","comp_select_gpio_bit", 0x00010001, 0x00, 0x00, 0x00, 0x00

; Back Panel = 0x00, Front Panel = 0x01
HKR,"DriverData","comp_select_panel", 0x00010001, 0x00, 0x00, 0x00, 0x00

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

;BoardType tbs6981 = 0x11
;885 + (Phantom + Mongoose)/TS1 Parallel + (Zarlink + Xceive)/TS2 Serial 
HKR,"DriverData","BoardType",0x00010001, 0x11, 0x00, 0x00, 0x00

;
; Driver Configuration Registry Entries
;

[tbsBDA.Xceive.AddReg]
HKR,"DriverData","VideoStandard",0x00010001, 0x10,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 

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

[tbs6981XBAR.AddReg]

;Pin 0 - Tuner In
; Input MUX       : VIN2 for video, VIN5 for audio
; Input Channel   : Ch1 for video,  Ch2  for audio
; Related PinIndex: Tuner Audio - Pin6 
HKR,"DriverData\XBarPin0","PinType",0x00010001, 0x00,0x00,0x00,0x00
HKR,"DriverData\XBarPin0","InputMux",0x00010001, 0x02,0x05,0x00,0x00
HKR,"DriverData\XBarPin0","InputChannel",0x00010001, 0x01,0x02,0x00,0x00
HKR,"DriverData\XBarPin0","RelatedPinIndex",0x00010001, 0x06,0x00,0x00,0x00

;Pin 1 - Composite 1 (Rear)
; Input Mux       : VIN1 for Composite
; Input Channel   : Ch1 for Composite
; Related PinIndex: Audio Line In 1 - Pin7
HKR,"DriverData\XBarPin1","PinType",0x00010001, 0x01,0x00,0x00,0x00
HKR,"DriverData\XBarPin1","InputMux",0x00010001, 0x01,0x00,0x00,0x00
HKR,"DriverData\XBarPin1","InputChannel",0x00010001, 0x01,0x00,0x00,0x00
HKR,"DriverData\XBarPin1","RelatedPinIndex",0x00010001, 0x07,0x00,0x00,0x00

;Pin 2 - S-Video 1 (Rear)
; Input Mux       : VIN8 for Luma, VIN7 for Chroma
; Input Channel   : Ch1 for  Lume, Ch3  for Chroma
; Related PinIndex: Audio Line In 1 - Pin7
HKR,"DriverData\XBarPin2","PinType",0x00010001, 0x02,0x00,0x00,0x00
HKR,"DriverData\XBarPin2","InputMux",0x00010001, 0x08,0x07,0x00,0x00
HKR,"DriverData\XBarPin2","InputChannel",0x00010001, 0x01,0x03,0x00,0x00
HKR,"DriverData\XBarPin2","RelatedPinIndex",0x00010001, 0x07,0x00,0x00,0x00

;Pin 3 - Component 1 (Rear)
; Input Mux       : VIN8 for Luma, VIN6 for YPb, VIN7 for YPr
; Input Channel   : Ch1 for  Lume, Ch2  for YPb, Ch3  for YPr, Dual ADC
; Related PinIndex: Audio Line In 1 - Pin7
HKR,"DriverData\XBarPin3","PinType",0x00010001, 0x03,0x00,0x00,0x00
HKR,"DriverData\XBarPin3","InputMux",0x00010001, 0x08,0x06,0x07,0x00
HKR,"DriverData\XBarPin3","InputChannel",0x00010001, 0x01,0x02,0x03,0x01
HKR,"DriverData\XBarPin3","RelatedPinIndex",0x00010001, 0x07,0x00,0x00,0x00

;Pin 4 - Composite 2 (Front) 
; Input Mux       : VIN1 for Composite - same as Composite1 - switched with GPIO0 MUX
; Input Channel   : Ch1 for Composite
; Related PinIndex: Audio Line In 2 - Pin8
HKR,"DriverData\XBarPin4","PinType",0x00010001, 0x04,0x00,0x00,0x00
HKR,"DriverData\XBarPin4","InputMux",0x00010001, 0x01,0x00,0x00,0x00
HKR,"DriverData\XBarPin4","InputChannel",0x00010001, 0x01,0x00,0x00,0x00
HKR,"DriverData\XBarPin4","RelatedPinIndex",0x00010001, 0x08,0x00,0x00,0x00

;Pin 5 - S-Video 2 (Front)
; Input Mux       : VIN3 for Luma, VIN4 for Chroma
; Input Channel   : Ch1 for  Luma, Ch2  for Chroma
; Related PinIndex: Audio Line In 2 - Pin8
HKR,"DriverData\XBarPin5","PinType",0x00010001, 0x05,0x00,0x00,0x00
HKR,"DriverData\XBarPin5","InputMux",0x00010001, 0x03,0x04,0x00,0x00
HKR,"DriverData\XBarPin5","InputChannel",0x00010001, 0x01,0x02,0x00,0x00
HKR,"DriverData\XBarPin5","RelatedPinIndex",0x00010001, 0x08,0x00,0x00,0x00

;Pin 6 - Tuner Audio
; Related PinIndex: Tuner In - Pin0
HKR,"DriverData\XBarPin6","PinType",0x00010001, 0x06,0x00,0x00,0x00
HKR,"DriverData\XBarPin6","RelatedPinIndex",0x00010001, 0x00,0x00,0x00,0x00

;Pin 7 - Audio Line In 1 (Rear)
; Related PinIndex: Composite 1 - Pin1
HKR,"DriverData\XBarPin7","PinType",0x00010001, 0x07,0x00,0x00,0x00
HKR,"DriverData\XBarPin7","RelatedPinIndex",0x00010001, 0x01,0x00,0x00,0x00

;Pin 8 - Audio Line In 2 (Front)
; Related PinIndex: Composite 2 - Pin4
HKR,"DriverData\XBarPin8","PinType",0x00010001, 0x08,0x00,0x00,0x00
HKR,"DriverData\XBarPin8","RelatedPinIndex",0x00010001, 0x04,0x00,0x00,0x00

;Pin 9 - Audio SPDIF in 
HKR,"DriverData\XBarPin9","PinType",0x00010001, 0x09,0x00,0x00,0x00
HKR,"DriverData\XBarPin9","RelatedPinIndex",0x00010001, 0x02,0x00,0x00,0x00

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


;-------------------------------------------------------------------
; Tuner AddReg sections
;-------------------------------------------------------------------

[Xceive.AddReg]
HKR,"DriverData","TunerType",0x00010001, 0x1A, 0x00, 0x00, 0x00
HKR,"DriverData","TunerI2CAddress",0x00010001, 0xC2, 0x00, 0x00, 0x00
HKR,"DriverData","Tuner2IFAddress",0x00010001, 0x86, 0x00, 0x00, 0x00

;-------------------------------------------------------------------
; AddReg sections for TS filter
;-------------------------------------------------------------------

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

;
; Interfaces installation
;

;
; Video
;
[tbsBDA.tbs6981.Interfaces]
Needs=VID.Interfaces

[tbsBDA.tbs6981.NT.Interfaces]
Needs=VID.Interfaces


[VID.Interfaces]
AddInterface={65e8773d-8f56-11d0-a3b9-00a0c9223196},%KsNameFilter%,VID_Interface,
AddInterface={a799a802-a46d-11d0-a18c-00a02401dcd4},%TVAudioReferenceGuid%,TvAudio_Interface,
AddInterface={a799a801-a46d-11d0-a18c-00a02401dcd4},%XBARReferenceGUID%,tbs88XBAR_Interface,
AddInterface={a799a800-a46d-11d0-a18c-00a02401dcd4},%TunerReferenceGuid%,tbs88TUNE_Interface,
AddInterface={6994AD04-93EF-11D0-A3CC-00A0C9223196},%AudioReferenceGuid%,AUD_Interface,
AddInterface={71985F48-1CA1-11d3-9CC8-00C04F7971E0},%BDATuneSATBReferenceGuid%,BDA_SATB_TUNE_Interface,
AddInterface={71985F48-1CA1-11d3-9CC8-00C04F7971E0},%BDATuneSATAReferenceGuid%,BDA_SATA_TUNE_Interface,
AddInterface={FD0A5AF4-B41D-11d2-9C95-00C04F7971E0},%TSSATBReferenceGuid%,SATB_TS_Interface
AddInterface={FD0A5AF4-B41D-11d2-9C95-00C04F7971E0},%TSSATAReferenceGuid%,SATA_TS_Interface


[VID_Interface]
AddReg=VID_Interface.AddReg

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

[TvAudio_Interface]
AddReg=TvAudio_Interface.AddReg

[TvAudio_Interface.AddReg]
HKR,,CLSID,,{71F96462-78F3-11d0-A18C-00A0C9118956}
HKR,,FriendlyName,,%TVAudioFriendlyName%

[tbs88XBAR_Interface]
AddReg=tbs88XBAR_Interface.AddReg

[tbs88XBAR_Interface.AddReg]
HKR,,CLSID,,{71F96460-78F3-11d0-A18C-00A0C9118956}
HKR,,FriendlyName,,%XBARFriendlyName%

[tbs88TUNE_Interface]
AddReg=tbs88TUNE_Interface.AddReg

[tbs88TUNE_Interface.AddReg]
HKR,,CLSID,,{266EEE40-6C63-11cf-8A03-00AA006ECB65}
HKR,,FriendlyName,,%TunerFriendlyName%

[AUD_Interface]
AddReg=AUD_Interface.AddReg

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

[BDA_SATA_TUNE_Interface]
AddReg=BDA_SATA_TUNE_Interface.AddReg

[BDA_SATB_TUNE_Interface]
AddReg=BDA_SATB_TUNE_Interface.AddReg

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

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

[SATB_TS_Interface]
AddReg=SATB_TS_Interface.AddReg

[SATA_TS_Interface]
AddReg=SATA_TS_Interface.AddReg

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

[SATB_TS_Interface.AddReg]
HKR,,CLSID,,%Proxy.CLSID%       ; {17CCA71B-ECD7-11D0-B908-00A0C9223196}
HKR,,FriendlyName,,%SATBTSFriendlyName%
; for mac address
HKLM,SOFTWARE\TBS\MPEVirtual\DriverData,"dwMAC_LOW", 0x00010001,       0xFF,0xFF,0xFF,0xFF
HKLM,SOFTWARE\TBS\MPEVirtual\DriverData,"dwMAC_HIGH", 0x00010001,       0xFF,0xFF,0xFF,0xFF

;

;
; Services installation
;
[tbsBDA.tbs6981.Services]
AddService = tbs6981,2,VID.ServiceInstall

[tbsBDA.tbs6981.NT.Services]
AddService = tbs6981,2,VID.ServiceInstall

[VID.ServiceInstall]
DisplayName   = %tbsBDA.DeviceDesc%
ServiceType   = 1
StartType     = 3
ErrorControl  = 1
ServiceBinary = %10%\system32\drivers\tbs6981.sys

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

[Strings]
KsNameFilter                 = "{9B365890-165F-11D0-A195-0020AFD156E4}"
Proxy.CLSID                  = "{17CCA71B-ECD7-11D0-B908-00A0C9223196}"
tbsBDA.DeviceDesc           = "TBS 6981 AvStream Video Capture"
tbsBDA.tbs6981             = "TBS 6981 DVB-S/S2 DUAL BDA"
VIDFriendlyName              = "TBS 6981 Video Capture"
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"
TVAudioFriendlyName          = "TBS 6981 TvAudio"
TVAudioReferenceGuid         = "{991182D5-71A2-4b5c-9817-F551FBBC8232}"
XBARFriendlyName             = "TBS 6981 Crossbar"
XBARReferenceGUID            = "{77F656DA-696D-407c-BA1C-50E4457C12E8}"
TunerFriendlyName            = "TBS 6981 Tuner"
TunerReferenceGuid           = "{5618011C-A4DA-455b-A448-EC2AF3DCCB02}"
TSPinID                      = "{5237C937-0A21-4f7e-B338-DE0D0793D03F}"
TSPinName                    = "TS Out"
BDASatATuneFriendlyName       = "TBS 6981 BDA DVBS/S2 A Tuner/Demod"
BDASatBTuneFriendlyName      = "TBS 6981 BDA DVBS/S2 B Tuner/Demod"
BDATuneSATAReferenceGuid      =  "{E9EAD02C-8B8C-4d9b-97A2-2EC0324360B1}"
BDATuneSATBReferenceGuid     = "{ED63EC0B-A040-4c59-BC9A-59B328A3F852}" 
SATATSFriendlyName		= "TBS 6981 DVBS/S2 A AVStream TS Capture"
SATBTSFriendlyName		= "TBS 6981 DVBS/S2 B AVStream TS Capture"
TSSATAReferenceGuid           	= "{63FFC020-B706-4262-B78C-3A8628CA9D0E}"
TSSATBReferenceGuid           	= "{559852E9-83D2-48ab-81E9-D06297FF1397}"
AudioFriendlyName            = "TBS 6981 Audio Capture"
AudioReferenceGuid           = "{AB766B70-AFB3-4461-A4DE-22E9C516B7FE}"
MediaInterfaces              = "System\CurrentControlSet\Control\MediaInterfaces"

