;
; INF file for installing Realtek USB Audio Driver
; Copyright (c) Realtek Semiconductor Corp.
;

[Version]
CatalogFile=RtkUsbAD.cat
Signature="$Windows NT$"
Class=MEDIA
ClassGUID={4d36e96c-e325-11ce-bfc1-08002be10318}
Provider=%OrganizationName%
DriverPackageType=PlugAndPlay
DriverPackageDisplayName=%PackageDisplayName%
DriverVer=11/10/2017,6.3.9600.122

[Manufacturer]
%MfgName%=RtkUsbAudio,NTx86

[SourceDisksNames]
222=%InsDisksName%,,,

[SourceDisksFiles]
RtkUsbAD.sys=222
RUAudCoI.dll=222
RtSetupAPI.dll=222
RtkMicU32.dll=222
RtkMcup32.dll=222
RtkApoApi.dll=222
RtkCfg.dll=222
RtkUGUI.exe=222
WhiteJadeUSBSkinImages.dll=222
GreyUSBSkinImages.dll=222


[DestinationDirs]
RtkUsbAD.CopyList=10,system32\drivers
RtSetupAPI.CopyList = 11
RtkUSBAudCoInst.CopyList = 11
SfxFx.CopyList = 11
RTCOMDLL.CopyList  = 11,"RTCOM"

[SignatureAttributes]
RtkUsbAD.sys=SignatureAttributes.DRM
RtkMicU32.dll=SignatureAttributes.PETrust
RtkApoApi.dll=SignatureAttributes.PETrust
RtkCfg.dll=SignatureAttributes.PETrust

[SignatureAttributes.DRM]
DRMLevel=1300

[SignatureAttributes.PETrust]
PETrust=true

[ControlFlags]
ExcludeFromSelect = *

;===== HWIDs ================================================================

[RtkUsbAudio.NTx86]
%USB\CLASS_01.DeviceDesc%=RtkUsbAD,USB\VID_0BDA&PID_4837&MI_00
%USB\CLASS_01.DeviceDesc%=RtkUsbAD,USB\VID_0BDA&PID_4868&MI_00
%USB\CLASS_01.DeviceDesc%=RtkUsbAD,USB\VID_0BDA&PID_4872&MI_00
%USB\CLASS_01.DeviceDesc%=RtkUsbAD,USB\VID_0BDA&PID_48FF&MI_00
Lenovo Hub500 Audio=      RtkUsbAD,USB\VID_17EF&PID_A017&MI_00
;============================================================================

[RtkUsbAD]
Include=ks.inf, wdmaudio.inf
Needs=KS.Registration, WDMAUDIO.Registration, mssysfx.CopyFilesAndRegister
CopyFiles=RtkUsbAD.CopyList, RtSetupAPI.CopyList, SfxFx.CopyList, RTCOMDLL.CopyList
AddReg=RtkUsbAD.AddReg, RtSetupAPI.AddReg
RegisterDlls=SfxFx.RegisterDlls, rtcom.RegisterDlls

[RtkUsbAD.CoInstallers]
CopyFiles = RtkUSBAudCoInst.CopyList
AddReg = RtkUSBAudCoInst.AddReg

