;Copyright (c) 2017 AnotherTec All rights Reserved
;
;Module Name:
;   spadrv.inf
;
;Abstract:
;    INF file for installing AUDIOPROBE SPARTAN A Driver

[Version]
CatalogFile=spadrv.cat
CatalogFile.ntamd64=spadrv64.cat
Signature="$CHICAGO$"
Class=MEDIA
ClassGUID={4d36e96c-e325-11ce-bfc1-08002be10318}
provider=%ProviderName%
;;The following line is used only when the INF comes with the Windows system
;;IHV needs to comment out the following line for their OEM redistributed disk.
;;LayoutFile=layout.inf, layout1.inf, layout2.inf
DriverVer=10/09/2017,1.0.2.4

;You must specify which platform is supported by each SourceDisksNames section
;Valid platform identifiers include .x86, .ia64, .alpha, .axp64
[SourceDisksNames]
222=%DiskDescription%,,,

;You must also specify which platform is supported by each SourceDisksFiles section
;Valid platform identifiers include .x86, .ia64, .alpha, .axp64
[SourceDisksFiles]
spawdm.sys=222
spadrv.inf=222
spaasio.dll=222
spactl.exe=222

[SourceDisksFiles.amd64]
spawdm64.sys=222
spadrv.inf=222
spaasio.dll=222
spaasio64.dll=222
spactl.exe=222

[Manufacturer]
%MfgName%=Jogerse,NTAMD64

;; Excluding drivers from the "Add New Hardware" list.
[ControlFlags]
ExcludeFromSelect = *

[Jogerse]
%SPADRV.DeviceDesc%=SPADRV, USB\VID_2360&PID_7021
[Jogerse.NTAMD64]
%SPADRV.DeviceDesc%=SPADRV64, USB\VID_2360&PID_7021

[DestinationDirs]
SPADRV.CopyList=10,system32\drivers
SPADRV64.CopyList=10,system32\drivers
SPADRV.App.CopyList=10,system32
SPADRV64.App.CopyList=10,system32
SPADRV64.Wow.CopyList = 10, SysWow64

[SPADRV]
;;This inf is intended for use by IHV. So, it's going to be used as from OEM distributed disk
;;This is why AlsoInstall got used instead if Needs & Include
AlsoInstall=KS.Registration(ks.inf), WDMAUDIO.Registration(wdmaudio.inf)
CopyFiles=SPADRV.CopyList,SPADRV.App.CopyList
AddReg=SPADRV.AddReg,SPADRV.App.AddReg

[SPADRV.NT]
Include=ks.inf,wdmaudio.inf
Needs=KS.Registration,WDMAUDIO.Registration
CopyFiles=SPADRV.CopyList,SPADRV.App.CopyList
AddReg=SPADRV.AddReg,SPADRV.App.AddReg

[SPADRV.CopyList]
spawdm.sys

[SPADRV.App.CopyList]
spaasio.dll
spactl.exe

[SPADRV.Interfaces]
AddInterface=%KSCATEGORY_AUDIO%,%KSNAME_Wave%,SPADRV.Interface.Wave
AddInterface=%KSCATEGORY_RENDER%,%KSNAME_Wave%,SPADRV.Interface.Wave
AddInterface=%KSCATEGORY_CAPTURE%,%KSNAME_Wave%,SPADRV.Interface.Wave
;AddInterface=%KSCATEGORY_REALTIME%,%KSNAME_Wave%,SPADRV.Interface.Wave
AddInterface=%KSCATEGORY_AUDIO%,%KSNAME_Topology%,SPADRV.Interface.Topology

AddInterface=%KSCATEGORY_AUDIO%,%KSNAME_Midi%,SPADRV.Interface.Midi
AddInterface=%KSCATEGORY_RENDER%,%KSNAME_Midi%,SPADRV.Interface.Midi
AddInterface=%KSCATEGORY_CAPTURE%,%KSNAME_Midi%,SPADRV.Interface.Midi

[SPADRV.NT.Interfaces]
AddInterface=%KSCATEGORY_AUDIO%,%KSNAME_Wave%,SPADRV.Interface.Wave
AddInterface=%KSCATEGORY_RENDER%,%KSNAME_Wave%,SPADRV.Interface.Wave
AddInterface=%KSCATEGORY_CAPTURE%,%KSNAME_Wave%,SPADRV.Interface.Wave
;AddInterface=%KSCATEGORY_REALTIME%,%KSNAME_Wave%,SPADRV.Interface.Wave
AddInterface=%KSCATEGORY_AUDIO%,%KSNAME_Topology%,SPADRV.Interface.Topology

