;------------------------------------------------------------------------------
;
; Ngene WDM / BDA Driver Installation Script
; Copyright (c) 2006, AVerMedia TECHNOLOGIES, Inc.
;
;------------------------------------------------------------------------------
[Version]
Signature=$Windows NT$
Class=MEDIA
ClassGUID={4d36e96c-e325-11ce-bfc1-08002be10318}
Provider=%MFGNAME%
DriverVer=03/06/2007,2.5.0.19
CatalogFile=AVerNg.cat

[Manufacturer]
%MFGNAME%=Micronas

[ControlFlags]
ExcludeFromSelect=*

[SourceDisksNames]
1 = %AVSTRM_INSTALLATION_DISK%,,

[SourceDisksFiles]
AVerBas.sys=1
AVerCap.sys=1
AVerTun.sys=1
AVerCP.ax=1
TVRate.dll=1

[Micronas]
;------------------------------------------------------------------------------
; Base device

%BASE_APPBOARD%=AVMNgBas,PCI\VEN_18C3&DEV_0720&SUBSYS_052E1461

;------------------------------------------------------------------------------
; Capture device

%CAPTURE_APPBOARD_60%=AVMNgCap60,Ngene\VEN_18C3&DEV_0720&SUBSYS_052E1461&Capture

;------------------------------------------------------------------------------
; Tuner device

%TUNER_APPBOARD%=AVMNgTun,Ngene\VEN_18C3&DEV_0720&SUBSYS_052E1461&Tuner

;------------------------------------------------------------------------------
;  Base driver sections (Windows XP)
;------------------------------------------------------------------------------

[AVMNgBas.NT]
Include=ks.inf, kscaptur.inf, bda.inf
Needs=KS.Registration,KSCAPTUR.Registration.NT,BDA.Registration,bda.Installation.NT,bdacap.Installation.NT
CopyFiles=Ngene.CopyFiles,DSFilters.CopyFiles

[AVMNgBas.NT.HW]
AddReg=AVMNgBas.NT.HW.AddReg

[DestinationDirs]
Ngene.CopyFiles=10,System32\Drivers
DSFilters.CopyFiles=11

[Ngene.CopyFiles]
AVerBas.sys,,,2
AVerCap.sys,,,2
AVerTun.sys,,,2

[DSFilters.CopyFiles]
AVerCP.ax
TVRate.dll

[DSFilters.RegDLL]
11,,AVerCP.ax,1
11,,TVRate.dll,1

[AVMNgBas.NT.Services]
AddService=AVMNgBasM779,0x00000002,AVMNgBas.Service

[AVMNgBas.Service]
DisplayName=%AVMNgBas.ServiceDesc%
ServiceType    = 1   ; SERVICE_KERNEL_DRIVER
StartType      = 3   ; SERVICE_DEMAND_START
ErrorControl   = 1   ; SERVICE_ERROR_NORMAL
ServiceBinary=%12%\AVerBas.sys

[AVMNgBas.NT.HW.AddReg]
HKR,,"TestDevice",1,00        ; Create PDO for test device
;HKR,,"ITUFeatureDecoder",1,00 00 00 00 00 00 00 00 
;HKR,,"ITUDecoder",1,1c 13 01 68 3d 90 14 20 00 00 01 b0 9c 00 00 00

; 0: FD_CTL1 Bit 7,6 must be 0,1
; 1: FD_CTL2 has 1/valid must be hi, 1/use valid, 1/edge
; 2: FD_STA is read-only.
; 3: FD_INSYNC is number of 47s to trigger "in sync".
; 4: FD_OUTSYNC is number of 47s to trigger "out of sync".
; 5: FD_MAXBYTE1 is low-order of bytes per packet.
; 6: FD_MAXBYTE2 is high-order of bytes per packet.
; 7: Top byte is unused.
; 
; static UCHAR TSFeatureDecoderSetup[8]  = {0x40,0x06,0x00,0x02,0x02,0xbc,0x00,0x00,};
; 
;               BYTE       0  1  2  3  4  5  6  7      
HKR,,"TSFeatureDecoder1",1,40,04,00,01,02,80,00,00 	;NEC61151
HKR,,"TSFeatureDecoder2",1,42,06,00,02,02,BC,00,00 	;ZL353

;------------------------------------------------------------------------------
;  Capture driver sections (Windows XP)
;------------------------------------------------------------------------------
[AVMNgCap60.NT]
Include=ks.inf, wdmaudio.inf, kscaptur.inf, bda.inf
Needs=KS.Registration, WDMAUDIO.Registration.NT, KSCAPTUR.Registration.NT, BDA.Installation.NT
AddReg=AVMNgCap60.NT.AddReg
RegisterDlls=DSFilters.RegDLL

[AVMNgCap60.NT.Services]
AddService=AVMNgCapM779,0x00000002,AVMNgCap.Service

[AVMNgCap.Service]
DisplayName=%AVMNgCap.ServiceDesc%
ServiceType    = 1   ; SERVICE_KERNEL_DRIVER
StartType      = 3   ; SERVICE_DEMAND_START
ErrorControl   = 1   ; SERVICE_ERROR_NORMAL
ServiceBinary=%12%\AVerCap.sys