[RtkUsbAD.Interfaces]
AddInterface=%KSCATEGORY_AUDIO%,%KSSTRING_FILTER%,RtkUsbAD.Interface.Curve
AddInterface=%KSCATEGORY_CAPTURE%,%KSSTRING_FILTER%,RtkUsbAD.Interface.Curve
AddInterface=%KSCATEGORY_AUDIO%, %KSNAME_RearLineOutWave1%,RtkUsbAD.Interface.WaveOut
AddInterface=%KSCATEGORY_RENDER%,%KSNAME_RearLineOutWave1%,RtkUsbAD.Interface.WaveOut
AddInterface=%KSCATEGORY_AUDIO%, %KSNAME_RearLineOutWave2%,RtkUsbAD.Interface.WaveOut
AddInterface=%KSCATEGORY_RENDER%,%KSNAME_RearLineOutWave2%,RtkUsbAD.Interface.WaveOut
AddInterface=%KSCATEGORY_AUDIO%, %KSNAME_RearLineOutWave3%,RtkUsbAD.Interface.WaveOut
AddInterface=%KSCATEGORY_RENDER%,%KSNAME_RearLineOutWave3%,RtkUsbAD.Interface.WaveOut
AddInterface=%KSCATEGORY_AUDIO%, %KSNAME_RearLineOutWave4%,RtkUsbAD.Interface.WaveOut
AddInterface=%KSCATEGORY_RENDER%,%KSNAME_RearLineOutWave4%,RtkUsbAD.Interface.WaveOut
AddInterface=%KSCATEGORY_AUDIO%,  %KSNAME_RearLineInWave1%,RtkUsbAD.Interface.WaveMicIn
AddInterface=%KSCATEGORY_CAPTURE%,%KSNAME_RearLineInWave1%,RtkUsbAD.Interface.WaveMicIn
AddInterface=%KSCATEGORY_AUDIO%,  %KSNAME_RearLineInWave2%,RtkUsbAD.Interface.Curve
AddInterface=%KSCATEGORY_CAPTURE%,%KSNAME_RearLineInWave2%,RtkUsbAD.Interface.Curve
AddInterface=%KSCATEGORY_AUDIO%,  %KSNAME_RearLineInWave3%,RtkUsbAD.Interface.WaveMicIn
AddInterface=%KSCATEGORY_CAPTURE%,%KSNAME_RearLineInWave3%,RtkUsbAD.Interface.WaveMicIn
AddInterface=%KSCATEGORY_AUDIO%,  %KSNAME_RearLineInWave4%,RtkUsbAD.Interface.Curve
AddInterface=%KSCATEGORY_CAPTURE%,%KSNAME_RearLineInWave4%,RtkUsbAD.Interface.Curve
AddInterface=%KSCATEGORY_AUDIO%,  %KSNAME_RearLineInWave5%,RtkUsbAD.Interface.WaveMicIn
AddInterface=%KSCATEGORY_CAPTURE%,%KSNAME_RearLineInWave5%,RtkUsbAD.Interface.WaveMicIn

[RtkUsbAD.Interface.Curve]
AddReg=RtkUsbAD.Interface.Addreg.Curve

[RtkUsbAD.Interface.AddReg.Curve]
HKR,,FriendlyName,,%USBGenericDesc%
HKR,,CurveType,1,01,00,00,00
HKR,,CLSID,,%Proxy.CLSID%

[RtkUsbAD.Interface.WaveOut]
AddReg=RtkUsbAD.Interface.Addreg.WaveOut, SysFx.AddReg

[RtkUsbAD.Interface.AddReg.WaveOut]
HKR,,FriendlyName,,%USBGenericDesc%
HKR,,CurveType,1,01,00,00,00
HKR,,CLSID,,%Proxy.CLSID%

[RtkUsbAD.Interface.WaveMicIn]
AddReg=RtkUsbAD.Interface.Addreg.WaveMicIn, SysRecFx.AddReg

[RtkUsbAD.Interface.AddReg.WaveMicIn]
HKR,,FriendlyName,,%USBGenericDesc%
HKR,,CurveType,1,01,00,00,00
HKR,,CLSID,,%Proxy.CLSID%

;;**************** NT Install ****************

[RtkUsbAD.NT]
Include=ks.inf, wdmaudio.inf
Needs=KS.Registration, WDMAUDIO.Registration, mssysfx.CopyFilesAndRegister
CopyFiles=RtkUsbAD.CopyList, RtSetupAPI.CopyList, SfxFx.CopyList, RTCOMDLL.CopyList
AddReg=RtkUsbAD.AddReg, RtSetupAPI.AddReg
RegisterDlls=SfxFx.RegisterDlls, rtcom.RegisterDlls