AddInterface=%KSCATEGORY_AUDIO%,%KSNAME_Midi%,SPADRV.Interface.Midi
AddInterface=%KSCATEGORY_RENDER%,%KSNAME_Midi%,SPADRV.Interface.Midi
AddInterface=%KSCATEGORY_CAPTURE%,%KSNAME_Midi%,SPADRV.Interface.Midi

[SPADRV.Interface.Wave]
AddReg=SPADRV.I.Wave.AddReg

[SPADRV.I.Wave.AddReg]
HKR,,CLSID,,%Proxy.CLSID%
HKR,,FriendlyName,,%SPADRV.Wave.szPname%

[SPADRV.Interface.Topology]
AddReg=SPADRV.I.Topology.AddReg

[SPADRV.I.Topology.AddReg]
HKR,,CLSID,,%Proxy.CLSID%
HKR,,FriendlyName,,%SPADRV.Topology.szPname%

[SPADRV.Interface.Midi]
AddReg=SPADRV.I.Midi.AddReg

[SPADRV.I.Midi.AddReg]
HKR,,CLSID,,%Proxy.CLSID%
HKR,,FriendlyName,,%SPADRV.Midi.szPname%

[SPADRV.AddReg]
HKR,,AssociatedFilters,,"wdmaud,swmidi,redbook"
HKR,,Driver,,spawdm.sys
HKR,,NTMPDriver,,"spawdm.sys,sbemul.sys"

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

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\wave\wdmaud.drv,Description,,%SPADRV.DeviceDesc%
HKR,Drivers\midi\wdmaud.drv, Description,,%SPADRV.DeviceDesc%
HKR,Drivers\mixer\wdmaud.drv,Description,,%SPADRV.DeviceDesc%

[SPADRV.App.AddReg]
HKLM,SOFTWARE\ASIO\%ASIO_DRIVER_NAME%,CLSID,,%ASIO_DRIVER_GUID%
HKCR,CLSID\%ASIO_DRIVER_GUID%,,,%ASIO_DRIVER_NAME%
HKCR,CLSID\%ASIO_DRIVER_GUID%\InProcServer32,,,"%10%\system32\spaasio.dll"
HKCR,CLSID\%ASIO_DRIVER_GUID%\InProcServer32,ThreadingModel,,"Apartment"

[SPADRV.Services]
AddService = %SPADRV.Service%, 0x00000002, SPADRV_Service_Inst

[SPADRV.NT.Services]
AddService = %SPADRV.Service%, 0x00000002, SPADRV_Service_Inst

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

;==================================================================
; amd64 platform

[SPADRV64]
;;This inf is intended for use by IHV. So, it's going to be used as from OEM distributed disk
;;This is why AlsoInstall got used instead if Needs & Include
AlsoInstall=KS.Registration(ks.inf), WDMAUDIO.Registration(wdmaudio.inf)
CopyFiles=SPADRV64.CopyList, SPADRV64.App.CopyList, SPADRV64.Wow.CopyList
AddReg=SPADRV64.AddReg, SPADRV64.App.AddReg

[SPADRV64.NT]
Include=ks.inf,wdmaudio.inf
Needs=KS.Registration,WDMAUDIO.Registration
CopyFiles=SPADRV64.CopyList, SPADRV64.App.CopyList, SPADRV64.Wow.CopyList
AddReg=SPADRV64.AddReg, SPADRV64.App.AddReg

[SPADRV64.CopyList]
spawdm64.sys

[SPADRV64.App.CopyList]
spaasio64.dll
spactl.exe

[SPADRV64.Wow.CopyList]
spaasio.dll

[SPADRV64.Interfaces]
AddInterface=%KSCATEGORY_AUDIO%,%KSNAME_Wave%,SPADRV.Interface.Wave
AddInterface=%KSCATEGORY_RENDER%,%KSNAME_Wave%,SPADRV.Interface.Wave
AddInterface=%KSCATEGORY_CAPTURE%,%KSNAME_Wave%,SPADRV.Interface.Wave
;AddInterface=%KSCATEGORY_REALTIME%,%KSNAME_Wave%,SPADRV.Interface.Wave
AddInterface=%KSCATEGORY_AUDIO%,%KSNAME_Topology%,SPADRV.Interface.Topology

