Skip to content

Commit

Permalink
Add I2S Audio Driver (WDM) (#15)
Browse files Browse the repository at this point in the history
* Add I2S Audio Driver
  • Loading branch information
coolstar authored Nov 28, 2023
1 parent cca6df9 commit afe2340
Show file tree
Hide file tree
Showing 58 changed files with 15,124 additions and 98 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ This repository contains drivers for RK35xx-based platforms, with a focus on RK3
|HDMI output|MSBDD (Inbox)|🟡 Partially working|Single display with mode limited at 1080p 60 Hz, provided by UEFI GOP.|
|HDMI input||🔴 Not working||
|DisplayPort output|MSBDD (Inbox)|🟡 Partially working|Single display with mode limited at 1080p 60 Hz, provided by UEFI GOP. Only works in one orientation of the Type-C connector.|
|HDMI audio||🔴 Not working||
|HDMI audio||🔴 WIP|I2S audio driver enumerates, but requires VOP driver|
|DisplayPort audio||🔴 Not working||
|Analog audio||🔴 Not working||
|Analog audio|[es8323](https://github.com/worproject/Rockchip-Windows-Drivers/tree/master/drivers/audio/codecs/es8323)|🟢 Working (Orange Pi 5)||
|Digital audio||🔴 Not working||
|USB/DP Alt Mode||🔴 Not working||
|GPU||🔴 Not working|Software-rendered|
Expand All @@ -30,7 +30,7 @@ This repository contains drivers for RK35xx-based platforms, with a focus on RK3
|UART||🔴 Not working|No OS driver but debugging does work on UART2, being configured by UEFI.|
|GPIO|[rk3xgpio](https://github.com/worproject/Rockchip-Windows-Drivers/tree/master/drivers/gpio)|🟢 Working||
|I2C|[rk3xi2c](https://github.com/worproject/Rockchip-Windows-Drivers/tree/master/drivers/i2c)|🟢 Working||
|I2S||🔴 Not working||
|I2S|[csaudiork3x](https://github.com/worproject/Rockchip-Windows-Drivers/tree/master/drivers/audio/csaudiork3x)|🟢 Working||
|SPI||🔴 Not working||
|CAN bus||🔴 Not working||
|SPDIF||🔴 Not working||
Expand Down
36 changes: 36 additions & 0 deletions build/RockchipDrivers.sln
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "es8323", "..\drivers\audio\
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rk3xi2sbus", "..\drivers\audio\rk3xi2sbus\rk3xi2sbus.vcxproj", "{BA95E25D-392E-4BC9-B481-E4D9FB9AFFB4}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "csaudio-Filters", "..\drivers\audio\csaudiork3x\Source\Filters\Filters.vcxproj", "{771312CF-E5A2-4676-8142-86CEBDF99E2B}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "csaudio-Inc", "..\drivers\audio\csaudiork3x\Source\Inc\Inc.vcxproj", "{4B664BA5-057A-41B8-B365-2C99065C4DFA}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "csaudio-Main", "..\drivers\audio\csaudiork3x\Source\Main\Main.vcxproj", "{E4DF0EEE-D35B-47F2-A9B1-41EA97C465FF}"
ProjectSection(ProjectDependencies) = postProject
{33E61864-6F2C-4F9F-BE70-8F8985A4F283} = {33E61864-6F2C-4F9F-BE70-8F8985A4F283}
{771312CF-E5A2-4676-8142-86CEBDF99E2B} = {771312CF-E5A2-4676-8142-86CEBDF99E2B}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "csaudio-Utilities", "..\drivers\audio\csaudiork3x\Source\Utilities\Utilities.vcxproj", "{33E61864-6F2C-4F9F-BE70-8F8985A4F283}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|ARM64 = Debug|ARM64
Expand Down Expand Up @@ -55,6 +67,30 @@ Global
{BA95E25D-392E-4BC9-B481-E4D9FB9AFFB4}.Release|ARM64.ActiveCfg = Release|ARM64
{BA95E25D-392E-4BC9-B481-E4D9FB9AFFB4}.Release|ARM64.Build.0 = Release|ARM64
{BA95E25D-392E-4BC9-B481-E4D9FB9AFFB4}.Release|ARM64.Deploy.0 = Release|ARM64
{771312CF-E5A2-4676-8142-86CEBDF99E2B}.Debug|ARM64.ActiveCfg = Debug|ARM64
{771312CF-E5A2-4676-8142-86CEBDF99E2B}.Debug|ARM64.Build.0 = Debug|ARM64
{771312CF-E5A2-4676-8142-86CEBDF99E2B}.Debug|ARM64.Deploy.0 = Debug|ARM64
{771312CF-E5A2-4676-8142-86CEBDF99E2B}.Release|ARM64.ActiveCfg = Release|ARM64
{771312CF-E5A2-4676-8142-86CEBDF99E2B}.Release|ARM64.Build.0 = Release|ARM64
{771312CF-E5A2-4676-8142-86CEBDF99E2B}.Release|ARM64.Deploy.0 = Release|ARM64
{4B664BA5-057A-41B8-B365-2C99065C4DFA}.Debug|ARM64.ActiveCfg = Debug|ARM64
{4B664BA5-057A-41B8-B365-2C99065C4DFA}.Debug|ARM64.Build.0 = Debug|ARM64
{4B664BA5-057A-41B8-B365-2C99065C4DFA}.Debug|ARM64.Deploy.0 = Debug|ARM64
{4B664BA5-057A-41B8-B365-2C99065C4DFA}.Release|ARM64.ActiveCfg = Release|ARM64
{4B664BA5-057A-41B8-B365-2C99065C4DFA}.Release|ARM64.Build.0 = Release|ARM64
{4B664BA5-057A-41B8-B365-2C99065C4DFA}.Release|ARM64.Deploy.0 = Release|ARM64
{E4DF0EEE-D35B-47F2-A9B1-41EA97C465FF}.Debug|ARM64.ActiveCfg = Debug|ARM64
{E4DF0EEE-D35B-47F2-A9B1-41EA97C465FF}.Debug|ARM64.Build.0 = Debug|ARM64
{E4DF0EEE-D35B-47F2-A9B1-41EA97C465FF}.Debug|ARM64.Deploy.0 = Debug|ARM64
{E4DF0EEE-D35B-47F2-A9B1-41EA97C465FF}.Release|ARM64.ActiveCfg = Release|ARM64
{E4DF0EEE-D35B-47F2-A9B1-41EA97C465FF}.Release|ARM64.Build.0 = Release|ARM64
{E4DF0EEE-D35B-47F2-A9B1-41EA97C465FF}.Release|ARM64.Deploy.0 = Release|ARM64
{33E61864-6F2C-4F9F-BE70-8F8985A4F283}.Debug|ARM64.ActiveCfg = Debug|ARM64
{33E61864-6F2C-4F9F-BE70-8F8985A4F283}.Debug|ARM64.Build.0 = Debug|ARM64
{33E61864-6F2C-4F9F-BE70-8F8985A4F283}.Debug|ARM64.Deploy.0 = Debug|ARM64
{33E61864-6F2C-4F9F-BE70-8F8985A4F283}.Release|ARM64.ActiveCfg = Release|ARM64
{33E61864-6F2C-4F9F-BE70-8F8985A4F283}.Release|ARM64.Build.0 = Release|ARM64
{33E61864-6F2C-4F9F-BE70-8F8985A4F283}.Release|ARM64.Deploy.0 = Release|ARM64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
15 changes: 15 additions & 0 deletions drivers/audio/csaudiork3x/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# CoolStar Audio for Rockchip 3xxx

Open Source driver for Rockchip 3xxx

Currently Implemented:

* 16-bit 48 Khz Audio Streams
* I2S TDM Streams
* Runtime Power Management
* Play / Pause / Stop support for streams
* WDM Position Counter

Tested on Orange Pi 5 (RK3588S)

Based off csaudioacp3x
101 changes: 101 additions & 0 deletions drivers/audio/csaudiork3x/Source/Filters/Filters.vcxproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
<?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|ARM64">
<Configuration>Debug</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM64">
<Configuration>Release</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{771312CF-E5A2-4676-8142-86CEBDF99E2B}</ProjectGuid>
<RootNamespace>$(MSBuildProjectName)</RootNamespace>
<KMDF_VERSION_MAJOR>1</KMDF_VERSION_MAJOR>
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
<Platform Condition="'$(Platform)' == ''">Win32</Platform>
<SampleGuid>{F51739CE-5253-42B5-9191-57F28B5842C6}</SampleGuid>
<ProjectName>csaudio-Filters</ProjectName>
<WindowsTargetPlatformVersion>$(LatestTargetPlatformVersion)</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration">
<TargetVersion>Windows10</TargetVersion>
<DriverTargetPlatform>Universal</DriverTargetPlatform>
<DriverType>KMDF</DriverType>
<PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
<ConfigurationType>StaticLibrary</ConfigurationType>
</PropertyGroup>
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
<UseDebugLibraries>true</UseDebugLibraries>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<PropertyGroup>
<OutDir>$(IntDir)</OutDir>
</PropertyGroup>
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
<Import Project="$(SolutionDir)\common.props" />
</ImportGroup>
<ItemGroup Label="WrappedTaskItems" />
<PropertyGroup>
<TargetName>csaudio-Filters</TargetName>
</PropertyGroup>
<ItemDefinitionGroup>
<ResourceCompile>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\Inc</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_WAVERT_</PreprocessorDefinitions>
</ResourceCompile>
<ClCompile>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..;.</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\Inc;.</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_WAVERT_;_NEW_DELETE_OPERATORS_</PreprocessorDefinitions>
<ExceptionHandling>
</ExceptionHandling>
<DisableSpecificWarnings>4595;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Midl>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);..</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\Inc</AdditionalIncludeDirectories>
<PreprocessorDefinitions>%(PreprocessorDefinitions);_USE_WAVERT_</PreprocessorDefinitions>
</Midl>
<DriverSign>
<FileDigestAlgorithm>sha256</FileDigestAlgorithm>
</DriverSign>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="hdmitopo.cpp" />
<ClCompile Include="headphonetopo.cpp" />
<ClCompile Include="micarraytopo.cpp" />
<ClCompile Include="micjacktopo.cpp" />
<ClCompile Include="speakertopo.cpp" />
</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 Include="hdmitopo.h" />
<ClInclude Include="hdmitoptable.h" />
<ClInclude Include="headphonetopo.h" />
<ClInclude Include="headphonetoptable.h" />
<ClInclude Include="micarray1toptable.h" />
<ClInclude Include="micarraytopo.h" />
<ClInclude Include="micarraywavtable.h" />
<ClInclude Include="micjacktopo.h" />
<ClInclude Include="micjacktoptable.h" />
<ClInclude Include="minipairs.h" />
<ClInclude Include="speakertopo.h" />
<ClInclude Include="speakertoptable.h" />
<ClInclude Include="speakerwavtable.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>
159 changes: 159 additions & 0 deletions drivers/audio/csaudiork3x/Source/Filters/Filters.vcxproj.Filters
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
<?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>{75C3E63D-04EA-4EB3-B9F1-505497C51F71}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files">
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
<UniqueIdentifier>{5E8F8D4C-2886-4109-9E78-CE5EA6DB4AC4}</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>{75D3016A-4ED8-4FAF-9817-394BE1112534}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="speakertopo.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="micarraytopo.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="speakertopo.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="headphonetopo.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="micjacktopo.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="hdmitopo.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="headphonetoptable.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="micarray1toptable.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="micarraytopo.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="micarraywavtable.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="micjacktopo.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="micjacktoptable.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="minipairs.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="speakertopo.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="speakertoptable.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="speakerwavtable.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="hdmitoptable.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="headphonetopo.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="headphonetoptable.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="micarray1toptable.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="micarraytopo.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="micarraywavtable.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="micjacktopo.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="micjacktoptable.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="minipairs.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="speakertopo.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="speakertoptable.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="speakerwavtable.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="*.h;*.hpp;*.hxx;*.hm;*.inl;*.xsd">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="*.h;*.hpp;*.hxx;*.hm;*.inl;*.xsd">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="*.h;*.hpp;*.hxx;*.hm;*.inl;*.xsd">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="*.h;*.hpp;*.hxx;*.hm;*.inl;*.xsd">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="*.h;*.hpp;*.hxx;*.hm;*.inl;*.xsd">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="headphonetoptable.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="micjacktoptable.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="headphonetopo.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="micjacktopo.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="micarray1toptable.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="micarraytopo.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="micarraywavtable.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="minipairs.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="speakertopo.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="speakertoptable.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="speakerwavtable.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="hdmitopo.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="hdmitoptable.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>
Loading

0 comments on commit afe2340

Please sign in to comment.