summaryrefslogtreecommitdiff
path: root/audio/sysvad/TabletAudioSample
diff options
context:
space:
mode:
authorJ M Rossy <[email protected]>2015-07-29 15:40:09 -0700
committerJ M Rossy <[email protected]>2015-07-29 16:34:40 -0700
commit5d61a4a79a1e96dc5d9af1e5e712c84507307544 (patch)
tree49ed270893578cd18758b74ffcca16dc7ab948d6 /audio/sysvad/TabletAudioSample
parent5d41613e26e147d2300c786bb2b34cb4b4067a25 (diff)
Samples update for public Windows 10 release
Fix #2 Enabling WPP Recorder in Sensors Samples causes errors Fix #4 Add back fixed KMDOD sample Add new BarcodeScanner sample in pos folder Add new MagneticStripeReader sample in pos folder Add new SynpaticsTouch sample in input folder Add new Power Engine Plugin sample in pofx folder Add new DeviceMft sample in avstream folder Add new AvsCamera sample in root Add new SimBatt sample in root Add other pre-existing samples not yet released for Win10
Diffstat (limited to 'audio/sysvad/TabletAudioSample')
-rw-r--r--audio/sysvad/TabletAudioSample/TabletAudioSample.vcxproj295
-rw-r--r--audio/sysvad/TabletAudioSample/TabletAudioSample.vcxproj.Filters58
-rw-r--r--audio/sysvad/TabletAudioSample/hdmitopo.cpp670
-rw-r--r--audio/sysvad/TabletAudioSample/hdmitopo.h86
-rw-r--r--audio/sysvad/TabletAudioSample/hdmitoptable.h172
-rw-r--r--audio/sysvad/TabletAudioSample/hdmiwavtable.h626
-rw-r--r--audio/sysvad/TabletAudioSample/micarray2toptable.h229
-rw-r--r--audio/sysvad/TabletAudioSample/micarray3toptable.h228
-rw-r--r--audio/sysvad/TabletAudioSample/micarray3wavtable.h455
-rw-r--r--audio/sysvad/TabletAudioSample/micintopo.cpp274
-rw-r--r--audio/sysvad/TabletAudioSample/micintopo.h21
-rw-r--r--audio/sysvad/TabletAudioSample/micintoptable.h250
-rw-r--r--audio/sysvad/TabletAudioSample/micinwavtable.h440
-rw-r--r--audio/sysvad/TabletAudioSample/minipairs.h512
-rw-r--r--audio/sysvad/TabletAudioSample/spdiftopo.cpp85
-rw-r--r--audio/sysvad/TabletAudioSample/spdiftopo.h21
-rw-r--r--audio/sysvad/TabletAudioSample/spdiftoptable.h166
-rw-r--r--audio/sysvad/TabletAudioSample/spdifwavtable.h854
18 files changed, 5442 insertions, 0 deletions
diff --git a/audio/sysvad/TabletAudioSample/TabletAudioSample.vcxproj b/audio/sysvad/TabletAudioSample/TabletAudioSample.vcxproj
new file mode 100644
index 00000000..b2723d08
--- /dev/null
+++ b/audio/sysvad/TabletAudioSample/TabletAudioSample.vcxproj
@@ -0,0 +1,295 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{29A5DD25-AB56-4DEE-96AB-21EC2926A300}</ProjectGuid>
+ <RootNamespace>$(MSBuildProjectName)</RootNamespace>
+ <KMDF_VERSION_MAJOR>1</KMDF_VERSION_MAJOR>
+ <SupportsPackaging>false</SupportsPackaging>
+ <RequiresPackageProject>true</RequiresPackageProject>
+ <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
+ <Platform Condition="'$(Platform)' == ''">Win32</Platform>
+ <SampleGuid>{D75C2887-9174-43D6-993C-B20E6F396D03}</SampleGuid>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <TargetVersion>Windows10</TargetVersion>
+ <UseDebugLibraries>False</UseDebugLibraries>
+ <DriverTargetPlatform>Desktop</DriverTargetPlatform>
+ <DriverType>KMDF</DriverType>
+ <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
+ <ConfigurationType>Driver</ConfigurationType>
+ </PropertyGroup>
+ <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <TargetVersion>Windows10</TargetVersion>
+ <UseDebugLibraries>True</UseDebugLibraries>
+ <DriverTargetPlatform>Desktop</DriverTargetPlatform>
+ <DriverType>KMDF</DriverType>
+ <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
+ <ConfigurationType>Driver</ConfigurationType>
+ </PropertyGroup>
+ <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <TargetVersion>Windows10</TargetVersion>
+ <UseDebugLibraries>False</UseDebugLibraries>
+ <DriverTargetPlatform>Desktop</DriverTargetPlatform>
+ <DriverType>KMDF</DriverType>
+ <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
+ <ConfigurationType>Driver</ConfigurationType>
+ </PropertyGroup>
+ <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <TargetVersion>Windows10</TargetVersion>
+ <UseDebugLibraries>True</UseDebugLibraries>
+ <DriverTargetPlatform>Desktop</DriverTargetPlatform>
+ <DriverType>KMDF</DriverType>
+ <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
+ <ConfigurationType>Driver</ConfigurationType>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <PropertyGroup>
+ <OutDir>$(IntDir)</OutDir>
+ </PropertyGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
+ </ImportGroup>
+ <ItemGroup Label="WrappedTaskItems" />
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Link>
+ <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\portcls.lib;$(DDK_LIB_PATH)\stdunk.lib;$(DDK_LIB_PATH)\libcntpr.lib</AdditionalDependencies>
+ </Link>
+ <ResourceCompile>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_WIN32;UNICODE;_UNICODE;PC_IMPLEMENTATION</PreprocessorDefinitions>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);DEBUG_LEVEL=DEBUGLVL_TERSE</PreprocessorDefinitions>
+ </ResourceCompile>
+ <ClCompile>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..</AdditionalIncludeDirectories>
+ <TreatWarningAsError>true</TreatWarningAsError>
+ <WarningLevel>Level4</WarningLevel>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_WIN32;UNICODE;_UNICODE;PC_IMPLEMENTATION</PreprocessorDefinitions>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);DEBUG_LEVEL=DEBUGLVL_TERSE</PreprocessorDefinitions>
+ </ClCompile>
+ <Midl>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_WIN32;UNICODE;_UNICODE;PC_IMPLEMENTATION</PreprocessorDefinitions>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);DEBUG_LEVEL=DEBUGLVL_TERSE</PreprocessorDefinitions>
+ </Midl>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Link>
+ <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\portcls.lib;$(DDK_LIB_PATH)\stdunk.lib;$(DDK_LIB_PATH)\libcntpr.lib</AdditionalDependencies>
+ </Link>
+ <ResourceCompile>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_WIN32;UNICODE;_UNICODE;PC_IMPLEMENTATION</PreprocessorDefinitions>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);DEBUG_LEVEL=DEBUGLVL_TERSE</PreprocessorDefinitions>
+ </ResourceCompile>
+ <ClCompile>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..</AdditionalIncludeDirectories>
+ <TreatWarningAsError>true</TreatWarningAsError>
+ <WarningLevel>Level4</WarningLevel>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_WIN32;UNICODE;_UNICODE;PC_IMPLEMENTATION</PreprocessorDefinitions>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);DEBUG_LEVEL=DEBUGLVL_TERSE</PreprocessorDefinitions>
+ </ClCompile>
+ <Midl>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_WIN32;UNICODE;_UNICODE;PC_IMPLEMENTATION</PreprocessorDefinitions>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);DEBUG_LEVEL=DEBUGLVL_TERSE</PreprocessorDefinitions>
+ </Midl>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Link>
+ <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\portcls.lib;$(DDK_LIB_PATH)\stdunk.lib;$(DDK_LIB_PATH)\libcntpr.lib</AdditionalDependencies>
+ </Link>
+ <ResourceCompile>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_WIN32;UNICODE;_UNICODE;PC_IMPLEMENTATION</PreprocessorDefinitions>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);DEBUG_LEVEL=DEBUGLVL_TERSE</PreprocessorDefinitions>
+ </ResourceCompile>
+ <ClCompile>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..</AdditionalIncludeDirectories>
+ <TreatWarningAsError>true</TreatWarningAsError>
+ <WarningLevel>Level4</WarningLevel>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_WIN32;UNICODE;_UNICODE;PC_IMPLEMENTATION</PreprocessorDefinitions>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);DEBUG_LEVEL=DEBUGLVL_TERSE</PreprocessorDefinitions>
+ </ClCompile>
+ <Midl>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_WIN32;UNICODE;_UNICODE;PC_IMPLEMENTATION</PreprocessorDefinitions>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);DEBUG_LEVEL=DEBUGLVL_TERSE</PreprocessorDefinitions>
+ </Midl>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Link>
+ <AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\portcls.lib;$(DDK_LIB_PATH)\stdunk.lib;$(DDK_LIB_PATH)\libcntpr.lib</AdditionalDependencies>
+ </Link>
+ <ResourceCompile>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_WIN32;UNICODE;_UNICODE;PC_IMPLEMENTATION</PreprocessorDefinitions>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);DEBUG_LEVEL=DEBUGLVL_TERSE</PreprocessorDefinitions>
+ </ResourceCompile>
+ <ClCompile>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..</AdditionalIncludeDirectories>
+ <TreatWarningAsError>true</TreatWarningAsError>
+ <WarningLevel>Level4</WarningLevel>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_WIN32;UNICODE;_UNICODE;PC_IMPLEMENTATION</PreprocessorDefinitions>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);DEBUG_LEVEL=DEBUGLVL_TERSE</PreprocessorDefinitions>
+ </ClCompile>
+ <Midl>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_WIN32;UNICODE;_UNICODE;PC_IMPLEMENTATION</PreprocessorDefinitions>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);DEBUG_LEVEL=DEBUGLVL_TERSE</PreprocessorDefinitions>
+ </Midl>
+ </ItemDefinitionGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <TargetName>TabletAudioSample</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <TargetName>TabletAudioSample</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <TargetName>TabletAudioSample</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <TargetName>TabletAudioSample</TargetName>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Link>
+ <AdditionalDependencies>%(AdditionalDependencies);.\..\EndpointsCommon\$(IntDir)\EndpointsCommon.lib</AdditionalDependencies>
+ </Link>
+ <ClCompile>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_WAVERT_;SYSVAD_BTH_BYPASS</PreprocessorDefinitions>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_SingleComponentMultiFxStates</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon</AdditionalIncludeDirectories>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ </ClCompile>
+ <Midl>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_WAVERT_;SYSVAD_BTH_BYPASS</PreprocessorDefinitions>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_SingleComponentMultiFxStates</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon</AdditionalIncludeDirectories>
+ </Midl>
+ <ResourceCompile>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_WAVERT_;SYSVAD_BTH_BYPASS</PreprocessorDefinitions>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_SingleComponentMultiFxStates</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Link>
+ <AdditionalDependencies>%(AdditionalDependencies);.\..\EndpointsCommon\$(IntDir)\EndpointsCommon.lib</AdditionalDependencies>
+ </Link>
+ <ClCompile>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_WAVERT_;SYSVAD_BTH_BYPASS</PreprocessorDefinitions>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_SingleComponentMultiFxStates</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon</AdditionalIncludeDirectories>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ </ClCompile>
+ <Midl>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_WAVERT_;SYSVAD_BTH_BYPASS</PreprocessorDefinitions>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_SingleComponentMultiFxStates</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon</AdditionalIncludeDirectories>
+ </Midl>
+ <ResourceCompile>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_WAVERT_;SYSVAD_BTH_BYPASS</PreprocessorDefinitions>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_SingleComponentMultiFxStates</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Link>
+ <AdditionalDependencies>%(AdditionalDependencies);.\..\EndpointsCommon\$(IntDir)\EndpointsCommon.lib</AdditionalDependencies>
+ </Link>
+ <ClCompile>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_WAVERT_;SYSVAD_BTH_BYPASS</PreprocessorDefinitions>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_SingleComponentMultiFxStates</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon</AdditionalIncludeDirectories>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ </ClCompile>
+ <Midl>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_WAVERT_;SYSVAD_BTH_BYPASS</PreprocessorDefinitions>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_SingleComponentMultiFxStates</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon</AdditionalIncludeDirectories>
+ </Midl>
+ <ResourceCompile>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_WAVERT_;SYSVAD_BTH_BYPASS</PreprocessorDefinitions>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_SingleComponentMultiFxStates</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Link>
+ <AdditionalDependencies>%(AdditionalDependencies);.\..\EndpointsCommon\$(IntDir)\EndpointsCommon.lib</AdditionalDependencies>
+ </Link>
+ <ClCompile>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_WAVERT_;SYSVAD_BTH_BYPASS</PreprocessorDefinitions>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_SingleComponentMultiFxStates</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon</AdditionalIncludeDirectories>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ </ClCompile>
+ <Midl>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_WAVERT_;SYSVAD_BTH_BYPASS</PreprocessorDefinitions>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_SingleComponentMultiFxStates</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon</AdditionalIncludeDirectories>
+ </Midl>
+ <ResourceCompile>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_WAVERT_;SYSVAD_BTH_BYPASS</PreprocessorDefinitions>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_SingleComponentMultiFxStates</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\EndpointsCommon</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\adapter.cpp" />
+ <ClCompile Include="..\basetopo.cpp" />
+ <ClCompile Include="..\common.cpp" />
+ <ClCompile Include="..\hw.cpp" />
+ <ClCompile Include="..\kshelper.cpp" />
+ <ClCompile Include="..\savedata.cpp" />
+ <ClCompile Include="..\tonegenerator.cpp" />
+ <ClCompile Include="hdmitopo.cpp" />
+ <ClCompile Include="micintopo.cpp" />
+ <ClCompile Include="spdiftopo.cpp" />
+ <ResourceCompile Include="..\sysvad.rc" />
+ </ItemGroup>
+ <ItemGroup>
+ <Inf Exclude="@(Inf)" Include="*.inf" />
+ <FilesToPackage Include="$(TargetPath)" Condition="'$(ConfigurationType)'=='Driver' or '$(ConfigurationType)'=='DynamicLibrary'" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Exclude="@(None)" Include="*.txt;*.htm;*.html" />
+ <None Exclude="@(None)" Include="*.ico;*.cur;*.bmp;*.dlg;*.rct;*.gif;*.jpg;*.jpeg;*.wav;*.jpe;*.tiff;*.tif;*.png;*.rc2" />
+ <None Exclude="@(None)" Include="*.def;*.bat;*.hpj;*.asmx" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Exclude="@(ClInclude)" Include="*.h;*.hpp;*.hxx;*.hm;*.inl;*.xsd" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+</Project> \ No newline at end of file
diff --git a/audio/sysvad/TabletAudioSample/TabletAudioSample.vcxproj.Filters b/audio/sysvad/TabletAudioSample/TabletAudioSample.vcxproj.Filters
new file mode 100644
index 00000000..14b93639
--- /dev/null
+++ b/audio/sysvad/TabletAudioSample/TabletAudioSample.vcxproj.Filters
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx;*</Extensions>
+ <UniqueIdentifier>{D13BC5E0-7771-4687-83A0-245941715858}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Header Files">
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ <UniqueIdentifier>{E07941ED-CD6E-4BAE-A9DE-5B7A970BA57B}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Resource Files">
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms;man;xml</Extensions>
+ <UniqueIdentifier>{D9A3BF33-CD62-4610-BA9D-5137A76BD2C9}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Driver Files">
+ <Extensions>inf;inv;inx;mof;mc;</Extensions>
+ <UniqueIdentifier>{D7BA1DD3-90E0-45B3-9C70-34C9A6F43FEC}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\adapter.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\basetopo.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\common.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\hw.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\kshelper.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\savedata.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\tonegenerator.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="hdmitopo.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="micintopo.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="spdiftopo.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="..\sysvad.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/audio/sysvad/TabletAudioSample/hdmitopo.cpp b/audio/sysvad/TabletAudioSample/hdmitopo.cpp
new file mode 100644
index 00000000..9deb16cd
--- /dev/null
+++ b/audio/sysvad/TabletAudioSample/hdmitopo.cpp
@@ -0,0 +1,670 @@
+/*++
+
+Copyright (c) Microsoft Corporation All Rights Reserved
+
+Module Name:
+
+ hdmitopo.cpp
+
+Abstract:
+
+ Implementation of topology miniport for the hdmi endpoint.
+
+--*/
+
+#pragma warning (disable : 4127)
+
+#include <sysvad.h>
+#include "simple.h"
+#include "mintopo.h"
+#include "hdmitopo.h"
+#include "hdmitoptable.h"
+#include <ntstrsafe.h>
+
+
+#pragma code_seg("PAGE")
+
+//=============================================================================
+NTSTATUS
+CreateHdmiMiniportTopology
+(
+ _Out_ PUNKNOWN * Unknown,
+ _In_ REFCLSID,
+ _In_opt_ PUNKNOWN UnknownOuter,
+ _When_((PoolType & NonPagedPoolMustSucceed) != 0,
+ __drv_reportError("Must succeed pool allocations are forbidden. "
+ "Allocation failures cause a system crash"))
+ _In_ POOL_TYPE PoolType,
+ _In_ PUNKNOWN UnknownAdapter,
+ _In_opt_ PVOID DeviceContext,
+ _In_ PENDPOINT_MINIPAIR MiniportPair
+)
+/*++
+
+Routine Description:
+
+ Creates a new topology miniport.
+
+Arguments:
+
+ Unknown -
+
+ RefclsId -
+
+ UnknownOuter -
+
+ PoolType -
+
+ UnknownAdapter -
+
+ DeviceContext -
+
+ MiniportPair -
+
+Return Value:
+
+ NT status code.
+
+--*/
+{
+ PAGED_CODE();
+
+ ASSERT(Unknown);
+ ASSERT(MiniportPair);
+
+ UNREFERENCED_PARAMETER(UnknownAdapter);
+ UNREFERENCED_PARAMETER(DeviceContext);
+
+ CHdmiMiniportTopology *obj =
+ new (PoolType, MINWAVERT_POOLTAG)
+ CHdmiMiniportTopology( UnknownOuter,
+ MiniportPair->TopoDescriptor,
+ MiniportPair->DeviceMaxChannels);
+ if (NULL == obj)
+ {
+ return STATUS_INSUFFICIENT_RESOURCES;
+ }
+
+ obj->AddRef();
+ *Unknown = reinterpret_cast<IUnknown*>(obj);
+
+ return STATUS_SUCCESS;
+} // CreateHdmiMiniportTopology
+
+//=============================================================================
+CHdmiMiniportTopology::~CHdmiMiniportTopology
+(
+ void
+)
+/*++
+
+Routine Description:
+
+ Topology miniport destructor
+
+Arguments:
+
+Return Value:
+
+ NT status code.
+
+--*/
+{
+ PAGED_CODE();
+
+ DPF_ENTER(("[CHdmiMiniportTopology::~CHdmiMiniportTopology]"));
+} // ~CHdmiMiniportTopology
+
+//=============================================================================
+NTSTATUS
+CHdmiMiniportTopology::DataRangeIntersection
+(
+ _In_ ULONG PinId,
+ _In_ PKSDATARANGE ClientDataRange,
+ _In_ PKSDATARANGE MyDataRange,
+ _In_ ULONG OutputBufferLength,
+ _Out_writes_bytes_to_opt_(OutputBufferLength, *ResultantFormatLength)
+ PVOID ResultantFormat OPTIONAL,
+ _Out_ PULONG ResultantFormatLength
+)
+/*++
+
+Routine Description:
+
+ The DataRangeIntersection function determines the highest quality
+ intersection of two data ranges.
+
+Arguments:
+
+ PinId - Pin for which data intersection is being determined.
+
+ ClientDataRange - Pointer to KSDATARANGE structure which contains the data range
+ submitted by client in the data range intersection property
+ request.
+
+ MyDataRange - Pin's data range to be compared with client's data range.
+
+ OutputBufferLength - Size of the buffer pointed to by the resultant format
+ parameter.
+
+ ResultantFormat - Pointer to value where the resultant format should be
+ returned.
+
+ ResultantFormatLength - Actual length of the resultant format that is placed
+ at ResultantFormat. This should be less than or equal
+ to OutputBufferLength.
+
+Return Value:
+
+ NT status code.
+
+--*/
+{
+ PAGED_CODE();
+
+ return
+ CMiniportTopologySYSVAD::DataRangeIntersection
+ (
+ PinId,
+ ClientDataRange,
+ MyDataRange,
+ OutputBufferLength,
+ ResultantFormat,
+ ResultantFormatLength
+ );
+} // DataRangeIntersection
+
+//=============================================================================
+STDMETHODIMP
+CHdmiMiniportTopology::GetDescription
+(
+ _Out_ PPCFILTER_DESCRIPTOR * OutFilterDescriptor
+)
+/*++
+
+Routine Description:
+
+ The GetDescription function gets a pointer to a filter description.
+ It provides a location to deposit a pointer in miniport's description
+ structure. This is the placeholder for the FromNode or ToNode fields in
+ connections which describe connections to the filter's pins.
+
+Arguments:
+
+ OutFilterDescriptor - Pointer to the filter description.
+
+Return Value:
+
+ NT status code.
+
+--*/
+{
+ PAGED_CODE();
+
+ ASSERT(OutFilterDescriptor);
+
+ return CMiniportTopologySYSVAD::GetDescription(OutFilterDescriptor);
+} // GetDescription
+
+//=============================================================================
+STDMETHODIMP
+CHdmiMiniportTopology::Init
+(
+ _In_ PUNKNOWN UnknownAdapter,
+ _In_ PRESOURCELIST ResourceList,
+ _In_ PPORTTOPOLOGY Port_
+)
+/*++
+
+Routine Description:
+
+ The Init function initializes the miniport. Callers of this function
+ should run at IRQL PASSIVE_LEVEL
+
+Arguments:
+
+ UnknownAdapter - A pointer to the Iuknown interface of the adapter object.
+
+ ResourceList - Pointer to the resource list to be supplied to the miniport
+ during initialization. The port driver is free to examine the
+ contents of the ResourceList. The port driver will not be
+ modify the ResourceList contents.
+
+ Port - Pointer to the topology port object that is linked with this miniport.
+
+Return Value:
+
+ NT status code.
+
+--*/
+{
+ UNREFERENCED_PARAMETER(ResourceList);
+
+ PAGED_CODE();
+
+ ASSERT(UnknownAdapter);
+ ASSERT(Port_);
+
+ DPF_ENTER(("[CHdmiMiniportTopology::Init]"));
+
+ NTSTATUS ntStatus;
+
+ ntStatus =
+ CMiniportTopologySYSVAD::Init
+ (
+ UnknownAdapter,
+ Port_
+ );
+
+ return ntStatus;
+} // Init
+
+//=============================================================================
+STDMETHODIMP
+CHdmiMiniportTopology::NonDelegatingQueryInterface
+(
+ _In_ REFIID Interface,
+ _COM_Outptr_ PVOID * Object
+)
+/*++
+
+Routine Description:
+
+ QueryInterface for MiniportTopology
+
+Arguments:
+
+ Interface - GUID of the interface
+
+ Object - interface object to be returned.
+
+Return Value:
+
+ NT status code.
+
+--*/
+{
+ PAGED_CODE();
+
+ ASSERT(Object);
+
+ if (IsEqualGUIDAligned(Interface, IID_IUnknown))
+ {
+ *Object = PVOID(PUNKNOWN(this));
+ }
+ else if (IsEqualGUIDAligned(Interface, IID_IMiniport))
+ {
+ *Object = PVOID(PMINIPORT(this));
+ }
+ else if (IsEqualGUIDAligned(Interface, IID_IMiniportTopology))
+ {
+ *Object = PVOID(PMINIPORTTOPOLOGY(this));
+ }
+ else
+ {
+ *Object = NULL;
+ }
+
+ if (*Object)
+ {
+ // We reference the interface for the caller.
+ PUNKNOWN(*Object)->AddRef();
+ return(STATUS_SUCCESS);
+ }
+
+ return(STATUS_INVALID_PARAMETER);
+} // NonDelegatingQueryInterface
+
+//=============================================================================
+
+#define SINK_DESC_STR L"SinkDescription Sample"
+
+NTSTATUS
+CHdmiMiniportTopology::PropertyHandlerJackSinkInfo
+(
+ _In_ PPCPROPERTY_REQUEST PropertyRequest
+)
+/*++
+
+Routine Description:
+
+ Handles ( KSPROPSETID_Jack, KSPROPERTY_JACK_SINK_INFO )
+
+Arguments:
+
+ PropertyRequest -
+
+Return Value:
+
+ NT status code.
+
+--*/
+{
+ PAGED_CODE();
+
+ ASSERT(PropertyRequest);
+
+ DPF_ENTER(("[PropertyHandlerJackSinkInfo]"));
+
+ NTSTATUS ntStatus = STATUS_INVALID_DEVICE_REQUEST;
+ ULONG nPinId = (ULONG)-1;
+
+ if (PropertyRequest->InstanceSize >= sizeof(ULONG))
+ {
+ nPinId = *(PULONG(PropertyRequest->Instance));
+
+ if (nPinId == KSPIN_TOPO_LINEOUT_DEST)
+ {
+ if (PropertyRequest->Verb & KSPROPERTY_TYPE_BASICSUPPORT)
+ {
+ ntStatus =
+ PropertyHandler_BasicSupport
+ (
+ PropertyRequest,
+ KSPROPERTY_TYPE_BASICSUPPORT | KSPROPERTY_TYPE_GET,
+ VT_ILLEGAL
+ );
+ }
+ else
+ {
+ ULONG cbNeeded = sizeof(KSJACK_SINK_INFORMATION);
+
+ if (PropertyRequest->ValueSize == 0)
+ {
+ PropertyRequest->ValueSize = cbNeeded;
+ ntStatus = STATUS_BUFFER_OVERFLOW;
+ }
+ else if (PropertyRequest->ValueSize < cbNeeded)
+ {
+ ntStatus = STATUS_BUFFER_TOO_SMALL;
+ }
+ else
+ {
+ if (PropertyRequest->Verb & KSPROPERTY_TYPE_GET)
+ {
+ size_t cchLength;
+
+ PKSJACK_SINK_INFORMATION sinkInfo = (PKSJACK_SINK_INFORMATION)PropertyRequest->Value;
+
+ RtlZeroMemory(sinkInfo, sizeof(KSJACK_SINK_INFORMATION));
+
+ //
+ // Init sink info data (example follows).
+ //
+ sinkInfo->ConnType = KSJACK_SINK_CONNECTIONTYPE_HDMI;
+ sinkInfo->ManufacturerId = 0;
+ sinkInfo->ProductId = 0;
+ sinkInfo->AudioLatency = 0;
+ sinkInfo->HDCPCapable = TRUE;
+ sinkInfo->AICapable = TRUE;
+
+ cchLength = sizeof(SINK_DESC_STR)/sizeof(WCHAR) - 1; // -1 to remove the null wchar.
+ if (cchLength < MAX_SINK_DESCRIPTION_NAME_LENGTH)
+ {
+ sinkInfo->SinkDescriptionLength = (UCHAR)cchLength;
+ (void)RtlStringCchCopyW
+ (
+ sinkInfo->SinkDescription,
+ MAX_SINK_DESCRIPTION_NAME_LENGTH,
+ SINK_DESC_STR
+ );
+ }
+
+ ntStatus = STATUS_SUCCESS;
+ }
+ }
+ }
+ }
+ }
+
+ return ntStatus;
+}
+
+//=============================================================================
+NTSTATUS
+CHdmiMiniportTopology::PropertyHandlerJackDescription
+(
+ _In_ PPCPROPERTY_REQUEST PropertyRequest
+)
+/*++
+
+Routine Description:
+
+ Handles ( KSPROPSETID_Jack, KSPROPERTY_JACK_DESCRIPTION )
+
+Arguments:
+
+ PropertyRequest
+
+Return Value:
+
+ NT status code.
+
+--*/
+{
+ PAGED_CODE();
+
+ ASSERT(PropertyRequest);
+
+ DPF_ENTER(("[PropertyHandlerJackDescription]"));
+
+ ULONG cJackDescriptions = ARRAYSIZE(HdmiJackDescriptions);
+ PKSJACK_DESCRIPTION * JackDescriptions = HdmiJackDescriptions;
+
+ NTSTATUS ntStatus = STATUS_INVALID_DEVICE_REQUEST;
+ ULONG nPinId = (ULONG)-1;
+
+ if (PropertyRequest->InstanceSize >= sizeof(ULONG))
+ {
+ nPinId = *(PULONG(PropertyRequest->Instance));
+
+ if ((nPinId < cJackDescriptions) && (JackDescriptions[nPinId] != NULL))
+ {
+ if (PropertyRequest->Verb & KSPROPERTY_TYPE_BASICSUPPORT)
+ {
+ ntStatus =
+ PropertyHandler_BasicSupport
+ (
+ PropertyRequest,
+ KSPROPERTY_TYPE_BASICSUPPORT | KSPROPERTY_TYPE_GET,
+ VT_ILLEGAL
+ );
+ }
+ else
+ {
+ ULONG cbNeeded = sizeof(KSMULTIPLE_ITEM) + sizeof(KSJACK_DESCRIPTION);
+
+ if (PropertyRequest->ValueSize == 0)
+ {
+ PropertyRequest->ValueSize = cbNeeded;
+ ntStatus = STATUS_BUFFER_OVERFLOW;
+ }
+ else if (PropertyRequest->ValueSize < cbNeeded)
+ {
+ ntStatus = STATUS_BUFFER_TOO_SMALL;
+ }
+ else
+ {
+ if (PropertyRequest->Verb & KSPROPERTY_TYPE_GET)
+ {
+ PKSMULTIPLE_ITEM pMI = (PKSMULTIPLE_ITEM)PropertyRequest->Value;
+ PKSJACK_DESCRIPTION pDesc = (PKSJACK_DESCRIPTION)(pMI+1);
+
+ pMI->Size = cbNeeded;
+ pMI->Count = 1;
+
+ RtlCopyMemory(pDesc, JackDescriptions[nPinId], sizeof(KSJACK_DESCRIPTION));
+ ntStatus = STATUS_SUCCESS;
+ }
+ }
+ }
+ }
+ }
+
+ return ntStatus;
+}
+
+//=============================================================================
+NTSTATUS
+CHdmiMiniportTopology::PropertyHandlerJackDescription2
+(
+ _In_ PPCPROPERTY_REQUEST PropertyRequest
+)
+/*++
+
+Routine Description:
+
+ Handles ( KSPROPSETID_Jack, KSPROPERTY_JACK_DESCRIPTION2 )
+
+Arguments:
+
+ PropertyRequest -
+
+Return Value:
+
+ NT status code.
+
+--*/
+{
+ PAGED_CODE();
+
+ ASSERT(PropertyRequest);
+
+ DPF_ENTER(("[PropertyHandlerJackDescription2]"));
+
+ NTSTATUS ntStatus = STATUS_INVALID_DEVICE_REQUEST;
+ ULONG nPinId = (ULONG)-1;
+
+ ULONG cJackDescriptions = ARRAYSIZE(HdmiJackDescriptions);
+ PKSJACK_DESCRIPTION * JackDescriptions = HdmiJackDescriptions;
+
+ if (PropertyRequest->InstanceSize >= sizeof(ULONG))
+ {
+ nPinId = *(PULONG(PropertyRequest->Instance));
+
+ if ((nPinId < cJackDescriptions) && (JackDescriptions[nPinId] != NULL))
+ {
+ if (PropertyRequest->Verb & KSPROPERTY_TYPE_BASICSUPPORT)
+ {
+ ntStatus =
+ PropertyHandler_BasicSupport
+ (
+ PropertyRequest,
+ KSPROPERTY_TYPE_BASICSUPPORT | KSPROPERTY_TYPE_GET,
+ VT_ILLEGAL
+ );
+ }
+ else
+ {
+ ULONG cbNeeded = sizeof(KSMULTIPLE_ITEM) + sizeof(KSJACK_DESCRIPTION2);
+
+ if (PropertyRequest->ValueSize == 0)
+ {
+ PropertyRequest->ValueSize = cbNeeded;
+ ntStatus = STATUS_BUFFER_OVERFLOW;
+ }
+ else if (PropertyRequest->ValueSize < cbNeeded)
+ {
+ ntStatus = STATUS_BUFFER_TOO_SMALL;
+ }
+ else
+ {
+ if (PropertyRequest->Verb & KSPROPERTY_TYPE_GET)
+ {
+ PKSMULTIPLE_ITEM pMI = (PKSMULTIPLE_ITEM)PropertyRequest->Value;
+ PKSJACK_DESCRIPTION2 pDesc = (PKSJACK_DESCRIPTION2)(pMI+1);
+
+ pMI->Size = cbNeeded;
+ pMI->Count = 1;
+
+ RtlZeroMemory(pDesc, sizeof(KSJACK_DESCRIPTION2));
+
+ //
+ // Specifies the lower 16 bits of the DWORD parameter. This parameter indicates whether
+ // the jack is currently active, streaming, idle, or hardware not ready.
+ //
+ pDesc->DeviceStateInfo = 0;
+
+ //
+ // From MSDN:
+ // "If an audio device lacks jack presence detection, the IsConnected member of
+ // the KSJACK_DESCRIPTION structure must always be set to TRUE. To remove the
+ // ambiguity that results from this dual meaning of the TRUE value for IsConnected,
+ // a client application can call IKsJackDescription2::GetJackDescription2 to read
+ // the JackCapabilities flag of the KSJACK_DESCRIPTION2 structure. If this flag has
+ // the JACKDESC2_PRESENCE_DETECT_CAPABILITY bit set, it indicates that the endpoint
+ // does in fact support jack presence detection. In that case, the return value of
+ // the IsConnected member can be interpreted to accurately reflect the insertion status
+ // of the jack."
+ //
+ // Bit definitions:
+ // 0x00000001 - JACKDESC2_PRESENCE_DETECT_CAPABILITY
+ // 0x00000002 - JACKDESC2_DYNAMIC_FORMAT_CHANGE_CAPABILITY
+ //
+ pDesc->JackCapabilities = JACKDESC2_PRESENCE_DETECT_CAPABILITY;
+
+ ntStatus = STATUS_SUCCESS;
+ }
+ }
+ }
+ }
+ }
+
+ return ntStatus;
+}
+
+//=============================================================================
+NTSTATUS
+PropertyHandler_HdmiTopoFilter
+(
+ _In_ PPCPROPERTY_REQUEST PropertyRequest
+)
+/*++
+
+Routine Description:
+
+ Redirects property request to miniport object
+
+Arguments:
+
+ PropertyRequest -
+
+Return Value:
+
+ NT status code.
+
+--*/
+{
+ PAGED_CODE();
+
+ ASSERT(PropertyRequest);
+
+ DPF_ENTER(("[PropertyHandler_HdmiTopoFilter]"));
+
+ // PropertryRequest structure is filled by portcls.
+ // MajorTarget is a pointer to miniport object for miniports.
+ //
+ NTSTATUS ntStatus = STATUS_INVALID_DEVICE_REQUEST;
+ PCHdmiMiniportTopology pMiniport = (PCHdmiMiniportTopology)PropertyRequest->MajorTarget;
+
+ if (IsEqualGUIDAligned(*PropertyRequest->PropertyItem->Set, KSPROPSETID_Jack))
+ {
+ if (PropertyRequest->PropertyItem->Id == KSPROPERTY_JACK_DESCRIPTION)
+ {
+ ntStatus = pMiniport->PropertyHandlerJackDescription(PropertyRequest);
+ }
+ else if (PropertyRequest->PropertyItem->Id == KSPROPERTY_JACK_DESCRIPTION2)
+ {
+ ntStatus = pMiniport->PropertyHandlerJackDescription2(PropertyRequest);
+ }
+ else if (PropertyRequest->PropertyItem->Id == KSPROPERTY_JACK_SINK_INFO)
+ {
+ ntStatus = pMiniport->PropertyHandlerJackSinkInfo(PropertyRequest);
+ }
+ }
+
+ return ntStatus;
+} // PropertyHandler_HdmiTopoFilter
+
+#pragma code_seg()
+
diff --git a/audio/sysvad/TabletAudioSample/hdmitopo.h b/audio/sysvad/TabletAudioSample/hdmitopo.h
new file mode 100644
index 00000000..cf873b70
--- /dev/null
+++ b/audio/sysvad/TabletAudioSample/hdmitopo.h
@@ -0,0 +1,86 @@
+
+/*++
+
+Copyright (c) Microsoft Corporation All Rights Reserved
+
+Module Name:
+
+ hdmitopo.h
+
+Abstract:
+
+ Declaration of topology miniport for the hdmi endpoint.
+
+--*/
+
+#ifndef _SYSVAD_HDMITOPO_H_
+#define _SYSVAD_HDMITOPO_H_
+
+#include "basetopo.h"
+
+//=============================================================================
+// Classes
+//=============================================================================
+
+///////////////////////////////////////////////////////////////////////////////
+// CHdmiMiniportTopology
+//
+
+class CHdmiMiniportTopology :
+ public CMiniportTopologySYSVAD,
+ public IMiniportTopology,
+ public CUnknown
+{
+ public:
+ DECLARE_STD_UNKNOWN();
+ CHdmiMiniportTopology
+ (
+ _In_opt_ PUNKNOWN UnknownOuter,
+ _In_ PCFILTER_DESCRIPTOR *FilterDesc,
+ _In_ USHORT DeviceMaxChannels
+ )
+ : CUnknown(UnknownOuter),
+ CMiniportTopologySYSVAD(FilterDesc, DeviceMaxChannels)
+ {}
+
+ ~CHdmiMiniportTopology();
+
+ IMP_IMiniportTopology;
+
+ NTSTATUS PropertyHandlerJackSinkInfo
+ (
+ _In_ PPCPROPERTY_REQUEST PropertyRequest
+ );
+
+ NTSTATUS PropertyHandlerJackDescription
+ (
+ _In_ PPCPROPERTY_REQUEST PropertyRequest
+ );
+
+ NTSTATUS PropertyHandlerJackDescription2
+ (
+ _In_ PPCPROPERTY_REQUEST PropertyRequest
+ );
+};
+
+typedef CHdmiMiniportTopology *PCHdmiMiniportTopology;
+
+
+NTSTATUS
+CreateHdmiMiniportTopology(
+ _Out_ PUNKNOWN * Unknown,
+ _In_ REFCLSID,
+ _In_opt_ PUNKNOWN UnknownOuter,
+ _When_((PoolType & NonPagedPoolMustSucceed) != 0,
+ __drv_reportError("Must succeed pool allocations are forbidden. "
+ "Allocation failures cause a system crash"))
+ _In_ POOL_TYPE PoolType,
+ _In_ PUNKNOWN UnknownAdapter,
+ _In_opt_ PVOID DeviceContext,
+ _In_ PENDPOINT_MINIPAIR MiniportPair
+ );
+
+NTSTATUS PropertyHandler_HdmiTopoFilter(_In_ PPCPROPERTY_REQUEST PropertyRequest);
+
+#endif // _SYSVAD_HDMITOPO_H_
+
diff --git a/audio/sysvad/TabletAudioSample/hdmitoptable.h b/audio/sysvad/TabletAudioSample/hdmitoptable.h
new file mode 100644
index 00000000..5fab7cf4
--- /dev/null
+++ b/audio/sysvad/TabletAudioSample/hdmitoptable.h
@@ -0,0 +1,172 @@
+/*++
+
+Copyright (c) Microsoft Corporation All Rights Reserved
+
+Module Name:
+
+ hdmitoptable.h
+
+Abstract:
+
+ Declaration of topology tables for the hdmi endpoint.
+
+--*/
+
+#ifndef _SYSVAD_HDMITOPTABLE_H_
+#define _SYSVAD_HDMITOPTABLE_H_
+
+//=============================================================================
+static
+KSDATARANGE HdmiTopoPinDataRangesBridge[] =
+{
+ {
+ sizeof(KSDATARANGE),
+ 0,
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_ANALOG),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_NONE)
+ },
+ {
+ sizeof(KSDATARANGE),
+ 0,
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_IEC61937_DOLBY_DIGITAL),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_NONE)
+ }
+};
+
+//=============================================================================
+static
+PKSDATARANGE HdmiTopoPinDataRangePointersBridge[] =
+{
+ &HdmiTopoPinDataRangesBridge[0],
+ &HdmiTopoPinDataRangesBridge[1]
+};
+
+//=============================================================================
+static
+PCPIN_DESCRIPTOR HdmiTopoMiniportPins[] =
+{
+ // KSPIN_TOPO_WAVEOUT_SOURCE
+ {
+ 0,
+ 0,
+ 0, // InstanceCount
+ NULL, // AutomationTable
+ { // KsPinDescriptor
+ 0, // InterfacesCount
+ NULL, // Interfaces
+ 0, // MediumsCount
+ NULL, // Mediums
+ SIZEOF_ARRAY(HdmiTopoPinDataRangePointersBridge), // DataRangesCount
+ HdmiTopoPinDataRangePointersBridge, // DataRanges
+ KSPIN_DATAFLOW_IN, // DataFlow
+ KSPIN_COMMUNICATION_NONE, // Communication
+ &KSCATEGORY_AUDIO, // Category
+ NULL, // Name
+ 0 // Reserved
+ }
+ },
+ // KSPIN_TOPO_LINEOUT_DEST
+ {
+ 0,
+ 0,
+ 0, // InstanceCount
+ NULL, // AutomationTable
+ { // KsPinDescriptor
+ 0, // InterfacesCount
+ NULL, // Interfaces
+ 0, // MediumsCount
+ NULL, // Mediums
+ SIZEOF_ARRAY(HdmiTopoPinDataRangePointersBridge), // DataRangesCount
+ HdmiTopoPinDataRangePointersBridge, // DataRanges
+ KSPIN_DATAFLOW_OUT, // DataFlow
+ KSPIN_COMMUNICATION_NONE, // Communication
+ &KSNODETYPE_HDMI_INTERFACE, // Category
+ NULL, // Name
+ 0 // Reserved
+ }
+ }
+};
+
+//=============================================================================
+static
+KSJACK_DESCRIPTION HdmiJackDesc =
+{
+ KSAUDIO_SPEAKER_STEREO,
+ 0x0000, // no color
+ eConnTypeOtherDigital,
+ eGeoLocHDMI,
+ eGenLocPrimaryBox,
+ ePortConnJack,
+ TRUE
+};
+
+// Only return a KSJACK_DESCRIPTION for the physical bridge pin.
+static
+PKSJACK_DESCRIPTION HdmiJackDescriptions[] =
+{
+ NULL,
+ &HdmiJackDesc
+};
+
+//=============================================================================
+static
+PCCONNECTION_DESCRIPTOR HdmiTopoMiniportConnections[] =
+{
+ // FromNode, FromPin, ToNode, ToPin
+ { PCFILTER_NODE, KSPIN_TOPO_WAVEOUT_SOURCE, PCFILTER_NODE, KSPIN_TOPO_LINEOUT_DEST}
+};
+
+
+//=============================================================================
+static
+PCPROPERTY_ITEM PropertiesHdmiTopoFilter[] =
+{
+ {
+ &KSPROPSETID_Jack,
+ KSPROPERTY_JACK_DESCRIPTION,
+ KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_BASICSUPPORT,
+ PropertyHandler_HdmiTopoFilter
+ },
+ {
+ &KSPROPSETID_Jack,
+ KSPROPERTY_JACK_DESCRIPTION2,
+ KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_BASICSUPPORT,
+ PropertyHandler_HdmiTopoFilter
+ },
+ {
+ &KSPROPSETID_Jack,
+ KSPROPERTY_JACK_SINK_INFO,
+ KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_BASICSUPPORT,
+ PropertyHandler_HdmiTopoFilter
+ }
+};
+
+DEFINE_PCAUTOMATION_TABLE_PROP(AutomationHdmiTopoFilter, PropertiesHdmiTopoFilter);
+
+//=============================================================================
+static
+PCFILTER_DESCRIPTOR HdmiTopoMiniportFilterDescriptor =
+{
+ 0, // Version
+ &AutomationHdmiTopoFilter, // AutomationTable
+ sizeof(PCPIN_DESCRIPTOR), // PinSize
+ SIZEOF_ARRAY(HdmiTopoMiniportPins), // PinCount
+ HdmiTopoMiniportPins, // Pins
+ sizeof(PCNODE_DESCRIPTOR), // NodeSize
+ 0, // NodeCount
+ NULL, // Nodes
+ SIZEOF_ARRAY(HdmiTopoMiniportConnections), // ConnectionCount
+ HdmiTopoMiniportConnections, // Connections
+ 0, // CategoryCount
+ NULL // Categories
+};
+
+#endif // _SYSVAD_HDMITOPTABLE_H_
+
+
diff --git a/audio/sysvad/TabletAudioSample/hdmiwavtable.h b/audio/sysvad/TabletAudioSample/hdmiwavtable.h
new file mode 100644
index 00000000..a5f63c62
--- /dev/null
+++ b/audio/sysvad/TabletAudioSample/hdmiwavtable.h
@@ -0,0 +1,626 @@
+/*++
+
+Copyright (c) Microsoft Corporation All Rights Reserved
+
+Module Name:
+
+ hdmiwavtable.h
+
+Abstract:
+
+ Declaration of wave miniport tables for the hdmi endpoint.
+
+ Note: the HDMI in this sample shows how to do h/w loopback
+ for non-offloaded devices.
+
+--*/
+
+#ifndef _SYSVAD_HDMIWAVTABLE_H_
+#define _SYSVAD_HDMIWAVTABLE_H_
+
+
+//=============================================================================
+// Defines
+//=============================================================================
+
+
+#define HDMI_DEVICE_MAX_CHANNELS 2 // Max Channels.
+
+#define HDMI_HOST_MAX_CHANNELS 2 // Max Channels.
+#define HDMI_HOST_MIN_BITS_PER_SAMPLE 16 // Min Bits Per Sample
+#define HDMI_HOST_MAX_BITS_PER_SAMPLE 16 // Max Bits Per Sample
+#define HDMI_HOST_MIN_SAMPLE_RATE 44100 // Min Sample Rate
+#define HDMI_HOST_MAX_SAMPLE_RATE 96000 // Max Sample Rate
+
+#define HDMI_LOOPBACK_MAX_CHANNELS 2 // Max Channels.
+#define HDMI_LOOPBACK_MIN_BITS_PER_SAMPLE 16 // Min Bits Per Sample
+#define HDMI_LOOPBACK_MAX_BITS_PER_SAMPLE 16 // Max Bits Per Sample
+#define HDMI_LOOPBACK_MIN_SAMPLE_RATE 44100 // Min Sample Rate
+#define HDMI_LOOPBACK_MAX_SAMPLE_RATE 48000 // Max Sample Rate
+
+#define HDMI_DOLBY_DIGITAL_MAX_CHANNELS 2 // Max Channels.
+#define HDMI_DOLBY_DIGITAL_MIN_BITS_PER_SAMPLE 16 // Min Bits Per Sample
+#define HDMI_DOLBY_DIGITAL_MAX_BITS_PER_SAMPLE 16 // Max Bits Per Sample
+#define HDMI_DOLBY_DIGITAL_MIN_SAMPLE_RATE 44100 // Min Sample Rate
+#define HDMI_DOLBY_DIGITAL_MAX_SAMPLE_RATE 48000 // Max Sample Rate
+
+//
+// Max # of pin instances.
+//
+#define HDMI_MAX_INPUT_SYSTEM_STREAMS 2 // Raw + Default streams
+#define HDMI_MAX_OUTPUT_LOOPBACK_STREAMS MAX_OUTPUT_LOOPBACK_STREAMS
+
+
+//=============================================================================
+static
+KSDATAFORMAT_WAVEFORMATEXTENSIBLE HdmiHostPinSupportedDeviceFormats[] =
+{
+ { // 0
+ {
+ sizeof(KSDATAFORMAT_WAVEFORMATEXTENSIBLE),
+ 0,
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)
+ },
+ {
+ {
+ WAVE_FORMAT_EXTENSIBLE,
+ 2,
+ 44100,
+ 176400,
+ 4,
+ 16,
+ sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX)
+ },
+ 16,
+ KSAUDIO_SPEAKER_STEREO,
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM)
+ }
+ },
+ { // 1
+ {
+ sizeof(KSDATAFORMAT_WAVEFORMATEXTENSIBLE),
+ 0,
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)
+ },
+ {
+ {
+ WAVE_FORMAT_EXTENSIBLE,
+ 2,
+ 48000,
+ 192000,
+ 4,
+ 16,
+ sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX)
+ },
+ 16,
+ KSAUDIO_SPEAKER_STEREO,
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM)
+ }
+ },
+ { // 2
+ {
+ sizeof(KSDATAFORMAT_WAVEFORMATEXTENSIBLE),
+ 0,
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)
+ },
+ {
+ {
+ WAVE_FORMAT_EXTENSIBLE,
+ 2,
+ 88200,
+ 352800,
+ 4,
+ 16,
+ sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX)
+ },
+ 16,
+ KSAUDIO_SPEAKER_STEREO,
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM)
+ }
+ },
+ { // 3
+ {
+ sizeof(KSDATAFORMAT_WAVEFORMATEXTENSIBLE),
+ 0,
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)
+ },
+ {
+ {
+ WAVE_FORMAT_EXTENSIBLE,
+ 2,
+ 96000,
+ 384000,
+ 4,
+ 16,
+ sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX)
+ },
+ 16,
+ KSAUDIO_SPEAKER_STEREO,
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM)
+ }
+ },
+ { // 4
+ {
+ sizeof(KSDATAFORMAT_WAVEFORMATEXTENSIBLE),
+ 0,
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_IEC61937_DOLBY_DIGITAL),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)
+ },
+ {
+ {
+ WAVE_FORMAT_EXTENSIBLE,
+ 2,
+ 44100,
+ 176400,
+ 4,
+ 16,
+ sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX)
+ },
+ 16,
+ KSAUDIO_SPEAKER_5POINT1_SURROUND,
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_IEC61937_DOLBY_DIGITAL)
+ }
+ },
+ { // 5
+ {
+ sizeof(KSDATAFORMAT_WAVEFORMATEXTENSIBLE),
+ 0,
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_IEC61937_DOLBY_DIGITAL),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)
+ },
+ {
+ {
+ WAVE_FORMAT_EXTENSIBLE,
+ 2,
+ 48000,
+ 192000,
+ 4,
+ 16,
+ sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX)
+ },
+ 16,
+ KSAUDIO_SPEAKER_5POINT1_SURROUND,
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_IEC61937_DOLBY_DIGITAL)
+ }
+ }
+};
+
+static
+KSDATAFORMAT_WAVEFORMATEXTENSIBLE HdmiLoopbackPinSupportedDeviceFormats[] =
+{
+ { // 0
+ {
+ sizeof(KSDATAFORMAT_WAVEFORMATEXTENSIBLE),
+ 0,
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)
+ },
+ {
+ {
+ WAVE_FORMAT_EXTENSIBLE,
+ 2,
+ 44100,
+ 176400,
+ 4,
+ 16,
+ sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX)
+ },
+ 16,
+ KSAUDIO_SPEAKER_STEREO,
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM)
+ }
+ },
+ { // 1
+ {
+ sizeof(KSDATAFORMAT_WAVEFORMATEXTENSIBLE),
+ 0,
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)
+ },
+ {
+ {
+ WAVE_FORMAT_EXTENSIBLE,
+ 2,
+ 48000,
+ 192000,
+ 4,
+ 16,
+ sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX)
+ },
+ 16,
+ KSAUDIO_SPEAKER_STEREO,
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM)
+ }
+ }
+};
+
+//
+// Supported modes (only on streaming pins).
+//
+static
+MODE_AND_DEFAULT_FORMAT HdmiHostPinSupportedDeviceModes[] =
+{
+ {
+ STATIC_AUDIO_SIGNALPROCESSINGMODE_RAW,
+ NULL, // just an example of no default format for this endpoint/mode
+ },
+ {
+ STATIC_AUDIO_SIGNALPROCESSINGMODE_DEFAULT,
+ NULL, // just an example of no default format for this endpoint/mode
+ }
+};
+
+//
+// The entries here must follow the same order as the filter's pin
+// descriptor array.
+//
+static
+PIN_DEVICE_FORMATS_AND_MODES HdmiPinDeviceFormatsAndModes[] =
+{
+ {
+ SystemRenderPin,
+ HdmiHostPinSupportedDeviceFormats,
+ SIZEOF_ARRAY(HdmiHostPinSupportedDeviceFormats),
+ HdmiHostPinSupportedDeviceModes,
+ SIZEOF_ARRAY(HdmiHostPinSupportedDeviceModes)
+ },
+ {
+ RenderLoopbackPin,
+ HdmiLoopbackPinSupportedDeviceFormats,
+ SIZEOF_ARRAY(HdmiLoopbackPinSupportedDeviceFormats),
+ NULL, // loopback doesn't support modes.
+ 0
+ },
+ {
+ BridgePin,
+ NULL,
+ 0,
+ NULL,
+ 0
+ }
+};
+
+//=============================================================================
+static
+KSDATARANGE_AUDIO HdmiPinDataRangesStream[] =
+{
+ { // 0 - PCM host
+ {
+ sizeof(KSDATARANGE_AUDIO),
+ KSDATARANGE_ATTRIBUTES, // An attributes list follows this data range
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)
+ },
+ HDMI_HOST_MAX_CHANNELS,
+ HDMI_HOST_MIN_BITS_PER_SAMPLE,
+ HDMI_HOST_MAX_BITS_PER_SAMPLE,
+ HDMI_HOST_MIN_SAMPLE_RATE,
+ HDMI_HOST_MAX_SAMPLE_RATE
+ },
+ { // 1 - PCM loopback
+ {
+ sizeof(KSDATARANGE_AUDIO),
+ 0,
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)
+ },
+ HDMI_LOOPBACK_MAX_CHANNELS,
+ HDMI_LOOPBACK_MIN_BITS_PER_SAMPLE,
+ HDMI_LOOPBACK_MAX_BITS_PER_SAMPLE,
+ HDMI_LOOPBACK_MIN_SAMPLE_RATE,
+ HDMI_LOOPBACK_MAX_SAMPLE_RATE
+ },
+ { // 2 - DOLBY-DIGITAL host
+ {
+ sizeof(KSDATARANGE_AUDIO),
+ KSDATARANGE_ATTRIBUTES, // An attributes list follows this data range
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_IEC61937_DOLBY_DIGITAL),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)
+ },
+ HDMI_DOLBY_DIGITAL_MAX_CHANNELS,
+ HDMI_DOLBY_DIGITAL_MIN_BITS_PER_SAMPLE,
+ HDMI_DOLBY_DIGITAL_MAX_BITS_PER_SAMPLE,
+ HDMI_DOLBY_DIGITAL_MIN_SAMPLE_RATE,
+ HDMI_DOLBY_DIGITAL_MAX_SAMPLE_RATE
+ }
+};
+
+static
+PKSDATARANGE HdmiPinDataRangePointersStream[] =
+{
+ PKSDATARANGE(&HdmiPinDataRangesStream[0]),
+ PKSDATARANGE(&PinDataRangeAttributeList),
+ PKSDATARANGE(&HdmiPinDataRangesStream[2]),
+ PKSDATARANGE(&PinDataRangeAttributeList)
+};
+
+static
+PKSDATARANGE HdmiPinDataRangePointersLoopbackStream[] =
+{
+ PKSDATARANGE(&HdmiPinDataRangesStream[1])
+};
+
+//=============================================================================
+static
+KSDATARANGE HdmiPinDataRangesBridge[] =
+{
+ {
+ sizeof(KSDATARANGE),
+ 0,
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_ANALOG),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_NONE)
+ },
+ {
+ sizeof(KSDATARANGE),
+ 0,
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_IEC61937_DOLBY_DIGITAL),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_NONE)
+ }
+};
+
+static
+PKSDATARANGE HdmiPinDataRangePointersBridge[] =
+{
+ &HdmiPinDataRangesBridge[0],
+ &HdmiPinDataRangesBridge[1]
+};
+
+
+//=============================================================================
+static
+PCPIN_DESCRIPTOR HdmiWaveMiniportPins[] =
+{
+ // Wave Out Streaming Pin (Renderer) KSPIN_WAVE_RENDER2_SINK_SYSTEM
+ {
+ HDMI_MAX_INPUT_SYSTEM_STREAMS,
+ HDMI_MAX_INPUT_SYSTEM_STREAMS,
+ 0,
+ NULL,
+ {
+ 0,
+ NULL,
+ 0,
+ NULL,
+ SIZEOF_ARRAY(HdmiPinDataRangePointersStream),
+ HdmiPinDataRangePointersStream,
+ KSPIN_DATAFLOW_IN,
+ KSPIN_COMMUNICATION_SINK,
+ &KSCATEGORY_AUDIO,
+ NULL,
+ 0
+ }
+ },
+ // Wave Out Streaming Pin (Renderer) KSPIN_WAVE_RENDER2_SINK_LOOPBACK
+ {
+ HDMI_MAX_OUTPUT_LOOPBACK_STREAMS,
+ HDMI_MAX_OUTPUT_LOOPBACK_STREAMS,
+ 0,
+ NULL,
+ {
+ 0,
+ NULL,
+ 0,
+ NULL,
+ SIZEOF_ARRAY(HdmiPinDataRangePointersLoopbackStream),
+ HdmiPinDataRangePointersLoopbackStream,
+ KSPIN_DATAFLOW_OUT,
+ KSPIN_COMMUNICATION_SINK,
+ &KSNODETYPE_AUDIO_LOOPBACK,
+ NULL,
+ 0
+ }
+ },
+ // Wave Out Bridge Pin (Renderer) KSPIN_WAVE_RENDER2_SOURCE
+ {
+ 0,
+ 0,
+ 0,
+ NULL,
+ {
+ 0,
+ NULL,
+ 0,
+ NULL,
+ SIZEOF_ARRAY(HdmiPinDataRangePointersBridge),
+ HdmiPinDataRangePointersBridge,
+ KSPIN_DATAFLOW_OUT,
+ KSPIN_COMMUNICATION_NONE,
+ &KSCATEGORY_AUDIO,
+ NULL,
+ 0
+ }
+ },
+};
+
+//=============================================================================
+static
+PCPROPERTY_ITEM HdmiPropertiesVolume[] =
+{
+ {
+ &KSPROPSETID_Audio,
+ KSPROPERTY_AUDIO_VOLUMELEVEL,
+ KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_SET | KSPROPERTY_TYPE_BASICSUPPORT,
+ PropertyHandler_WaveFilter
+ }
+};
+
+DEFINE_PCAUTOMATION_TABLE_PROP(AutomationHdmiVolume, HdmiPropertiesVolume);
+
+//=============================================================================
+static
+PCPROPERTY_ITEM HdmiPropertiesMute[] =
+{
+ {
+ &KSPROPSETID_Audio,
+ KSPROPERTY_AUDIO_MUTE,
+ KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_SET | KSPROPERTY_TYPE_BASICSUPPORT,
+ PropertyHandler_WaveFilter
+ }
+};
+
+DEFINE_PCAUTOMATION_TABLE_PROP(AutomationHdmiMute, HdmiPropertiesMute);
+
+//=============================================================================
+static
+PCPROPERTY_ITEM HdmiPropertiesPeakMeter[] =
+{
+ {
+ &KSPROPSETID_Audio,
+ KSPROPERTY_AUDIO_PEAKMETER2,
+ KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_BASICSUPPORT,
+ PropertyHandler_WaveFilter
+ },
+ {
+ &KSPROPSETID_Audio,
+ KSPROPERTY_AUDIO_CPU_RESOURCES,
+ KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_BASICSUPPORT,
+ PropertyHandler_WaveFilter
+ }
+};
+
+DEFINE_PCAUTOMATION_TABLE_PROP(AutomationHdmiPeakMeter, HdmiPropertiesPeakMeter);
+
+//=============================================================================
+static
+PCNODE_DESCRIPTOR HdmiWaveMiniportNodes[] =
+{
+ // KSNODE_WAVE_SUM
+ {
+ 0, // Flags
+ NULL, // AutomationTable
+ &KSNODETYPE_SUM, // Type
+ NULL // Name
+ },
+ // KSNODE_WAVE_VOLUME
+ {
+ 0, // Flags
+ &AutomationHdmiVolume, // AutomationTable
+ &KSNODETYPE_VOLUME, // Type
+ &KSAUDFNAME_WAVE_VOLUME // Name
+ },
+ // KSNODE_WAVE_MUTE
+ {
+ 0, // Flags
+ &AutomationHdmiMute, // AutomationTable
+ &KSNODETYPE_MUTE, // Type
+ &KSAUDFNAME_WAVE_MUTE // Name
+ },
+ // KSNODE_WAVE_PEAKMETER
+ {
+ 0, // Flags
+ &AutomationHdmiPeakMeter, // AutomationTable
+ &KSNODETYPE_PEAKMETER, // Type
+ &KSAUDFNAME_PEAKMETER // Name
+ }
+};
+
+C_ASSERT( KSNODE_WAVE_SUM == 0 );
+C_ASSERT( KSNODE_WAVE_VOLUME == 1 );
+C_ASSERT( KSNODE_WAVE_MUTE == 2 );
+C_ASSERT( KSNODE_WAVE_PEAKMETER == 3 );
+
+
+//=============================================================================
+//
+// Note:
+// 1) A sum node can be used to 'sum' multiple streams associated to different
+// instances of the same pin.
+// 2) Any node output has an implicit 'tee' node associated with it. Thus in the
+// scenario below it is ok for the peak meter node to have two identical outputs.
+//
+// ----------------------------------------------------------
+// | |
+// System Pin 0 | |-----| |--------| |------| |-----------| |--> 1 Loopback Pin
+// [instances:0...n]-->| -->| Sum |--->| Volume |-->| Mute |-->| PeakMeter |--> |
+// | |-----| |--------| |------| |-----------| |--> 2 KSPIN_WAVE_RENDER2_SOURCE
+// | |
+// ----------------------------------------------------------
+
+static
+PCCONNECTION_DESCRIPTOR HdmiWaveMiniportConnections[] =
+{
+ { PCFILTER_NODE, KSPIN_WAVE_RENDER2_SINK_SYSTEM, KSNODE_WAVE_SUM, 1 },
+ { KSNODE_WAVE_SUM, 0, KSNODE_WAVE_VOLUME, 1 },
+ { KSNODE_WAVE_VOLUME, 0, KSNODE_WAVE_MUTE, 1 },
+ { KSNODE_WAVE_MUTE, 0, KSNODE_WAVE_PEAKMETER, 1 },
+ { KSNODE_WAVE_PEAKMETER, 2, PCFILTER_NODE, KSPIN_WAVE_RENDER2_SINK_LOOPBACK },
+ { KSNODE_WAVE_PEAKMETER, 0, PCFILTER_NODE, KSPIN_WAVE_RENDER2_SOURCE },
+};
+
+//=============================================================================
+static
+PCPROPERTY_ITEM PropertiesHdmiWaveFilter[] =
+{
+ {
+ &KSPROPSETID_Pin,
+ KSPROPERTY_PIN_PROPOSEDATAFORMAT,
+ KSPROPERTY_TYPE_SET | KSPROPERTY_TYPE_BASICSUPPORT,
+ PropertyHandler_WaveFilter
+ },
+};
+
+DEFINE_PCAUTOMATION_TABLE_PROP(AutomationHdmiWaveFilter, PropertiesHdmiWaveFilter);
+
+//=============================================================================
+static
+PCFILTER_DESCRIPTOR HdmiWaveMiniportFilterDescriptor =
+{
+ 0, // Version
+ &AutomationHdmiWaveFilter, // AutomationTable
+ sizeof(PCPIN_DESCRIPTOR), // PinSize
+ SIZEOF_ARRAY(HdmiWaveMiniportPins), // PinCount
+ HdmiWaveMiniportPins, // Pins
+ sizeof(PCNODE_DESCRIPTOR), // NodeSize
+ SIZEOF_ARRAY(HdmiWaveMiniportNodes), // NodeCount
+ HdmiWaveMiniportNodes, // Nodes
+ SIZEOF_ARRAY(HdmiWaveMiniportConnections), // ConnectionCount
+ HdmiWaveMiniportConnections, // Connections
+ 0, // CategoryCount
+ NULL // Categories - use defaults (audio, render, capture)
+};
+
+#endif // _SYSVAD_HDMIWAVTABLE_H_
+
diff --git a/audio/sysvad/TabletAudioSample/micarray2toptable.h b/audio/sysvad/TabletAudioSample/micarray2toptable.h
new file mode 100644
index 00000000..0c03a839
--- /dev/null
+++ b/audio/sysvad/TabletAudioSample/micarray2toptable.h
@@ -0,0 +1,229 @@
+/*++
+
+Copyright (c) Microsoft Corporation All Rights Reserved
+
+Module Name:
+
+ micarray2toptable.h
+
+Abstract:
+
+ Declaration of topology tables for the mic array (back).
+
+--*/
+
+#ifndef _SYSVAD_MICARRAY2TOPTABLE_H_
+#define _SYSVAD_MICARRAY2TOPTABLE_H_
+
+//
+// {3fe0e3e1-ad16-4772-8382-4129169018ce}
+DEFINE_GUID(MICARRAY2_CUSTOM_NAME,
+0x3fe0e3e1, 0xad16, 0x4772, 0x83, 0x82, 0x41, 0x29, 0x16, 0x90, 0x18, 0xce);
+
+//=============================================================================
+static
+KSDATARANGE MicArray2TopoPinDataRangesBridge[] =
+{
+ {
+ sizeof(KSDATARANGE),
+ 0,
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_ANALOG),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_NONE)
+ }
+};
+
+//=============================================================================
+static
+PKSDATARANGE MicArray2TopoPinDataRangePointersBridge[] =
+{
+ &MicArray2TopoPinDataRangesBridge[0]
+};
+
+//=============================================================================
+static
+PCPIN_DESCRIPTOR MicArray2TopoMiniportPins[] =
+{
+ // KSPIN_TOPO_MIC_ELEMENTS
+ {
+ 0,
+ 0,
+ 0, // InstanceCount
+ NULL, // AutomationTable
+ { // KsPinDescriptor
+ 0, // InterfacesCount
+ NULL, // Interfaces
+ 0, // MediumsCount
+ NULL, // Mediums
+ SIZEOF_ARRAY(MicArray2TopoPinDataRangePointersBridge), // DataRangesCount
+ MicArray2TopoPinDataRangePointersBridge, // DataRanges
+ KSPIN_DATAFLOW_IN, // DataFlow
+ KSPIN_COMMUNICATION_NONE, // Communication
+ &KSNODETYPE_MICROPHONE_ARRAY, // Category
+ &MICARRAY2_CUSTOM_NAME, // Name
+ 0 // Reserved
+ }
+ },
+
+ // KSPIN_TOPO_BRIDGE
+ {
+ 0,
+ 0,
+ 0, // InstanceCount
+ NULL, // AutomationTable
+ { // KsPinDescriptor
+ 0, // InterfacesCount
+ NULL, // Interfaces
+ 0, // MediumsCount
+ NULL, // Mediums
+ SIZEOF_ARRAY(MicArray2TopoPinDataRangePointersBridge), // DataRangesCount
+ MicArray2TopoPinDataRangePointersBridge, // DataRanges
+ KSPIN_DATAFLOW_OUT, // DataFlow
+ KSPIN_COMMUNICATION_NONE, // Communication
+ &KSCATEGORY_AUDIO, // Category
+ NULL, // Name
+ 0 // Reserved
+ }
+ }
+};
+
+//=============================================================================
+static
+PCPROPERTY_ITEM MicArray2PropertiesVolume[] =
+{
+ {
+ &KSPROPSETID_Audio,
+ KSPROPERTY_AUDIO_VOLUMELEVEL,
+ KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_SET | KSPROPERTY_TYPE_BASICSUPPORT,
+ PropertyHandler_MicArrayTopology
+ }
+};
+
+DEFINE_PCAUTOMATION_TABLE_PROP(AutomationMicArray2Volume, MicArray2PropertiesVolume);
+
+//=============================================================================
+static
+PCPROPERTY_ITEM MicArray2PropertiesMute[] =
+{
+ {
+ &KSPROPSETID_Audio,
+ KSPROPERTY_AUDIO_MUTE,
+ KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_SET | KSPROPERTY_TYPE_BASICSUPPORT,
+ PropertyHandler_MicArrayTopology
+ }
+};
+
+DEFINE_PCAUTOMATION_TABLE_PROP(AutomationMicArray2Mute, MicArray2PropertiesMute);
+
+//=============================================================================
+static
+PCPROPERTY_ITEM MicArray2PropertiesPeakMeter[] =
+{
+ {
+ &KSPROPSETID_Audio,
+ KSPROPERTY_AUDIO_PEAKMETER2,
+ KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_BASICSUPPORT,
+ PropertyHandler_MicArrayTopology
+ },
+ {
+ &KSPROPSETID_Audio,
+ KSPROPERTY_AUDIO_CPU_RESOURCES,
+ KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_BASICSUPPORT,
+ PropertyHandler_MicArrayTopology
+ }
+};
+
+DEFINE_PCAUTOMATION_TABLE_PROP(AutomationMicArray2PeakMeter, MicArray2PropertiesPeakMeter);
+
+//=============================================================================
+static
+PCNODE_DESCRIPTOR MicArray2TopologyNodes[] =
+{
+ // KSNODE_TOPO_VOLUME
+ {
+ 0, // Flags
+ &AutomationMicArray2Volume, // AutomationTable
+ &KSNODETYPE_VOLUME, // Type
+ &KSAUDFNAME_MIC_VOLUME // Name
+ },
+ // KSNODE_TOPO_MUTE
+ {
+ 0, // Flags
+ &AutomationMicArray2Mute, // AutomationTable
+ &KSNODETYPE_MUTE, // Type
+ &KSAUDFNAME_MIC_MUTE // Name
+ },
+ // KSNODE_TOPO_PEAKMETER
+ {
+ 0, // Flags
+ &AutomationMicArray2PeakMeter, // AutomationTable
+ &KSNODETYPE_PEAKMETER, // Type
+ &KSAUDFNAME_PEAKMETER // Name
+ }
+};
+
+C_ASSERT( KSNODE_TOPO_VOLUME == 0 );
+C_ASSERT( KSNODE_TOPO_MUTE == 1 );
+C_ASSERT( KSNODE_TOPO_PEAKMETER == 2 );
+
+
+//=============================================================================
+static
+PCCONNECTION_DESCRIPTOR MicArray2TopoMiniportConnections[] =
+{
+ // FromNode, FromPin, ToNode, ToPin
+ { PCFILTER_NODE, KSPIN_TOPO_MIC_ELEMENTS, KSNODE_TOPO_VOLUME, 1 },
+ { KSNODE_TOPO_VOLUME, 0, KSNODE_TOPO_MUTE, 1 },
+ { KSNODE_TOPO_MUTE, 0, KSNODE_TOPO_PEAKMETER, 1 },
+ { KSNODE_TOPO_PEAKMETER, 0, PCFILTER_NODE, KSPIN_TOPO_BRIDGE }
+};
+
+
+//=============================================================================
+static
+PCPROPERTY_ITEM MicArray2PropertiesTopoFilter[] =
+{
+ {
+ &KSPROPSETID_Jack,
+ KSPROPERTY_JACK_DESCRIPTION,
+ KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_BASICSUPPORT,
+ PropertyHandler_MicArrayTopoFilter
+ },
+ {
+ &KSPROPSETID_Jack,
+ KSPROPERTY_JACK_DESCRIPTION2,
+ KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_BASICSUPPORT,
+ PropertyHandler_MicArrayTopoFilter
+ },
+ {
+ &KSPROPSETID_Audio,
+ KSPROPERTY_AUDIO_MIC_ARRAY_GEOMETRY,
+ KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_BASICSUPPORT,
+ PropertyHandler_MicArrayTopoFilter
+ }
+};
+
+DEFINE_PCAUTOMATION_TABLE_PROP(AutomationMicArray2TopoFilter, MicArray2PropertiesTopoFilter);
+
+//=============================================================================
+static
+PCFILTER_DESCRIPTOR MicArray2TopoMiniportFilterDescriptor =
+{
+ 0, // Version
+ &AutomationMicArray2TopoFilter, // AutomationTable
+ sizeof(PCPIN_DESCRIPTOR), // PinSize
+ SIZEOF_ARRAY(MicArray2TopoMiniportPins), // PinCount
+ MicArray2TopoMiniportPins, // Pins
+ sizeof(PCNODE_DESCRIPTOR), // NodeSize
+ SIZEOF_ARRAY(MicArray2TopologyNodes), // NodeCount
+ MicArray2TopologyNodes, // Nodes
+ SIZEOF_ARRAY(MicArray2TopoMiniportConnections),// ConnectionCount
+ MicArray2TopoMiniportConnections, // Connections
+ 0, // CategoryCount
+ NULL // Categories
+};
+
+#endif // _SYSVAD_MICARRAY2TOPTABLE_H_
+
diff --git a/audio/sysvad/TabletAudioSample/micarray3toptable.h b/audio/sysvad/TabletAudioSample/micarray3toptable.h
new file mode 100644
index 00000000..02a3d76e
--- /dev/null
+++ b/audio/sysvad/TabletAudioSample/micarray3toptable.h
@@ -0,0 +1,228 @@
+/*++
+
+Copyright (c) Microsoft Corporation All Rights Reserved
+
+Module Name:
+
+ micarray3toptable.h
+
+Abstract:
+
+ Declaration of topology tables for the mic array (front/back).
+
+--*/
+
+#ifndef _SYSVAD_MICARRAY3TOPTABLE_H_
+#define _SYSVAD_MICARRAY3TOPTABLE_H_
+
+//
+// {c04bdb7c-2138-48da-9dd4-2af9ff2e58c2}
+DEFINE_GUID(MICARRAY3_CUSTOM_NAME,
+0xc04bdb7c, 0x2138, 0x48da, 0x9d, 0xd4, 0x2a, 0xf9, 0xff, 0x2e, 0x58, 0xc2);
+
+//=============================================================================
+static
+KSDATARANGE MicArray3TopoPinDataRangesBridge[] =
+{
+ {
+ sizeof(KSDATARANGE),
+ 0,
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_ANALOG),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_NONE)
+ }
+};
+
+//=============================================================================
+static
+PKSDATARANGE MicArray3TopoPinDataRangePointersBridge[] =
+{
+ &MicArray3TopoPinDataRangesBridge[0]
+};
+
+//=============================================================================
+static
+PCPIN_DESCRIPTOR MicArray3TopoMiniportPins[] =
+{
+ // KSPIN_TOPO_MIC_ELEMENTS
+ {
+ 0,
+ 0,
+ 0, // InstanceCount
+ NULL, // AutomationTable
+ { // KsPinDescriptor
+ 0, // InterfacesCount
+ NULL, // Interfaces
+ 0, // MediumsCount
+ NULL, // Mediums
+ SIZEOF_ARRAY(MicArray3TopoPinDataRangePointersBridge), // DataRangesCount
+ MicArray3TopoPinDataRangePointersBridge, // DataRanges
+ KSPIN_DATAFLOW_IN, // DataFlow
+ KSPIN_COMMUNICATION_NONE, // Communication
+ &KSNODETYPE_MICROPHONE_ARRAY, // Category
+ &MICARRAY3_CUSTOM_NAME, // Name
+ 0 // Reserved
+ }
+ },
+
+ // KSPIN_TOPO_BRIDGE
+ {
+ 0,
+ 0,
+ 0, // InstanceCount
+ NULL, // AutomationTable
+ { // KsPinDescriptor
+ 0, // InterfacesCount
+ NULL, // Interfaces
+ 0, // MediumsCount
+ NULL, // Mediums
+ SIZEOF_ARRAY(MicArray3TopoPinDataRangePointersBridge), // DataRangesCount
+ MicArray3TopoPinDataRangePointersBridge, // DataRanges
+ KSPIN_DATAFLOW_OUT, // DataFlow
+ KSPIN_COMMUNICATION_NONE, // Communication
+ &KSCATEGORY_AUDIO, // Category
+ NULL, // Name
+ 0 // Reserved
+ }
+ }
+};
+
+//=============================================================================
+static
+PCPROPERTY_ITEM MicArray3PropertiesVolume[] =
+{
+ {
+ &KSPROPSETID_Audio,
+ KSPROPERTY_AUDIO_VOLUMELEVEL,
+ KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_SET | KSPROPERTY_TYPE_BASICSUPPORT,
+ PropertyHandler_MicArrayTopology
+ }
+};
+
+DEFINE_PCAUTOMATION_TABLE_PROP(AutomationMicArray3Volume, MicArray3PropertiesVolume);
+
+//=============================================================================
+static
+PCPROPERTY_ITEM MicArray3PropertiesMute[] =
+{
+ {
+ &KSPROPSETID_Audio,
+ KSPROPERTY_AUDIO_MUTE,
+ KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_SET | KSPROPERTY_TYPE_BASICSUPPORT,
+ PropertyHandler_MicArrayTopology
+ }
+};
+
+DEFINE_PCAUTOMATION_TABLE_PROP(AutomationMicArray3Mute, MicArray3PropertiesMute);
+
+//=============================================================================
+static
+PCPROPERTY_ITEM MicArray3PropertiesPeakMeter[] =
+{
+ {
+ &KSPROPSETID_Audio,
+ KSPROPERTY_AUDIO_PEAKMETER2,
+ KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_BASICSUPPORT,
+ PropertyHandler_MicArrayTopology
+ },
+ {
+ &KSPROPSETID_Audio,
+ KSPROPERTY_AUDIO_CPU_RESOURCES,
+ KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_BASICSUPPORT,
+ PropertyHandler_MicArrayTopology
+ }
+};
+
+DEFINE_PCAUTOMATION_TABLE_PROP(AutomationMicArray3PeakMeter, MicArray3PropertiesPeakMeter);
+
+//=============================================================================
+static
+PCNODE_DESCRIPTOR MicArray3TopologyNodes[] =
+{
+ // KSNODE_TOPO_VOLUME
+ {
+ 0, // Flags
+ &AutomationMicArray3Volume, // AutomationTable
+ &KSNODETYPE_VOLUME, // Type
+ &KSAUDFNAME_MIC_VOLUME // Name
+ },
+ // KSNODE_TOPO_MUTE
+ {
+ 0, // Flags
+ &AutomationMicArray3Mute, // AutomationTable
+ &KSNODETYPE_MUTE, // Type
+ &KSAUDFNAME_MIC_MUTE // Name
+ },
+ // KSNODE_TOPO_PEAKMETER
+ {
+ 0, // Flags
+ &AutomationMicArray3PeakMeter, // AutomationTable
+ &KSNODETYPE_PEAKMETER, // Type
+ &KSAUDFNAME_PEAKMETER // Name
+ }
+};
+
+C_ASSERT( KSNODE_TOPO_VOLUME == 0 );
+C_ASSERT( KSNODE_TOPO_MUTE == 1 );
+C_ASSERT( KSNODE_TOPO_PEAKMETER == 2 );
+
+//=============================================================================
+static
+PCCONNECTION_DESCRIPTOR MicArray3TopoMiniportConnections[] =
+{
+ // FromNode, FromPin, ToNode, ToPin
+ { PCFILTER_NODE, KSPIN_TOPO_MIC_ELEMENTS, KSNODE_TOPO_VOLUME, 1 },
+ { KSNODE_TOPO_VOLUME, 0, KSNODE_TOPO_MUTE, 1 },
+ { KSNODE_TOPO_MUTE, 0, KSNODE_TOPO_PEAKMETER, 1 },
+ { KSNODE_TOPO_PEAKMETER, 0, PCFILTER_NODE, KSPIN_TOPO_BRIDGE }
+};
+
+
+//=============================================================================
+static
+PCPROPERTY_ITEM MicArray3PropertiesTopoFilter[] =
+{
+ {
+ &KSPROPSETID_Jack,
+ KSPROPERTY_JACK_DESCRIPTION,
+ KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_BASICSUPPORT,
+ PropertyHandler_MicArrayTopoFilter
+ },
+ {
+ &KSPROPSETID_Jack,
+ KSPROPERTY_JACK_DESCRIPTION2,
+ KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_BASICSUPPORT,
+ PropertyHandler_MicArrayTopoFilter
+ },
+ {
+ &KSPROPSETID_Audio,
+ KSPROPERTY_AUDIO_MIC_ARRAY_GEOMETRY,
+ KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_BASICSUPPORT,
+ PropertyHandler_MicArrayTopoFilter
+ }
+};
+
+DEFINE_PCAUTOMATION_TABLE_PROP(AutomationMicArray3TopoFilter, MicArray3PropertiesTopoFilter);
+
+//=============================================================================
+static
+PCFILTER_DESCRIPTOR MicArray3TopoMiniportFilterDescriptor =
+{
+ 0, // Version
+ &AutomationMicArray3TopoFilter, // AutomationTable
+ sizeof(PCPIN_DESCRIPTOR), // PinSize
+ SIZEOF_ARRAY(MicArray3TopoMiniportPins), // PinCount
+ MicArray3TopoMiniportPins, // Pins
+ sizeof(PCNODE_DESCRIPTOR), // NodeSize
+ SIZEOF_ARRAY(MicArray3TopologyNodes), // NodeCount
+ MicArray3TopologyNodes, // Nodes
+ SIZEOF_ARRAY(MicArray3TopoMiniportConnections),// ConnectionCount
+ MicArray3TopoMiniportConnections, // Connections
+ 0, // CategoryCount
+ NULL // Categories
+};
+
+#endif // _SYSVAD_MICARRAY3TOPTABLE_H_
+
diff --git a/audio/sysvad/TabletAudioSample/micarray3wavtable.h b/audio/sysvad/TabletAudioSample/micarray3wavtable.h
new file mode 100644
index 00000000..34e3df18
--- /dev/null
+++ b/audio/sysvad/TabletAudioSample/micarray3wavtable.h
@@ -0,0 +1,455 @@
+/*++
+
+Copyright (c) Microsoft Corporation All Rights Reserved
+
+Module Name:
+
+ micarray3wavtable.h
+
+Abstract:
+
+ Declaration of wave miniport tables for the combined mic array (front/back).
+
+--*/
+
+#ifndef _SYSVAD_MICARRAY3WAVTABLE_H_
+#define _SYSVAD_MICARRAY3WAVTABLE_H_
+
+//
+// Mic array range.
+//
+#define MICARRAY3_RAW_CHANNELS 4 // Channels for raw mode
+#define MICARRAY3_PROCESSED_CHANNELS 1 // Channels for default mode
+#define MICARRAY3_DEVICE_MAX_CHANNELS 4 // Max channels overall
+#define MICARRAY3_MIN_BITS_PER_SAMPLE_PCM 16 // Min Bits Per Sample
+#define MICARRAY3_MAX_BITS_PER_SAMPLE_PCM 16 // Max Bits Per Sample
+#define MICARRAY3_RAW_SAMPLE_RATE 48000 // Raw sample rate
+
+//
+// Max # of pin instances.
+//
+#define MICARRAY3_MAX_INPUT_STREAMS 2 // Raw + Default streams
+
+//=============================================================================
+static
+KSDATAFORMAT_WAVEFORMATEXTENSIBLE MicArray3PinSupportedDeviceFormats[] =
+{
+ // 0 - Note the ENDPOINT_MINIPAIR structures for the mic arrays use this first element as the proposed DEFAULT format
+ // 48 KHz 16-bit mono
+ {
+ {
+ sizeof(KSDATAFORMAT_WAVEFORMATEXTENSIBLE),
+ 0,
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)
+ },
+ {
+ {
+ WAVE_FORMAT_EXTENSIBLE,
+ 1,
+ 48000,
+ 96000,
+ 2,
+ 16,
+ sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX)
+ },
+ 16,
+ KSAUDIO_SPEAKER_MONO,
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM)
+ }
+ },
+ // 1
+ // 16 KHz 16-bit mono
+ {
+ {
+ sizeof(KSDATAFORMAT_WAVEFORMATEXTENSIBLE),
+ 0,
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)
+ },
+ {
+ {
+ WAVE_FORMAT_EXTENSIBLE,
+ 1,
+ 16000,
+ 32000,
+ 2,
+ 16,
+ sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX)
+ },
+ 16,
+ KSAUDIO_SPEAKER_MONO,
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM)
+ }
+ },
+ // 2
+ // 11.025 KHz 16-bit mono
+ {
+ {
+ sizeof(KSDATAFORMAT_WAVEFORMATEXTENSIBLE),
+ 0,
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)
+ },
+ {
+ {
+ WAVE_FORMAT_EXTENSIBLE,
+ 1,
+ 11025,
+ 22050,
+ 2,
+ 16,
+ sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX)
+ },
+ 16,
+ KSAUDIO_SPEAKER_MONO,
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM)
+ }
+ },
+ // 3
+ // 8 KHz 16-bit mono
+ {
+ {
+ sizeof(KSDATAFORMAT_WAVEFORMATEXTENSIBLE),
+ 0,
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)
+ },
+ {
+ {
+ WAVE_FORMAT_EXTENSIBLE,
+ 1,
+ 8000,
+ 16000,
+ 2,
+ 16,
+ sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX)
+ },
+ 16,
+ KSAUDIO_SPEAKER_MONO,
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM)
+ }
+ },
+ // 4 - Note the ENDPOINT_MINIPAIR structures for the mic arrays use this last element as the proposed RAW format
+ // 48 KHz 16-bit 4 channels
+ {
+ {
+ sizeof(KSDATAFORMAT_WAVEFORMATEXTENSIBLE),
+ 0,
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)
+ },
+ {
+ {
+ WAVE_FORMAT_EXTENSIBLE,
+ 4,
+ 48000,
+ 384000,
+ 8,
+ 16,
+ sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX)
+ },
+ 16,
+ 0, // No channel configuration for unprocessed mic array
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM)
+ }
+ },
+};
+
+//
+// Supported modes (only on streaming pins).
+//
+static
+MODE_AND_DEFAULT_FORMAT MicArray3PinSupportedDeviceModes[] =
+{
+ {
+ STATIC_AUDIO_SIGNALPROCESSINGMODE_RAW,
+ &MicArray3PinSupportedDeviceFormats[SIZEOF_ARRAY(MicArray3PinSupportedDeviceFormats)-1].DataFormat
+ },
+ {
+ STATIC_AUDIO_SIGNALPROCESSINGMODE_DEFAULT,
+ &MicArray3PinSupportedDeviceFormats[0].DataFormat
+ }
+};
+
+//
+// The entries here must follow the same order as the filter's pin
+// descriptor array.
+//
+static
+PIN_DEVICE_FORMATS_AND_MODES MicArray3PinDeviceFormatsAndModes[] =
+{
+ {
+ BridgePin,
+ NULL,
+ 0,
+ NULL,
+ 0
+ },
+ {
+ SystemCapturePin,
+ MicArray3PinSupportedDeviceFormats,
+ SIZEOF_ARRAY(MicArray3PinSupportedDeviceFormats),
+ MicArray3PinSupportedDeviceModes,
+ SIZEOF_ARRAY(MicArray3PinSupportedDeviceModes)
+ }
+};
+
+//=============================================================================
+// Data ranges
+//
+// See CMiniportWaveRT::DataRangeIntersection.
+//
+// Both mono and two-channel formats are supported for the mic arrays. The
+// design of this sample driver's data range intersection handler requires a
+// separate data for each supported channel count.
+//
+static
+KSDATARANGE_AUDIO MicArray3PinDataRangesRawStream[] =
+{
+ {
+ {
+ sizeof(KSDATARANGE_AUDIO),
+ KSDATARANGE_ATTRIBUTES, // An attributes list follows this data range
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)
+ },
+ MICARRAY3_RAW_CHANNELS,
+ MICARRAY3_MIN_BITS_PER_SAMPLE_PCM,
+ MICARRAY3_MAX_BITS_PER_SAMPLE_PCM,
+ MICARRAY3_RAW_SAMPLE_RATE,
+ MICARRAY3_RAW_SAMPLE_RATE
+ },
+};
+
+static
+KSDATARANGE_AUDIO MicArray3PinDataRangesProcessedStream[] =
+{
+ {
+ {
+ sizeof(KSDATARANGE_AUDIO),
+ KSDATARANGE_ATTRIBUTES, // An attributes list follows this data range
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)
+ },
+ MICARRAY3_PROCESSED_CHANNELS,
+ MICARRAY3_MIN_BITS_PER_SAMPLE_PCM,
+ MICARRAY3_MAX_BITS_PER_SAMPLE_PCM,
+ 48000,
+ 48000
+ },
+ {
+ {
+ sizeof(KSDATARANGE_AUDIO),
+ KSDATARANGE_ATTRIBUTES, // An attributes list follows this data range
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)
+ },
+ MICARRAY3_PROCESSED_CHANNELS,
+ MICARRAY3_MIN_BITS_PER_SAMPLE_PCM,
+ MICARRAY3_MAX_BITS_PER_SAMPLE_PCM,
+ 16000,
+ 16000
+ },
+ {
+ {
+ sizeof(KSDATARANGE_AUDIO),
+ KSDATARANGE_ATTRIBUTES, // An attributes list follows this data range
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)
+ },
+ MICARRAY3_PROCESSED_CHANNELS,
+ MICARRAY3_MIN_BITS_PER_SAMPLE_PCM,
+ MICARRAY3_MAX_BITS_PER_SAMPLE_PCM,
+ 11025,
+ 11025
+ },
+ {
+ {
+ sizeof(KSDATARANGE_AUDIO),
+ KSDATARANGE_ATTRIBUTES, // An attributes list follows this data range
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)
+ },
+ MICARRAY3_PROCESSED_CHANNELS,
+ MICARRAY3_MIN_BITS_PER_SAMPLE_PCM,
+ MICARRAY3_MAX_BITS_PER_SAMPLE_PCM,
+ 8000,
+ 8000
+ },
+};
+
+static
+PKSDATARANGE MicArray3PinDataRangePointersStream[] =
+{
+ PKSDATARANGE(&MicArray3PinDataRangesProcessedStream[0]),
+ PKSDATARANGE(&PinDataRangeAttributeList),
+ PKSDATARANGE(&MicArray3PinDataRangesRawStream[0]),
+ PKSDATARANGE(&PinDataRangeAttributeList),
+};
+
+//=============================================================================
+static
+KSDATARANGE MicArray3PinDataRangesBridge[] =
+{
+ {
+ sizeof(KSDATARANGE),
+ 0,
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_ANALOG),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_NONE)
+ }
+};
+
+static
+PKSDATARANGE MicArray3PinDataRangePointersBridge[] =
+{
+ &MicArray3PinDataRangesBridge[0]
+};
+
+//=============================================================================
+static
+PCPIN_DESCRIPTOR MicArray3WaveMiniportPins[] =
+{
+ // Wave In Bridge Pin (Capture - From Topology) KSPIN_WAVE_BRIDGE
+ {
+ 0,
+ 0,
+ 0,
+ NULL,
+ {
+ 0,
+ NULL,
+ 0,
+ NULL,
+ SIZEOF_ARRAY(MicArray3PinDataRangePointersBridge),
+ MicArray3PinDataRangePointersBridge,
+ KSPIN_DATAFLOW_IN,
+ KSPIN_COMMUNICATION_NONE,
+ &KSCATEGORY_AUDIO,
+ NULL,
+ 0
+ }
+ },
+
+ // Wave In Streaming Pin (Capture) KSPIN_WAVE_HOST
+ {
+ MICARRAY3_MAX_INPUT_STREAMS,
+ MICARRAY3_MAX_INPUT_STREAMS,
+ 0,
+ NULL,
+ {
+ 0,
+ NULL,
+ 0,
+ NULL,
+ SIZEOF_ARRAY(MicArray3PinDataRangePointersStream),
+ MicArray3PinDataRangePointersStream,
+ KSPIN_DATAFLOW_OUT,
+ KSPIN_COMMUNICATION_SINK,
+ &KSCATEGORY_AUDIO,
+ &KSAUDFNAME_RECORDING_CONTROL,
+ 0
+ }
+ }
+};
+
+//=============================================================================
+static
+PCNODE_DESCRIPTOR MicArray3WaveMiniportNodes[] =
+{
+ // KSNODE_WAVE_ADC
+ {
+ 0, // Flags
+ NULL, // AutomationTable
+ &KSNODETYPE_ADC, // Type
+ NULL // Name
+ }
+};
+
+//=============================================================================
+static
+PCCONNECTION_DESCRIPTOR MicArray3WaveMiniportConnections[] =
+{
+ { PCFILTER_NODE, KSPIN_WAVE_BRIDGE, KSNODE_WAVE_ADC, 1 },
+ { KSNODE_WAVE_ADC, 0, PCFILTER_NODE, KSPIN_WAVEIN_HOST }
+};
+
+//=============================================================================
+static
+PCPROPERTY_ITEM PropertiesMicArray3WaveFilter[] =
+{
+ {
+ &KSPROPSETID_General,
+ KSPROPERTY_GENERAL_COMPONENTID,
+ KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_BASICSUPPORT,
+ PropertyHandler_WaveFilter
+ },
+ {
+ &KSPROPSETID_Pin,
+ KSPROPERTY_PIN_PROPOSEDATAFORMAT,
+ KSPROPERTY_TYPE_SET | KSPROPERTY_TYPE_BASICSUPPORT,
+ PropertyHandler_WaveFilter
+ },
+ {
+ &KSPROPSETID_Pin,
+ KSPROPERTY_PIN_PROPOSEDATAFORMAT2,
+ KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_BASICSUPPORT,
+ PropertyHandler_WaveFilter
+ },
+};
+
+DEFINE_PCAUTOMATION_TABLE_PROP(AutomationMicArray3WaveFilter, PropertiesMicArray3WaveFilter);
+
+//=============================================================================
+static
+PCFILTER_DESCRIPTOR MicArray3WaveMiniportFilterDescriptor =
+{
+ 0, // Version
+ &AutomationMicArray3WaveFilter, // AutomationTable
+ sizeof(PCPIN_DESCRIPTOR), // PinSize
+ SIZEOF_ARRAY(MicArray3WaveMiniportPins), // PinCount
+ MicArray3WaveMiniportPins, // Pins
+ sizeof(PCNODE_DESCRIPTOR), // NodeSize
+ SIZEOF_ARRAY(MicArray3WaveMiniportNodes), // NodeCount
+ MicArray3WaveMiniportNodes, // Nodes
+ SIZEOF_ARRAY(MicArray3WaveMiniportConnections), // ConnectionCount
+ MicArray3WaveMiniportConnections, // Connections
+ 0, // CategoryCount
+ NULL // Categories - use defaults (audio, render, capture)
+};
+
+#endif // _SYSVAD_MICARRAY3WAVTABLE_H_
+
diff --git a/audio/sysvad/TabletAudioSample/micintopo.cpp b/audio/sysvad/TabletAudioSample/micintopo.cpp
new file mode 100644
index 00000000..6c1de10f
--- /dev/null
+++ b/audio/sysvad/TabletAudioSample/micintopo.cpp
@@ -0,0 +1,274 @@
+/*++
+
+Copyright (c) Microsoft Corporation All Rights Reserved
+
+Module Name:
+
+ micintopo.cpp
+
+Abstract:
+
+ Implementation of topology miniport for the mic (external: headphone).
+
+--*/
+
+#pragma warning (disable : 4127)
+
+#include <sysvad.h>
+#include "simple.h"
+#include "mintopo.h"
+#include "micintopo.h"
+#include "micintoptable.h"
+
+
+#pragma code_seg("PAGE")
+
+//=============================================================================
+NTSTATUS
+PropertyHandler_MicInJackDescription
+(
+ _In_ PPCPROPERTY_REQUEST PropertyRequest
+)
+/*++
+
+Routine Description:
+
+ Handles ( KSPROPSETID_Jack, KSPROPERTY_JACK_DESCRIPTION )
+
+Arguments:
+
+ PropertyRequest -
+
+Return Value:
+
+ NT status code.
+
+--*/
+{
+ PAGED_CODE();
+
+ ASSERT(PropertyRequest);
+
+ DPF_ENTER(("[PropertyHandler_MicInJackDescription]"));
+
+ NTSTATUS ntStatus = STATUS_INVALID_DEVICE_REQUEST;
+ ULONG nPinId = (ULONG)-1;
+
+ ULONG cJackDescriptions = ARRAYSIZE(MicInJackDescriptions);
+ PKSJACK_DESCRIPTION * JackDescriptions = MicInJackDescriptions;
+
+ if (PropertyRequest->InstanceSize >= sizeof(ULONG))
+ {
+ nPinId = *(PULONG(PropertyRequest->Instance));
+
+ if ((nPinId < cJackDescriptions) && (JackDescriptions[nPinId] != NULL))
+ {
+ if (PropertyRequest->Verb & KSPROPERTY_TYPE_BASICSUPPORT)
+ {
+ ntStatus =
+ PropertyHandler_BasicSupport
+ (
+ PropertyRequest,
+ KSPROPERTY_TYPE_BASICSUPPORT | KSPROPERTY_TYPE_GET,
+ VT_ILLEGAL
+ );
+ }
+ else
+ {
+ ULONG cbNeeded = sizeof(KSMULTIPLE_ITEM) + sizeof(KSJACK_DESCRIPTION);
+
+ if (PropertyRequest->ValueSize == 0)
+ {
+ PropertyRequest->ValueSize = cbNeeded;
+ ntStatus = STATUS_BUFFER_OVERFLOW;
+ }
+ else if (PropertyRequest->ValueSize < cbNeeded)
+ {
+ ntStatus = STATUS_BUFFER_TOO_SMALL;
+ }
+ else
+ {
+ if (PropertyRequest->Verb & KSPROPERTY_TYPE_GET)
+ {
+ PKSMULTIPLE_ITEM pMI = (PKSMULTIPLE_ITEM)PropertyRequest->Value;
+ PKSJACK_DESCRIPTION pDesc = (PKSJACK_DESCRIPTION)(pMI+1);
+
+ pMI->Size = cbNeeded;
+ pMI->Count = 1;
+
+ RtlCopyMemory(pDesc, JackDescriptions[nPinId], sizeof(KSJACK_DESCRIPTION));
+ ntStatus = STATUS_SUCCESS;
+ }
+ }
+ }
+ }
+ }
+
+ return ntStatus;
+}
+
+//=============================================================================
+NTSTATUS
+PropertyHandler_MicInJackDescription2
+(
+ _In_ PPCPROPERTY_REQUEST PropertyRequest
+)
+/*++
+
+Routine Description:
+
+ Handles ( KSPROPSETID_Jack, KSPROPERTY_JACK_DESCRIPTION2 )
+
+Arguments:
+
+ PropertyRequest -
+
+Return Value:
+
+ NT status code.
+
+--*/
+{
+ PAGED_CODE();
+
+ ASSERT(PropertyRequest);
+
+ DPF_ENTER(("[PropertyHandler_MicInJackDescription2]"));
+
+ NTSTATUS ntStatus = STATUS_INVALID_DEVICE_REQUEST;
+ ULONG nPinId = (ULONG)-1;
+
+ ULONG cJackDescriptions = ARRAYSIZE(MicInJackDescriptions);
+ PKSJACK_DESCRIPTION * JackDescriptions = MicInJackDescriptions;
+
+ if (PropertyRequest->InstanceSize >= sizeof(ULONG))
+ {
+ nPinId = *(PULONG(PropertyRequest->Instance));
+
+ if ((nPinId < cJackDescriptions) && (JackDescriptions[nPinId] != NULL))
+ {
+ if (PropertyRequest->Verb & KSPROPERTY_TYPE_BASICSUPPORT)
+ {
+ ntStatus =
+ PropertyHandler_BasicSupport
+ (
+ PropertyRequest,
+ KSPROPERTY_TYPE_BASICSUPPORT | KSPROPERTY_TYPE_GET,
+ VT_ILLEGAL
+ );
+ }
+ else
+ {
+ ULONG cbNeeded = sizeof(KSMULTIPLE_ITEM) + sizeof(KSJACK_DESCRIPTION2);
+
+ if (PropertyRequest->ValueSize == 0)
+ {
+ PropertyRequest->ValueSize = cbNeeded;
+ ntStatus = STATUS_BUFFER_OVERFLOW;
+ }
+ else if (PropertyRequest->ValueSize < cbNeeded)
+ {
+ ntStatus = STATUS_BUFFER_TOO_SMALL;
+ }
+ else
+ {
+ if (PropertyRequest->Verb & KSPROPERTY_TYPE_GET)
+ {
+ PKSMULTIPLE_ITEM pMI = (PKSMULTIPLE_ITEM)PropertyRequest->Value;
+ PKSJACK_DESCRIPTION2 pDesc = (PKSJACK_DESCRIPTION2)(pMI+1);
+
+ pMI->Size = cbNeeded;
+ pMI->Count = 1;
+
+ RtlZeroMemory(pDesc, sizeof(KSJACK_DESCRIPTION2));
+
+ //
+ // Specifies the lower 16 bits of the DWORD parameter. This parameter indicates whether
+ // the jack is currently active, streaming, idle, or hardware not ready.
+ //
+ pDesc->DeviceStateInfo = 0;
+
+ //
+ // From MSDN:
+ // "If an audio device lacks jack presence detection, the IsConnected member of
+ // the KSJACK_DESCRIPTION structure must always be set to TRUE. To remove the
+ // ambiguity that results from this dual meaning of the TRUE value for IsConnected,
+ // a client application can call IKsJackDescription2::GetJackDescription2 to read
+ // the JackCapabilities flag of the KSJACK_DESCRIPTION2 structure. If this flag has
+ // the JACKDESC2_PRESENCE_DETECT_CAPABILITY bit set, it indicates that the endpoint
+ // does in fact support jack presence detection. In that case, the return value of
+ // the IsConnected member can be interpreted to accurately reflect the insertion status
+ // of the jack."
+ //
+ // Bit definitions:
+ // 0x00000001 - JACKDESC2_PRESENCE_DETECT_CAPABILITY
+ // 0x00000002 - JACKDESC2_DYNAMIC_FORMAT_CHANGE_CAPABILITY
+ //
+ pDesc->JackCapabilities = JACKDESC2_PRESENCE_DETECT_CAPABILITY;
+
+ ntStatus = STATUS_SUCCESS;
+ }
+ }
+ }
+ }
+ }
+
+ return ntStatus;
+}
+
+//=============================================================================
+NTSTATUS
+PropertyHandler_MicInTopoFilter
+(
+ _In_ PPCPROPERTY_REQUEST PropertyRequest
+)
+/*++
+
+Routine Description:
+
+ Redirects property request to miniport object
+
+Arguments:
+
+ PropertyRequest -
+
+Return Value:
+
+ NT status code.
+
+--*/
+{
+ PAGED_CODE();
+
+ ASSERT(PropertyRequest);
+
+ DPF_ENTER(("[PropertyHandler_MicInTopoFilter]"));
+
+ // PropertryRequest structure is filled by portcls.
+ // MajorTarget is a pointer to miniport object for miniports.
+ //
+ NTSTATUS ntStatus = STATUS_INVALID_DEVICE_REQUEST;
+
+ //
+ // This line shows how to get a pointer to the miniport topology object.
+ //
+ PCMiniportTopology pMiniport = (PCMiniportTopology)PropertyRequest->MajorTarget;
+ UNREFERENCED_VAR(pMiniport);
+
+ if (IsEqualGUIDAligned(*PropertyRequest->PropertyItem->Set, KSPROPSETID_Jack))
+ {
+ if (PropertyRequest->PropertyItem->Id == KSPROPERTY_JACK_DESCRIPTION)
+ {
+ ntStatus = PropertyHandler_MicInJackDescription(PropertyRequest);
+ }
+ else if (PropertyRequest->PropertyItem->Id == KSPROPERTY_JACK_DESCRIPTION2)
+ {
+ ntStatus = PropertyHandler_MicInJackDescription2(PropertyRequest);
+ }
+ }
+
+ return ntStatus;
+} // PropertyHandler_MicInTopoFilter
+
+#pragma code_seg()
+
diff --git a/audio/sysvad/TabletAudioSample/micintopo.h b/audio/sysvad/TabletAudioSample/micintopo.h
new file mode 100644
index 00000000..af4b8be2
--- /dev/null
+++ b/audio/sysvad/TabletAudioSample/micintopo.h
@@ -0,0 +1,21 @@
+
+/*++
+
+Copyright (c) Microsoft Corporation All Rights Reserved
+
+Module Name:
+
+ micintopo.h
+
+Abstract:
+
+ Declaration of topology miniport for the mic (external: headphone).
+
+--*/
+
+#ifndef _SYSVAD_MICINTOPO_H_
+#define _SYSVAD_MICINTOPO_H_
+
+NTSTATUS PropertyHandler_MicInTopoFilter(_In_ PPCPROPERTY_REQUEST PropertyRequest);
+
+#endif // _SYSVAD_MICINTOPO_H_
diff --git a/audio/sysvad/TabletAudioSample/micintoptable.h b/audio/sysvad/TabletAudioSample/micintoptable.h
new file mode 100644
index 00000000..329c2f2b
--- /dev/null
+++ b/audio/sysvad/TabletAudioSample/micintoptable.h
@@ -0,0 +1,250 @@
+/*++
+
+Copyright (c) Microsoft Corporation All Rights Reserved
+
+Module Name:
+
+ micintopotable.h
+
+Abstract:
+
+ Declaration of topology table for the mic (external: headphone)
+
+--*/
+
+#ifndef _SYSVAD_MICINTOPTABLE_H_
+#define _SYSVAD_MICINTOPTABLE_H_
+
+// Function declarations.
+NTSTATUS
+PropertyHandler_MicInTopoFilter(
+ _In_ PPCPROPERTY_REQUEST PropertyRequest
+ );
+
+//
+// {d48deb08-fd1c-4d1e-b821-9064d49ae96e}
+DEFINE_GUID(MICIN_CUSTOM_NAME,
+0xd48deb08, 0xfd1c, 0x4d1e, 0xb8, 0x21, 0x90, 0x64, 0xd4, 0x9a, 0xe9, 0x6e);
+
+//=============================================================================
+static
+KSJACK_DESCRIPTION MicInJackDesc =
+{
+ KSAUDIO_SPEAKER_MONO,
+ JACKDESC_RGB(179, 201, 140),
+ eConnTypeCombination,
+ eGeoLocRear,
+ eGenLocPrimaryBox,
+ ePortConnJack,
+ TRUE
+};
+
+//=============================================================================
+static
+KSDATARANGE MicInTopoPinDataRangesBridge[] =
+{
+ {
+ sizeof(KSDATARANGE),
+ 0,
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_ANALOG),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_NONE)
+ }
+};
+
+//=============================================================================
+static
+PKSDATARANGE MicInTopoPinDataRangePointersBridge[] =
+{
+ &MicInTopoPinDataRangesBridge[0]
+};
+
+//=============================================================================
+static
+PCPIN_DESCRIPTOR MicInTopoMiniportPins[] =
+{
+ // KSPIN - topology filter in-pin
+ {
+ 0,
+ 0,
+ 0, // InstanceCount
+ NULL, // AutomationTable
+ { // KsPinDescriptor
+ 0, // InterfacesCount
+ NULL, // Interfaces
+ 0, // MediumsCount
+ NULL, // Mediums
+ SIZEOF_ARRAY(MicInTopoPinDataRangePointersBridge),// DataRangesCount
+ MicInTopoPinDataRangePointersBridge, // DataRanges
+ KSPIN_DATAFLOW_IN, // DataFlow
+ KSPIN_COMMUNICATION_NONE, // Communication
+ &KSNODETYPE_MICROPHONE, // Category
+ &MICIN_CUSTOM_NAME, // Name
+ 0 // Reserved
+ }
+ },
+
+ // KSPIN - topology filter out-in
+ {
+ 0,
+ 0,
+ 0, // InstanceCount
+ NULL, // AutomationTable
+ { // KsPinDescriptor
+ 0, // InterfacesCount
+ NULL, // Interfaces
+ 0, // MediumsCount
+ NULL, // Mediums
+ SIZEOF_ARRAY(MicInTopoPinDataRangePointersBridge),// DataRangesCount
+ MicInTopoPinDataRangePointersBridge, // DataRanges
+ KSPIN_DATAFLOW_OUT, // DataFlow
+ KSPIN_COMMUNICATION_NONE, // Communication
+ &KSCATEGORY_AUDIO, // Category
+ NULL, // Name
+ 0 // Reserved
+ }
+ }
+};
+
+//=============================================================================
+// Only return a KSJACK_DESCRIPTION for the physical bridge pin.
+static
+PKSJACK_DESCRIPTION MicInJackDescriptions[] =
+{
+ &MicInJackDesc,
+ NULL
+};
+
+//=============================================================================
+static
+PCPROPERTY_ITEM MicInPropertiesVolume[] =
+{
+ {
+ &KSPROPSETID_Audio,
+ KSPROPERTY_AUDIO_VOLUMELEVEL,
+ KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_SET | KSPROPERTY_TYPE_BASICSUPPORT,
+ PropertyHandler_Topology
+ }
+};
+
+DEFINE_PCAUTOMATION_TABLE_PROP(AutomationMicInVolume, MicInPropertiesVolume);
+
+//=============================================================================
+static
+PCPROPERTY_ITEM MicInPropertiesMute[] =
+{
+ {
+ &KSPROPSETID_Audio,
+ KSPROPERTY_AUDIO_MUTE,
+ KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_SET | KSPROPERTY_TYPE_BASICSUPPORT,
+ PropertyHandler_Topology
+ }
+};
+
+DEFINE_PCAUTOMATION_TABLE_PROP(AutomationMicInMute, MicInPropertiesMute);
+
+//=============================================================================
+static
+PCPROPERTY_ITEM MicInPropertiesPeakMeter[] =
+{
+ {
+ &KSPROPSETID_Audio,
+ KSPROPERTY_AUDIO_PEAKMETER2,
+ KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_BASICSUPPORT,
+ PropertyHandler_Topology
+ },
+ {
+ &KSPROPSETID_Audio,
+ KSPROPERTY_AUDIO_CPU_RESOURCES,
+ KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_BASICSUPPORT,
+ PropertyHandler_Topology
+ }
+};
+
+DEFINE_PCAUTOMATION_TABLE_PROP(AutomationMicInPeakMeter, MicInPropertiesPeakMeter);
+
+//=============================================================================
+static
+PCNODE_DESCRIPTOR MicInTopologyNodes[] =
+{
+ // KSNODE_TOPO_VOLUME
+ {
+ 0, // Flags
+ &AutomationMicInVolume, // AutomationTable
+ &KSNODETYPE_VOLUME, // Type
+ &KSAUDFNAME_MIC_VOLUME // Name
+ },
+ // KSNODE_TOPO_MUTE
+ {
+ 0, // Flags
+ &AutomationMicInMute, // AutomationTable
+ &KSNODETYPE_MUTE, // Type
+ &KSAUDFNAME_MIC_MUTE // Name
+ },
+ // KSNODE_TOPO_PEAKMETER
+ {
+ 0, // Flags
+ &AutomationMicInPeakMeter, // AutomationTable
+ &KSNODETYPE_PEAKMETER, // Type
+ &KSAUDFNAME_PEAKMETER // Name
+ }
+};
+
+C_ASSERT( KSNODE_TOPO_VOLUME == 0 );
+C_ASSERT( KSNODE_TOPO_MUTE == 1 );
+C_ASSERT( KSNODE_TOPO_PEAKMETER == 2 );
+
+//=============================================================================
+static
+PCCONNECTION_DESCRIPTOR MicInMiniportConnections[] =
+{
+ // FromNode, FromPin, ToNode, ToPin
+ { PCFILTER_NODE, KSPIN_TOPO_MIC_ELEMENTS, KSNODE_TOPO_VOLUME, 1 },
+ { KSNODE_TOPO_VOLUME, 0, KSNODE_TOPO_MUTE, 1 },
+ { KSNODE_TOPO_MUTE, 0, KSNODE_TOPO_PEAKMETER, 1 },
+ { KSNODE_TOPO_PEAKMETER, 0, PCFILTER_NODE, KSPIN_TOPO_BRIDGE }
+};
+
+
+//=============================================================================
+static
+PCPROPERTY_ITEM MicInPropertiesTopoFilter[] =
+{
+ {
+ &KSPROPSETID_Jack,
+ KSPROPERTY_JACK_DESCRIPTION,
+ KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_BASICSUPPORT,
+ PropertyHandler_MicInTopoFilter
+ },
+ {
+ &KSPROPSETID_Jack,
+ KSPROPERTY_JACK_DESCRIPTION2,
+ KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_BASICSUPPORT,
+ PropertyHandler_MicInTopoFilter
+ }
+};
+
+DEFINE_PCAUTOMATION_TABLE_PROP(AutomationMicInTopoFilter, MicInPropertiesTopoFilter);
+
+//=============================================================================
+static
+PCFILTER_DESCRIPTOR MicInTopoMiniportFilterDescriptor =
+{
+ 0, // Version
+ &AutomationMicInTopoFilter, // AutomationTable
+ sizeof(PCPIN_DESCRIPTOR), // PinSize
+ SIZEOF_ARRAY(MicInTopoMiniportPins), // PinCount
+ MicInTopoMiniportPins, // Pins
+ sizeof(PCNODE_DESCRIPTOR), // NodeSize
+ SIZEOF_ARRAY(MicInTopologyNodes), // NodeCount
+ MicInTopologyNodes, // Nodes
+ SIZEOF_ARRAY(MicInMiniportConnections), // ConnectionCount
+ MicInMiniportConnections, // Connections
+ 0, // CategoryCount
+ NULL // Categories
+};
+
+#endif // _SYSVAD_MICINTOPTABLE_H_
+
diff --git a/audio/sysvad/TabletAudioSample/micinwavtable.h b/audio/sysvad/TabletAudioSample/micinwavtable.h
new file mode 100644
index 00000000..42598c4e
--- /dev/null
+++ b/audio/sysvad/TabletAudioSample/micinwavtable.h
@@ -0,0 +1,440 @@
+/*++
+
+Copyright (c) Microsoft Corporation All Rights Reserved
+
+Module Name:
+
+ micinwavtable.h
+
+Abstract:
+
+ Declaration of wave miniport tables for the mic (external: headphone).
+
+--*/
+
+#ifndef _SYSVAD_MICINWAVTABLE_H_
+#define _SYSVAD_MICINWAVTABLE_H_
+
+//
+// Mic in (external: headphone) range.
+//
+#define MICIN_DEVICE_MAX_CHANNELS 1 // Max Channels.
+#define MICIN_MIN_BITS_PER_SAMPLE_PCM 16 // Min Bits Per Sample
+#define MICIN_MAX_BITS_PER_SAMPLE_PCM 16 // Max Bits Per Sample
+#define MICIN_MIN_SAMPLE_RATE 8000 // Min Sample Rate
+#define MICIN_MAX_SAMPLE_RATE 48000 // Max Sample Rate
+
+//
+// Max # of pin instances.
+//
+#define MICIN_MAX_INPUT_STREAMS 2 // Raw + Default streams
+
+//=============================================================================
+static
+KSDATAFORMAT_WAVEFORMATEXTENSIBLE MicInPinSupportedDeviceFormats[] =
+{
+ { // 0
+ {
+ sizeof(KSDATAFORMAT_WAVEFORMATEXTENSIBLE),
+ 0,
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)
+ },
+ {
+ {
+ WAVE_FORMAT_EXTENSIBLE,
+ 1,
+ 8000,
+ 16000,
+ 2,
+ 16,
+ sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX)
+ },
+ 16,
+ KSAUDIO_SPEAKER_MONO,
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM)
+ }
+ },
+ { // 1
+ {
+ sizeof(KSDATAFORMAT_WAVEFORMATEXTENSIBLE),
+ 0,
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)
+ },
+ {
+ {
+ WAVE_FORMAT_EXTENSIBLE,
+ 1,
+ 11025,
+ 22050,
+ 2,
+ 16,
+ sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX)
+ },
+ 16,
+ KSAUDIO_SPEAKER_MONO,
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM)
+ }
+ },
+ { // 2
+ {
+ sizeof(KSDATAFORMAT_WAVEFORMATEXTENSIBLE),
+ 0,
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)
+ },
+ {
+ {
+ WAVE_FORMAT_EXTENSIBLE,
+ 1,
+ 16000,
+ 32000,
+ 2,
+ 16,
+ sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX)
+ },
+ 16,
+ KSAUDIO_SPEAKER_MONO,
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM)
+ }
+ },
+ { // 3
+ {
+ sizeof(KSDATAFORMAT_WAVEFORMATEXTENSIBLE),
+ 0,
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)
+ },
+ {
+ {
+ WAVE_FORMAT_EXTENSIBLE,
+ 1,
+ 22050,
+ 44100,
+ 2,
+ 16,
+ sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX)
+ },
+ 16,
+ KSAUDIO_SPEAKER_MONO,
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM)
+ }
+ },
+ { // 4
+ {
+ sizeof(KSDATAFORMAT_WAVEFORMATEXTENSIBLE),
+ 0,
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)
+ },
+ {
+ {
+ WAVE_FORMAT_EXTENSIBLE,
+ 1,
+ 24000,
+ 48000,
+ 2,
+ 16,
+ sizeof(WAVEFORMATEXTENSIBLE)-sizeof(WAVEFORMATEX)
+ },
+ 16,
+ KSAUDIO_SPEAKER_MONO,
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM)
+ }
+ },
+ { // 5
+ {
+ sizeof(KSDATAFORMAT_WAVEFORMATEXTENSIBLE),
+ 0,
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)
+ },
+ {
+ {
+ WAVE_FORMAT_EXTENSIBLE,
+ 1,
+ 32000,
+ 64000,
+ 2,
+ 16,
+ sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX)
+ },
+ 16,
+ KSAUDIO_SPEAKER_MONO,
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM)
+ }
+ },
+ { // 6
+ {
+ sizeof(KSDATAFORMAT_WAVEFORMATEXTENSIBLE),
+ 0,
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)
+ },
+ {
+ {
+ WAVE_FORMAT_EXTENSIBLE,
+ 1,
+ 44100,
+ 88200,
+ 2,
+ 16,
+ sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX)
+ },
+ 16,
+ KSAUDIO_SPEAKER_MONO,
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM)
+ }
+ },
+ { // 7
+ {
+ sizeof(KSDATAFORMAT_WAVEFORMATEXTENSIBLE),
+ 0,
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)
+ },
+ {
+ {
+ WAVE_FORMAT_EXTENSIBLE,
+ 1,
+ 48000,
+ 96000,
+ 2,
+ 16,
+ sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX)
+ },
+ 16,
+ KSAUDIO_SPEAKER_MONO,
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM)
+ }
+ }
+};
+
+//
+// Supported modes (only on streaming pins).
+//
+static
+MODE_AND_DEFAULT_FORMAT MicInPinSupportedDeviceModes[] =
+{
+ {
+ STATIC_AUDIO_SIGNALPROCESSINGMODE_RAW,
+ &MicInPinSupportedDeviceFormats[SIZEOF_ARRAY(MicInPinSupportedDeviceFormats) - 1].DataFormat,
+ },
+ {
+ STATIC_AUDIO_SIGNALPROCESSINGMODE_DEFAULT,
+ &MicInPinSupportedDeviceFormats[SIZEOF_ARRAY(MicInPinSupportedDeviceFormats) - 1].DataFormat,
+ },
+ {
+ STATIC_AUDIO_SIGNALPROCESSINGMODE_SPEECH,
+ &MicInPinSupportedDeviceFormats[2].DataFormat, // 16KHz
+ },
+ {
+ STATIC_AUDIO_SIGNALPROCESSINGMODE_COMMUNICATIONS,
+ &MicInPinSupportedDeviceFormats[4].DataFormat, // 24KHz
+ }
+};
+
+//
+// The entries here must follow the same order as the filter's pin
+// descriptor array.
+static
+PIN_DEVICE_FORMATS_AND_MODES MicInPinDeviceFormatsAndModes[] =
+{
+ {
+ BridgePin,
+ NULL,
+ 0,
+ NULL,
+ 0
+ },
+ {
+ SystemCapturePin,
+ MicInPinSupportedDeviceFormats,
+ SIZEOF_ARRAY(MicInPinSupportedDeviceFormats),
+ MicInPinSupportedDeviceModes,
+ SIZEOF_ARRAY(MicInPinSupportedDeviceModes)
+ }
+};
+
+//=============================================================================
+static
+KSDATARANGE MicInPinDataRangesBridge[] =
+{
+ {
+ sizeof(KSDATARANGE),
+ 0,
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_ANALOG),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_NONE)
+ }
+};
+
+static
+PKSDATARANGE MicInPinDataRangePointersBridge[] =
+{
+ &MicInPinDataRangesBridge[0]
+};
+
+//=============================================================================
+static
+KSDATARANGE_AUDIO MicInPinDataRangesStream[] =
+{
+ {
+ {
+ sizeof(KSDATARANGE_AUDIO),
+ KSDATARANGE_ATTRIBUTES, // An attributes list follows this data range
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)
+ },
+ MICIN_DEVICE_MAX_CHANNELS,
+ MICIN_MIN_BITS_PER_SAMPLE_PCM,
+ MICIN_MAX_BITS_PER_SAMPLE_PCM,
+ MICIN_MIN_SAMPLE_RATE,
+ MICIN_MAX_SAMPLE_RATE
+ },
+};
+
+static
+PKSDATARANGE MicInPinDataRangePointersStream[] =
+{
+ PKSDATARANGE(&MicInPinDataRangesStream[0]),
+ PKSDATARANGE(&PinDataRangeAttributeList),
+};
+
+//=============================================================================
+static
+PCPIN_DESCRIPTOR MicInWaveMiniportPins[] =
+{
+ // Wave In Bridge Pin (Capture - From Topology) KSPIN_WAVE_BRIDGE
+ {
+ 0,
+ 0,
+ 0,
+ NULL,
+ {
+ 0,
+ NULL,
+ 0,
+ NULL,
+ SIZEOF_ARRAY(MicInPinDataRangePointersBridge),
+ MicInPinDataRangePointersBridge,
+ KSPIN_DATAFLOW_IN,
+ KSPIN_COMMUNICATION_NONE,
+ &KSCATEGORY_AUDIO,
+ NULL,
+ 0
+ }
+ },
+
+ // Wave In Streaming Pin (Capture) KSPIN_WAVEIN_HOST
+ {
+ MICIN_MAX_INPUT_STREAMS,
+ MICIN_MAX_INPUT_STREAMS,
+ 0,
+ NULL,
+ {
+ 0,
+ NULL,
+ 0,
+ NULL,
+ SIZEOF_ARRAY(MicInPinDataRangePointersStream),
+ MicInPinDataRangePointersStream,
+ KSPIN_DATAFLOW_OUT,
+ KSPIN_COMMUNICATION_SINK,
+ &KSCATEGORY_AUDIO,
+ &KSAUDFNAME_RECORDING_CONTROL,
+ 0
+ }
+ }
+};
+
+//=============================================================================
+static
+PCNODE_DESCRIPTOR MicInWaveMiniportNodes[] =
+{
+ // KSNODE_WAVE_ADC
+ {
+ 0, // Flags
+ NULL, // AutomationTable
+ &KSNODETYPE_ADC, // Type
+ NULL // Name
+ }
+};
+
+//=============================================================================
+static
+PCCONNECTION_DESCRIPTOR MicInWaveMiniportConnections[] =
+{
+ { PCFILTER_NODE, KSPIN_WAVE_BRIDGE, KSNODE_WAVE_ADC, 1 },
+ { KSNODE_WAVE_ADC, 0, PCFILTER_NODE, KSPIN_WAVEIN_HOST },
+};
+
+//=============================================================================
+static
+PCPROPERTY_ITEM PropertiesMicInWaveFilter[] =
+{
+ {
+ &KSPROPSETID_General,
+ KSPROPERTY_GENERAL_COMPONENTID,
+ KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_BASICSUPPORT,
+ PropertyHandler_WaveFilter
+ },
+ {
+ &KSPROPSETID_Pin,
+ KSPROPERTY_PIN_PROPOSEDATAFORMAT,
+ KSPROPERTY_TYPE_SET | KSPROPERTY_TYPE_BASICSUPPORT,
+ PropertyHandler_WaveFilter
+ }
+};
+
+DEFINE_PCAUTOMATION_TABLE_PROP(AutomationMicInWaveFilter, PropertiesMicInWaveFilter);
+
+//=============================================================================
+static
+PCFILTER_DESCRIPTOR MicInWaveMiniportFilterDescriptor =
+{
+ 0, // Version
+ &AutomationMicInWaveFilter, // AutomationTable
+ sizeof(PCPIN_DESCRIPTOR), // PinSize
+ SIZEOF_ARRAY(MicInWaveMiniportPins), // PinCount
+ MicInWaveMiniportPins, // Pins
+ sizeof(PCNODE_DESCRIPTOR), // NodeSize
+ SIZEOF_ARRAY(MicInWaveMiniportNodes), // NodeCount
+ MicInWaveMiniportNodes, // Nodes
+ SIZEOF_ARRAY(MicInWaveMiniportConnections), // ConnectionCount
+ MicInWaveMiniportConnections, // Connections
+ 0, // CategoryCount
+ NULL // Categories - use defaults (audio, render, capture)
+};
+
+#endif // _SYSVAD_MICINWAVTABLE_H_
diff --git a/audio/sysvad/TabletAudioSample/minipairs.h b/audio/sysvad/TabletAudioSample/minipairs.h
new file mode 100644
index 00000000..f35398d4
--- /dev/null
+++ b/audio/sysvad/TabletAudioSample/minipairs.h
@@ -0,0 +1,512 @@
+/*++
+
+Copyright (c) Microsoft Corporation All Rights Reserved
+
+Module Name:
+
+ minipairs.h
+
+Abstract:
+
+ Local audio endpoint filter definitions.
+
+--*/
+
+#ifndef _SYSVAD_MINIPAIRS_H_
+#define _SYSVAD_MINIPAIRS_H_
+
+#include "speakertopo.h"
+#include "speakertoptable.h"
+#include "speakerwavtable.h"
+
+#include "speakerhptopo.h"
+#include "speakerhptoptable.h"
+#include "speakerhpwavtable.h"
+
+#include "hdmitopo.h"
+#include "hdmitoptable.h"
+#include "hdmiwavtable.h"
+
+#include "spdiftopo.h"
+#include "spdiftoptable.h"
+#include "spdifwavtable.h"
+
+#include "micintopo.h"
+#include "micintoptable.h"
+#include "micinwavtable.h"
+
+#include "micarraytopo.h"
+#include "micarray1toptable.h"
+#include "micarray2toptable.h"
+#include "micarray3toptable.h"
+#include "micarraywavtable.h"
+#include "micarray3wavtable.h"
+
+NTSTATUS
+CreateMiniportWaveRTSYSVAD
+(
+ _Out_ PUNKNOWN *,
+ _In_ REFCLSID,
+ _In_opt_ PUNKNOWN,
+ _In_ POOL_TYPE,
+ _In_ PUNKNOWN,
+ _In_opt_ PVOID,
+ _In_ PENDPOINT_MINIPAIR
+);
+
+NTSTATUS
+CreateMiniportTopologySYSVAD
+(
+ _Out_ PUNKNOWN *,
+ _In_ REFCLSID,
+ _In_opt_ PUNKNOWN,
+ _In_ POOL_TYPE,
+ _In_ PUNKNOWN,
+ _In_opt_ PVOID,
+ _In_ PENDPOINT_MINIPAIR
+);
+
+//
+// Describe buffer size constraints for WaveRT buffers
+//
+static struct
+{
+ KSAUDIO_PACKETSIZE_CONSTRAINTS TransportPacketConstraints;
+ KSAUDIO_PACKETSIZE_PROCESSINGMODE_CONSTRAINT AdditionalProcessingConstraints[1];
+} SysvadWaveRtPacketSizeConstraintsRender =
+{
+ {
+ 1 * HNSTIME_PER_MILLISECOND, // 1 ms minimum processing interval
+ FILE_256_BYTE_ALIGNMENT, // 256 byte packet size alignment
+ 0, // reserved
+ 2, // 2 processing constraints follow
+ {
+ STATIC_AUDIO_SIGNALPROCESSINGMODE_DEFAULT, // constraint for default processing mode
+ 128, // 128 samples per processing frame
+ 0, // NA hns per processing frame
+ },
+ },
+ {
+ {
+ STATIC_AUDIO_SIGNALPROCESSINGMODE_MOVIE, // constraint for movie processing mode
+ 1024, // 1024 samples per processing frame
+ 0, // NA hns per processing frame
+ },
+ }
+};
+
+const SYSVAD_DEVPROPERTY SysvadWaveFilterInterfacePropertiesRender[] =
+{
+ {
+ &DEVPKEY_KsAudio_PacketSize_Constraints, // Key
+ DEVPROP_TYPE_BINARY, // Type
+ sizeof(SysvadWaveRtPacketSizeConstraintsRender), // BufferSize
+ &SysvadWaveRtPacketSizeConstraintsRender, // Buffer
+ },
+};
+
+static struct
+{
+ KSAUDIO_PACKETSIZE_CONSTRAINTS TransportPacketConstraints;
+} SysvadWaveRtPacketSizeConstraintsCapture =
+{
+ {
+ 0, // no minimum processing interval
+ FILE_128_BYTE_ALIGNMENT, // 128 byte packet size alignment
+ 0, // reserved
+ 1, // 1 processing constraint follows
+ {
+ STATIC_AUDIO_SIGNALPROCESSINGMODE_COMMUNICATIONS, // constraint for communications processing mode
+ 0, // NA samples per processing frame
+ 20 * HNSTIME_PER_MILLISECOND, // 200000 hns (20ms) per processing frame
+ },
+ },
+};
+
+const SYSVAD_DEVPROPERTY SysvadWaveFilterInterfacePropertiesCapture[] =
+{
+ {
+ &DEVPKEY_KsAudio_PacketSize_Constraints, // Key
+ DEVPROP_TYPE_BINARY, // Type
+ sizeof(SysvadWaveRtPacketSizeConstraintsCapture), // BufferSize
+ &SysvadWaveRtPacketSizeConstraintsCapture, // Buffer
+ },
+};
+
+//
+// Render miniports.
+//
+
+/*********************************************************************
+* Topology/Wave bridge connection for speaker (internal) *
+* *
+* +------+ +------+ *
+* | Wave | | Topo | *
+* | | | | *
+* System --->|0 2|---> Loopback | | *
+* | | | | *
+* Offload --->|1 3|--------------->|0 1|---> Line Out *
+* | | | | *
+* +------+ +------+ *
+*********************************************************************/
+static
+PHYSICALCONNECTIONTABLE SpeakerTopologyPhysicalConnections[] =
+{
+ {
+ KSPIN_TOPO_WAVEOUT_SOURCE, // TopologyIn
+ KSPIN_WAVE_RENDER_SOURCE, // WaveOut
+ CONNECTIONTYPE_WAVE_OUTPUT
+ }
+};
+
+static
+ENDPOINT_MINIPAIR SpeakerMiniports =
+{
+ eSpeakerDevice,
+ L"TopologySpeaker", // make sure this name matches with KSNAME_TopologySpeaker in the inf's [Strings] section
+ CreateMiniportTopologySYSVAD,
+ &SpeakerTopoMiniportFilterDescriptor,
+ 0, NULL, // Interface properties
+ L"WaveSpeaker", // make sure this name matches with KSNAME_WaveSpeaker in the inf's [Strings] section
+ CreateMiniportWaveRTSYSVAD,
+ &SpeakerWaveMiniportFilterDescriptor,
+ ARRAYSIZE(SysvadWaveFilterInterfacePropertiesRender), // Interface properties
+ SysvadWaveFilterInterfacePropertiesRender,
+ SPEAKER_DEVICE_MAX_CHANNELS,
+ SpeakerPinDeviceFormatsAndModes,
+ SIZEOF_ARRAY(SpeakerPinDeviceFormatsAndModes),
+ SpeakerTopologyPhysicalConnections,
+ SIZEOF_ARRAY(SpeakerTopologyPhysicalConnections),
+ ENDPOINT_OFFLOAD_SUPPORTED
+};
+
+/*********************************************************************
+* Topology/Wave bridge connection for speaker (external:headphone) *
+* *
+* +------+ +------+ *
+* | Wave | | Topo | *
+* | | | | *
+* System --->|0 2|---> Loopback | | *
+* | | | | *
+* Offload --->|1 3|--------------->|0 1|---> Line Out *
+* | | | | *
+* +------+ +------+ *
+*********************************************************************/
+static
+PHYSICALCONNECTIONTABLE SpeakerHpTopologyPhysicalConnections[] =
+{
+ {
+ KSPIN_TOPO_WAVEOUT_SOURCE, // TopologyIn
+ KSPIN_WAVE_RENDER_SOURCE, // WaveOut
+ CONNECTIONTYPE_WAVE_OUTPUT
+ }
+};
+
+static
+ENDPOINT_MINIPAIR SpeakerHpMiniports =
+{
+ eSpeakerHpDevice,
+ L"TopologySpeakerHeadphone", // make sure this name matches with KSNAME_TopologySpeakerHeadphone in the inf's [Strings] section
+ CreateMiniportTopologySYSVAD,
+ &SpeakerHpTopoMiniportFilterDescriptor,
+ 0, NULL, // Interface properties
+ L"WaveSpeakerHeadphone", // make sure this name matches with KSNAME_WaveSpeakerHeadphone in the inf's [Strings] section
+ CreateMiniportWaveRTSYSVAD,
+ &SpeakerHpWaveMiniportFilterDescriptor,
+ 0, NULL, // Interface properties
+ SPEAKERHP_DEVICE_MAX_CHANNELS,
+ SpeakerHpPinDeviceFormatsAndModes,
+ SIZEOF_ARRAY(SpeakerHpPinDeviceFormatsAndModes),
+ SpeakerHpTopologyPhysicalConnections,
+ SIZEOF_ARRAY(SpeakerHpTopologyPhysicalConnections),
+ ENDPOINT_OFFLOAD_SUPPORTED
+};
+
+/*********************************************************************
+* Topology/Wave bridge connection for hdmi endpoint *
+* *
+* +------+ +------+ *
+* | Wave | | Topo | *
+* | | | | *
+* System --->|0 1|---> Loopback | | *
+* | | | | *
+* | 2|--------------->|0 1|---> Line Out *
+* | | | | *
+* +------+ +------+ *
+*********************************************************************/
+static
+PHYSICALCONNECTIONTABLE HdmiTopologyPhysicalConnections[] =
+{
+ {
+ KSPIN_TOPO_WAVEOUT_SOURCE, // TopologyIn
+ KSPIN_WAVE_RENDER2_SOURCE, // WaveOut (no offloading)
+ CONNECTIONTYPE_WAVE_OUTPUT
+ }
+};
+
+static
+ENDPOINT_MINIPAIR HdmiMiniports =
+{
+ eHdmiRenderDevice,
+ L"TopologyHdmi", // make sure this name matches with KSNAME_TopologyHdmi in the inf's [Strings] section
+ CreateHdmiMiniportTopology,
+ &HdmiTopoMiniportFilterDescriptor,
+ 0, NULL, // Interface properties
+ L"WaveHdmi", // make sure this name matches with KSNAME_WaveHdmi in the inf's [Strings] section
+ CreateMiniportWaveRTSYSVAD,
+ &HdmiWaveMiniportFilterDescriptor,
+ 0, NULL, // Interface properties
+ HDMI_DEVICE_MAX_CHANNELS,
+ HdmiPinDeviceFormatsAndModes,
+ SIZEOF_ARRAY(HdmiPinDeviceFormatsAndModes),
+ HdmiTopologyPhysicalConnections,
+ SIZEOF_ARRAY(HdmiTopologyPhysicalConnections),
+ ENDPOINT_NO_FLAGS
+};
+
+/*********************************************************************
+* Topology/Wave bridge connection for spdif (internal) *
+* *
+* +------+ +------+ *
+* | Wave | | Topo | *
+* | | | | *
+* System --->|0 2|---> Loopback | | *
+* | | | | *
+* Offload --->|1 3|--------------->|0 1|---> Line Out *
+* | | | | *
+* +------+ +------+ *
+*********************************************************************/
+static
+PHYSICALCONNECTIONTABLE SpdifTopologyPhysicalConnections[] =
+{
+ {
+ KSPIN_TOPO_WAVEOUT_SOURCE, // TopologyIn
+ KSPIN_WAVE_RENDER_SOURCE, // WaveOut
+ CONNECTIONTYPE_WAVE_OUTPUT
+ }
+};
+
+static
+ENDPOINT_MINIPAIR SpdifMiniports =
+{
+ eSpdifRenderDevice,
+ L"TopologySpdif", // make sure this name matches with KSNAME_TopologySpeaker in the inf's [Strings] section
+ CreateMiniportTopologySYSVAD,
+ &SpdifTopoMiniportFilterDescriptor,
+ 0, NULL, // Interface properties
+ L"WaveSpdif", // make sure this name matches with KSNAME_WaveSpeaker in the inf's [Strings] section
+ CreateMiniportWaveRTSYSVAD,
+ &SpdifWaveMiniportFilterDescriptor,
+ ARRAYSIZE(SysvadWaveFilterInterfacePropertiesRender), // Interface properties
+ SysvadWaveFilterInterfacePropertiesRender,
+ SPDIF_DEVICE_MAX_CHANNELS,
+ SpdifPinDeviceFormatsAndModes,
+ SIZEOF_ARRAY(SpdifPinDeviceFormatsAndModes),
+ SpdifTopologyPhysicalConnections,
+ SIZEOF_ARRAY(SpdifTopologyPhysicalConnections),
+ ENDPOINT_OFFLOAD_SUPPORTED
+};
+
+//
+// Capture miniports.
+//
+
+/*********************************************************************
+* Topology/Wave bridge connection for mic in *
+* *
+* +------+ +------+ *
+* | Topo | | Wave | *
+* | | | | *
+* Mic in --->|0 1|===>|0 1|---> Capture Host Pin *
+* | | | | *
+* +------+ +------+ *
+*********************************************************************/
+static
+PHYSICALCONNECTIONTABLE MicInTopologyPhysicalConnections[] =
+{
+ {
+ KSPIN_TOPO_BRIDGE, // TopologyOut
+ KSPIN_WAVE_BRIDGE, // WaveIn
+ CONNECTIONTYPE_TOPOLOGY_OUTPUT
+ }
+};
+
+static
+ENDPOINT_MINIPAIR MicInMiniports =
+{
+ eMicInDevice,
+ L"TopologyMicIn", // make sure this name matches with KSNAME_TopologyMicIn in the inf's [Strings] section
+ CreateMiniportTopologySYSVAD,
+ &MicInTopoMiniportFilterDescriptor,
+ 0, NULL, // Interface properties
+ L"WaveMicIn", // make sure this name matches with KSNAME_WaveMicIn in the inf's [Strings] section
+ CreateMiniportWaveRTSYSVAD,
+ &MicInWaveMiniportFilterDescriptor,
+ 0, NULL, // Interface properties
+ MICIN_DEVICE_MAX_CHANNELS,
+ MicInPinDeviceFormatsAndModes,
+ SIZEOF_ARRAY(MicInPinDeviceFormatsAndModes),
+ MicInTopologyPhysicalConnections,
+ SIZEOF_ARRAY(MicInTopologyPhysicalConnections),
+ ENDPOINT_NO_FLAGS
+};
+
+/*********************************************************************
+* Topology/Wave bridge connection for mic array 1 (front) *
+* *
+* +------+ +------+ *
+* | Topo | | Wave | *
+* | | | | *
+* Mic in --->|0 1|===>|0 1|---> Capture Host Pin *
+* | | | | *
+* +------+ +------+ *
+*********************************************************************/
+static
+PHYSICALCONNECTIONTABLE MicArray1TopologyPhysicalConnections[] =
+{
+ {
+ KSPIN_TOPO_BRIDGE, // TopologyOut
+ KSPIN_WAVE_BRIDGE, // WaveIn
+ CONNECTIONTYPE_TOPOLOGY_OUTPUT
+ }
+};
+
+static
+ENDPOINT_MINIPAIR MicArray1Miniports =
+{
+ eMicArrayDevice1,
+ L"TopologyMicArray1", // make sure this name matches with KSNAME_TopologyMicArray1 in the inf's [Strings] section
+ CreateMicArrayMiniportTopology,
+ &MicArray1TopoMiniportFilterDescriptor,
+ 0, NULL, // Interface properties
+ L"WaveMicArray1", // make sure this name matches with KSNAME_WaveMicArray1 in the inf's [Strings] section
+ CreateMiniportWaveRTSYSVAD,
+ &MicArrayWaveMiniportFilterDescriptor,
+ ARRAYSIZE(SysvadWaveFilterInterfacePropertiesCapture), // Interface properties
+ SysvadWaveFilterInterfacePropertiesCapture,
+ MICARRAY_DEVICE_MAX_CHANNELS,
+ MicArrayPinDeviceFormatsAndModes,
+ SIZEOF_ARRAY(MicArrayPinDeviceFormatsAndModes),
+ MicArray1TopologyPhysicalConnections,
+ SIZEOF_ARRAY(MicArray1TopologyPhysicalConnections),
+ ENDPOINT_SOUNDDETECTOR_SUPPORTED
+};
+
+/*********************************************************************
+* Topology/Wave bridge connection for mic array 2 (back) *
+* *
+* +------+ +------+ *
+* | Topo | | Wave | *
+* | | | | *
+* Mic in --->|0 1|===>|0 1|---> Capture Host Pin *
+* | | | | *
+* +------+ +------+ *
+*********************************************************************/
+static
+PHYSICALCONNECTIONTABLE MicArray2TopologyPhysicalConnections[] =
+{
+ {
+ KSPIN_TOPO_BRIDGE, // TopologyOut
+ KSPIN_WAVE_BRIDGE, // WaveIn
+ CONNECTIONTYPE_TOPOLOGY_OUTPUT
+ }
+};
+
+static
+ENDPOINT_MINIPAIR MicArray2Miniports =
+{
+ eMicArrayDevice2,
+ L"TopologyMicArray2", // make sure this name matches with KSNAME_TopologyMicArray2 in the inf's [Strings] section
+ CreateMicArrayMiniportTopology,
+ &MicArray2TopoMiniportFilterDescriptor,
+ 0, NULL, // Interface properties
+ L"WaveMicArray2", // make sure this name matches with KSNAME_WaveMicArray2 in the inf's [Strings] section
+ CreateMiniportWaveRTSYSVAD,
+ &MicArrayWaveMiniportFilterDescriptor,
+ 0, NULL, // Interface properties
+ MICARRAY_DEVICE_MAX_CHANNELS,
+ MicArrayPinDeviceFormatsAndModes,
+ SIZEOF_ARRAY(MicArrayPinDeviceFormatsAndModes),
+ MicArray2TopologyPhysicalConnections,
+ SIZEOF_ARRAY(MicArray2TopologyPhysicalConnections),
+ ENDPOINT_SOUNDDETECTOR_SUPPORTED
+};
+
+/*********************************************************************
+* Topology/Wave bridge connection for mic array 3 (combined) *
+* *
+* +------+ +------+ *
+* | Topo | | Wave | *
+* | | | | *
+* Mic in --->|0 1|===>|0 1|---> Capture Host Pin *
+* | | | | *
+* +------+ +------+ *
+*********************************************************************/
+static
+PHYSICALCONNECTIONTABLE MicArray3TopologyPhysicalConnections[] =
+{
+ {
+ KSPIN_TOPO_BRIDGE, // TopologyOut
+ KSPIN_WAVE_BRIDGE, // WaveIn
+ CONNECTIONTYPE_TOPOLOGY_OUTPUT
+ }
+};
+
+static
+ENDPOINT_MINIPAIR MicArray3Miniports =
+{
+ eMicArrayDevice3,
+ L"TopologyMicArray3", // make sure this name matches with KSNAME_TopologyMicArray3 in the inf's [Strings] section
+ CreateMicArrayMiniportTopology,
+ &MicArray3TopoMiniportFilterDescriptor,
+ 0, NULL, // Interface properties
+ L"WaveMicArray3", // make sure this name matches with KSNAME_WaveMicArray3 in the inf's [Strings] section
+ CreateMiniportWaveRTSYSVAD,
+ &MicArray3WaveMiniportFilterDescriptor,
+ 0, NULL, // Interface properties
+ MICARRAY3_DEVICE_MAX_CHANNELS,
+ MicArray3PinDeviceFormatsAndModes,
+ SIZEOF_ARRAY(MicArray3PinDeviceFormatsAndModes),
+ MicArray3TopologyPhysicalConnections,
+ SIZEOF_ARRAY(MicArray3TopologyPhysicalConnections),
+ ENDPOINT_NO_FLAGS
+};
+
+//=============================================================================
+//
+// Render miniport pairs.
+//
+static
+PENDPOINT_MINIPAIR g_RenderEndpoints[] =
+{
+ &SpeakerMiniports,
+ &SpeakerHpMiniports,
+ &HdmiMiniports,
+ &SpdifMiniports,
+};
+
+#define g_cRenderEndpoints (SIZEOF_ARRAY(g_RenderEndpoints))
+
+//=============================================================================
+//
+// Capture miniport pairs.
+//
+static
+PENDPOINT_MINIPAIR g_CaptureEndpoints[] =
+{
+ &MicInMiniports,
+ &MicArray1Miniports,
+ &MicArray2Miniports,
+ &MicArray3Miniports,
+};
+
+#define g_cCaptureEndpoints (SIZEOF_ARRAY(g_CaptureEndpoints))
+
+//=============================================================================
+//
+// Total miniports = # endpoints * 2 (topology + wave).
+//
+#define g_MaxMiniports ((g_cRenderEndpoints + g_cCaptureEndpoints) * 2)
+
+#endif // _SYSVAD_MINIPAIRS_H_
+
diff --git a/audio/sysvad/TabletAudioSample/spdiftopo.cpp b/audio/sysvad/TabletAudioSample/spdiftopo.cpp
new file mode 100644
index 00000000..f715e41d
--- /dev/null
+++ b/audio/sysvad/TabletAudioSample/spdiftopo.cpp
@@ -0,0 +1,85 @@
+/*++
+
+Copyright (c) Microsoft Corporation All Rights Reserved
+
+Module Name:
+
+ spdiftopo.cpp
+
+Abstract:
+
+ Implementation of topology miniport for the spdif (internal).
+
+--*/
+
+#pragma warning (disable : 4127)
+
+#include <sysvad.h>
+#include "simple.h"
+#include "mintopo.h"
+#include "spdiftopo.h"
+#include "spdiftoptable.h"
+
+
+#pragma code_seg("PAGE")
+
+//=============================================================================
+NTSTATUS
+PropertyHandler_SpdifTopoFilter
+(
+ _In_ PPCPROPERTY_REQUEST PropertyRequest
+)
+/*++
+
+Routine Description:
+
+ Redirects property request to miniport object
+
+Arguments:
+
+ PropertyRequest -
+
+Return Value:
+
+ NT status code.
+
+--*/
+{
+ PAGED_CODE();
+
+ ASSERT(PropertyRequest);
+
+ DPF_ENTER(("[PropertyHandler_SpdifTopoFilter]"));
+
+ // PropertryRequest structure is filled by portcls.
+ // MajorTarget is a pointer to miniport object for miniports.
+ //
+ NTSTATUS ntStatus = STATUS_INVALID_DEVICE_REQUEST;
+ PCMiniportTopology pMiniport = (PCMiniportTopology)PropertyRequest->MajorTarget;
+
+ if (IsEqualGUIDAligned(*PropertyRequest->PropertyItem->Set, KSPROPSETID_Jack))
+ {
+ if (PropertyRequest->PropertyItem->Id == KSPROPERTY_JACK_DESCRIPTION)
+ {
+ ntStatus = pMiniport->PropertyHandlerJackDescription(
+ PropertyRequest,
+ ARRAYSIZE(SpdifJackDescriptions),
+ SpdifJackDescriptions
+ );
+ }
+ else if (PropertyRequest->PropertyItem->Id == KSPROPERTY_JACK_DESCRIPTION2)
+ {
+ ntStatus = pMiniport->PropertyHandlerJackDescription2(
+ PropertyRequest,
+ ARRAYSIZE(SpdifJackDescriptions),
+ SpdifJackDescriptions,
+ 0 // jack capabilities
+ );
+ }
+ }
+
+ return ntStatus;
+} // PropertyHandler_SpdifTopoFilter
+
+#pragma code_seg()
+
diff --git a/audio/sysvad/TabletAudioSample/spdiftopo.h b/audio/sysvad/TabletAudioSample/spdiftopo.h
new file mode 100644
index 00000000..ffaefb5c
--- /dev/null
+++ b/audio/sysvad/TabletAudioSample/spdiftopo.h
@@ -0,0 +1,21 @@
+
+/*++
+
+Copyright (c) Microsoft Corporation All Rights Reserved
+
+Module Name:
+
+ speakertopo.h
+
+Abstract:
+
+ Declaration of topology miniport for the speaker (internal).
+
+--*/
+
+#ifndef _SYSVAD_SPDIFTOPO_H_
+#define _SYSVAD_SPDIFTOPO_H_
+
+NTSTATUS PropertyHandler_SpdifTopoFilter(_In_ PPCPROPERTY_REQUEST PropertyRequest);
+
+#endif // _SYSVAD_SPDIFTOPO_H_
diff --git a/audio/sysvad/TabletAudioSample/spdiftoptable.h b/audio/sysvad/TabletAudioSample/spdiftoptable.h
new file mode 100644
index 00000000..8e1376a8
--- /dev/null
+++ b/audio/sysvad/TabletAudioSample/spdiftoptable.h
@@ -0,0 +1,166 @@
+/*++
+
+Copyright (c) Microsoft Corporation All Rights Reserved
+
+Module Name:
+
+ spdiftoptable.h
+
+Abstract:
+
+ Declaration of topology tables for the SPDIF endpoint.
+
+--*/
+
+#ifndef _SYSVAD_SPDIFTOPTABLE_H_
+#define _SYSVAD_SPDIFTOPTABLE_H_
+
+//=============================================================================
+static
+KSDATARANGE SpdifTopoPinDataRangesBridge[] =
+{
+ {
+ sizeof(KSDATARANGE),
+ 0,
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_ANALOG),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_NONE)
+ },
+ {
+ sizeof(KSDATARANGE),
+ 0,
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_IEC61937_DOLBY_DIGITAL),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_NONE)
+ }
+};
+
+//=============================================================================
+static
+PKSDATARANGE SpdifTopoPinDataRangePointersBridge[] =
+{
+ &SpdifTopoPinDataRangesBridge[0],
+ &SpdifTopoPinDataRangesBridge[1]
+};
+
+//=============================================================================
+static
+PCPIN_DESCRIPTOR SpdifTopoMiniportPins[] =
+{
+ // KSPIN_TOPO_WAVEOUT_SOURCE
+ {
+ 0,
+ 0,
+ 0, // InstanceCount
+ NULL, // AutomationTable
+ { // KsPinDescriptor
+ 0, // InterfacesCount
+ NULL, // Interfaces
+ 0, // MediumsCount
+ NULL, // Mediums
+ SIZEOF_ARRAY(SpdifTopoPinDataRangePointersBridge), // DataRangesCount
+ SpdifTopoPinDataRangePointersBridge, // DataRanges
+ KSPIN_DATAFLOW_IN, // DataFlow
+ KSPIN_COMMUNICATION_NONE, // Communication
+ &KSCATEGORY_AUDIO, // Category
+ NULL, // Name
+ 0 // Reserved
+ }
+ },
+ // KSPIN_TOPO_LINEOUT_DEST
+ {
+ 0,
+ 0,
+ 0, // InstanceCount
+ NULL, // AutomationTable
+ { // KsPinDescriptor
+ 0, // InterfacesCount
+ NULL, // Interfaces
+ 0, // MediumsCount
+ NULL, // Mediums
+ SIZEOF_ARRAY(SpdifTopoPinDataRangePointersBridge), // DataRangesCount
+ SpdifTopoPinDataRangePointersBridge, // DataRanges
+ KSPIN_DATAFLOW_OUT, // DataFlow
+ KSPIN_COMMUNICATION_NONE, // Communication
+ &KSNODETYPE_SPDIF_INTERFACE, // Category
+ NULL, // Name
+ 0 // Reserved
+ }
+ }
+};
+
+//=============================================================================
+static
+KSJACK_DESCRIPTION SpdifJackDesc =
+{
+ KSAUDIO_SPEAKER_STEREO,
+ 0x0000, // no color
+ eConnTypeOtherDigital,
+ eGeoLocRear,
+ eGenLocPrimaryBox,
+ ePortConnJack,
+ TRUE
+};
+
+// Only return a KSJACK_DESCRIPTION for the physical bridge pin.
+static
+PKSJACK_DESCRIPTION SpdifJackDescriptions[] =
+{
+ NULL,
+ &SpdifJackDesc
+};
+
+//=============================================================================
+static
+PCCONNECTION_DESCRIPTOR SpdifTopoMiniportConnections[] =
+{
+ // FromNode, FromPin, ToNode, ToPin
+ { PCFILTER_NODE, KSPIN_TOPO_WAVEOUT_SOURCE, PCFILTER_NODE, KSPIN_TOPO_LINEOUT_DEST}
+};
+
+
+//=============================================================================
+static
+PCPROPERTY_ITEM PropertiesSpdifTopoFilter[] =
+{
+ {
+ &KSPROPSETID_Jack,
+ KSPROPERTY_JACK_DESCRIPTION,
+ KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_BASICSUPPORT,
+ PropertyHandler_SpdifTopoFilter
+ },
+ {
+ &KSPROPSETID_Jack,
+ KSPROPERTY_JACK_DESCRIPTION2,
+ KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_BASICSUPPORT,
+ PropertyHandler_SpdifTopoFilter
+ }
+};
+
+DEFINE_PCAUTOMATION_TABLE_PROP(AutomationSpdifTopoFilter, PropertiesSpdifTopoFilter);
+
+//=============================================================================
+static
+PCFILTER_DESCRIPTOR SpdifTopoMiniportFilterDescriptor =
+{
+ 0, // Version
+ &AutomationSpdifTopoFilter, // AutomationTable
+ sizeof(PCPIN_DESCRIPTOR), // PinSize
+ SIZEOF_ARRAY(SpdifTopoMiniportPins), // PinCount
+ SpdifTopoMiniportPins, // Pins
+ sizeof(PCNODE_DESCRIPTOR), // NodeSize
+ 0, // NodeCount
+ NULL, // Nodes
+ SIZEOF_ARRAY(SpdifTopoMiniportConnections), // ConnectionCount
+ SpdifTopoMiniportConnections, // Connections
+ 0, // CategoryCount
+ NULL // Categories
+};
+
+#endif // _SYSVAD_SPDIFTOPTABLE_H_
+
+
diff --git a/audio/sysvad/TabletAudioSample/spdifwavtable.h b/audio/sysvad/TabletAudioSample/spdifwavtable.h
new file mode 100644
index 00000000..963822a8
--- /dev/null
+++ b/audio/sysvad/TabletAudioSample/spdifwavtable.h
@@ -0,0 +1,854 @@
+/*++
+
+Copyright (c) Microsoft Corporation All Rights Reserved
+
+Module Name:
+
+ spdifwavtable.h
+
+Abstract:
+
+ Declaration of wave miniport tables for the SPDIF endpoint.
+
+--*/
+
+#ifndef _SYSVAD_SPDIFWAVTABLE_H_
+#define _SYSVAD_SPDIFWAVTABLE_H_
+
+
+//=============================================================================
+// Defines
+//=============================================================================
+
+
+#define SPDIF_DEVICE_MAX_CHANNELS 2 // Max Channels.
+
+#define SPDIF_HOST_MAX_CHANNELS 2 // Max Channels.
+#define SPDIF_HOST_MIN_BITS_PER_SAMPLE 16 // Min Bits Per Sample
+#define SPDIF_HOST_MAX_BITS_PER_SAMPLE 16 // Max Bits Per Sample
+#define SPDIF_HOST_MIN_SAMPLE_RATE 44100 // Min Sample Rate
+#define SPDIF_HOST_MAX_SAMPLE_RATE 96000 // Max Sample Rate
+
+#define SPDIF_OFFLOAD_MAX_CHANNELS 2 // Max Channels.
+#define SPDIF_OFFLOAD_MIN_BITS_PER_SAMPLE 16 // Min Bits Per Sample
+#define SPDIF_OFFLOAD_MAX_BITS_PER_SAMPLE 16 // Max Bits Per Sample
+#define SPDIF_OFFLOAD_MIN_SAMPLE_RATE 44100 // Min Sample Rate
+#define SPDIF_OFFLOAD_MAX_SAMPLE_RATE 96000 // Max Sample Rate
+
+#define SPDIF_LOOPBACK_MAX_CHANNELS 2 // Max Channels.
+#define SPDIF_LOOPBACK_MIN_BITS_PER_SAMPLE 16 // Min Bits Per Sample
+#define SPDIF_LOOPBACK_MAX_BITS_PER_SAMPLE 16 // Max Bits Per Sample
+#define SPDIF_LOOPBACK_MIN_SAMPLE_RATE 44100 // Min Sample Rate
+#define SPDIF_LOOPBACK_MAX_SAMPLE_RATE 48000 // Max Sample Rate
+
+#define SPDIF_DOLBY_DIGITAL_MAX_CHANNELS 2 // Max Channels.
+#define SPDIF_DOLBY_DIGITAL_MIN_BITS_PER_SAMPLE 16 // Min Bits Per Sample
+#define SPDIF_DOLBY_DIGITAL_MAX_BITS_PER_SAMPLE 16 // Max Bits Per Sample
+#define SPDIF_DOLBY_DIGITAL_MIN_SAMPLE_RATE 44100 // Min Sample Rate
+#define SPDIF_DOLBY_DIGITAL_MAX_SAMPLE_RATE 48000 // Max Sample Rate
+
+//
+// Max # of pin instances.
+//
+#define SPDIF_MAX_INPUT_SYSTEM_STREAMS 2 // Raw + Default streams
+#define SPDIF_MAX_INPUT_OFFLOAD_STREAMS MAX_INPUT_OFFLOAD_STREAMS
+#define SPDIF_MAX_OUTPUT_LOOPBACK_STREAMS MAX_OUTPUT_LOOPBACK_STREAMS
+
+
+//=============================================================================
+static
+KSDATAFORMAT_WAVEFORMATEXTENSIBLE SpdifAudioEngineSupportedDeviceFormats[] =
+{
+ { // 0 : First entry in this table is the default format for the audio engine
+ {
+ sizeof(KSDATAFORMAT_WAVEFORMATEXTENSIBLE),
+ 0,
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)
+ },
+ {
+ {
+ WAVE_FORMAT_EXTENSIBLE,
+ 2,
+ 44100,
+ 176400,
+ 4,
+ 16,
+ sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX)
+ },
+ 16,
+ KSAUDIO_SPEAKER_STEREO,
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM)
+ }
+ },
+ { // 1
+ {
+ sizeof(KSDATAFORMAT_WAVEFORMATEXTENSIBLE),
+ 0,
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)
+ },
+ {
+ {
+ WAVE_FORMAT_EXTENSIBLE,
+ 2,
+ 48000,
+ 192000,
+ 4,
+ 16,
+ sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX)
+ },
+ 16,
+ KSAUDIO_SPEAKER_STEREO,
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM)
+ }
+ },
+ { // 2
+ {
+ sizeof(KSDATAFORMAT_WAVEFORMATEXTENSIBLE),
+ 0,
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)
+ },
+ {
+ {
+ WAVE_FORMAT_EXTENSIBLE,
+ 2,
+ 88200,
+ 352800,
+ 4,
+ 16,
+ sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX)
+ },
+ 16,
+ KSAUDIO_SPEAKER_STEREO,
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM)
+ }
+ },
+ { // 3
+ {
+ sizeof(KSDATAFORMAT_WAVEFORMATEXTENSIBLE),
+ 0,
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)
+ },
+ {
+ {
+ WAVE_FORMAT_EXTENSIBLE,
+ 2,
+ 96000,
+ 384000,
+ 4,
+ 16,
+ sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX)
+ },
+ 16,
+ KSAUDIO_SPEAKER_STEREO,
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM)
+ }
+ }
+};
+
+static
+KSDATAFORMAT_WAVEFORMATEXTENSIBLE SpdifHostPinSupportedDeviceFormats[] =
+{
+ { // 0
+ {
+ sizeof(KSDATAFORMAT_WAVEFORMATEXTENSIBLE),
+ 0,
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)
+ },
+ {
+ {
+ WAVE_FORMAT_EXTENSIBLE,
+ 2,
+ 44100,
+ 176400,
+ 4,
+ 16,
+ sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX)
+ },
+ 16,
+ KSAUDIO_SPEAKER_STEREO,
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM)
+ }
+ },
+ { // 1
+ {
+ sizeof(KSDATAFORMAT_WAVEFORMATEXTENSIBLE),
+ 0,
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)
+ },
+ {
+ {
+ WAVE_FORMAT_EXTENSIBLE,
+ 2,
+ 48000,
+ 192000,
+ 4,
+ 16,
+ sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX)
+ },
+ 16,
+ KSAUDIO_SPEAKER_STEREO,
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM)
+ }
+ },
+ { // 2
+ {
+ sizeof(KSDATAFORMAT_WAVEFORMATEXTENSIBLE),
+ 0,
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)
+ },
+ {
+ {
+ WAVE_FORMAT_EXTENSIBLE,
+ 2,
+ 88200,
+ 352800,
+ 4,
+ 16,
+ sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX)
+ },
+ 16,
+ KSAUDIO_SPEAKER_STEREO,
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM)
+ }
+ },
+ { // 3
+ {
+ sizeof(KSDATAFORMAT_WAVEFORMATEXTENSIBLE),
+ 0,
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)
+ },
+ {
+ {
+ WAVE_FORMAT_EXTENSIBLE,
+ 2,
+ 96000,
+ 384000,
+ 4,
+ 16,
+ sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX)
+ },
+ 16,
+ KSAUDIO_SPEAKER_STEREO,
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM)
+ }
+ },
+ { // 4
+ {
+ sizeof(KSDATAFORMAT_WAVEFORMATEXTENSIBLE),
+ 0,
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_IEC61937_DOLBY_DIGITAL),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)
+ },
+ {
+ {
+ WAVE_FORMAT_EXTENSIBLE,
+ 2,
+ 44100,
+ 176400,
+ 4,
+ 16,
+ sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX)
+ },
+ 16,
+ KSAUDIO_SPEAKER_5POINT1_SURROUND,
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_IEC61937_DOLBY_DIGITAL)
+ }
+ },
+ { // 5
+ {
+ sizeof(KSDATAFORMAT_WAVEFORMATEXTENSIBLE),
+ 0,
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_IEC61937_DOLBY_DIGITAL),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)
+ },
+ {
+ {
+ WAVE_FORMAT_EXTENSIBLE,
+ 2,
+ 48000,
+ 192000,
+ 4,
+ 16,
+ sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX)
+ },
+ 16,
+ KSAUDIO_SPEAKER_5POINT1_SURROUND,
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_IEC61937_DOLBY_DIGITAL)
+ }
+ }
+};
+
+static
+KSDATAFORMAT_WAVEFORMATEXTENSIBLE SpdifOffloadPinSupportedDeviceFormats[] =
+{
+ { // 0
+ {
+ sizeof(KSDATAFORMAT_WAVEFORMATEXTENSIBLE),
+ 0,
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)
+ },
+ {
+ {
+ WAVE_FORMAT_EXTENSIBLE,
+ 2,
+ 44100,
+ 176400,
+ 4,
+ 16,
+ sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX)
+ },
+ 16,
+ KSAUDIO_SPEAKER_STEREO,
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM)
+ }
+ },
+ { // 1
+ {
+ sizeof(KSDATAFORMAT_WAVEFORMATEXTENSIBLE),
+ 0,
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)
+ },
+ {
+ {
+ WAVE_FORMAT_EXTENSIBLE,
+ 2,
+ 48000,
+ 192000,
+ 4,
+ 16,
+ sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX)
+ },
+ 16,
+ KSAUDIO_SPEAKER_STEREO,
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM)
+ }
+ },
+ { // 2
+ {
+ sizeof(KSDATAFORMAT_WAVEFORMATEXTENSIBLE),
+ 0,
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)
+ },
+ {
+ {
+ WAVE_FORMAT_EXTENSIBLE,
+ 2,
+ 88200,
+ 352800,
+ 4,
+ 16,
+ sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX)
+ },
+ 16,
+ KSAUDIO_SPEAKER_STEREO,
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM)
+ }
+ },
+ { // 3
+ {
+ sizeof(KSDATAFORMAT_WAVEFORMATEXTENSIBLE),
+ 0,
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)
+ },
+ {
+ {
+ WAVE_FORMAT_EXTENSIBLE,
+ 2,
+ 96000,
+ 384000,
+ 4,
+ 16,
+ sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX)
+ },
+ 16,
+ KSAUDIO_SPEAKER_STEREO,
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM)
+ }
+ }
+};
+
+static
+KSDATAFORMAT_WAVEFORMATEXTENSIBLE SpdifLoopbackPinSupportedDeviceFormats[] =
+{
+ { // 0
+ {
+ sizeof(KSDATAFORMAT_WAVEFORMATEXTENSIBLE),
+ 0,
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)
+ },
+ {
+ {
+ WAVE_FORMAT_EXTENSIBLE,
+ 2,
+ 44100,
+ 176400,
+ 4,
+ 16,
+ sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX)
+ },
+ 16,
+ KSAUDIO_SPEAKER_STEREO,
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM)
+ }
+ },
+ { // 1
+ {
+ sizeof(KSDATAFORMAT_WAVEFORMATEXTENSIBLE),
+ 0,
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)
+ },
+ {
+ {
+ WAVE_FORMAT_EXTENSIBLE,
+ 2,
+ 48000,
+ 192000,
+ 4,
+ 16,
+ sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX)
+ },
+ 16,
+ KSAUDIO_SPEAKER_STEREO,
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM)
+ }
+ }
+};
+
+//
+// Supported modes (only on streaming pins).
+//
+static
+MODE_AND_DEFAULT_FORMAT SpdifHostPinSupportedDeviceModes[] =
+{
+ {
+ STATIC_AUDIO_SIGNALPROCESSINGMODE_RAW,
+ NULL, // just an example of no default format for this endpoint/mode
+ },
+ {
+ STATIC_AUDIO_SIGNALPROCESSINGMODE_DEFAULT,
+ NULL, // just an example of no default format for this endpoint/mode
+ }
+};
+
+static
+MODE_AND_DEFAULT_FORMAT SpdifOffloadPinSupportedDeviceModes[] =
+{
+ {
+ STATIC_AUDIO_SIGNALPROCESSINGMODE_RAW,
+ NULL, // just an example of no default format for this endpoint/mode
+ },
+ {
+ STATIC_AUDIO_SIGNALPROCESSINGMODE_DEFAULT,
+ NULL, // just an example of no default format for this endpoint/mode
+ }
+};
+
+//
+// The entries here must follow the same order as the filter's pin
+// descriptor array.
+//
+static
+PIN_DEVICE_FORMATS_AND_MODES SpdifPinDeviceFormatsAndModes[] =
+{
+ {
+ SystemRenderPin,
+ SpdifHostPinSupportedDeviceFormats,
+ SIZEOF_ARRAY(SpdifHostPinSupportedDeviceFormats),
+ SpdifHostPinSupportedDeviceModes,
+ SIZEOF_ARRAY(SpdifHostPinSupportedDeviceModes)
+ },
+ {
+ OffloadRenderPin,
+ SpdifOffloadPinSupportedDeviceFormats,
+ SIZEOF_ARRAY(SpdifOffloadPinSupportedDeviceFormats),
+ SpdifOffloadPinSupportedDeviceModes,
+ SIZEOF_ARRAY(SpdifOffloadPinSupportedDeviceModes),
+ },
+ {
+ RenderLoopbackPin,
+ SpdifLoopbackPinSupportedDeviceFormats,
+ SIZEOF_ARRAY(SpdifLoopbackPinSupportedDeviceFormats),
+ NULL, // loopback doesn't support modes.
+ 0
+ },
+ {
+ BridgePin,
+ NULL,
+ 0,
+ NULL,
+ 0
+ },
+ {
+ NoPin, // For convenience, offload engine device formats appended here
+ SpdifAudioEngineSupportedDeviceFormats,
+ SIZEOF_ARRAY(SpdifAudioEngineSupportedDeviceFormats),
+ NULL, // no modes for this entry.
+ 0
+ }
+};
+
+//=============================================================================
+static
+KSDATARANGE_AUDIO SpdifPinDataRangesStream[] =
+{
+ { // 0 - PCM host
+ {
+ sizeof(KSDATARANGE_AUDIO),
+ KSDATARANGE_ATTRIBUTES, // An attributes list follows this data range
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)
+ },
+ SPDIF_HOST_MAX_CHANNELS,
+ SPDIF_HOST_MIN_BITS_PER_SAMPLE,
+ SPDIF_HOST_MAX_BITS_PER_SAMPLE,
+ SPDIF_HOST_MIN_SAMPLE_RATE,
+ SPDIF_HOST_MAX_SAMPLE_RATE
+ },
+ { // 1 - PCM offload
+ {
+ sizeof(KSDATARANGE_AUDIO),
+ KSDATARANGE_ATTRIBUTES, // An attributes list follows this data range
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)
+ },
+ SPDIF_OFFLOAD_MAX_CHANNELS,
+ SPDIF_OFFLOAD_MIN_BITS_PER_SAMPLE,
+ SPDIF_OFFLOAD_MAX_BITS_PER_SAMPLE,
+ SPDIF_OFFLOAD_MIN_SAMPLE_RATE,
+ SPDIF_OFFLOAD_MAX_SAMPLE_RATE
+ },
+ { // 2 - PCM loopback
+ {
+ sizeof(KSDATARANGE_AUDIO),
+ 0,
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_PCM),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)
+ },
+ SPDIF_LOOPBACK_MAX_CHANNELS,
+ SPDIF_LOOPBACK_MIN_BITS_PER_SAMPLE,
+ SPDIF_LOOPBACK_MAX_BITS_PER_SAMPLE,
+ SPDIF_LOOPBACK_MIN_SAMPLE_RATE,
+ SPDIF_LOOPBACK_MAX_SAMPLE_RATE
+ },
+ { // 3 - DOLBY-DIGITAL host
+ {
+ sizeof(KSDATARANGE_AUDIO),
+ KSDATARANGE_ATTRIBUTES, // An attributes list follows this data range
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_IEC61937_DOLBY_DIGITAL),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX)
+ },
+ SPDIF_DOLBY_DIGITAL_MAX_CHANNELS,
+ SPDIF_DOLBY_DIGITAL_MIN_BITS_PER_SAMPLE,
+ SPDIF_DOLBY_DIGITAL_MAX_BITS_PER_SAMPLE,
+ SPDIF_DOLBY_DIGITAL_MIN_SAMPLE_RATE,
+ SPDIF_DOLBY_DIGITAL_MAX_SAMPLE_RATE
+ }
+};
+
+static
+PKSDATARANGE SpdifPinDataRangePointersStream[] =
+{
+ PKSDATARANGE(&SpdifPinDataRangesStream[0]),
+ PKSDATARANGE(&PinDataRangeAttributeList),
+ PKSDATARANGE(&SpdifPinDataRangesStream[3]),
+ PKSDATARANGE(&PinDataRangeAttributeList)
+};
+
+static
+PKSDATARANGE SpdifPinDataRangePointersOffloadStream[] =
+{
+ PKSDATARANGE(&SpdifPinDataRangesStream[1]),
+ PKSDATARANGE(&PinDataRangeAttributeList),
+
+};
+
+static
+PKSDATARANGE SpdifPinDataRangePointersLoopbackStream[] =
+{
+ PKSDATARANGE(&SpdifPinDataRangesStream[2])
+};
+
+//=============================================================================
+static
+KSDATARANGE SpdifPinDataRangesBridge[] =
+{
+ {
+ sizeof(KSDATARANGE),
+ 0,
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_ANALOG),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_NONE)
+ },
+ {
+ sizeof(KSDATARANGE),
+ 0,
+ 0,
+ 0,
+ STATICGUIDOF(KSDATAFORMAT_TYPE_AUDIO),
+ STATICGUIDOF(KSDATAFORMAT_SUBTYPE_IEC61937_DOLBY_DIGITAL),
+ STATICGUIDOF(KSDATAFORMAT_SPECIFIER_NONE)
+ }
+};
+
+static
+PKSDATARANGE SpdifPinDataRangePointersBridge[] =
+{
+ &SpdifPinDataRangesBridge[0],
+ &SpdifPinDataRangesBridge[1]
+};
+
+//=============================================================================
+
+static
+PCPROPERTY_ITEM PropertiesSpdifOffloadPin[] =
+{
+ {
+ &KSPROPSETID_OffloadPin, // define new property set
+ KSPROPERTY_OFFLOAD_PIN_GET_STREAM_OBJECT_POINTER, // define properties
+ KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_BASICSUPPORT,
+ PropertyHandler_OffloadPin
+ },
+ {
+ &KSPROPSETID_OffloadPin, // define new property set
+ KSPROPERTY_OFFLOAD_PIN_VERIFY_STREAM_OBJECT_POINTER, // define properties
+ KSPROPERTY_TYPE_SET | KSPROPERTY_TYPE_BASICSUPPORT,
+ PropertyHandler_OffloadPin
+ }
+};
+
+DEFINE_PCAUTOMATION_TABLE_PROP(AutomationSpdifOffloadPin, PropertiesSpdifOffloadPin);
+
+
+//=============================================================================
+static
+PCPIN_DESCRIPTOR SpdifWaveMiniportPins[] =
+{
+ // Wave Out Streaming Pin (Renderer) KSPIN_WAVE_RENDER2_SINK_SYSTEM
+ {
+ SPDIF_MAX_INPUT_SYSTEM_STREAMS,
+ SPDIF_MAX_INPUT_SYSTEM_STREAMS,
+ 0,
+ NULL,
+ {
+ 0,
+ NULL,
+ 0,
+ NULL,
+ SIZEOF_ARRAY(SpdifPinDataRangePointersStream),
+ SpdifPinDataRangePointersStream,
+ KSPIN_DATAFLOW_IN,
+ KSPIN_COMMUNICATION_SINK,
+ &KSCATEGORY_AUDIO,
+ NULL,
+ 0
+ }
+ },
+ // Wave Out Streaming Pin (Renderer) KSPIN_WAVE_RENDER_SINK_OFFLOAD
+ {
+ SPDIF_MAX_INPUT_OFFLOAD_STREAMS,
+ SPDIF_MAX_INPUT_OFFLOAD_STREAMS,
+ 0,
+ &AutomationSpdifOffloadPin, // AutomationTable
+ {
+ 0,
+ NULL,
+ 0,
+ NULL,
+ SIZEOF_ARRAY(SpdifPinDataRangePointersOffloadStream),
+ SpdifPinDataRangePointersOffloadStream,
+ KSPIN_DATAFLOW_IN,
+ KSPIN_COMMUNICATION_SINK,
+ &KSCATEGORY_AUDIO,
+ NULL,
+ 0
+ }
+ },
+ // Wave Out Streaming Pin (Renderer) KSPIN_WAVE_RENDER2_SINK_LOOPBACK
+ {
+ SPDIF_MAX_OUTPUT_LOOPBACK_STREAMS,
+ SPDIF_MAX_OUTPUT_LOOPBACK_STREAMS,
+ 0,
+ NULL,
+ {
+ 0,
+ NULL,
+ 0,
+ NULL,
+ SIZEOF_ARRAY(SpdifPinDataRangePointersLoopbackStream),
+ SpdifPinDataRangePointersLoopbackStream,
+ KSPIN_DATAFLOW_OUT,
+ KSPIN_COMMUNICATION_SINK,
+ &KSNODETYPE_AUDIO_LOOPBACK,
+ NULL,
+ 0
+ }
+ },
+ // Wave Out Bridge Pin (Renderer) KSPIN_WAVE_RENDER2_SOURCE
+ {
+ 0,
+ 0,
+ 0,
+ NULL,
+ {
+ 0,
+ NULL,
+ 0,
+ NULL,
+ SIZEOF_ARRAY(SpdifPinDataRangePointersBridge),
+ SpdifPinDataRangePointersBridge,
+ KSPIN_DATAFLOW_OUT,
+ KSPIN_COMMUNICATION_NONE,
+ &KSCATEGORY_AUDIO,
+ NULL,
+ 0
+ }
+ },
+};
+
+//=============================================================================
+static
+PCNODE_DESCRIPTOR SpdifWaveMiniportNodes[] =
+{
+ // KSNODE_WAVE_AUDIO_ENGINE
+ {
+ 0, // Flags
+ NULL, // AutomationTable
+ &KSNODETYPE_AUDIO_ENGINE, // Type KSNODETYPE_AUDIO_ENGINE
+ NULL // Name
+ }
+};
+
+//=============================================================================
+//
+// ----------------------------
+// | |
+// System Pin 0-->| |--> 2 Loopback Pin
+// | HW Audio Engine node |
+// Offload Pin 1-->| |--> 3 KSPIN_WAVE_RENDER_SOURCE
+// | |
+// ----------------------------
+static
+PCCONNECTION_DESCRIPTOR SpdifWaveMiniportConnections[] =
+{
+ { PCFILTER_NODE, KSPIN_WAVE_RENDER_SINK_SYSTEM, KSNODE_WAVE_AUDIO_ENGINE, 1 },
+ { PCFILTER_NODE, KSPIN_WAVE_RENDER_SINK_OFFLOAD, KSNODE_WAVE_AUDIO_ENGINE, 2 },
+ { KSNODE_WAVE_AUDIO_ENGINE, 3, PCFILTER_NODE, KSPIN_WAVE_RENDER_SINK_LOOPBACK },
+ { KSNODE_WAVE_AUDIO_ENGINE, 0, PCFILTER_NODE, KSPIN_WAVE_RENDER_SOURCE },
+};
+
+//=============================================================================
+static
+PCPROPERTY_ITEM PropertiesSpdifWaveFilter[] =
+{
+ {
+ &KSPROPSETID_Pin,
+ KSPROPERTY_PIN_PROPOSEDATAFORMAT,
+ KSPROPERTY_TYPE_SET | KSPROPERTY_TYPE_BASICSUPPORT,
+ PropertyHandler_WaveFilter
+ },
+ {
+ &KSPROPSETID_SysVAD,
+ KSPROPERTY_SYSVAD_DEFAULTSTREAMEFFECTS,
+ KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_BASICSUPPORT,
+ PropertyHandler_WaveFilter
+ }
+};
+
+DEFINE_PCAUTOMATION_TABLE_PROP(AutomationSpdifWaveFilter, PropertiesSpdifWaveFilter);
+
+//=============================================================================
+static
+PCFILTER_DESCRIPTOR SpdifWaveMiniportFilterDescriptor =
+{
+ 0, // Version
+ &AutomationSpdifWaveFilter, // AutomationTable
+ sizeof(PCPIN_DESCRIPTOR), // PinSize
+ SIZEOF_ARRAY(SpdifWaveMiniportPins), // PinCount
+ SpdifWaveMiniportPins, // Pins
+ sizeof(PCNODE_DESCRIPTOR), // NodeSize
+ SIZEOF_ARRAY(SpdifWaveMiniportNodes), // NodeCount
+ SpdifWaveMiniportNodes, // Nodes
+ SIZEOF_ARRAY(SpdifWaveMiniportConnections), // ConnectionCount
+ SpdifWaveMiniportConnections, // Connections
+ 0, // CategoryCount
+ NULL // Categories - use defaults (audio, render, capture)
+};
+
+#endif // _SYSVAD_SPDIFWAVTABLE_H_
+