AddInterface=%KSCATEGORY_AUDIO%,%KSNAME_Midi%,SPADRV.Interface.Midi
AddInterface=%KSCATEGORY_RENDER%,%KSNAME_Midi%,SPADRV.Interface.Midi
AddInterface=%KSCATEGORY_CAPTURE%,%KSNAME_Midi%,SPADRV.Interface.Midi

[SPADRV64.NT.Interfaces]
AddInterface=%KSCATEGORY_AUDIO%,%KSNAME_Wave%,SPADRV.Interface.Wave
AddInterface=%KSCATEGORY_RENDER%,%KSNAME_Wave%,SPADRV.Interface.Wave
AddInterface=%KSCATEGORY_CAPTURE%,%KSNAME_Wave%,SPADRV.Interface.Wave
;AddInterface=%KSCATEGORY_REALTIME%,%KSNAME_Wave%,SPADRV.Interface.Wave
AddInterface=%KSCATEGORY_AUDIO%,%KSNAME_Topology%,SPADRV.Interface.Topology

AddInterface=%KSCATEGORY_AUDIO%,%KSNAME_Midi%,SPADRV.Interface.Midi
AddInterface=%KSCATEGORY_RENDER%,%KSNAME_Midi%,SPADRV.Interface.Midi
AddInterface=%KSCATEGORY_CAPTURE%,%KSNAME_Midi%,SPADRV.Interface.Midi

[SPADRV64.AddReg]
HKR,,AssociatedFilters,,"wdmaud,swmidi,redbook"
HKR,,Driver,,spawdm64.sys
HKR,,NTMPDriver,,"spawdm64.sys,sbemul.sys"

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

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\wave\wdmaud.drv,Description,,%SPADRV.DeviceDesc%
HKR,Drivers\midi\wdmaud.drv, Description,,%SPADRV.DeviceDesc%
HKR,Drivers\mixer\wdmaud.drv,Description,,%SPADRV.DeviceDesc%

[SPADRV64.App.AddReg]
; 64BIT ASIO
HKLM,SOFTWARE\ASIO\%ASIO_DRIVER_NAME%,CLSID,,%ASIO_DRIVER_GUID%
HKCR,CLSID\%ASIO_DRIVER_GUID%,,,%ASIO_DRIVER_NAME%
HKCR,CLSID\%ASIO_DRIVER_GUID%\InProcServer32,,,"%10%\system32\spaasio64.dll"
HKCR,CLSID\%ASIO_DRIVER_GUID%\InProcServer32,ThreadingModel,,"Apartment"

; WOW64 ASIO
HKLM,SOFTWARE\Wow6432Node\ASIO\%ASIO_DRIVER_NAME%,CLSID,,%ASIO_DRIVER_GUID%
HKCR,Wow6432Node\CLSID\%ASIO_DRIVER_GUID%,,,%ASIO_DRIVER_NAME%
HKCR,Wow6432Node\CLSID\%ASIO_DRIVER_GUID%\InProcServer32,,,"%10%\system32\spaasio.dll"
HKCR,Wow6432Node\CLSID\%ASIO_DRIVER_GUID%\InProcServer32,ThreadingModel,,"Apartment"

[SPADRV64.Services]
AddService = %SPADRV.Service%, 0x00000002, SPADRV64_Service_Inst

[SPADRV64.NT.Services]
AddService = %SPADRV.Service%, 0x00000002, SPADRV64_Service_Inst

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


[Strings]
ProviderName="AUDIOPROBE"
MfgName="AUDIOPROBE"
DiskDescription="AUDIOPROBE SPARTAN A Audio Disk"
SPADRV.DeviceDesc="AUDIOPROBE SPARTAN A Audio"

SPADRV.Wave.szPname="AUDIOPROBE SPARTAN A Audio"
SPADRV.Topology.szPname="AUDIOPROBE SPARTAN A Mixer"
SPADRV.Midi.szPname ="AUDIOPROBE SPARTAN A Midi"

MediaCategories="SYSTEM\CurrentControlSet\Control\MediaCategories"

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}"
KSCATEGORY_REALTIME="{EB115FFC-10C8-4964-831D-6DCB02E6F23F}"

KSNAME_Wave="Wave"
KSNAME_Topology="Topology"
KSNAME_Midi="Midi"

SPADRV.Service = "SPADRV"
SPADRV.SvcDesc = "Service for AUDIOPROBE SPARTAN A Audio(WDM)"

ASIO_DRIVER_GUID         ="{0FD1D6B0-5627-4a0a-8075-63B2F1253B19}"
ASIO_DRIVER_NAME         ="ASIO 2.2 - AUDIOPROBE SPARTAN A"