[RtkUsbAD.NT.CoInstallers]
CopyFiles = RtkUSBAudCoInst.CopyList
AddReg = RtkUSBAudCoInst.AddReg

[RtkUsbAD.NT.Interfaces]
AddInterface=%KSCATEGORY_AUDIO%,%KSSTRING_FILTER%,RtkUsbAD.Interface.Curve
AddInterface=%KSCATEGORY_CAPTURE%,%KSSTRING_FILTER%,RtkUsbAD.Interface.Curve
AddInterface=%KSCATEGORY_AUDIO%, %KSNAME_RearLineOutWave1%,RtkUsbAD.Interface.WaveOut
AddInterface=%KSCATEGORY_RENDER%,%KSNAME_RearLineOutWave1%,RtkUsbAD.Interface.WaveOut
AddInterface=%KSCATEGORY_AUDIO%, %KSNAME_RearLineOutWave2%,RtkUsbAD.Interface.WaveOut
AddInterface=%KSCATEGORY_RENDER%,%KSNAME_RearLineOutWave2%,RtkUsbAD.Interface.WaveOut
AddInterface=%KSCATEGORY_AUDIO%, %KSNAME_RearLineOutWave3%,RtkUsbAD.Interface.WaveOut
AddInterface=%KSCATEGORY_RENDER%,%KSNAME_RearLineOutWave3%,RtkUsbAD.Interface.WaveOut
AddInterface=%KSCATEGORY_AUDIO%, %KSNAME_RearLineOutWave4%,RtkUsbAD.Interface.WaveOut
AddInterface=%KSCATEGORY_RENDER%,%KSNAME_RearLineOutWave4%,RtkUsbAD.Interface.WaveOut
AddInterface=%KSCATEGORY_AUDIO%,  %KSNAME_RearLineInWave1%,RtkUsbAD.Interface.WaveMicIn
AddInterface=%KSCATEGORY_CAPTURE%,%KSNAME_RearLineInWave1%,RtkUsbAD.Interface.WaveMicIn
AddInterface=%KSCATEGORY_AUDIO%,  %KSNAME_RearLineInWave2%,RtkUsbAD.Interface.Curve
AddInterface=%KSCATEGORY_CAPTURE%,%KSNAME_RearLineInWave2%,RtkUsbAD.Interface.Curve
AddInterface=%KSCATEGORY_AUDIO%,  %KSNAME_RearLineInWave3%,RtkUsbAD.Interface.WaveMicIn
AddInterface=%KSCATEGORY_CAPTURE%,%KSNAME_RearLineInWave3%,RtkUsbAD.Interface.WaveMicIn
AddInterface=%KSCATEGORY_AUDIO%,  %KSNAME_RearLineInWave4%,RtkUsbAD.Interface.Curve
AddInterface=%KSCATEGORY_CAPTURE%,%KSNAME_RearLineInWave4%,RtkUsbAD.Interface.Curve
AddInterface=%KSCATEGORY_AUDIO%,  %KSNAME_RearLineInWave5%,RtkUsbAD.Interface.WaveMicIn
AddInterface=%KSCATEGORY_CAPTURE%,%KSNAME_RearLineInWave5%,RtkUsbAD.Interface.WaveMicIn

[RtkUsbAD.NT.Services]
AddService = RtkUsbAD,0x00000002, RtkUsbAD_Service_Inst

[RtkUsbAD_Service_Inst]
DisplayName    = %RtkUsbAD.SvcDesc%
ServiceType    = 1                  ; SERVICE_KERNEL_DRIVER
StartType      = 3                  ; SERVICE_DEMAND_START
ErrorControl   = 1                  ; SERVICE_ERROR_NORMAL
ServiceBinary  = %10%\system32\drivers\RtkUsbAD.sys

;============================================================================

[RtkUsbAD.AddReg]
;; Usb audio specific registry update sutff
HKR,,SetupPreferredAudioDevices,3,01,00,00,00
HKR,,AssociatedFilters,,"wdmaud,redbook"
HKR,,Driver,,RtkUsbAD.sys

