;------------------------------------------------------------------------
; 
;  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 noninfringement, merchantability and/or 
;     fitness for a particular purpose.
;     --------------------------------------------------------------- 
;   
;     Copyright (c) 2006 Hauppauge Computer Work, Inc. 
;     All rights reserved. 
;
;------------------------------------------------------------------------

[Version]
signature="$CHICAGO$"
Class=Media
ClassGUID={4d36e96c-e325-11ce-bfc1-08002be10318}
Provider="Hauppauge Computer Works"
DriverVer=07/24/2007,6.1.103.25191
CatalogFile.ntamd64=HCWUSB264.cat

[Manufacturer]
"Hauppauge"=Hauppauge,NTamd64

[SourceDisksNames.amd64]
1="Hauppauge PVR USB2 AVS Install Disk",,,"DrvAVSD2"
2="Hauppauge PVR USB2 AVS Install Disk (64Bit Components)",,,"DrvAVSD2\64Bit"	
;64bit machine, 64bit components


[SourceDisksFiles.amd64]
HCWUSB264.sys=2
hcwPrxD2.ax=2
hcwCCnvD2.ax=2
HCWD2M_B.rom=1
HCWD2M_C.rom=1
HCWD2416.rom=1
hcwECPPP.ax=2
hcwCP.ax=2

[Hauppauge.NTamd64]
;%CXBUTTERFLY.DeviceDesc%=BUTTERFLY,USB\VID_0572&PID_839C
;%CXBUTTERFLY.DeviceDesc%=BUTTERFLY,USB\VID_04b4&PID_8613
%CXBUTTERFLY.DeviceDesc%=BUTTERFLY,USB\VID_2040&PID_2400

[BUTTERFLY]
Include=    ks.inf, kscaptur.inf, bda.inf, wdmaudio.inf
Needs=      KS.Registration, KSCAPTUR.Registration, BDA.Installation, BDA.Registration, WDMAUDIO.Registration
AddReg=     BUTTERFLY.AddReg,VID.AddReg
CopyFiles=  CXBUTTERFLY.CopyDrivers,DSFilters.CopyFiles
RegisterDlls=DSFilters.RegDLL    

[BUTTERFLY.NT]
Include=    ks.inf, kscaptur.inf,  bda.inf, wdmaudio.inf
Needs=      KS.Registration.NT, KSCAPTUR.Registration.NT, BDA.Installation.NT, WDMAUDIO.Registration
AddReg=     BUTTERFLY.AddReg,VID.AddReg
CopyFiles=  CXBUTTERFLY.CopyDrivers,DSFilters.CopyFiles
RegisterDlls=DSFilters.RegDLL    

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

[CXBUTTERFLY.CopyDrivers]
HCWUSB264.sys
HCWD2416.rom
HCWD2M_B.rom
HCWD2M_C.rom

[DSFilters.CopyFiles]
hcwPrxD2.ax
hcwCCnvD2.ax
hcwECPPP.ax
hcwCP.ax

[DSFilters.RegDLL]
11,,hcwPrxD2.ax,1
11,,hcwCCnvD2.ax,1
11,,hcwECPPP.ax,1
11,,hcwCP.ax,1

[VID.AddReg]
HKR,,DevLoader,,*ntkern
HKR,,NTMPDriver,,HCWUSB264.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%

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

HKLM,%MediaCategories%\%GUID.PINNAME_MPEG_OUT%,Name,,%PinName.MpegOut%
HKLM,%MediaCategories%\%GUID.PINNAME_MPEG_INDEX_OUT%,Name,,%PinName.MpegIndexOut%
HKLM,%MediaCategories%\%GUID.PINNAME_656_OUT%,Name,,%PinName.656Out%
HKLM,%MediaCategories%\%GUID.PINNAME_656_IN%,Name,,%PinName.656In%

;Add the property pages