[AVMNgCap60.NT.AddReg]
;  Pin names
HKLM,SYSTEM\CurrentControlSet\Control\MediaCategories\%NgeneCaptureAnalogAudioInputName%,"Name",,"Analog Audio Input"
HKLM,SYSTEM\CurrentControlSet\Control\MediaCategories\%NgeneCaptureAnalogAudioOutputName%,"Name",,"Audio Capture"
HKLM,SYSTEM\CurrentControlSet\Control\MediaCategories\%NgeneCaptureAnalogI2SOutputName%,"Name",,"I2S Audio"
HKLM,SYSTEM\CurrentControlSet\Control\MediaCategories\%NgeneCaptureAnalogITUOutputName%,"Name",,"Analog ITU Video"
HKLM,SYSTEM\CurrentControlSet\Control\MediaCategories\%NgeneCaptureAnalogPSOutputName%,"Name",,"MPEG2 Program"
HKLM,SYSTEM\CurrentControlSet\Control\MediaInterfaces\{7E5F8269-3B7E-48e8-A92B-AA5A3149248B},,,"AVerMedia Macrovision Detection Property"
HKLM,SYSTEM\CurrentControlSet\Control\MediaInterfaces\{7E5F8269-3B7E-48e8-A92B-AA5A3149248B},IID,1,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
HKLM,SYSTEM\CurrentControlSet\Control\MediaCategories\%AVerAnalogAudioOutputName%,"Name",,"Audio Output"
HKLM,SYSTEM\CurrentControlSet\Control\MediaCategories\%AVerAnalogAudioInputName%,"Name",,"Audio Input"

; ----------------------------------------------------------------------------
; Capture configuration
; Config\
;  VideoStandard : Default video standard
;           one of the %KS_AnalogVideo_XXX% values
;
;    HKR,"Config","VBIMode",%REG_DWORD%,0xNNNNNNNN
;    HKR,"Config","StandardsSupported",%REG_DWORD%,0xNNNNNNNN
;    
;  VBIMode
;      Bit 0 :  Use Closed Caption polling via i2c (implies bit 1 and 2 also)
;      Bit 1 :  Use Hardware VBI slicer
;      Bit 2 :  VBI Data will be supplied from other source
;               (i.e. extracted from mpeg data stream, requires custom
;               extension of driver)
;      default: 0x00000000
;               
;  StandardsSupported
;        Any combinations of KS_AnalogVideo_XXX values (see inf file)
;        Most common values:
;            0x00000A07  All 60 Hz Standards
;            0x00000003  Common NTSC Standards (US/Japan)
;            0x00000001  US only NTSC
;            0x001FF5F0  All 50 Hz Standards
;            0x001005F0  All 50 Hz PAL Standards
;            0x000FF000  All SECAM Standards 
;            0x0013F5F0  All 50 Hz Standards but SECAM L/L'
;
;  HWMpegEncoder
;	Bit 0 : NEC61151 Encoder
;	Bit 1 : Capture pin
;	Bit 2 : Preview Pin
;	Bit 3 : Audio Capture pin
;	Bit 4 : Audio Capture Filter
;	Bit 5 : Analog Audio Input (Input pin)
;       NOTE: Bit 1~5 takes effect only when Bit 0 is set to 1. 
;
;  Filter :   bit 0 = Analog Capture 1
;                 1 = Analog Capture 2
;                 2 = Digital Capture 1
;                 3 = Digital Capture 2
;              4-31 = reserved, set to 0
;
; Filter Config :  bit 0 = Analog Tuner 1
;                      1 = Analog Tuner 2
;                      2 = Digital Tuner 1
;                      3 = Digital Tuner 2
;
;                      8  = DVB-T
;                      9  = DVB-C
;                      10 = DVB-S
;                      11 = ATSC
;                      12 - 15  = ISDB-x ???
;                      16 - 31  = Reserved for future standards (China)
;                                     or properity US cable standards
;                      Note: BDA currently only supports DVB-x and ATSC
;
;  Decoder1,Decoder2 : Video/Audio Decoder configuration
;           byte 0 : Decoder type
;           byte 1 : Video Decoder i2c address
;           byte 2 : Audio Decoder i2c address
;           byte 3 : Type of i2c gate (default = 0)
;           byte 4..11 : Parameters to i2c gate
;
;       Tuner types :  0 = Micronas AVF4910A
;
;       I2c Gate : 0 = none
;                  1 = unused
;                  2 = via ngene gpio pin
;                      byte 4 : pin nbr (0-4), high opens the gate.
;                  8 = via IO Expander high active
;                      byte 4 : expander i2c address 
;                      byte 5 : bit mask
;                  9 = via IO Expander low active
;                      byte 4 : expander i2c address 
;                      byte 5 : bit mask
;       I2c Gate bit 7 = 1 : use global mutex. 
;       Type 8,9 assume a switch instead of a gate, it will not switched back
;       on release to reduce i2c traffic.