HKR,,CLSID,,%Proxy.CLSID%

HKR,Drivers,SubClasses,,"wave,midi,mixer,aux"

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

HKR,Drivers\wave\wdmaud.drv,Description,,%USBGenericDesc%
HKR,Drivers\midi\wdmaud.drv,Description,,%USBGenericDesc%
HKR,Drivers\mixer\wdmaud.drv,Description,,%USBGenericDesc%
HKR,Drivers\aux\wdmaud.drv,Description,,%USBGenericDesc%

[RtkUsbAD.CopyList]
RtkUsbAD.sys

[RtkUSBAudCoInst.CopyList]
RUAudCoI.dll

[RtSetupAPI.CopyList]
RtSetupAPI.dll

[SfxFx.CopyList]
RtkMicU32.dll
RtkMcup32.dll
RtkUGUI.exe
WhiteJadeUSBSkinImages.dll
GreyUSBSkinImages.dll
RtkApoApi.dll

[RTCOMDLL.CopyList]
;RTCOMDLL.dll
RtkCfg.dll
;RtDataProc.dll

;============================================================================
[RtSetupAPI.AddReg]
HKLM,%RT_UNINSTALL%,DisplayName,,"Realtek USB Audio"
HKLM,%RT_UNINSTALL%,UninstallString,,%11%"\rundll32.exe RtSetupAPI.dll RealtekUSBAudioInstaller -r -m"
HKLM,%RT_UNINSTALL%,DisplayIcon,,%11%"\RtSetupAPI.dll"
HKLM,%RT_UNINSTALL%,Publisher,,%OrganizationName%
HKLM,%RT_UNINSTALL%,DisplayVersion,,"6.3.9600.122"
HKLM,%RT_UNINSTALL%,InstallLocation,,%16422%"\Realtek\Audio\USB"
HKLM,%RT_UNINSTALL%,NoModify,0x00010001,1
HKLM,%RT_UNINSTALL%,NoRepair,0x00010001,1

;============================================================================

[RtkUSBAudCoInst.AddReg]
HKR,,CoInstallers32,0x00010000,"RUAudCoI.dll,RtkUSBAudCoInstaller"

[SysFx.AddReg]
HKR,"FX\\0",%PKEY_DisplayName%,,%SYSFX_FriendlyName%
HKR,"FX\\0",%PKEY_SYSFX_PreMixClsid%,,%SYSFX_PREMIX_CLSID%
HKR,"FX\\0",%PKEY_SYSFX_PostMixClsid%,,%SYSFX_POSTMIX_CLSID%
HKR,"FX\\0",%PKEY_SYSFX_SFXClsid%,,%SYSFX_SFX_CLSID%
HKR,"FX\\0",%PKEY_SYSFX_MFXClsid%,,%SYSFX_MFX_CLSID%
HKR,"FX\\0",%PKEY_SYSFX_EFXClsid%,,%SYSFX_EFX_CLSID%
HKR,"FX\\0",%PKEY_SYSFX_UiClsid%,,%SYSFX_UI_CLSID%
HKR,"FX\\0",%PKEY_SYSFX_Association%,,%KSNODETYPE_ANY%
HKR,"EP\\0",%PKEY_AudioEndpoint_Association%,,%KSNODETYPE_ANY%
HKR,"EP\\0",%PKEY_AudioEndpoint_Supports_EventDriven_Mode%,0x00010001,0x1
HKR,"FX\\0",%PKEY_SFX_ProcessingModes_Supported_For_Streaming%,0x00010000,%AUDIO_SIGNALPROCESSINGMODE_DEFAULT%
HKR,"FX\\0",%PKEY_MFX_ProcessingModes_Supported_For_Streaming%,0x00010000,%AUDIO_SIGNALPROCESSINGMODE_DEFAULT%
HKR,"FX\\0",%PKEY_EFX_ProcessingModes_Supported_For_Streaming%,0x00010000,%AUDIO_SIGNALPROCESSINGMODE_DEFAULT%