HKCR,CLSID\%GUID.General_Properties%\InprocServer32,,,hcwPrxD2.ax
HKCR,CLSID\%GUID.General_Properties%\InprocServer32,ThreadingModel,,Both
HKLM,%MediaSets%\%GUID.FALCON_CONTROL_PROPERTIES%\PropertyPages\%GUID.General_Properties%,,,

HKCR,CLSID\%GUID.Video_Properties%\InprocServer32,,,hcwPrxD2.ax
HKCR,CLSID\%GUID.Video_Properties%\InprocServer32,ThreadingModel,,Both
HKLM,%MediaSets%\%GUID.FALCON_CONTROL_PROPERTIES%\PropertyPages\%GUID.Video_Properties%,,,

HKCR,CLSID\%GUID.Audio_Properties%\InprocServer32,,,hcwPrxD2.ax
HKCR,CLSID\%GUID.Audio_Properties%\InprocServer32,ThreadingModel,,Both
HKLM,%MediaSets%\%GUID.FALCON_CONTROL_PROPERTIES%\PropertyPages\%GUID.Audio_Properties%,,,

HKCR,CLSID\%GUID.Noise_Properties%\InprocServer32,,,hcwPrxD2.ax
HKCR,CLSID\%GUID.Noise_Properties%\InprocServer32,ThreadingModel,,Both
HKLM,%MediaSets%\%GUID.FALCON_CONTROL_PROPERTIES%\PropertyPages\%GUID.Noise_Properties%,,,

HKCR,CLSID\%GUID.Pin_Resolution_Prop%\InprocServer32,,,hcwPrxD2.ax
HKCR,CLSID\%GUID.Pin_Resolution_Prop%\InprocServer32,ThreadingModel,,Both
HKLM,%MediaCategories%\%GUID.PINNAME_656_OUT%\PropertyPages\%GUID.Pin_Resolution_Prop%,,,

;Register the encoder and multiplexer classes with Direct X
HKCR,%ActiveMovieCategories%\%GUID.Encoder%,CLSID,,%GUID.Encoder%
HKCR,%ActiveMovieCategories%\%GUID.Encoder%,FriendlyName,,%Category_Encoders%
HKCR,%ActiveMovieCategories%\%GUID.Multiplexer%,CLSID,,%GUID.Multiplexer%
HKCR,%ActiveMovieCategories%\%GUID.Multiplexer%,FriendlyName,,%Category_Multiplexers%

;Register the names of the encoder and multiplexer nodes
HKLM,%MediaCategories%\%GUID.Encoder%,Name,,%Node.Encoder%
HKLM,%MediaCategories%\%GUID.Encoder%,Display,1,00,00,00,00
HKLM,%MediaCategories%\%GUID.Multiplexer%,Name,,%Node.Multiplexer%
HKLM,%MediaCategories%\%GUID.Multiplexer%,Display,1,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%

;Copy protection method enforced by driver
HKR,"DriverData","CpMethod",0x00010001, 0xFE, 0x00, 0x00, 0x00

; Sony format = 1, Philips format = 0
HKR,"DriverData","I2SInputFormat",0x00010001, 0x01, 0x00, 0x00, 0x00


;; Hauppauge API Support
HKLM,"Software\WOW6432Node\Hauppauge\HcwTVWnd","VCapFilter",0x00000000,"Hauppauge PVR USB2 AVS Video Capture"

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