;  CrossBar,CrossBar1,CrossBar2 : Crossbar configuration
;           byte 0 : Number of input pins
;           byte 1 : default video input pin (normally tuner)
;           byte 2 : default audio input pin (normally tuner)
;           byte 3 : reserved (set to 0)
;       For each pin follow four bytes :
;           byte n+0 : Pin type
;                        0 : Video Tuner
;                        1 : Video Composite
;                        2 : Video SVideo
;                        3 : Video Component (YCrCb,YRYBY)
;                        4 : Audio Tuner
;                        5 : Audio Line in
;                        6 : Audio SPDIF
;           byte n+1 : Input selection
;                      Video pins:
;                         bit 0..3 : Video input (1 = VIN1 .. 4 = VIN4)
;                         bit 4..7 : Chroma input for SVideo (1 = CIN1, 2 = CIN2)
;                      Audio pins:
;                         0 = SIF (Tuner) input
;                         1..4 : Line input (1 = SC1 .. 4 = SC4)
;                         (not used for SPDIF, set to 0)
;           byte n+2 : related audio/video input pin
;           byte n+3 : reserved (set to 0)
;
; Config\Model
;		0 : NONE
;		1 : M1A3
;		2 : A1A1
;   3 : M779
;		4 : A1A3
;		5 : M779_ATSC
HKR,"Config","CrossBar1",1, 08,00,05,00,\
                            00,04,05,00,\	;pin 0
 		  	    01,03,06,00,\	;pin 1: EXT-Composite
                            02,11,06,00,\	;pin 2: EXT-SVideo
  			    01,02,07,00,\	;pin 3: Front-Composite
                            02,11,07,00,\	;pin 4: Front-SVideo
                            04,00,00,00,\	;pin 5: Audio-TV
			    05,01,FF,00,\	;pin 6: Audio-EXT
			    05,02,FF,00		;pin 7: Audio-Front

HKR,"Config","CrossBar2",1, 08,00,05,00,\
                            00,04,05,00,\	;pin 0
 		  	    01,03,06,00,\	;pin 1: EXT-Composite
                            02,11,06,00,\	;pin 2: EXT-SVideo
  			    01,02,07,00,\	;pin 3: Front-Composite
                            02,11,07,00,\	;pin 4: Front-SVideo
                            04,00,00,00,\	;pin 5: Audio-TV
			    05,01,FF,00,\	;pin 6: Audio-EXT
			    05,02,FF,00		;pin 7: Audio-Front


HKR,"Config","Filter",%REG_DWORD%,0x00000109   
HKR,"Config","VideoStandard",%REG_DWORD%,%KS_AnalogVideo_NTSC_M%
HKR,"Config","HWMpegEncoder",%REG_DWORD%,0x3F             
HKR,"Config","VBIMode",%REG_DWORD%,0x00
HKR,"Config","StandardsSupported",%REG_DWORD%,%KS_AnalogVideo_NTSC_M%
HKR,"Config","Model",%REG_DWORD%,0x05
HKR,"Config","Decoder1",1,00,8E,88	;//8E,88
HKR,"Config","Decoder2",1,00,86,80
HKR,"Config","DontVideoBlackIfCP",%REG_DWORD%,0x00000000

HKR,,AssociatedFilters,,"wdmaud,swmidi,redbook"
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,,"Audio capture device"
HKR,Drivers\mixer\wdmaud.drv,Description,,"Audio capture device"

[AVMNgCap60.NT.Interfaces]
AddInterface = %KSCATEGORY_CAPTURE%, %KSSTRING_Ngene_AnalogCaptureFilter1%, Ngene.AnalogCapture.Filter1
AddInterface = %KSCATEGORY_CAPTURE%, %KSSTRING_Ngene_AnalogCaptureFilter2%, Ngene.AnalogCapture.Filter2
AddInterface = %KSCATEGORY_VIDEO%, %KSSTRING_Ngene_AnalogCaptureFilter1%, Ngene.AnalogCapture.Filter1
AddInterface = %KSCATEGORY_VIDEO%, %KSSTRING_Ngene_AnalogCaptureFilter2%, Ngene.AnalogCapture.Filter2
AddInterface = %KSCATEGORY_TVAUDIO%, %KSSTRING_Ngene_TvAudioFilter1%, Ngene.TvAudio.Filter1
AddInterface = %KSCATEGORY_TVAUDIO%, %KSSTRING_Ngene_TvAudioFilter2%, Ngene.TvAudio.Filter2
AddInterface = %KSCATEGORY_CROSSBAR%, %KSSTRING_Ngene_CrossBarFilter1%, Ngene.CrossBar.Filter1
AddInterface = %KSCATEGORY_CROSSBAR%, %KSSTRING_Ngene_CrossBarFilter2%, Ngene.CrossBar.Filter2
AddInterface = %KSCATEGORY_ENCODER%, %KSSTRING_Ngene_EncoderFilter1%, Ngene.Encoder.Filter1
AddInterface = %KSCATEGORY_ENCODER%, %KSSTRING_Ngene_EncoderFilter2%, Ngene.Encoder.Filter2
AddInterface = %KSCATEGORY_MULTIPLEXER%, %KSSTRING_Ngene_EncoderFilter1%, Ngene.Encoder.Filter1
AddInterface = %KSCATEGORY_MULTIPLEXER%, %KSSTRING_Ngene_EncoderFilter2%, Ngene.Encoder.Filter2
AddInterface = %KSCATEGORY_BDA_RECEIVER_COMPONENT%, %KSSTRING_Ngene_DigitalCaptureFilter1%, Ngene.DigitalCapture.Filter1
AddInterface = %KSCATEGORY_BDA_RECEIVER_COMPONENT%, %KSSTRING_Ngene_DigitalCaptureFilter2%, Ngene.DigitalCapture.Filter2
AddInterface = %KSCATEGORY_AUDIO%,%KSSTRING_AVer_AudioCaptureFilter1%,AVer.AudioCapture.Filter1
AddInterface = %KSCATEGORY_AUDIO%,%KSSTRING_AVer_AudioCaptureFilter2%,AVer.AudioCapture.Filter2
AddInterface = %KSCATEGORY_CAPTURE%,%KSSTRING_AVer_AudioCaptureFilter1%,AVer.AudioCapture.Filter1
AddInterface = %KSCATEGORY_CAPTURE%,%KSSTRING_AVer_AudioCaptureFilter2%,AVer.AudioCapture.Filter2