[SysRecFx.AddReg]
HKR,"FX\\0",%PKEY_DisplayName%,,%SYSFX_FriendlyName%
HKR,"FX\\0",%PKEY_SYSFX_PreMixClsid%,,%SYSRECFX_PREMIX_CLSID%
HKR,"FX\\0",%PKEY_SYSFX_MFXClsid%,,%SYSRECFX_MFX_CLSID%
HKR,"FX\\0",%PKEY_SYSFX_EFXClsid%,,%SYSRECFX_EFX_CLSID%
HKR,"FX\\0",%PKEY_SYSFX_UiClsid%,,%SYSFX_UI_CLSID%
HKR,"FX\\0",%PKEY_SYSFX_Association%,,%KSNODETYPE_ANY%

HKR,"EP\\0",%PKEY_AudioEndpoint_Association%,,%KSNODETYPE_ANY%
HKR,"EP\\0",%PKEY_AudioEndpoint_Supports_EventDriven_Mode%,0x00010001,0x1
;HKR,"FX\\0",%PKEY_SFX_ProcessingModes_Supported_For_Streaming%,0x00010000,%AUDIO_SIGNALPROCESSINGMODE_DEFAULT%,%AUDIO_SIGNALPROCESSINGMODE_SPEECH%
;HKR,"FX\\0",%PKEY_MFX_ProcessingModes_Supported_For_Streaming%,0x00010000,%AUDIO_SIGNALPROCESSINGMODE_DEFAULT%,%AUDIO_SIGNALPROCESSINGMODE_SPEECH%
;HKR,"FX\\0",%PKEY_EFX_ProcessingModes_Supported_For_Streaming%,0x00010000,%AUDIO_SIGNALPROCESSINGMODE_DEFAULT%,%AUDIO_SIGNALPROCESSINGMODE_SPEECH%
HKR,"FX\\0",%PKEY_SFX_ProcessingModes_Supported_For_Streaming%,0x00010000,%AUDIO_SIGNALPROCESSINGMODE_DEFAULT%
HKR,"FX\\0",%PKEY_MFX_ProcessingModes_Supported_For_Streaming%,0x00010000,%AUDIO_SIGNALPROCESSINGMODE_DEFAULT%
HKR,"FX\\0",%PKEY_EFX_ProcessingModes_Supported_For_Streaming%,0x00010000,%AUDIO_SIGNALPROCESSINGMODE_DEFAULT%

[SfxFx.RegisterDlls]
11,,RtkMicU32.dll,1
11,,RtkMcup32.dll,1
11,,RtkApoApi.dll,1

[rtcom.RegisterDlls]
;11,RTCOM,RtlCPAPI.dll,1
;11,RTCOM,RTCOMDLL.dll,1
11,RTCOM,RtkCfg.dll,1

[Strings]
OrganizationName="Realtek Semiconductor Corp."
MfgName="Realtek"
USB\CLASS_01.DeviceDesc="Realtek USB Audio"
USBGenericDesc="Realtek USB Audio"
RtkUsbAD.SvcDesc="Realtek USB Audio Driver"

RT_UNINSTALL="Software\Microsoft\Windows\CurrentVersion\Uninstall\{0A46A65D-89AC-464C-8026-3CD44960BD04}"

Proxy.CLSID = "{17CCA71B-ECD7-11D0-B908-00A0C9223196}"
KSCATEGORY_AUDIO="{6994ad04-93ef-11d0-a3cc-00a0c9223196}"
KSCATEGORY_RENDER="{65E8773E-8F56-11D0-A3B9-00A0C9223196}"
KSCATEGORY_CAPTURE="{65E8773D-8F56-11D0-A3B9-00A0C9223196}"
KSSTRING_Filter="{9B365890-165F-11D0-A195-0020AFD156E4}"
KSNAME_Wave="Wave"
KSNAME_Topology="Topology"
KSNAME_RearLineOutWave1="WaveOut1"
KSNAME_RearLineOutWave2="WaveOut2"
KSNAME_RearLineOutWave3="WaveOut3"
KSNAME_RearLineOutWave4="WaveOut4"
KSNAME_RearLineInWave1="WaveIn1"
KSNAME_RearLineInWave2="WaveIn2"
KSNAME_RearLineInWave3="WaveIn3"
KSNAME_RearLineInWave4="WaveIn4"
KSNAME_RearLineInWave5="WaveIn5"