;---Tuner registry values------
; "TunerType"
; 0x01, Philips FM1236 Mk2 (NTSC-M)
; 0x02, Philips FM1216 Mk2 (PAL B/G)
; 0x03, Philips FM1246 Mk2 (PAL I)
; 0x0A, Philips FM1216 Mk3 (multi-standard Euro)
; 0x0B, Philips FM1236 Mk3 (NTSC-M)
; 0x0C, Philips FI1236 Mk3 (NTSC-M)
; 0x0D, Philips FQ1216 Mk3 (multi-standard Euro)
; 0x0E, Philips FQ1236 Mk3 (NTSC-M)
; 0x0F, Temic 4039 (NTSC-M, FM radio)
; 0x10, XuGuang JS-2S/126 (PAL D/K and I, no radio)
; 0x11, Philips FQ1216 Mk4 (multi-standard Euro)
; 0x12, Philips FQ1236 Mk4 (NTSC-M)
; 0x13, TEA5768HL (FM tuner)
; 0x14, TALF H800Y (Ultra-mini NTSC)
; 0x15, TALF W800Y (Ultra-mini multi-standard Euro)
; 0x16, Philips FQ1236 Mk5 (NTSC-M)
; 0x17, Philips FMD1216 ME (DVB-T & Analog, FM radio)
; 0x18, Thomson (ATSC/NTSC)
; 0x19, LG TAPE-H001F (NTSC, FM radio)
; 0x1A, Xceive XC3028
; 0x1B, Philips FM1236 Mk5 (NTSC-M, FM radio)
; 0x1C, Philips FQ1216 Mk5 (PAL 4-in-1, no radio)


HKR,"DriverData","TunerType",0x00010001, 0x1B, 0x00, 0x00, 0x00
HKR,"DriverData","TunerI2CAddress",0x00010001, 0xC2, 0x00, 0x00, 0x00
HKR,"DriverData","Tuner2IFAddress",0x00010001, 0x86, 0x00, 0x00, 0x00
;------------------------------

[BUTTERFLY.AddReg]

;-------------------------------------------------------------------
; Crossbar AddReg sections
;
;---Crossbar registry values---
;
; Note: For each pin on the crossbar, specify the following:
; (1) Pin type
;     0 - SVIDEO
;     1 - Tuner
;     2 - Composite
;     3 - audio tuner in
;     4 - audio line in
; (2) InputMux (required for Falcon 2) - input mux to use for the selected pin
; (3) RelatedPinIndex
;-------------------------------------------------------------------


;---Crossbar registry values---
;Pin 0 - Tuner In
HKR,"DriverData\XBarPin0","PinType",0x00010001, 0x01,0x00,0x00,0x00
HKR,"DriverData\XBarPin0","InputMux",0x00010001, 0x07,0x08,0x00,0x00
HKR,"DriverData\XBarPin0","RelatedPinIndex",0x00010001, 0x03,0x00,0x00,0x00

;Pin 1 - Composite in
HKR,"DriverData\XBarPin1","PinType",0x00010001, 0x02,0x00,0x00,0x00
HKR,"DriverData\XBarPin1","InputMux",0x00010001, 0x03,0x00,0x00,0x00
HKR,"DriverData\XBarPin1","RelatedPinIndex",0x00010001, 0x04,0x00,0x00,0x00

;Pin 2 - S-Video in
HKR,"DriverData\XBarPin2","PinType",0x00010001, 0x00,0x00,0x00,0x00
HKR,"DriverData\XBarPin2","InputMux",0x00010001, 0x01,0x05,0x00,0x00
HKR,"DriverData\XBarPin2","RelatedPinIndex",0x00010001, 0x04,0x00,0x00,0x00

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

;Pin 4 - Audio Line in
HKR,"DriverData\XBarPin4","PinType",0x00010001, 0x04,0x00,0x00,0x00
HKR,"DriverData\XBarPin4","RelatedPinIndex",0x00010001, 0x01,0x00,0x00,0x00

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


;
; Interfaces installation
;

;
; Video
;