[AVer.AudioCapture.Filter1]
AddReg=AVer.AudioCapture.Filter1.AddReg

[AVer.AudioCapture.Filter2]
AddReg=AVer.AudioCapture.Filter2.AddReg

[AVer.AudioCapture.Filter1.AddReg]
HKR,,CLSID,,%Proxy.CLSID%
HKR,,FriendlyName,,%AVer.AudioCapture.Filter1Desc%

[AVer.AudioCapture.Filter2.AddReg]
HKR,,CLSID,,%Proxy.CLSID%
HKR,,FriendlyName,,%AVer.AudioCapture.Filter2Desc%

[Ngene.TvAudio.Filter1]
AddReg=Ngene.TvAudio.Filter1.AddReg

[Ngene.TvAudio.Filter1.AddReg]
HKR,,CLSID,,%TvAudio.CLSID%
HKR,,FriendlyName,,%Ngene.TvAudio.Filter1Desc%

[Ngene.TvAudio.Filter2]
AddReg=Ngene.TvAudio.Filter2.AddReg

[Ngene.TvAudio.Filter2.AddReg]
HKR,,CLSID,,%TvAudio.CLSID%
HKR,,FriendlyName,,%Ngene.TvAudio.Filter2Desc%

[Ngene.CrossBar.Filter1]
AddReg=Ngene.CrossBar.Filter1.AddReg

[Ngene.CrossBar.Filter1.AddReg]
HKR,,CLSID,,%CrossBar.CLSID%
HKR,,FriendlyName,,%Ngene.CrossBar.Filter1Desc%

[Ngene.CrossBar.Filter2]
AddReg=Ngene.CrossBar.Filter2.AddReg

[Ngene.CrossBar.Filter2.AddReg]
HKR,,CLSID,,%CrossBar.CLSID%
HKR,,FriendlyName,,%Ngene.CrossBar.Filter2Desc%

[Ngene.AnalogCapture.Filter1]
AddReg=Ngene.AnalogCapture.Filter1.AddReg

[Ngene.AnalogCapture.Filter1.AddReg]
HKR,,CLSID,,%Proxy.CLSID%
HKR,,FriendlyName,,%Ngene.AnalogCapture.Filter1Desc%

[Ngene.AnalogCapture.Filter2]
AddReg=Ngene.AnalogCapture.Filter2.AddReg

[Ngene.AnalogCapture.Filter2.AddReg]
HKR,,CLSID,,%Proxy.CLSID%
HKR,,FriendlyName,,%Ngene.AnalogCapture.Filter2Desc%

[Ngene.DigitalCapture.Filter1]
AddReg=Ngene.DigitalCapture.Filter1.AddReg

[Ngene.DigitalCapture.Filter1.AddReg]
HKR,,CLSID,,%Proxy.CLSID%
HKR,,FriendlyName,,%Ngene.DigitalCapture.Filter1Desc%

[Ngene.DigitalCapture.Filter2]
AddReg=Ngene.DigitalCapture.Filter2.AddReg

[Ngene.DigitalCapture.Filter2.AddReg]
HKR,,CLSID,,%Proxy.CLSID%
HKR,,FriendlyName,,%Ngene.DigitalCapture.Filter2Desc%

;-----------------------------------------------------------------------------
;  Tuner driver sections (Windows XP)
;------------------------------------------------------------------------------

[AVMNgTun.NT]
AddReg=AVMNgTun.AddReg
;Reboot

[AVMNgTun.NT.Services]
AddService=AVMNgTunM779,0x00000002,AVMNgTun.Service

[AVMNgTun.Service]
DisplayName=%AVMNgTun.ServiceDesc%
ServiceType    = 1   ; SERVICE_KERNEL_DRIVER
StartType      = 3   ; SERVICE_DEMAND_START
ErrorControl   = 1   ; SERVICE_ERROR_NORMAL
ServiceBinary=%12%\AVerTun.sys
; LoadOrderGroup=ExtendedBase