PackageDisplayName="Realtek USB Audio Driver"
InsDisksName=="Realtek USB Audio Installation Disk"

PKEY_DisplayName                = "{B725F130-47EF-101A-A5F1-02608C9EEBAC},10"
PKEY_SYSFX_Association          = "{D04E05A6-594B-4FB6-A80D-01AF5EED7D1D},0"
PKEY_SYSFX_PreMixClsid          = "{D04E05A6-594B-4FB6-A80D-01AF5EED7D1D},1"
PKEY_SYSFX_PostMixClsid         = "{D04E05A6-594B-4FB6-A80D-01AF5EED7D1D},2"
PKEY_SYSFX_SFXClsid             = "{D04E05A6-594B-4FB6-A80D-01AF5EED7D1D},5"
PKEY_SYSFX_MFXClsid             = "{D04E05A6-594B-4FB6-A80D-01AF5EED7D1D},6"
PKEY_SYSFX_EFXClsid             = "{D04E05A6-594B-4FB6-A80D-01AF5EED7D1D},7"
PKEY_SYSFX_UiClsid              = "{D04E05A6-594B-4FB6-A80D-01AF5EED7D1D},3"
KSNODETYPE_ANY                  = "{00000000-0000-0000-0000-000000000000}"

SYSFX_PREMIX_CLSID    = "{DB1DF477-4EDD-44be-8F98-57169D48D1DD}"
SYSFX_POSTMIX_CLSID   = "{A5CEDC48-D8C9-4c37-94C9-D332AFC1786E}"
SYSFX_SFX_CLSID       = "{DDD6EC70-B6A2-460b-BEB2-BB8138FE9CE9}"
SYSFX_MFX_CLSID       = "{ACE4B6FC-0E07-4f56-A9FF-1526DD35AB3B}"
SYSFX_EFX_CLSID       = "{AB8EDD89-64A1-4d58-A961-34E85144060F}"
SYSFX_UI_CLSID        = "{B5240D97-C0EE-4847-AAAE-ADBDA084B967}"
SYSFX_FriendlyName    = "Realtek System Effect"
SYSRECFX_PREMIX_CLSID = "{A1506854-B6DC-4760-A6A3-6AF8A0E55608}"
SYSRECFX_MFX_CLSID = "{AE2E9D99-0B84-415b-82CB-E41F1E5E84D1}"
SYSRECFX_EFX_CLSID = "{A7AC9689-BFB6-4a63-A7E7-B1AF0FE0F343}"

PKEY_SFX_ProcessingModes_Supported_For_Streaming = "{D3993A3F-99C2-4402-B5EC-A92A0367664B},5"
PKEY_MFX_ProcessingModes_Supported_For_Streaming = "{D3993A3F-99C2-4402-B5EC-A92A0367664B},6"
PKEY_EFX_ProcessingModes_Supported_For_Streaming = "{D3993A3F-99C2-4402-B5EC-A92A0367664B},7"
AUDIO_SIGNALPROCESSINGMODE_DEFAULT = "{C18E2F7E-933D-4965-B7D1-1EEF228D2AF3}"
AUDIO_SIGNALPROCESSINGMODE_SPEECH = "{FC1CFC9B-B9D6-4CFA-B5E0-4BB2166878B2}"
PKEY_AudioEndpoint_Supports_EventDriven_Mode = "{1DA5D803-D492-4EDD-8C23-E0C0FFEE7F0E},7"
PKEY_AudioEndpoint_Association  = "{1DA5D803-D492-4EDD-8C23-E0C0FFEE7F0E},2"