[BUTTERFLY.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%,CXXBAR_Interface,
AddInterface={a799a800-a46d-11d0-a18c-00a02401dcd4},%TunerReferenceGuid%,CXTUNE_Interface,
AddInterface=%GUID.Encoder%,%EncoderReferenceGuid%,Encoder_Interface,
AddInterface=%GUID.Multiplexer%,%EncoderReferenceGuid%,Encoder_Interface,
AddInterface=%KSCATEGORY_AUDIO%,%AudioReferenceGuid%,AUD_Interface

[BUTTERFLY.NT.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%,CXXBAR_Interface,
AddInterface={a799a800-a46d-11d0-a18c-00a02401dcd4},%TunerReferenceGuid%,CXTUNE_Interface,
AddInterface=%GUID.Encoder%,%EncoderReferenceGuid%,Encoder_Interface,
AddInterface=%GUID.Multiplexer%,%EncoderReferenceGuid%,Encoder_Interface,
AddInterface=%KSCATEGORY_AUDIO%,%AudioReferenceGuid%,AUD_Interface

[VID_Interface]
AddReg=VID_Interface.AddReg
AddReg=BUTTERFLY_DESCRIPTION.AddReg

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

[BUTTERFLY_DESCRIPTION.AddReg]
HKR,,Description,,%CXBUTTERFLY.DeviceDesc%

[AUD_Interface]
AddReg=AUD_Interface.AddReg

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


[TvAudio_Interface]
AddReg=TvAudio_Interface.AddReg

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

[CXXBAR_Interface]
AddReg=CXXBAR_Interface.AddReg

[CXXBAR_Interface.AddReg]
HKR,,CLSID,,%CLSID_CrossbarFilter%
HKR,,FriendlyName,,%XBARFriendlyName%

[CXTUNE_Interface]
AddReg=CXTUNE_Interface.AddReg

[CXTUNE_Interface.AddReg]
HKR,,CLSID,,%CLSID_CTVTunerFilter%
HKR,,FriendlyName,,%TunerFriendlyName%

[Encoder_Interface]
AddReg=Encoder_Interface.AddReg

[Encoder_Interface.AddReg]
HKR,,CLSID,,{17CCA71B-ECD7-11D0-B908-00A0C9223196}
HKR,,FriendlyName,,%EncoderFriendlyName%
;Add an interface for Microsoft's video bit rate property set
HKR,Interfaces\{B43C4EEC-8C32-4791-9102-508ADA5EE8E7},,,
HKR,Interfaces\{b05dabd9-56e5-4fdc-afa4-8a47e91f1c9c},,,
HKR,Capabilities,,,
HKR,Capabilities,"{BB4FAA02-596C-4129-8FB3-74E75421FA02}", 0x00010001,1


;
; Services installation
;

[BUTTERFLY.Services]
AddService = hcwAVD2,2,VID.ServiceInstall

[BUTTERFLY.NT.Services]
AddService = hcwAVD2,2,VID.ServiceInstall


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

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

[Strings]

;
; Device Names
;
CXBUTTERFLY.DeviceDesc          = "Hauppauge PVR USB2 AVS Video Capture"

;
; Friendly Names
;
VIDFriendlyName              = "Hauppauge PVR USB2 AVS Video Capture"
TVAudioFriendlyName          = "Hauppauge PVR USB2 AVS TvAudio"
TunerFriendlyName            = "Hauppauge PVR USB2 AVS Tuner"
AudioFriendlyName            = "Hauppauge PVR USB2 AVS Audio Capture"
XBARFriendlyName             = "Hauppauge PVR USB2 AVS Crossbar"
EncoderFriendlyName          = "Hauppauge PVR USB2 AVS Encoder"

;
; Reference GUIDS
; Hauppauge Update
; The Reference guids as defined via Conexant cause conflict with 
; other Conexant based products, so we changed all reference Guids.
KsNameFilter                 = "{9B365890-165F-11D0-A195-0020AFD156E4}"

TVAudioReferenceGuid         = "{950D6D64-D8C1-4b8a-B1E2-1E219C8F2362}"
;Conexant_TVAudioReferenceGuid         = "{BD5227E3-96BB-4172-9CD3-D07B25FAC01A}"

XBARReferenceGUID            = "{550EAB02-899D-49fd-8C7D-4767F05421A3}"
;Conexant_XBARReferenceGUID            = "{E4E33899-8D15-47d1-BECC-113883D0BBC9}"

TunerReferenceGuid           = "{D761DD41-8333-4b5d-AFA6-3E7E834A197C}"
;Conexant_TunerReferenceGuid           = "{EBE24D78-F037-4932-B879-CCEFEFE78750}"

EncoderReferenceGuid         = "{B4C1A163-C9AB-41c5-BAF2-B3B14B15ED4E}"
;Conexant_EncoderReferenceGuid         = "{03688831-8667-4c61-B5D6-4A361F025D2D}"

AudioReferenceGuid           = "{F906935A-34B7-4f65-9925-ACF5568226BB}"
;Conexant_AudioReferenceGuid           = "{AB766B70-AFB3-4461-A4DE-22E9C516B7FE}"



;
; Pin Name GUIDS
;
GUID.PINNAME_ANALOG_AUDIO_IN = "{3E2D189F-B15C-4447-96F1-BD1D64FB99BA}"
GUID.PINNAME_AUDIO_OUT       = "{9DA02733-7910-40f2-95DD-0441676C9A9B}"
GUID.PINNAME_MPEG_OUT        = "{0336609B-16B8-420b-9A6F-E65BB03447BA}"
GUID.PINNAME_MPEG_INDEX_OUT  = "{E298342F-F60B-4c61-9C0D-4EDACDA8007F}"
GUID.PINNAME_656_OUT         = "{4EF89945-4D43-48d7-A442-A1B4E7813036}"
GUID.PINNAME_656_IN          = "{0E49C928-C95B-4e72-B1A5-A1B9EA79EB6B}"
GUID.PinName_Capture         = "{FB6C4281-0353-11d1-905F-0000C0CC16BA}"


;
; Pin Names
;
PinName.AnalogAudioOut       = "Audio Out"
PinName.MpegOut              = "MPEG" 
PinName.MpegIndexOut         = "Mpeg Index" 
PinName.656Out               = "656" 
PinName.656In                = "656" 
Pin.p2AnalogAudioIn          = "Analog Audio In"

;
; PROPSETIDs in the driver
;
GUID.FALCON_CONTROL_PROPERTIES  = "{379AF833-BCF2-41db-A33B-89AB905A86DA}"

;
; Property page GUIDS
;
GUID.General_Properties      = "{D6AF260A-638A-4884-AFB1-268E49B7B4EB}"
GUID.Video_Properties        = "{33C0BD6A-38D1-4ebe-9E45-059A58EDDD90}"
GUID.Audio_Properties        = "{35CC8FDB-7C8D-4d64-A043-E34AE4D84EDD}"
GUID.Noise_Properties        = "{E89A9B65-FEE0-4b8f-A80D-E8471D5EEF05}"
GUID.Pin_Resolution_Prop     = "{DD245852-4E33-42ca-8848-54747A8623E9}"


;
; Other Strings
;

KSCATEGORY_AUDIO             = "{6994AD04-93EF-11D0-A3CC-00A0C9223196}"
CLSID_TVAudioFilter          = "{71F96462-78F3-11d0-A18C-00A0C9118956}"
CLSID_CrossbarFilter         = "{71F96460-78F3-11d0-A18C-00A0C9118956}"
CLSID_CTVTunerFilter         = "{266EEE40-6C63-11cf-8A03-00AA006ECB65}"

GUID.Encoder                 = "{19689BF6-C384-48fd-AD51-90E58C79F70B}"
GUID.Multiplexer             = "{7A5DE1D3-01A1-452c-B481-4FA2B96271E8}"

Category_Encoders            = "WDM Streaming Encoder Devices"
Category_Multiplexers        = "WDM Streaming Multiplexer Devices"
Node.Encoder                 = "Encoder"
Node.Multiplexer             = "Multiplexer"

Proxy.CLSID                  = "{17CCA71B-ECD7-11D0-B908-00A0C9223196}"

ActiveMovieCategories        = "CLSID\{da4e3da0-d07d-11d0-bd50-00a0c911ce86}\Instance"
MediaCategories              = "SYSTEM\CurrentControlSet\Control\MediaCategories"
MediaSets                    = "System\CurrentControlSet\Control\MediaSets"
MediaInterfaces              = "System\CurrentControlSet\Control\MediaInterfaces"