[AVMNgTun.NT.Interfaces]
AddInterface = %KSCATEGORY_TVTUNER%, %KSSTRING_Ngene_TvTunerFilter1%, Ngene.AnalogTuner.Filter1
AddInterface = %KSCATEGORY_TVTUNER%, %KSSTRING_Ngene_TvTunerFilter2%, Ngene.AnalogTuner.Filter2
AddInterface = %KSCATEGORY_BDA_NETWORK_TUNER%, %KSSTRING_Ngene_BdaATSCTunerFilter1%, Ngene.ATSCTuner.Filter1
AddInterface = %KSCATEGORY_BDA_NETWORK_TUNER%, %KSSTRING_Ngene_BdaATSCTunerFilter2%, Ngene.ATSCTuner.Filter2

; ----------------------------------------------------------------------------
; Tuner configuration
;
; Config1\Filter,Config2\Filter
;         bit 0 = Analog TV Tuner
;             1 = DVB-T 
;             2 = DVB-C         
;             3 = DVB-S         
;             4 = ATSC         
;             5 - 7  = ISDB-x ???         
;             8 - 31  = Reserved for future standards (China)         
;                       or properity US cable standards         
;        default: 0x00000001 
;
;   Note: BDA currently only supports DVB-x and ATSC
;         for now only one digital standard will be allowed
;         can be enhanced in the future i.e. for DVB-C/ATSC combi cards
;
; Digital\BandwidthSelect : frequency for automatic DVBT Bandwidth select
;                           Set to          0 for 6 MHz countries (Taiwan,South America)
;                           Set to  299000000 for 7/8 Mhz countries (most Pal B/G countries)
;                           Set to          1 for 8 Mhz countries (i.e. France)
;                           Set to 1000000000 for 7 Mhz countries (i.e. Australia)
;         This setting only has effect for applications which don't select
;         the bandwidth as required. 
;
; Config1\Tuner,Config2\Tuner : Tuner frontend and analog demodulator configuration
;           byte 0 : Tuner type
;           byte 1 : Frontend i2c address
;           byte 2 : Analog demodulator i2c address (types 0 - 239 )
;                    Ngene gpio pin to reset tuner  (types 240-255 )
;                          Bit 3 = 0 : low active reset
;                          Bit 3 = 1 : high active reset
;		     For M1A3 board:
;			   0xC1 = 1st channel of M1A3						
;                          0xC2 = 2nd channel of M1A3
;
;           byte 3 : Type of i2c gate (default = 0)  (see below)
;           byte 4..11 : Parameters to i2c gate (see below)
;
;       Tuner types :  0 (0x00) = Microtune 3x0819,3x0909 with DRX3960A (All Analog, DVBT supported)
;                      1 (0x01) = Microtune 3x0823 with DRX3960A (M/N, DVBT 6 MHz and  ATSC supported)
;                      2 (0x02) = Philips FQ1216ME MK3		BG/DK/I/L
;                      3 (0x03) = Philips FQ1216AME MK4	BG/DK/I/L 
;                      4 (0x04) = Philips FQ1216ME MK5		BG/DK/I/L 
;                      5 (0x05) = Philips FQ1236 MK3		M/N 
;                      6 (0x06) = Philips FQ1236A MK4		M/N 
;                      7 (0x07) = Philips FQ1236 MK5		M/N
;                      8 (0x08) = Philips FQ1286 MK3		M/N-EAJ
;                      9 (0x09) = Philips FQ1286A MK4		M/N-EAJ 
;                     10 (0x0A) = Philips FQ1286 MK5		M/N-EAJ
;                     11 (0x0B) = Philips FM1216ME MK3		BG/DK/I/L
;                     12 (0x0C) = Philips FM1216AME MK4	BG/DK/I/L 
;                     13 (0x0D) = Philips FM1216ME MK5		BG/DK/I/L 
;                     14 (0x0E) = Philips FM1236 MK3		M/N 
;                     15 (0x0F) = Philips FM1236A MK4		M/N 
;                     16 (0x10) = Philips FM1236 MK5		M/N
;                     17 (0x11) = Philips FM1286 MK3		M/N-EAJ
;                     18 (0x12) = Philips FM1286A MK4		M/N-EAJ 
;                     19 (0x13) = Philips FM1286 MK5		M/N-EAJ
;                     20 (0x14) = Microtune 3x0819,3x0909  DVBT
;                     21 (0x15) = Microtune 3x0823         DVBT 6 MHz, ATSC
;                     22 (0x16) = Thomson DTT7520x         DVBT
;                     23 (0x17) = Philips FMD1216ME        BG/DK/I/L, DVBT 7/8 MHz
;
;                    224 (0xE0) = Microtune MT2060         DVBT                 
;                    225 (0xE1) = Microtune MT2060         DVBT 6 MHz, ATSC     
;                    226 (0xE2) = Microtune MT2060         All Analog, DVBT     
;                    227 (0xE3) = Microtune MT2060         M/N, DVBT 6 MHz, ATSC
;
;                    240 (0xF0) = XC2028 Silicon tuner
;                    241 (0xF1) = XC3028 Silicon tuner
;
;		     176 (0xB0) = XC3028 Silicon tuner for M779 board
;
;                    255 [0xFF] = use the tuner defined on other channel (SHARING)
;
; Config1\Audio,Config2\AudioTuner : audio demodulator configuration
;           byte 0 : Demodulator type (only 00 defined = MSP Part of AVFA491x
;           byte 1 : Demodulator i2c address
;           byte 2 : Input select for FM Radio
;                       0 : SIF Input (preferred)
;                       1-4 : Line in 1 - 4
;           byte 3 : Type of i2c gate (default = 0)  (see below)
;           byte 4..11 : Parameters to i2c gate (see below)
;                    
;       I2c Gate : 0 = none
;                  1 = via digital demodulator
;                  2 = via ngene gpio pin
;                      byte 4 : pin nbr (0-4), high opens the gate.
;                  8 = via IO Expander high active
;                      byte 4 : expander i2c address 
;                      byte 5 : bit mask
;                  9 = via IO Expander low active
;                      byte 4 : expander i2c address 
;                      byte 5 : bit mask
;       I2c Gate bit 7 = 1 : use global mutex. Needed if more than the tuner will be switched
;       Type 8,9 assume a switch instead of a gate, it will not switched back
;       on release to reduce i2c traffic.
;
; General\Model
;		0 : NONE
;		1 : M1A3
;		2 : A1A1
;               3 : M779
;		4 : A1A3
;
[AVMNgTun.AddReg]
HKR,"Config1","Tuner",1,B0,C2,01
HKR,"Config1","Audio",1,00,88,00
HKR,"Config1","Filter",%REG_DWORD%,0x00000001
HKR,"Config2","Tuner",1,B0,C2,02
HKR,"Config2","Audio",1,00,88,00
HKR,"Config2","Filter",%REG_DWORD%,0x00000010
HKR,"General","Model",%REG_DWORD%,0x00000005

[Ngene.AnalogTuner.Filter1]
AddReg=Ngene.AnalogTuner.Filter1.AddReg

[Ngene.AnalogTuner.Filter1.AddReg]
HKR,,CLSID,,%TvTuner.CLSID%
HKR,,FriendlyName,,%Ngene.AnalogTuner.Filter1Desc%

[Ngene.AnalogTuner.Filter2]
AddReg=Ngene.AnalogTuner.Filter2.AddReg

[Ngene.AnalogTuner.Filter2.AddReg]
HKR,,CLSID,,%TvTuner.CLSID%
HKR,,FriendlyName,,%Ngene.AnalogTuner.Filter2Desc%

[Ngene.DVBTTuner.Filter1]
AddReg=Ngene.DVBTTuner.Filter1.AddReg

[Ngene.DVBTTuner.Filter1.AddReg]
HKR,,CLSID,,%Proxy.CLSID%
HKR,,FriendlyName,,%Ngene.DVBTTuner.Filter1Desc%

[Ngene.DVBTTuner.Filter2]
AddReg=Ngene.DVBTTuner.Filter2.AddReg

[Ngene.DVBTTuner.Filter2.AddReg]
HKR,,CLSID,,%Proxy.CLSID%
HKR,,FriendlyName,,%Ngene.DVBTTuner.Filter2Desc%

[Ngene.ATSCTuner.Filter1]
AddReg=Ngene.ATSCTuner.Filter1.AddReg

[Ngene.ATSCTuner.Filter1.AddReg]
HKR,,CLSID,,%Proxy.CLSID%
HKR,,FriendlyName,,%Ngene.ATSCTuner.Filter1Desc%

[Ngene.ATSCTuner.Filter2]
AddReg=Ngene.ATSCTuner.Filter2.AddReg

[Ngene.ATSCTuner.Filter2.AddReg]
HKR,,CLSID,,%Proxy.CLSID%
HKR,,FriendlyName,,%Ngene.ATSCTuner.Filter2Desc%

;------------------------------------------------------------------------------
;  Encoder driver sections
;------------------------------------------------------------------------------
[Ngene.Encoder.Filter1]
AddReg=Ngene.Encoder.Filter1.AddReg

[Ngene.Encoder.Filter1.AddReg]
HKR,,CLSID,,%Proxy.CLSID%
HKR,,FriendlyName,,%Ngene.Encoder.Filter1Desc%
; 
; IVideoEncoder proxy plug-in
;
HKR,Interfaces\{B43C4EEC-8C32-4791-9102-508ADA5EE8E7},,,
;
; ICodecAPI proxy plug-in
;
HKR,Interfaces\{7ff0997a-1999-4286-a73c-622b8814e7eb},,,
;
; ICodecAPI/IVideoEncoder proxy plug-in
;
HKR,Interfaces\{b05dabd9-56e5-4fdc-afa4-8a47e91f1c9c},,,
;
; Dynamic data rate change notify
;
HKR,Capabilities,"{BB4FAA02-596C-4129-8FB3-74E75421FA02}",0x00010001,1

[Ngene.Encoder.Filter2]
AddReg=Ngene.Encoder.Filter2.AddReg

[Ngene.Encoder.Filter2.AddReg]
HKR,,CLSID,,%Proxy.CLSID%
HKR,,FriendlyName,,%Ngene.Encoder.Filter2Desc%
;
; IVideoEncoder proxy plug-in
;
HKR,Interfaces\{B43C4EEC-8C32-4791-9102-508ADA5EE8E7},,,
;
; ICodecAPI proxy plug-in
;
HKR,Interfaces\{7ff0997a-1999-4286-a73c-622b8814e7eb},,,
;
; ICodecAPI/IVideoEncoder proxy plug-in
;
HKR,Interfaces\{b05dabd9-56e5-4fdc-afa4-8a47e91f1c9c},,,
;
; Dynamic data rate change notify
;
HKR,Capabilities,"{BB4FAA02-596C-4129-8FB3-74E75421FA02}",0x00010001,1

;------------------------------------------------------------------------------
;  String Definitions
;------------------------------------------------------------------------------
[Strings]
KSSTRING_Ngene_TvTunerFilter1="{2745a786-e8ca-11d8-a988-004030004d56}"
KSSTRING_Ngene_TvTunerFilter2="{2745a787-e8ca-11d8-a988-004030004d56}"
KSSTRING_Ngene_TvAudioFilter1="{2745a788-e8ca-11d8-a988-004030004d56}"
KSSTRING_Ngene_TvAudioFilter2="{2745a789-e8ca-11d8-a988-004030004d56}"
KSSTRING_Ngene_CrossBarFilter1="{2745a78b-e8ca-11d8-a988-004030004d56}"
KSSTRING_Ngene_CrossBarFilter2="{2745a78c-e8ca-11d8-a988-004030004d56}"
KSSTRING_Ngene_AnalogCaptureFilter1="{2745a78f-e8ca-11d8-a988-004030005452}"
KSSTRING_Ngene_AnalogCaptureFilter2="{2745a790-e8ca-11d8-a988-004030005452}"
KSSTRING_Ngene_DigitalCaptureFilter1="{2745a796-e8ca-11d8-a988-004030005452}"
KSSTRING_Ngene_DigitalCaptureFilter2="{2745a797-e8ca-11d8-a988-004030005452}"
KSSTRING_Ngene_BdaTunerFilter1="{2745a799-e8ca-11d8-a988-004030004d56}"
KSSTRING_Ngene_BdaTunerFilter2="{2745a79a-e8ca-11d8-a988-004030004d56}"
KSSTRING_Ngene_EncoderFilter1="{2745a7a3-e8ca-11d8-a988-004030004d56}"
KSSTRING_Ngene_EncoderFilter2="{2745a7a4-e8ca-11d8-a988-004030004d56}"
KSSTRING_Ngene_BdaATSCTunerFilter1="{2745a7ab-e8ca-11d8-a988-004030004d56}"
KSSTRING_Ngene_BdaATSCTunerFilter2="{2745a7ac-e8ca-11d8-a988-004030004d56}"
KSSTRING_Ngene_BdaDVBTTunerFilter1="{2745a7ad-e8ca-11d8-a988-004030004d56}"
KSSTRING_Ngene_BdaDVBTTunerFilter2="{2745a7ae-e8ca-11d8-a988-004030004d56}"
KSSTRING_AVer_AudioCaptureFilter1="{ba5bd66d-2ae5-499c-82b1-bb86df102f5a}"
KSSTRING_AVer_AudioCaptureFilter2="{7cd6c131-8711-4b82-ad89-17d2590b563a}"

NgeneCaptureAnalogAudioInputName="{2745a791-e8ca-11d8-a988-004030005452}"
NgeneCaptureAnalogAudioOutputName="{2745a792-e8ca-11d8-a988-004030005452}"
NgeneCaptureAnalogI2SOutputName="{2826B366-7B11-4e3b-9DB7-3509A410E224}"
NgeneCaptureAnalogITUOutputName="{49F5F62F-E2A9-4daf-85D7-DE9C74011A32}"
NgeneCaptureAnalogPSOutputName="{dda87b83-65db-4aec-82d0-79FBE67D2BB6}"
AVerAnalogAudioInputName="{014A255C-7D01-4bcc-A07B-1CED5D9D9236}"
AVerAnalogAudioOutputName="{066526CC-9A1B-46d8-9CDE-63E0FC97FF0A}"

KSCATEGORY_CAPTURE                = "{65E8773D-8F56-11D0-A3B9-00A0C9223196}"
KSCATEGORY_VIDEO                  = "{6994AD05-93EF-11D0-A3CC-00A0C9223196}"
KSCATEGORY_AUDIO                  = "{6994AD04-93EF-11D0-A3CC-00A0C9223196}"
KSCATEGORY_CROSSBAR               = "{a799a801-a46d-11d0-a18c-00a02401dcd4}"
KSCATEGORY_TVAUDIO                = "{a799a802-a46d-11d0-a18c-00a02401dcd4}"
KSCATEGORY_TVTUNER                = "{a799a800-a46d-11d0-a18c-00a02401dcd4}"
KSCATEGORY_BDA_RECEIVER_COMPONENT = "{FD0A5AF4-B41D-11d2-9C95-00C04F7971E0}"
KSCATEGORY_BDA_NETWORK_TUNER      = "{71985F48-1CA1-11d3-9CC8-00C04F7971E0}"
KSCATEGORY_ENCODER		  = "{19689BF6-C384-48FD-AD51-90E58C79F70B}"
KSCATEGORY_MULTIPLEXER		  = "{7A5DE1D3-01A1-452c-B481-4FA2B96271E8}"

Proxy.CLSID    = "{17CCA71B-ECD7-11D0-B908-00A0C9223196}"
CrossBar.CLSID = "{71F96460-78F3-11d0-A18C-00A0C9118956}"
TVAudio.CLSID  = "{71F96462-78F3-11d0-A18C-00A0C9118956}"
TvTuner.CLSID  = "{266EEE40-6C63-11cf-8A03-00AA006ECB65}"

SERVICE_KERNEL_DRIVER=1
SERVICE_DEMAND_START=3
SERVICE_ERROR_NORMAL=1
REG_EXPAND_SZ=0x00020000
REG_DWORD=0x00010001

KS_AnalogVideo_None     = 0x00000000
KS_AnalogVideo_NTSC_M   = 0x00000001
KS_AnalogVideo_NTSC_M_J = 0x00000002
KS_AnalogVideo_NTSC_433 = 0x00000004
KS_AnalogVideo_PAL_B    = 0x00000010
KS_AnalogVideo_PAL_D    = 0x00000020
KS_AnalogVideo_PAL_G    = 0x00000040
KS_AnalogVideo_PAL_H    = 0x00000080
KS_AnalogVideo_PAL_I    = 0x00000100
KS_AnalogVideo_PAL_M    = 0x00000200
KS_AnalogVideo_PAL_N    = 0x00000400
KS_AnalogVideo_PAL_60   = 0x00000800
KS_AnalogVideo_SECAM_B  = 0x00001000
KS_AnalogVideo_SECAM_D  = 0x00002000
KS_AnalogVideo_SECAM_G  = 0x00004000
KS_AnalogVideo_SECAM_H  = 0x00008000
KS_AnalogVideo_SECAM_K  = 0x00010000
KS_AnalogVideo_SECAM_K1 = 0x00020000
KS_AnalogVideo_SECAM_L  = 0x00040000
KS_AnalogVideo_SECAM_L1 = 0x00080000
KS_AnalogVideo_PAL_N_COMBO = 0x00100000
; -----------------------------------------------------------------------------

AVSTRM_INSTALLATION_DISK = "AVerMedia M779 driver installation disk"
MFGNAME="AVerMedia TECHNOLOGIES, Inc."
INSTDISK="AVerMedia M779 Installation Disc"
AVMNgBas.ServiceDesc="AVerMedia M779 Base Driver"
AVMNgCap.ServiceDesc="AVerMedia M779 Audio/Video Capture Driver"
AVMNgTun.ServiceDesc="AVerMedia M779 TVTuner Driver"
AVMNgEnc.ServiceDesc="AVerMedia M779 Encoder Driver"

Ngene.AnalogTuner.Filter1Desc="AVerMedia M779 PCIe TV-Tuner 1"
Ngene.AnalogTuner.Filter2Desc="AVerMedia M779 PCIe TV-Tuner 2"
Ngene.DigitalTuner.Filter1Desc="AVerMedia M779 PCIe BDA-Tuner 1"
Ngene.DigitalTuner.Filter2Desc="AVerMedia M779 PCIe BDA-Tuner 2"
Ngene.TvAudio.Filter1Desc="AVerMedia M779 PCIe Audio Decoder 1"
Ngene.TvAudio.Filter2Desc="AVerMedia M779 PCIe Audio Decoder 2"
Ngene.CrossBar.Filter1Desc="AVerMedia M779 PCIe Crossbar 1"
Ngene.CrossBar.Filter2Desc="AVerMedia M779 PCIe Crossbar 2"
Ngene.AnalogCapture.Filter1Desc="AVerMedia M779 PCIe Audio/Video Capture 1"
Ngene.AnalogCapture.Filter2Desc="AVerMedia M779 PCIe Audio/Video Capture 2"
Ngene.DigitalCapture.Filter1Desc="AVerMedia M779 PCIe Digital Video Capture 1"
Ngene.DigitalCapture.Filter2Desc="AVerMedia M779 PCIe Digital Video Capture 2"
Ngene.Encoder.Filter1Desc="AVerMedia M779 PCIe Encoder 1"
Ngene.Encoder.Filter2Desc="AVerMedia M779 PCIe Encoder 2"
Ngene.DVBTTuner.Filter1Desc="AVerMedia M779 PCIe BDA DVB-T Tuner 1"
Ngene.DVBTTuner.Filter2Desc="AVerMedia M779 PCIe BDA DVB-T Tuner 2"
Ngene.ATSCTuner.Filter1Desc="AVerMedia M779 PCIe BDA ATSC Tuner 1"
Ngene.ATSCTuner.Filter2Desc="AVerMedia M779 PCIe BDA ATSC Tuner 2"
AVer.AudioCapture.Filter1Desc="AVerMedia M779 PCIe Audio Capture 1"
AVer.AudioCapture.Filter2Desc="AVerMedia M779 PCIe Audio Capture 2"

BASE_APPBOARD		="AVerMedia M779 PCIe NTSC/ATSC Hybrid TV Tuner (Bridge)"
CAPTURE_APPBOARD_60	="AVerMedia M779 PCIe NTSC/ATSC Hybrid TV Tuner (Capture)"
TUNER_APPBOARD		="AVerMedia M779 PCIe NTSC/ATSC Hybrid TV Tuner (Tuner)"

SERVICE_DESCRIPTION     ="AVerMedia M779 Driver"