From 7701f9f87b0545177a44b36e33abff3e69d9be50 Mon Sep 17 00:00:00 2001 From: Martmists Date: Tue, 26 Oct 2021 04:36:34 +0200 Subject: [PATCH] Add gradle build setup Signed-off-by: Martmists --- .gitignore | 6 + CMakeLists.txt | 83 +- build.gradle.kts | 36 + gradle.properties | 4 + gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 59203 bytes gradle/wrapper/gradle-wrapper.properties | 5 + gradlew | 185 +++ gradlew.bat | 89 ++ include/hardware/audio_policy.h | 461 ------ include/hardware/hardware.h | 241 ---- include/hardware/system/audio-base-utils.h | 177 --- include/hardware/system/audio-base.h | 450 ------ include/hardware/system/audio.h | 1230 ----------------- include/hardware/system/audio_policy.h | 108 -- include/hardware/system/cutils/atomic.h | 152 -- include/hardware/system/cutils/bitops.h | 120 -- .../hardware/system/cutils/native_handle.h | 69 - settings.gradle | 8 + src/{ => cpp}/Effect.cpp | 1 + src/{ => cpp}/Effect.h | 2 +- src/{ => cpp}/ProcessUnit_FX.cpp | 0 src/{ => cpp}/ProcessUnit_FX.h | 0 src/{ => cpp}/constants.h | 8 + src/{ => cpp}/effects/AnalogX.cpp | 0 src/{ => cpp}/effects/AnalogX.h | 0 src/{ => cpp}/effects/Cure.cpp | 0 src/{ => cpp}/effects/Cure.h | 0 src/{ => cpp}/effects/DiffSurround.cpp | 0 src/{ => cpp}/effects/DiffSurround.h | 0 src/{ => cpp}/effects/DynamicSystem.cpp | 0 src/{ => cpp}/effects/DynamicSystem.h | 0 src/{ => cpp}/effects/Reverberation.cpp | 0 src/{ => cpp}/effects/Reverberation.h | 0 src/{ => cpp}/effects/SpeakerCorrection.cpp | 0 src/{ => cpp}/effects/SpeakerCorrection.h | 0 src/{ => cpp}/effects/SpectrumExtend.cpp | 0 src/{ => cpp}/effects/SpectrumExtend.h | 0 src/{ => cpp}/effects/TubeSimulator.cpp | 0 src/{ => cpp}/effects/TubeSimulator.h | 0 src/{ => cpp}/effects/VHE.cpp | 0 src/{ => cpp}/effects/VHE.h | 0 src/{ => cpp}/effects/ViPERClarity.cpp | 0 src/{ => cpp}/effects/ViPERClarity.h | 0 src/{ => cpp}/functions/kissfft/README.md | 0 .../functions/kissfft/_kiss_fft_guts.h | 0 src/{ => cpp}/functions/kissfft/kiss_fft.cpp | 0 src/{ => cpp}/functions/kissfft/kiss_fft.h | 0 src/{ => cpp}/functions/kissfft/kiss_fftr.cpp | 0 src/{ => cpp}/functions/kissfft/kiss_fftr.h | 0 src/{ => cpp}/utils/CAllpassFilter.cpp | 0 src/{ => cpp}/utils/CAllpassFilter.h | 0 src/{ => cpp}/utils/CCombFilter.cpp | 0 src/{ => cpp}/utils/CCombFilter.h | 0 src/{ => cpp}/utils/CRevModel.cpp | 0 src/{ => cpp}/utils/CRevModel.h | 0 src/{ => cpp}/utils/Crossfeed.cpp | 0 src/{ => cpp}/utils/Crossfeed.h | 0 src/{ => cpp}/utils/DepthSurround.cpp | 0 src/{ => cpp}/utils/DepthSurround.h | 0 src/{ => cpp}/utils/DynamicBass.cpp | 0 src/{ => cpp}/utils/DynamicBass.h | 0 src/{ => cpp}/utils/FixedBiquad.cpp | 0 src/{ => cpp}/utils/FixedBiquad.h | 0 src/cpp/utils/Harmonic.cpp | 121 ++ src/{ => cpp}/utils/Harmonic.h | 0 src/{ => cpp}/utils/HiFi.cpp | 0 src/{ => cpp}/utils/HiFi.h | 0 src/{ => cpp}/utils/HighShelf.cpp | 2 +- src/{ => cpp}/utils/HighShelf.h | 0 src/{ => cpp}/utils/IIR_1st.cpp | 0 src/{ => cpp}/utils/IIR_1st.h | 0 src/{ => cpp}/utils/IIR_NOrder_BW_BP.cpp | 0 src/{ => cpp}/utils/IIR_NOrder_BW_BP.h | 0 src/{ => cpp}/utils/IIR_NOrder_BW_LH.cpp | 0 src/{ => cpp}/utils/IIR_NOrder_BW_LH.h | 0 src/{ => cpp}/utils/MultiBiquad.cpp | 0 src/{ => cpp}/utils/MultiBiquad.h | 0 src/{ => cpp}/utils/NoiseSharpening.cpp | 0 src/{ => cpp}/utils/NoiseSharpening.h | 0 src/{ => cpp}/utils/PConvSingle_F32.cpp | 4 +- src/{ => cpp}/utils/PConvSingle_F32.h | 0 src/{ => cpp}/utils/PassFilter.cpp | 0 src/{ => cpp}/utils/PassFilter.h | 0 src/{ => cpp}/utils/PolesFilter.cpp | 0 src/{ => cpp}/utils/PolesFilter.h | 0 src/{ => cpp}/utils/Subwoofer.cpp | 0 src/{ => cpp}/utils/Subwoofer.h | 0 src/{ => cpp}/utils/TimeConstDelay.cpp | 0 src/{ => cpp}/utils/TimeConstDelay.h | 0 src/{ => cpp}/utils/WaveBuffer_I32.cpp | 0 src/{ => cpp}/utils/WaveBuffer_I32.h | 0 src/{ => cpp}/viper.cpp | 1 - src/{ => cpp}/viper.h | 0 .../audio_effect.h => src/include/essential.h | 711 ++++++++-- src/main/AndroidManifest.xml | 6 + src/utils/Harmonic.cpp | 65 - 96 files changed, 1111 insertions(+), 3234 deletions(-) create mode 100644 build.gradle.kts create mode 100644 gradle.properties create mode 100644 gradle/wrapper/gradle-wrapper.jar create mode 100644 gradle/wrapper/gradle-wrapper.properties create mode 100755 gradlew create mode 100644 gradlew.bat delete mode 100644 include/hardware/audio_policy.h delete mode 100644 include/hardware/hardware.h delete mode 100644 include/hardware/system/audio-base-utils.h delete mode 100644 include/hardware/system/audio-base.h delete mode 100644 include/hardware/system/audio.h delete mode 100644 include/hardware/system/audio_policy.h delete mode 100644 include/hardware/system/cutils/atomic.h delete mode 100644 include/hardware/system/cutils/bitops.h delete mode 100644 include/hardware/system/cutils/native_handle.h create mode 100644 settings.gradle rename src/{ => cpp}/Effect.cpp (99%) rename src/{ => cpp}/Effect.h (94%) rename src/{ => cpp}/ProcessUnit_FX.cpp (100%) rename src/{ => cpp}/ProcessUnit_FX.h (100%) rename src/{ => cpp}/constants.h (63%) rename src/{ => cpp}/effects/AnalogX.cpp (100%) rename src/{ => cpp}/effects/AnalogX.h (100%) rename src/{ => cpp}/effects/Cure.cpp (100%) rename src/{ => cpp}/effects/Cure.h (100%) rename src/{ => cpp}/effects/DiffSurround.cpp (100%) rename src/{ => cpp}/effects/DiffSurround.h (100%) rename src/{ => cpp}/effects/DynamicSystem.cpp (100%) rename src/{ => cpp}/effects/DynamicSystem.h (100%) rename src/{ => cpp}/effects/Reverberation.cpp (100%) rename src/{ => cpp}/effects/Reverberation.h (100%) rename src/{ => cpp}/effects/SpeakerCorrection.cpp (100%) rename src/{ => cpp}/effects/SpeakerCorrection.h (100%) rename src/{ => cpp}/effects/SpectrumExtend.cpp (100%) rename src/{ => cpp}/effects/SpectrumExtend.h (100%) rename src/{ => cpp}/effects/TubeSimulator.cpp (100%) rename src/{ => cpp}/effects/TubeSimulator.h (100%) rename src/{ => cpp}/effects/VHE.cpp (100%) rename src/{ => cpp}/effects/VHE.h (100%) rename src/{ => cpp}/effects/ViPERClarity.cpp (100%) rename src/{ => cpp}/effects/ViPERClarity.h (100%) rename src/{ => cpp}/functions/kissfft/README.md (100%) rename src/{ => cpp}/functions/kissfft/_kiss_fft_guts.h (100%) rename src/{ => cpp}/functions/kissfft/kiss_fft.cpp (100%) rename src/{ => cpp}/functions/kissfft/kiss_fft.h (100%) rename src/{ => cpp}/functions/kissfft/kiss_fftr.cpp (100%) rename src/{ => cpp}/functions/kissfft/kiss_fftr.h (100%) rename src/{ => cpp}/utils/CAllpassFilter.cpp (100%) rename src/{ => cpp}/utils/CAllpassFilter.h (100%) rename src/{ => cpp}/utils/CCombFilter.cpp (100%) rename src/{ => cpp}/utils/CCombFilter.h (100%) rename src/{ => cpp}/utils/CRevModel.cpp (100%) rename src/{ => cpp}/utils/CRevModel.h (100%) rename src/{ => cpp}/utils/Crossfeed.cpp (100%) rename src/{ => cpp}/utils/Crossfeed.h (100%) rename src/{ => cpp}/utils/DepthSurround.cpp (100%) rename src/{ => cpp}/utils/DepthSurround.h (100%) rename src/{ => cpp}/utils/DynamicBass.cpp (100%) rename src/{ => cpp}/utils/DynamicBass.h (100%) rename src/{ => cpp}/utils/FixedBiquad.cpp (100%) rename src/{ => cpp}/utils/FixedBiquad.h (100%) create mode 100644 src/cpp/utils/Harmonic.cpp rename src/{ => cpp}/utils/Harmonic.h (100%) rename src/{ => cpp}/utils/HiFi.cpp (100%) rename src/{ => cpp}/utils/HiFi.h (100%) rename src/{ => cpp}/utils/HighShelf.cpp (94%) rename src/{ => cpp}/utils/HighShelf.h (100%) rename src/{ => cpp}/utils/IIR_1st.cpp (100%) rename src/{ => cpp}/utils/IIR_1st.h (100%) rename src/{ => cpp}/utils/IIR_NOrder_BW_BP.cpp (100%) rename src/{ => cpp}/utils/IIR_NOrder_BW_BP.h (100%) rename src/{ => cpp}/utils/IIR_NOrder_BW_LH.cpp (100%) rename src/{ => cpp}/utils/IIR_NOrder_BW_LH.h (100%) rename src/{ => cpp}/utils/MultiBiquad.cpp (100%) rename src/{ => cpp}/utils/MultiBiquad.h (100%) rename src/{ => cpp}/utils/NoiseSharpening.cpp (100%) rename src/{ => cpp}/utils/NoiseSharpening.h (100%) rename src/{ => cpp}/utils/PConvSingle_F32.cpp (94%) rename src/{ => cpp}/utils/PConvSingle_F32.h (100%) rename src/{ => cpp}/utils/PassFilter.cpp (100%) rename src/{ => cpp}/utils/PassFilter.h (100%) rename src/{ => cpp}/utils/PolesFilter.cpp (100%) rename src/{ => cpp}/utils/PolesFilter.h (100%) rename src/{ => cpp}/utils/Subwoofer.cpp (100%) rename src/{ => cpp}/utils/Subwoofer.h (100%) rename src/{ => cpp}/utils/TimeConstDelay.cpp (100%) rename src/{ => cpp}/utils/TimeConstDelay.h (100%) rename src/{ => cpp}/utils/WaveBuffer_I32.cpp (100%) rename src/{ => cpp}/utils/WaveBuffer_I32.h (100%) rename src/{ => cpp}/viper.cpp (99%) rename src/{ => cpp}/viper.h (100%) rename include/hardware/audio_effect.h => src/include/essential.h (61%) create mode 100644 src/main/AndroidManifest.xml delete mode 100644 src/utils/Harmonic.cpp diff --git a/.gitignore b/.gitignore index 5a4aa85..043503b 100644 --- a/.gitignore +++ b/.gitignore @@ -141,3 +141,9 @@ compile_commands.json CTestTestfile.cmake _deps *.cbp + +### Gradle +local.properties +.gradle/ +build/ +.cxx/ diff --git a/CMakeLists.txt b/CMakeLists.txt index 0e96305..fc3b6d7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,10 +1,10 @@ -cmake_minimum_required(VERSION 3.19) +cmake_minimum_required(VERSION 3.18.1) project("ViPER4Android Reworked") set(CMAKE_CXX_COMPILER_VERSION 20) -include_directories(include/) +include_directories(src/include/) add_compile_definitions(VERSION_MAJOR=1) add_compile_definitions(VERSION_MINOR=0) @@ -14,56 +14,57 @@ add_compile_definitions(VERSION_CODENAME="Reworked") set(FILES # Main - src/Effect.cpp - src/ProcessUnit_FX.cpp - src/viper.cpp + src/cpp/Effect.cpp + src/cpp/ProcessUnit_FX.cpp + src/cpp/viper.cpp # Effects - src/effects/AnalogX.cpp - src/effects/Cure.cpp - src/effects/DiffSurround.cpp - src/effects/DynamicSystem.cpp - src/effects/Reverberation.cpp - src/effects/SpeakerCorrection.cpp - src/effects/SpectrumExtend.cpp - src/effects/TubeSimulator.cpp - src/effects/VHE.cpp - src/effects/ViPERClarity.cpp + src/cpp/effects/AnalogX.cpp + src/cpp/effects/Cure.cpp + src/cpp/effects/DiffSurround.cpp + src/cpp/effects/DynamicSystem.cpp + src/cpp/effects/Reverberation.cpp + src/cpp/effects/SpeakerCorrection.cpp + src/cpp/effects/SpectrumExtend.cpp + src/cpp/effects/TubeSimulator.cpp + src/cpp/effects/VHE.cpp + src/cpp/effects/ViPERClarity.cpp # Utils - src/utils/CAllpassFilter.cpp - src/utils/CCombFilter.cpp - src/utils/CRevModel.cpp - src/utils/Crossfeed.cpp - src/utils/DepthSurround.cpp - src/utils/DynamicBass.cpp - src/utils/FixedBiquad.cpp - src/utils/Harmonic.cpp - src/utils/HiFi.cpp - src/utils/HighShelf.cpp - src/utils/IIR_1st.cpp - src/utils/IIR_NOrder_BW_BP.cpp - src/utils/IIR_NOrder_BW_LH.cpp - src/utils/MultiBiquad.cpp - src/utils/NoiseSharpening.cpp - src/utils/PassFilter.cpp - src/utils/PConvSingle_F32.cpp - src/utils/PolesFilter.cpp - src/utils/Subwoofer.cpp - src/utils/TimeConstDelay.cpp - src/utils/WaveBuffer_I32.cpp) + src/cpp/utils/CAllpassFilter.cpp + src/cpp/utils/CCombFilter.cpp + src/cpp/utils/CRevModel.cpp + src/cpp/utils/Crossfeed.cpp + src/cpp/utils/DepthSurround.cpp + src/cpp/utils/DynamicBass.cpp + src/cpp/utils/FixedBiquad.cpp + src/cpp/utils/Harmonic.cpp + src/cpp/utils/HiFi.cpp + src/cpp/utils/HighShelf.cpp + src/cpp/utils/IIR_1st.cpp + src/cpp/utils/IIR_NOrder_BW_BP.cpp + src/cpp/utils/IIR_NOrder_BW_LH.cpp + src/cpp/utils/MultiBiquad.cpp + src/cpp/utils/NoiseSharpening.cpp + src/cpp/utils/PassFilter.cpp + src/cpp/utils/PConvSingle_F32.cpp + src/cpp/utils/PolesFilter.cpp + src/cpp/utils/Subwoofer.cpp + src/cpp/utils/TimeConstDelay.cpp + src/cpp/utils/WaveBuffer_I32.cpp) + +message(${CMAKE_BUILD_TYPE}) + add_library( # Sets the name of the library. v4afx_r - # Sets the library as a shared library. + # Sets the library as a shared library. SHARED # Provides a relative path to your source file(s). ${FILES}) -target_link_libraries( - v4afx_r - log -) +find_library(log-lib log) +target_link_libraries(v4afx_r ${log-lib}) diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 0000000..2240e0a --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,36 @@ +plugins { + id("com.android.application") version "7.0.3" +} + +repositories { + google() + mavenCentral() +} + +android { + compileSdk = 23 + ndkVersion = "23.1.7779620" + + externalNativeBuild { + cmake { + version = "3.21.3" + path = file("CMakeLists.txt") + } + } + + defaultConfig { + externalNativeBuild { + cmake { + arguments += listOf("-DANDROID_ARM_NEON=ON", "-DANDROID_TOOLCHAIN=clang") + cFlags += listOf("-D__STDC_FORMAT_MACROS") + cppFlags += listOf("-fexceptions", "-frtti") + } + } + + ndk { + abiFilters += listOf("armeabi-v7a","arm64-v8a","x86","x86_64") +// abiFilters += listOf("x86", "armeabi-v7a") +// abiFilters += listOf("x86", "x86_64", "armeabi", "armeabi-v7a", "arm64-v8a") + } + } +} diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..9650bbc --- /dev/null +++ b/gradle.properties @@ -0,0 +1,4 @@ +org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 +android.useAndroidX=true +android.enableJetifier=true +kotlin.code.style=official diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..e708b1c023ec8b20f512888fe07c5bd3ff77bb8f GIT binary patch literal 59203 zcma&O1CT9Y(k9%tZQHhO+qUh#ZQHhO+qmuS+qP|E@9xZO?0h@l{(r>DQ>P;GjjD{w zH}lENr;dU&FbEU?00aa80D$0M0RRB{U*7-#kbjS|qAG&4l5%47zyJ#WrfA#1$1Ctx zf&Z_d{GW=lf^w2#qRJ|CvSJUi(^E3iv~=^Z(zH}F)3Z%V3`@+rNB7gTVU{Bb~90p|f+0(v;nz01EG7yDMX9@S~__vVgv%rS$+?IH+oZ03D5zYrv|^ zC1J)SruYHmCki$jLBlTaE5&dFG9-kq3!^i>^UQL`%gn6)jz54$WDmeYdsBE9;PqZ_ zoGd=P4+|(-u4U1dbAVQrFWoNgNd;0nrghPFbQrJctO>nwDdI`Q^i0XJDUYm|T|RWc zZ3^Qgo_Qk$%Fvjj-G}1NB#ZJqIkh;kX%V{THPqOyiq)d)0+(r9o(qKlSp*hmK#iIY zA^)Vr$-Hz<#SF=0@tL@;dCQsm`V9s1vYNq}K1B)!XSK?=I1)tX+bUV52$YQu*0%fnWEukW>mxkz+%3-S!oguE8u#MGzST8_Dy^#U?fA@S#K$S@9msUiX!gd_ow>08w5)nX{-KxqMOo7d?k2&?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W`gxE5T>C#E|{i<1D35C222I33?Njaz`On7 zi<+VWFP6D{e-{yiN#M|Jgk<44u1TiMI78S5W`Sdb5f+{zu34s{CfWN7a3Cf^@L%!& zN$?|!!9j2c)j$~+R6n#891w-z8(!oBpL2K=+%a$r2|~8-(vQj5_XT`<0Ksf;oP+tz z9CObS!0m)Tgg`K#xBM8B(|Z)Wb&DYL{WTYv`;A=q6~Nnx2+!lTIXtj8J7dZE!P_{z z#f8w6F}^!?^KE#+ZDv+xd5O&3EmomZzsv?>E-~ygGum45fk!SBN&|eo1rKw^?aZJ4 E2O(~oYXATM literal 0 HcmV?d00001 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..0f80bbf --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew new file mode 100755 index 0000000..4f906e0 --- /dev/null +++ b/gradlew @@ -0,0 +1,185 @@ +#!/usr/bin/env sh + +# +# Copyright 2015 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=`expr $i + 1` + done + case $i in + 0) set -- ;; + 1) set -- "$args0" ;; + 2) set -- "$args0" "$args1" ;; + 3) set -- "$args0" "$args1" "$args2" ;; + 4) set -- "$args0" "$args1" "$args2" "$args3" ;; + 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=`save "$@"` + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 0000000..ac1b06f --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,89 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/include/hardware/audio_policy.h b/include/hardware/audio_policy.h deleted file mode 100644 index 3c0cd4c..0000000 --- a/include/hardware/audio_policy.h +++ /dev/null @@ -1,461 +0,0 @@ -/* - * Copyright (C) 2011 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -#ifndef ANDROID_AUDIO_POLICY_INTERFACE_H -#define ANDROID_AUDIO_POLICY_INTERFACE_H - -#include -#include -#include - -#include - -#include "system/audio.h" -#include "system/audio_policy.h" - -__BEGIN_DECLS - -/** - * The id of this module - */ -#define AUDIO_POLICY_HARDWARE_MODULE_ID "audio_policy" - -/** - * Name of the audio devices to open - */ -#define AUDIO_POLICY_INTERFACE "policy" - -/* ---------------------------------------------------------------------------- */ - -/* - * The audio_policy and audio_policy_service_ops structs define the - * communication interfaces between the platform specific audio policy manager - * and Android generic audio policy manager. - * The platform specific audio policy manager must implement methods of the - * audio_policy struct. - * This implementation makes use of the audio_policy_service_ops to control - * the activity and configuration of audio input and output streams. - * - * The platform specific audio policy manager is in charge of the audio - * routing and volume control policies for a given platform. - * The main roles of this module are: - * - keep track of current system state (removable device connections, phone - * state, user requests...). - * System state changes and user actions are notified to audio policy - * manager with methods of the audio_policy. - * - * - process get_output() queries received when AudioTrack objects are - * created: Those queries return a handler on an output that has been - * selected, configured and opened by the audio policy manager and that - * must be used by the AudioTrack when registering to the AudioFlinger - * with the createTrack() method. - * When the AudioTrack object is released, a release_output() query - * is received and the audio policy manager can decide to close or - * reconfigure the output depending on other streams using this output and - * current system state. - * - * - similarly process get_input() and release_input() queries received from - * AudioRecord objects and configure audio inputs. - * - process volume control requests: the stream volume is converted from - * an index value (received from UI) to a float value applicable to each - * output as a function of platform specific settings and current output - * route (destination device). It also make sure that streams are not - * muted if not allowed (e.g. camera shutter sound in some countries). - */ - -/* XXX: this should be defined OUTSIDE of frameworks/base */ -struct effect_descriptor_s; - -struct audio_policy -{ - /* - * configuration functions - */ - - /* indicate a change in device connection status */ - int (*set_device_connection_state)(struct audio_policy *pol, - audio_devices_t device, - audio_policy_dev_state_t state, - const char *device_address); - - /* retrieve a device connection status */ - audio_policy_dev_state_t (*get_device_connection_state)( - const struct audio_policy *pol, - audio_devices_t device, - const char *device_address); - - /* indicate a change in phone state. Valid phones states are defined - * by audio_mode_t */ - void (*set_phone_state)(struct audio_policy *pol, audio_mode_t state); - - /* deprecated, never called (was "indicate a change in ringer mode") */ - void (*set_ringer_mode)(struct audio_policy *pol, uint32_t mode, - uint32_t mask); - - /* force using a specific device category for the specified usage */ - void (*set_force_use)(struct audio_policy *pol, - audio_policy_force_use_t usage, - audio_policy_forced_cfg_t config); - - /* retrieve current device category forced for a given usage */ - audio_policy_forced_cfg_t (*get_force_use)(const struct audio_policy *pol, - audio_policy_force_use_t usage); - - /* if can_mute is true, then audio streams that are marked ENFORCED_AUDIBLE - * can still be muted. */ - void (*set_can_mute_enforced_audible)(struct audio_policy *pol, - bool can_mute); - - /* check proper initialization */ - int (*init_check)(const struct audio_policy *pol); - - /* - * Audio routing query functions - */ - - /* request an output appropriate for playback of the supplied stream type and - * parameters */ - audio_io_handle_t (*get_output)(struct audio_policy *pol, - audio_stream_type_t stream, - uint32_t samplingRate, - audio_format_t format, - audio_channel_mask_t channelMask, - audio_output_flags_t flags, - const audio_offload_info_t *offloadInfo); - - /* indicates to the audio policy manager that the output starts being used - * by corresponding stream. */ - int (*start_output)(struct audio_policy *pol, - audio_io_handle_t output, - audio_stream_type_t stream, - int session); - - /* indicates to the audio policy manager that the output stops being used - * by corresponding stream. */ - int (*stop_output)(struct audio_policy *pol, - audio_io_handle_t output, - audio_stream_type_t stream, - int session); - - /* releases the output. */ - void (*release_output)(struct audio_policy *pol, audio_io_handle_t output); - - /* request an input appropriate for record from the supplied device with - * supplied parameters. */ - audio_io_handle_t (*get_input)(struct audio_policy *pol, audio_source_t inputSource, - uint32_t samplingRate, - audio_format_t format, - audio_channel_mask_t channelMask, - audio_in_acoustics_t acoustics); - - /* indicates to the audio policy manager that the input starts being used */ - int (*start_input)(struct audio_policy *pol, audio_io_handle_t input); - - /* indicates to the audio policy manager that the input stops being used. */ - int (*stop_input)(struct audio_policy *pol, audio_io_handle_t input); - - /* releases the input. */ - void (*release_input)(struct audio_policy *pol, audio_io_handle_t input); - - /* - * volume control functions - */ - - /* initialises stream volume conversion parameters by specifying volume - * index range. The index range for each stream is defined by AudioService. */ - void (*init_stream_volume)(struct audio_policy *pol, - audio_stream_type_t stream, - int index_min, - int index_max); - - /* sets the new stream volume at a level corresponding to the supplied - * index. The index is within the range specified by init_stream_volume() */ - int (*set_stream_volume_index)(struct audio_policy *pol, - audio_stream_type_t stream, - int index); - - /* retrieve current volume index for the specified stream */ - int (*get_stream_volume_index)(const struct audio_policy *pol, - audio_stream_type_t stream, - int *index); - - /* sets the new stream volume at a level corresponding to the supplied - * index for the specified device. - * The index is within the range specified by init_stream_volume() */ - int (*set_stream_volume_index_for_device)(struct audio_policy *pol, - audio_stream_type_t stream, - int index, - audio_devices_t device); - - /* retrieve current volume index for the specified stream for the specified device */ - int (*get_stream_volume_index_for_device)(const struct audio_policy *pol, - audio_stream_type_t stream, - int *index, - audio_devices_t device); - - /* return the strategy corresponding to a given stream type */ - uint32_t (*get_strategy_for_stream)(const struct audio_policy *pol, - audio_stream_type_t stream); - - /* return the enabled output devices for the given stream type */ - audio_devices_t (*get_devices_for_stream)(const struct audio_policy *pol, - audio_stream_type_t stream); - - /* Audio effect management */ - audio_io_handle_t (*get_output_for_effect)(struct audio_policy *pol, - const struct effect_descriptor_s *desc); - - int (*register_effect)(struct audio_policy *pol, - const struct effect_descriptor_s *desc, - audio_io_handle_t output, - uint32_t strategy, - int session, - int id); - - int (*unregister_effect)(struct audio_policy *pol, int id); - - int (*set_effect_enabled)(struct audio_policy *pol, int id, bool enabled); - - bool (*is_stream_active)(const struct audio_policy *pol, - audio_stream_type_t stream, - uint32_t in_past_ms); - - bool (*is_stream_active_remotely)(const struct audio_policy *pol, - audio_stream_type_t stream, - uint32_t in_past_ms); - - bool (*is_source_active)(const struct audio_policy *pol, - audio_source_t source); - - /* dump state */ - int (*dump)(const struct audio_policy *pol, int fd); - - /* check if offload is possible for given sample rate, bitrate, duration, ... */ - bool (*is_offload_supported)(const struct audio_policy *pol, - const audio_offload_info_t *info); -}; - - -struct audio_policy_service_ops -{ - /* - * Audio output Control functions - */ - - /* Opens an audio output with the requested parameters. - * - * The parameter values can indicate to use the default values in case the - * audio policy manager has no specific requirements for the output being - * opened. - * - * When the function returns, the parameter values reflect the actual - * values used by the audio hardware output stream. - * - * The audio policy manager can check if the proposed parameters are - * suitable or not and act accordingly. - */ - audio_io_handle_t (*open_output)(void *service, - audio_devices_t *pDevices, - uint32_t *pSamplingRate, - audio_format_t *pFormat, - audio_channel_mask_t *pChannelMask, - uint32_t *pLatencyMs, - audio_output_flags_t flags); - - /* creates a special output that is duplicated to the two outputs passed as - * arguments. The duplication is performed by - * a special mixer thread in the AudioFlinger. - */ - audio_io_handle_t (*open_duplicate_output)(void *service, - audio_io_handle_t output1, - audio_io_handle_t output2); - - /* closes the output stream */ - int (*close_output)(void *service, audio_io_handle_t output); - - /* suspends the output. - * - * When an output is suspended, the corresponding audio hardware output - * stream is placed in standby and the AudioTracks attached to the mixer - * thread are still processed but the output mix is discarded. - */ - int (*suspend_output)(void *service, audio_io_handle_t output); - - /* restores a suspended output. */ - int (*restore_output)(void *service, audio_io_handle_t output); - - /* */ - /* Audio input Control functions */ - /* */ - - /* opens an audio input - * deprecated - new implementations should use open_input_on_module, - * and the acoustics parameter is ignored - */ - audio_io_handle_t (*open_input)(void *service, - audio_devices_t *pDevices, - uint32_t *pSamplingRate, - audio_format_t *pFormat, - audio_channel_mask_t *pChannelMask, - audio_in_acoustics_t acoustics); - - /* closes an audio input */ - int (*close_input)(void *service, audio_io_handle_t input); - - /* */ - /* misc control functions */ - /* */ - - /* set a stream volume for a particular output. - * - * For the same user setting, a given stream type can have different - * volumes for each output (destination device) it is attached to. - */ - int (*set_stream_volume)(void *service, - audio_stream_type_t stream, - float volume, - audio_io_handle_t output, - int delay_ms); - - /* invalidate a stream type, causing a reroute to an unspecified new output */ - int (*invalidate_stream)(void *service, - audio_stream_type_t stream); - - /* function enabling to send proprietary informations directly from audio - * policy manager to audio hardware interface. */ - void (*set_parameters)(void *service, - audio_io_handle_t io_handle, - const char *kv_pairs, - int delay_ms); - - /* function enabling to receive proprietary informations directly from - * audio hardware interface to audio policy manager. - * - * Returns a pointer to a heap allocated string. The caller is responsible - * for freeing the memory for it using free(). - */ - - char * (*get_parameters)(void *service, audio_io_handle_t io_handle, - const char *keys); - - /* request the playback of a tone on the specified stream. - * used for instance to replace notification sounds when playing over a - * telephony device during a phone call. - */ - int (*start_tone)(void *service, - audio_policy_tone_t tone, - audio_stream_type_t stream); - - int (*stop_tone)(void *service); - - /* set down link audio volume. */ - int (*set_voice_volume)(void *service, - float volume, - int delay_ms); - - /* move effect to the specified output */ - int (*move_effects)(void *service, - int session, - audio_io_handle_t src_output, - audio_io_handle_t dst_output); - - /* loads an audio hw module. - * - * The module name passed is the base name of the HW module library, e.g "primary" or "a2dp". - * The function returns a handle on the module that will be used to specify a particular - * module when calling open_output_on_module() or open_input_on_module() - */ - audio_module_handle_t (*load_hw_module)(void *service, - const char *name); - - /* Opens an audio output on a particular HW module. - * - * Same as open_output() but specifying a specific HW module on which the output must be opened. - */ - audio_io_handle_t (*open_output_on_module)(void *service, - audio_module_handle_t module, - audio_devices_t *pDevices, - uint32_t *pSamplingRate, - audio_format_t *pFormat, - audio_channel_mask_t *pChannelMask, - uint32_t *pLatencyMs, - audio_output_flags_t flags, - const audio_offload_info_t *offloadInfo); - - /* Opens an audio input on a particular HW module. - * - * Same as open_input() but specifying a specific HW module on which the input must be opened. - * Also removed deprecated acoustics parameter - */ - audio_io_handle_t (*open_input_on_module)(void *service, - audio_module_handle_t module, - audio_devices_t *pDevices, - uint32_t *pSamplingRate, - audio_format_t *pFormat, - audio_channel_mask_t *pChannelMask); - -}; - -/**********************************************************************/ - -/** - * Every hardware module must have a data structure named HAL_MODULE_INFO_SYM - * and the fields of this data structure must begin with hw_module_t - * followed by module specific information. - */ -typedef struct audio_policy_module -{ - struct hw_module_t common; -} audio_policy_module_t; - -struct audio_policy_device -{ - /** - * Common methods of the audio policy device. This *must* be the first member of - * audio_policy_device as users of this structure will cast a hw_device_t to - * audio_policy_device pointer in contexts where it's known the hw_device_t references an - * audio_policy_device. - */ - struct hw_device_t common; - - int (*create_audio_policy)(const struct audio_policy_device *device, - struct audio_policy_service_ops *aps_ops, - void *service, - struct audio_policy **ap); - - int (*destroy_audio_policy)(const struct audio_policy_device *device, - struct audio_policy *ap); -}; - -/** convenience API for opening and closing a supported device */ - -static inline int audio_policy_dev_open(const hw_module_t* module, - struct audio_policy_device** device) -{ - return module->methods->open(module, AUDIO_POLICY_INTERFACE, - (hw_device_t**)device); -} - -static inline int audio_policy_dev_close(struct audio_policy_device* device) -{ - return device->common.close(&device->common); -} - - -__END_DECLS - -#endif // ANDROID_AUDIO_POLICY_INTERFACE_H diff --git a/include/hardware/hardware.h b/include/hardware/hardware.h deleted file mode 100644 index d6ac1d6..0000000 --- a/include/hardware/hardware.h +++ /dev/null @@ -1,241 +0,0 @@ -/* - * Copyright (C) 2008 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef ANDROID_INCLUDE_HARDWARE_HARDWARE_H -#define ANDROID_INCLUDE_HARDWARE_HARDWARE_H - -#include -#include - -#include "system/cutils/native_handle.h" -//#include "system/graphics.h" - -__BEGIN_DECLS - -/* - * Value for the hw_module_t.tag field - */ - -#define MAKE_TAG_CONSTANT(A,B,C,D) (((A) << 24) | ((B) << 16) | ((C) << 8) | (D)) - -#define HARDWARE_MODULE_TAG MAKE_TAG_CONSTANT('H', 'W', 'M', 'T') -#define HARDWARE_DEVICE_TAG MAKE_TAG_CONSTANT('H', 'W', 'D', 'T') - -#define HARDWARE_MAKE_API_VERSION(maj,min) \ - ((((maj) & 0xff) << 8) | ((min) & 0xff)) - -#define HARDWARE_MAKE_API_VERSION_2(maj,min,hdr) \ - ((((maj) & 0xff) << 24) | (((min) & 0xff) << 16) | ((hdr) & 0xffff)) -#define HARDWARE_API_VERSION_2_MAJ_MIN_MASK 0xffff0000 -#define HARDWARE_API_VERSION_2_HEADER_MASK 0x0000ffff - - -/* - * The current HAL API version. - * - * All module implementations must set the hw_module_t.hal_api_version field - * to this value when declaring the module with HAL_MODULE_INFO_SYM. - * - * Note that previous implementations have always set this field to 0. - * Therefore, libhardware HAL API will always consider versions 0.0 and 1.0 - * to be 100% binary compatible. - * - */ -#define HARDWARE_HAL_API_VERSION HARDWARE_MAKE_API_VERSION(1, 0) - -/* - * Helper macros for module implementors. - * - * The derived modules should provide convenience macros for supported - * versions so that implementations can explicitly specify module/device - * versions at definition time. - * - * Use this macro to set the hw_module_t.module_api_version field. - */ -#define HARDWARE_MODULE_API_VERSION(maj,min) HARDWARE_MAKE_API_VERSION(maj,min) -#define HARDWARE_MODULE_API_VERSION_2(maj,min,hdr) HARDWARE_MAKE_API_VERSION_2(maj,min,hdr) - -/* - * Use this macro to set the hw_device_t.version field - */ -#define HARDWARE_DEVICE_API_VERSION(maj,min) HARDWARE_MAKE_API_VERSION(maj,min) -#define HARDWARE_DEVICE_API_VERSION_2(maj,min,hdr) HARDWARE_MAKE_API_VERSION_2(maj,min,hdr) - -struct hw_module_t; -struct hw_module_methods_t; -struct hw_device_t; - -/** - * Every hardware module must have a data structure named HAL_MODULE_INFO_SYM - * and the fields of this data structure must begin with hw_module_t - * followed by module specific information. - */ -typedef struct hw_module_t -{ - /** tag must be initialized to HARDWARE_MODULE_TAG */ - uint32_t tag; - - /** - * The API version of the implemented module. The module owner is - * responsible for updating the version when a module interface has - * changed. - * - * The derived modules such as gralloc and audio own and manage this field. - * The module user must interpret the version field to decide whether or - * not to inter-operate with the supplied module implementation. - * For example, SurfaceFlinger is responsible for making sure that - * it knows how to manage different versions of the gralloc-module API, - * and AudioFlinger must know how to do the same for audio-module API. - * - * The module API version should include a major and a minor component. - * For example, version 1.0 could be represented as 0x0100. This format - * implies that versions 0x0100-0x01ff are all API-compatible. - * - * In the future, libhardware will expose a hw_get_module_version() - * (or equivalent) function that will take minimum/maximum supported - * versions as arguments and would be able to reject modules with - * versions outside of the supplied range. - */ - uint16_t module_api_version; -#define version_major module_api_version - /** - * version_major/version_minor defines are supplied here for temporary - * source code compatibility. They will be removed in the next version. - * ALL clients must convert to the new version format. - */ - - /** - * The API version of the HAL module interface. This is meant to - * version the hw_module_t, hw_module_methods_t, and hw_device_t - * structures and definitions. - * - * The HAL interface owns this field. Module users/implementations - * must NOT rely on this value for version information. - * - * Presently, 0 is the only valid value. - */ - uint16_t hal_api_version; -#define version_minor hal_api_version - - /** Identifier of module */ - const char *id; - - /** Name of this module */ - const char *name; - - /** Author/owner/implementor of the module */ - const char *author; - - /** Modules methods */ - struct hw_module_methods_t* methods; - - /** module's dso */ - void* dso; - -#ifdef __LP64__ - uint64_t reserved[32-7]; -#else - /** padding to 128 bytes, reserved for future use */ - uint32_t reserved[32-7]; -#endif - -} hw_module_t; - -typedef struct hw_module_methods_t -{ - /** Open a specific device */ - int (*open)(const struct hw_module_t* module, const char* id, - struct hw_device_t** device); - -} hw_module_methods_t; - -/** - * Every device data structure must begin with hw_device_t - * followed by module specific public methods and attributes. - */ -typedef struct hw_device_t -{ - /** tag must be initialized to HARDWARE_DEVICE_TAG */ - uint32_t tag; - - /** - * Version of the module-specific device API. This value is used by - * the derived-module user to manage different device implementations. - * - * The module user is responsible for checking the module_api_version - * and device version fields to ensure that the user is capable of - * communicating with the specific module implementation. - * - * One module can support multiple devices with different versions. This - * can be useful when a device interface changes in an incompatible way - * but it is still necessary to support older implementations at the same - * time. One such example is the Camera 2.0 API. - * - * This field is interpreted by the module user and is ignored by the - * HAL interface itself. - */ - uint32_t version; - - /** reference to the module this device belongs to */ - struct hw_module_t* module; - - /** padding reserved for future use */ -#ifdef __LP64__ - uint64_t reserved[12]; -#else - uint32_t reserved[12]; -#endif - - /** Close this device */ - int (*close)(struct hw_device_t* device); - -} hw_device_t; - -/** - * Name of the hal_module_info - */ -#define HAL_MODULE_INFO_SYM HMI - -/** - * Name of the hal_module_info as a string - */ -#define HAL_MODULE_INFO_SYM_AS_STR "HMI" - -/** - * Get the module info associated with a module by id. - * - * @return: 0 == success, <0 == error and *module == NULL - */ -int hw_get_module(const char *id, const struct hw_module_t **module); - -/** - * Get the module info associated with a module instance by class 'class_id' - * and instance 'inst'. - * - * Some modules types necessitate multiple instances. For example audio supports - * multiple concurrent interfaces and thus 'audio' is the module class - * and 'primary' or 'a2dp' are module interfaces. This implies that the files - * providing these modules would be named audio.primary..so and - * audio.a2dp..so - * - * @return: 0 == success, <0 == error and *module == NULL - */ -int hw_get_module_by_class(const char *class_id, const char *inst, - const struct hw_module_t **module); - -__END_DECLS - -#endif /* ANDROID_INCLUDE_HARDWARE_HARDWARE_H */ diff --git a/include/hardware/system/audio-base-utils.h b/include/hardware/system/audio-base-utils.h deleted file mode 100644 index 016a085..0000000 --- a/include/hardware/system/audio-base-utils.h +++ /dev/null @@ -1,177 +0,0 @@ -/* - * Copyright (C) 2018 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef ANDROID_AUDIO_BASE_UTILS_H -#define ANDROID_AUDIO_BASE_UTILS_H - -#include "audio-base.h" - -/** Define helper values to iterate over enum, extend them or checking value validity. - * Those values are compatible with the O corresponding enum values. - * They are not macro like similar values in audio.h to avoid conflicting - * with the libhardware_legacy audio.h. - */ -enum { - /** Number of audio stream available to vendors. */ - AUDIO_STREAM_PUBLIC_CNT = AUDIO_STREAM_ACCESSIBILITY + 1, - -#ifndef AUDIO_NO_SYSTEM_DECLARATIONS - /** Total number of stream handled by the policy*/ - AUDIO_STREAM_FOR_POLICY_CNT= AUDIO_STREAM_REROUTING + 1, -#endif - - /** Total number of stream. */ - AUDIO_STREAM_CNT = AUDIO_STREAM_PATCH + 1, - - AUDIO_SOURCE_MAX = AUDIO_SOURCE_UNPROCESSED, - AUDIO_SOURCE_CNT = AUDIO_SOURCE_MAX + 1, - - AUDIO_MODE_MAX = AUDIO_MODE_IN_COMMUNICATION, - AUDIO_MODE_CNT = AUDIO_MODE_MAX + 1, - - /** For retrocompatibility AUDIO_MODE_* and AUDIO_STREAM_* must be signed. */ - AUDIO_DETAIL_NEGATIVE_VALUE = -1, -}; - -enum { - AUDIO_CHANNEL_OUT_ALL = AUDIO_CHANNEL_OUT_FRONT_LEFT | - AUDIO_CHANNEL_OUT_FRONT_RIGHT | - AUDIO_CHANNEL_OUT_FRONT_CENTER | - AUDIO_CHANNEL_OUT_LOW_FREQUENCY | - AUDIO_CHANNEL_OUT_BACK_LEFT | - AUDIO_CHANNEL_OUT_BACK_RIGHT | - AUDIO_CHANNEL_OUT_FRONT_LEFT_OF_CENTER | - AUDIO_CHANNEL_OUT_FRONT_RIGHT_OF_CENTER | - AUDIO_CHANNEL_OUT_BACK_CENTER | - AUDIO_CHANNEL_OUT_SIDE_LEFT | - AUDIO_CHANNEL_OUT_SIDE_RIGHT | - AUDIO_CHANNEL_OUT_TOP_CENTER | - AUDIO_CHANNEL_OUT_TOP_FRONT_LEFT | - AUDIO_CHANNEL_OUT_TOP_FRONT_CENTER | - AUDIO_CHANNEL_OUT_TOP_FRONT_RIGHT | - AUDIO_CHANNEL_OUT_TOP_BACK_LEFT | - AUDIO_CHANNEL_OUT_TOP_BACK_CENTER | - AUDIO_CHANNEL_OUT_TOP_BACK_RIGHT | - AUDIO_CHANNEL_OUT_TOP_SIDE_LEFT | - AUDIO_CHANNEL_OUT_TOP_SIDE_RIGHT, - - AUDIO_CHANNEL_IN_ALL = AUDIO_CHANNEL_IN_LEFT | - AUDIO_CHANNEL_IN_RIGHT | - AUDIO_CHANNEL_IN_FRONT | - AUDIO_CHANNEL_IN_BACK| - AUDIO_CHANNEL_IN_LEFT_PROCESSED | - AUDIO_CHANNEL_IN_RIGHT_PROCESSED | - AUDIO_CHANNEL_IN_FRONT_PROCESSED | - AUDIO_CHANNEL_IN_BACK_PROCESSED| - AUDIO_CHANNEL_IN_PRESSURE | - AUDIO_CHANNEL_IN_X_AXIS | - AUDIO_CHANNEL_IN_Y_AXIS | - AUDIO_CHANNEL_IN_Z_AXIS | - AUDIO_CHANNEL_IN_VOICE_UPLINK | - AUDIO_CHANNEL_IN_VOICE_DNLINK | - AUDIO_CHANNEL_IN_BACK_LEFT | - AUDIO_CHANNEL_IN_BACK_RIGHT | - AUDIO_CHANNEL_IN_CENTER | - AUDIO_CHANNEL_IN_LOW_FREQUENCY | - AUDIO_CHANNEL_IN_TOP_LEFT | - AUDIO_CHANNEL_IN_TOP_RIGHT, - - AUDIO_DEVICE_OUT_ALL = AUDIO_DEVICE_OUT_EARPIECE | - AUDIO_DEVICE_OUT_SPEAKER | - AUDIO_DEVICE_OUT_WIRED_HEADSET | - AUDIO_DEVICE_OUT_WIRED_HEADPHONE | - AUDIO_DEVICE_OUT_BLUETOOTH_SCO | - AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET | - AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT | - AUDIO_DEVICE_OUT_BLUETOOTH_A2DP | - AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES | - AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER | - AUDIO_DEVICE_OUT_HDMI | - AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET | - AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET | - AUDIO_DEVICE_OUT_USB_ACCESSORY | - AUDIO_DEVICE_OUT_USB_DEVICE | - AUDIO_DEVICE_OUT_REMOTE_SUBMIX | - AUDIO_DEVICE_OUT_TELEPHONY_TX | - AUDIO_DEVICE_OUT_LINE | - AUDIO_DEVICE_OUT_HDMI_ARC | - AUDIO_DEVICE_OUT_SPDIF | - AUDIO_DEVICE_OUT_FM | - AUDIO_DEVICE_OUT_AUX_LINE | - AUDIO_DEVICE_OUT_SPEAKER_SAFE | - AUDIO_DEVICE_OUT_IP | - AUDIO_DEVICE_OUT_BUS | - AUDIO_DEVICE_OUT_PROXY | - AUDIO_DEVICE_OUT_USB_HEADSET | - AUDIO_DEVICE_OUT_HEARING_AID | - AUDIO_DEVICE_OUT_ECHO_CANCELLER | - AUDIO_DEVICE_OUT_DEFAULT, - - AUDIO_DEVICE_OUT_ALL_A2DP = AUDIO_DEVICE_OUT_BLUETOOTH_A2DP | - AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES | - AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER, - - AUDIO_DEVICE_OUT_ALL_SCO = AUDIO_DEVICE_OUT_BLUETOOTH_SCO | - AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET | - AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT, - - AUDIO_DEVICE_OUT_ALL_USB = AUDIO_DEVICE_OUT_USB_ACCESSORY | - AUDIO_DEVICE_OUT_USB_DEVICE | - AUDIO_DEVICE_OUT_USB_HEADSET, - - AUDIO_DEVICE_IN_ALL = AUDIO_DEVICE_IN_COMMUNICATION | - AUDIO_DEVICE_IN_AMBIENT | - AUDIO_DEVICE_IN_BUILTIN_MIC | - AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET | - AUDIO_DEVICE_IN_WIRED_HEADSET | - AUDIO_DEVICE_IN_HDMI | - AUDIO_DEVICE_IN_TELEPHONY_RX | - AUDIO_DEVICE_IN_BACK_MIC | - AUDIO_DEVICE_IN_REMOTE_SUBMIX | - AUDIO_DEVICE_IN_ANLG_DOCK_HEADSET | - AUDIO_DEVICE_IN_DGTL_DOCK_HEADSET | - AUDIO_DEVICE_IN_USB_ACCESSORY | - AUDIO_DEVICE_IN_USB_DEVICE | - AUDIO_DEVICE_IN_FM_TUNER | - AUDIO_DEVICE_IN_TV_TUNER | - AUDIO_DEVICE_IN_LINE | - AUDIO_DEVICE_IN_SPDIF | - AUDIO_DEVICE_IN_BLUETOOTH_A2DP | - AUDIO_DEVICE_IN_LOOPBACK | - AUDIO_DEVICE_IN_IP | - AUDIO_DEVICE_IN_BUS | - AUDIO_DEVICE_IN_PROXY | - AUDIO_DEVICE_IN_USB_HEADSET | - AUDIO_DEVICE_IN_BLUETOOTH_BLE | - AUDIO_DEVICE_IN_DEFAULT, - - AUDIO_DEVICE_IN_ALL_SCO = AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET, - - AUDIO_DEVICE_IN_ALL_USB = AUDIO_DEVICE_IN_USB_ACCESSORY | - AUDIO_DEVICE_IN_USB_DEVICE | - AUDIO_DEVICE_IN_USB_HEADSET, - - AUDIO_USAGE_MAX = AUDIO_USAGE_ASSISTANT, - AUDIO_USAGE_CNT = AUDIO_USAGE_ASSISTANT + 1, - - AUDIO_PORT_CONFIG_ALL = AUDIO_PORT_CONFIG_SAMPLE_RATE | - AUDIO_PORT_CONFIG_CHANNEL_MASK | - AUDIO_PORT_CONFIG_FORMAT | - AUDIO_PORT_CONFIG_GAIN, -}; // enum - - -#endif // ANDROID_AUDIO_BASE_UTILS_H diff --git a/include/hardware/system/audio-base.h b/include/hardware/system/audio-base.h deleted file mode 100644 index 3d0638d..0000000 --- a/include/hardware/system/audio-base.h +++ /dev/null @@ -1,450 +0,0 @@ -// This file is autogenerated by hidl-gen -// then manualy edited for retrocompatiblity -// Source: android.hardware.audio.common@4.0 -// Root: android.hardware:hardware/interfaces - -#ifndef HIDL_GENERATED_ANDROID_HARDWARE_AUDIO_COMMON_V4_0_EXPORTED_CONSTANTS_H_ -#define HIDL_GENERATED_ANDROID_HARDWARE_AUDIO_COMMON_V4_0_EXPORTED_CONSTANTS_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -enum { - AUDIO_IO_HANDLE_NONE = 0, - AUDIO_MODULE_HANDLE_NONE = 0, - AUDIO_PORT_HANDLE_NONE = 0, - AUDIO_PATCH_HANDLE_NONE = 0, -}; - -typedef enum { - AUDIO_STREAM_DEFAULT = -1, // (-1) - AUDIO_STREAM_MIN = 0, - AUDIO_STREAM_VOICE_CALL = 0, - AUDIO_STREAM_SYSTEM = 1, - AUDIO_STREAM_RING = 2, - AUDIO_STREAM_MUSIC = 3, - AUDIO_STREAM_ALARM = 4, - AUDIO_STREAM_NOTIFICATION = 5, - AUDIO_STREAM_BLUETOOTH_SCO = 6, - AUDIO_STREAM_ENFORCED_AUDIBLE = 7, - AUDIO_STREAM_DTMF = 8, - AUDIO_STREAM_TTS = 9, - AUDIO_STREAM_ACCESSIBILITY = 10, -#ifndef AUDIO_NO_SYSTEM_DECLARATIONS - /** For dynamic policy output mixes. Only used by the audio policy */ - AUDIO_STREAM_REROUTING = 11, - /** For audio flinger tracks volume. Only used by the audioflinger */ - AUDIO_STREAM_PATCH = 12, -#endif // AUDIO_NO_SYSTEM_DECLARATIONS -} audio_stream_type_t; - -typedef enum { - AUDIO_SOURCE_DEFAULT = 0, - AUDIO_SOURCE_MIC = 1, - AUDIO_SOURCE_VOICE_UPLINK = 2, - AUDIO_SOURCE_VOICE_DOWNLINK = 3, - AUDIO_SOURCE_VOICE_CALL = 4, - AUDIO_SOURCE_CAMCORDER = 5, - AUDIO_SOURCE_VOICE_RECOGNITION = 6, - AUDIO_SOURCE_VOICE_COMMUNICATION = 7, - AUDIO_SOURCE_REMOTE_SUBMIX = 8, - AUDIO_SOURCE_UNPROCESSED = 9, - AUDIO_SOURCE_FM_TUNER = 1998, -#ifndef AUDIO_NO_SYSTEM_DECLARATIONS - /** - * A low-priority, preemptible audio source for for background software - * hotword detection. Same tuning as VOICE_RECOGNITION. - * Used only internally by the framework. - */ - AUDIO_SOURCE_HOTWORD = 1999, -#endif // AUDIO_NO_SYSTEM_DECLARATIONS -} audio_source_t; - -typedef enum { - AUDIO_SESSION_OUTPUT_STAGE = -1, // (-1) - AUDIO_SESSION_OUTPUT_MIX = 0, - AUDIO_SESSION_ALLOCATE = 0, - AUDIO_SESSION_NONE = 0, -} audio_session_t; - -typedef enum { - AUDIO_FORMAT_INVALID = 0xFFFFFFFFu, - AUDIO_FORMAT_DEFAULT = 0, - AUDIO_FORMAT_PCM = 0x00000000u, - AUDIO_FORMAT_MP3 = 0x01000000u, - AUDIO_FORMAT_AMR_NB = 0x02000000u, - AUDIO_FORMAT_AMR_WB = 0x03000000u, - AUDIO_FORMAT_AAC = 0x04000000u, - AUDIO_FORMAT_HE_AAC_V1 = 0x05000000u, - AUDIO_FORMAT_HE_AAC_V2 = 0x06000000u, - AUDIO_FORMAT_VORBIS = 0x07000000u, - AUDIO_FORMAT_OPUS = 0x08000000u, - AUDIO_FORMAT_AC3 = 0x09000000u, - AUDIO_FORMAT_E_AC3 = 0x0A000000u, - AUDIO_FORMAT_DTS = 0x0B000000u, - AUDIO_FORMAT_DTS_HD = 0x0C000000u, - AUDIO_FORMAT_IEC61937 = 0x0D000000u, - AUDIO_FORMAT_DOLBY_TRUEHD = 0x0E000000u, - AUDIO_FORMAT_EVRC = 0x10000000u, - AUDIO_FORMAT_EVRCB = 0x11000000u, - AUDIO_FORMAT_EVRCWB = 0x12000000u, - AUDIO_FORMAT_EVRCNW = 0x13000000u, - AUDIO_FORMAT_AAC_ADIF = 0x14000000u, - AUDIO_FORMAT_WMA = 0x15000000u, - AUDIO_FORMAT_WMA_PRO = 0x16000000u, - AUDIO_FORMAT_AMR_WB_PLUS = 0x17000000u, - AUDIO_FORMAT_MP2 = 0x18000000u, - AUDIO_FORMAT_QCELP = 0x19000000u, - AUDIO_FORMAT_DSD = 0x1A000000u, - AUDIO_FORMAT_FLAC = 0x1B000000u, - AUDIO_FORMAT_ALAC = 0x1C000000u, - AUDIO_FORMAT_APE = 0x1D000000u, - AUDIO_FORMAT_AAC_ADTS = 0x1E000000u, - AUDIO_FORMAT_SBC = 0x1F000000u, - AUDIO_FORMAT_APTX = 0x20000000u, - AUDIO_FORMAT_APTX_HD = 0x21000000u, - AUDIO_FORMAT_AC4 = 0x22000000u, - AUDIO_FORMAT_LDAC = 0x23000000u, - AUDIO_FORMAT_MAT = 0x24000000u, - AUDIO_FORMAT_MAIN_MASK = 0xFF000000u, - AUDIO_FORMAT_SUB_MASK = 0x00FFFFFFu, - - /* Subformats */ - AUDIO_FORMAT_PCM_SUB_16_BIT = 0x1u, - AUDIO_FORMAT_PCM_SUB_8_BIT = 0x2u, - AUDIO_FORMAT_PCM_SUB_32_BIT = 0x3u, - AUDIO_FORMAT_PCM_SUB_8_24_BIT = 0x4u, - AUDIO_FORMAT_PCM_SUB_FLOAT = 0x5u, - AUDIO_FORMAT_PCM_SUB_24_BIT_PACKED = 0x6u, - - AUDIO_FORMAT_MP3_SUB_NONE = 0x0u, - - AUDIO_FORMAT_AMR_SUB_NONE = 0x0u, - - AUDIO_FORMAT_AAC_SUB_MAIN = 0x1u, - AUDIO_FORMAT_AAC_SUB_LC = 0x2u, - AUDIO_FORMAT_AAC_SUB_SSR = 0x4u, - AUDIO_FORMAT_AAC_SUB_LTP = 0x8u, - AUDIO_FORMAT_AAC_SUB_HE_V1 = 0x10u, - AUDIO_FORMAT_AAC_SUB_SCALABLE = 0x20u, - AUDIO_FORMAT_AAC_SUB_ERLC = 0x40u, - AUDIO_FORMAT_AAC_SUB_LD = 0x80u, - AUDIO_FORMAT_AAC_SUB_HE_V2 = 0x100u, - AUDIO_FORMAT_AAC_SUB_ELD = 0x200u, - AUDIO_FORMAT_AAC_SUB_XHE = 0x300u, - - AUDIO_FORMAT_VORBIS_SUB_NONE = 0x0u, - - AUDIO_FORMAT_E_AC3_SUB_JOC = 0x1u, - - AUDIO_FORMAT_MAT_SUB_1_0 = 0x1u, - AUDIO_FORMAT_MAT_SUB_2_0 = 0x2u, - AUDIO_FORMAT_MAT_SUB_2_1 = 0x3u, - - /* Aliases */ - AUDIO_FORMAT_PCM_16_BIT = 0x1u, // (PCM | PCM_SUB_16_BIT) - AUDIO_FORMAT_PCM_8_BIT = 0x2u, // (PCM | PCM_SUB_8_BIT) - AUDIO_FORMAT_PCM_32_BIT = 0x3u, // (PCM | PCM_SUB_32_BIT) - AUDIO_FORMAT_PCM_8_24_BIT = 0x4u, // (PCM | PCM_SUB_8_24_BIT) - AUDIO_FORMAT_PCM_FLOAT = 0x5u, // (PCM | PCM_SUB_FLOAT) - AUDIO_FORMAT_PCM_24_BIT_PACKED = 0x6u, // (PCM | PCM_SUB_24_BIT_PACKED) - AUDIO_FORMAT_AAC_MAIN = 0x4000001u, // (AAC | AAC_SUB_MAIN) - AUDIO_FORMAT_AAC_LC = 0x4000002u, // (AAC | AAC_SUB_LC) - AUDIO_FORMAT_AAC_SSR = 0x4000004u, // (AAC | AAC_SUB_SSR) - AUDIO_FORMAT_AAC_LTP = 0x4000008u, // (AAC | AAC_SUB_LTP) - AUDIO_FORMAT_AAC_HE_V1 = 0x4000010u, // (AAC | AAC_SUB_HE_V1) - AUDIO_FORMAT_AAC_SCALABLE = 0x4000020u, // (AAC | AAC_SUB_SCALABLE) - AUDIO_FORMAT_AAC_ERLC = 0x4000040u, // (AAC | AAC_SUB_ERLC) - AUDIO_FORMAT_AAC_LD = 0x4000080u, // (AAC | AAC_SUB_LD) - AUDIO_FORMAT_AAC_HE_V2 = 0x4000100u, // (AAC | AAC_SUB_HE_V2) - AUDIO_FORMAT_AAC_ELD = 0x4000200u, // (AAC | AAC_SUB_ELD) - AUDIO_FORMAT_AAC_XHE = 0x4000300u, // (AAC | AAC_SUB_XHE) - AUDIO_FORMAT_AAC_ADTS_MAIN = 0x1e000001u, // (AAC_ADTS | AAC_SUB_MAIN) - AUDIO_FORMAT_AAC_ADTS_LC = 0x1e000002u, // (AAC_ADTS | AAC_SUB_LC) - AUDIO_FORMAT_AAC_ADTS_SSR = 0x1e000004u, // (AAC_ADTS | AAC_SUB_SSR) - AUDIO_FORMAT_AAC_ADTS_LTP = 0x1e000008u, // (AAC_ADTS | AAC_SUB_LTP) - AUDIO_FORMAT_AAC_ADTS_HE_V1 = 0x1e000010u, // (AAC_ADTS | AAC_SUB_HE_V1) - AUDIO_FORMAT_AAC_ADTS_SCALABLE = 0x1e000020u, // (AAC_ADTS | AAC_SUB_SCALABLE) - AUDIO_FORMAT_AAC_ADTS_ERLC = 0x1e000040u, // (AAC_ADTS | AAC_SUB_ERLC) - AUDIO_FORMAT_AAC_ADTS_LD = 0x1e000080u, // (AAC_ADTS | AAC_SUB_LD) - AUDIO_FORMAT_AAC_ADTS_HE_V2 = 0x1e000100u, // (AAC_ADTS | AAC_SUB_HE_V2) - AUDIO_FORMAT_AAC_ADTS_ELD = 0x1e000200u, // (AAC_ADTS | AAC_SUB_ELD) - AUDIO_FORMAT_AAC_ADTS_XHE = 0x1e000300u, // (AAC_ADTS | AAC_SUB_XHE) - AUDIO_FORMAT_E_AC3_JOC = 0xA000001u, // (E_AC3 | E_AC3_SUB_JOC) - AUDIO_FORMAT_MAT_1_0 = 0x24000001u, // (MAT | MAT_SUB_1_0) - AUDIO_FORMAT_MAT_2_0 = 0x24000002u, // (MAT | MAT_SUB_2_0) - AUDIO_FORMAT_MAT_2_1 = 0x24000003u, // (MAT | MAT_SUB_2_1) -} audio_format_t; - -enum { - FCC_2 = 2, - FCC_8 = 8, -}; - -enum { - AUDIO_CHANNEL_REPRESENTATION_POSITION = 0x0u, - AUDIO_CHANNEL_REPRESENTATION_INDEX = 0x2u, - AUDIO_CHANNEL_NONE = 0x0u, - AUDIO_CHANNEL_INVALID = 0xC0000000u, - - AUDIO_CHANNEL_OUT_FRONT_LEFT = 0x1u, - AUDIO_CHANNEL_OUT_FRONT_RIGHT = 0x2u, - AUDIO_CHANNEL_OUT_FRONT_CENTER = 0x4u, - AUDIO_CHANNEL_OUT_LOW_FREQUENCY = 0x8u, - AUDIO_CHANNEL_OUT_BACK_LEFT = 0x10u, - AUDIO_CHANNEL_OUT_BACK_RIGHT = 0x20u, - AUDIO_CHANNEL_OUT_FRONT_LEFT_OF_CENTER = 0x40u, - AUDIO_CHANNEL_OUT_FRONT_RIGHT_OF_CENTER = 0x80u, - AUDIO_CHANNEL_OUT_BACK_CENTER = 0x100u, - AUDIO_CHANNEL_OUT_SIDE_LEFT = 0x200u, - AUDIO_CHANNEL_OUT_SIDE_RIGHT = 0x400u, - AUDIO_CHANNEL_OUT_TOP_CENTER = 0x800u, - AUDIO_CHANNEL_OUT_TOP_FRONT_LEFT = 0x1000u, - AUDIO_CHANNEL_OUT_TOP_FRONT_CENTER = 0x2000u, - AUDIO_CHANNEL_OUT_TOP_FRONT_RIGHT = 0x4000u, - AUDIO_CHANNEL_OUT_TOP_BACK_LEFT = 0x8000u, - AUDIO_CHANNEL_OUT_TOP_BACK_CENTER = 0x10000u, - AUDIO_CHANNEL_OUT_TOP_BACK_RIGHT = 0x20000u, - AUDIO_CHANNEL_OUT_TOP_SIDE_LEFT = 0x40000u, - AUDIO_CHANNEL_OUT_TOP_SIDE_RIGHT = 0x80000u, - AUDIO_CHANNEL_OUT_MONO = 0x1u, // OUT_FRONT_LEFT - AUDIO_CHANNEL_OUT_STEREO = 0x3u, // OUT_FRONT_LEFT | OUT_FRONT_RIGHT - AUDIO_CHANNEL_OUT_2POINT1 = 0xBu, // OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_LOW_FREQUENCY - AUDIO_CHANNEL_OUT_2POINT0POINT2 = 0xC0003u, // OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_TOP_SIDE_LEFT | OUT_TOP_SIDE_RIGHT - AUDIO_CHANNEL_OUT_2POINT1POINT2 = 0xC000Bu, // OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_TOP_SIDE_LEFT | OUT_TOP_SIDE_RIGHT | OUT_LOW_FREQUENCY - AUDIO_CHANNEL_OUT_3POINT0POINT2 = 0xC0007u, // OUT_FRONT_LEFT | OUT_FRONT_CENTER | OUT_FRONT_RIGHT | OUT_TOP_SIDE_LEFT | OUT_TOP_SIDE_RIGHT - AUDIO_CHANNEL_OUT_3POINT1POINT2 = 0xC000Fu, // OUT_FRONT_LEFT | OUT_FRONT_CENTER | OUT_FRONT_RIGHT | OUT_TOP_SIDE_LEFT | OUT_TOP_SIDE_RIGHT | OUT_LOW_FREQUENCY - AUDIO_CHANNEL_OUT_QUAD = 0x33u, // OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_BACK_LEFT | OUT_BACK_RIGHT - AUDIO_CHANNEL_OUT_QUAD_BACK = 0x33u, // OUT_QUAD - AUDIO_CHANNEL_OUT_QUAD_SIDE = 0x603u, // OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_SIDE_LEFT | OUT_SIDE_RIGHT - AUDIO_CHANNEL_OUT_SURROUND = 0x107u, // OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_FRONT_CENTER | OUT_BACK_CENTER - AUDIO_CHANNEL_OUT_PENTA = 0x37u, // OUT_QUAD | OUT_FRONT_CENTER - AUDIO_CHANNEL_OUT_5POINT1 = 0x3Fu, // OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_FRONT_CENTER | OUT_LOW_FREQUENCY | OUT_BACK_LEFT | OUT_BACK_RIGHT - AUDIO_CHANNEL_OUT_5POINT1_BACK = 0x3Fu, // OUT_5POINT1 - AUDIO_CHANNEL_OUT_5POINT1_SIDE = 0x60Fu, // OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_FRONT_CENTER | OUT_LOW_FREQUENCY | OUT_SIDE_LEFT | OUT_SIDE_RIGHT - AUDIO_CHANNEL_OUT_5POINT1POINT2 = 0xC003Fu, // OUT_5POINT1 | OUT_TOP_SIDE_LEFT | OUT_TOP_SIDE_RIGHT - AUDIO_CHANNEL_OUT_5POINT1POINT4 = 0x2D03Fu, // OUT_5POINT1 | OUT_TOP_FRONT_LEFT | OUT_TOP_FRONT_RIGHT | OUT_TOP_BACK_LEFT | OUT_TOP_BACK_RIGHT - AUDIO_CHANNEL_OUT_6POINT1 = 0x13Fu, // OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_FRONT_CENTER | OUT_LOW_FREQUENCY | OUT_BACK_LEFT | OUT_BACK_RIGHT | OUT_BACK_CENTER - AUDIO_CHANNEL_OUT_7POINT1 = 0x63Fu, // OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_FRONT_CENTER | OUT_LOW_FREQUENCY | OUT_BACK_LEFT | OUT_BACK_RIGHT | OUT_SIDE_LEFT | OUT_SIDE_RIGHT - AUDIO_CHANNEL_OUT_7POINT1POINT2 = 0xC063Fu, // OUT_7POINT1 | OUT_TOP_SIDE_LEFT | OUT_TOP_SIDE_RIGHT - AUDIO_CHANNEL_OUT_7POINT1POINT4 = 0x2D63Fu, // OUT_7POINT1 | OUT_TOP_FRONT_LEFT | OUT_TOP_FRONT_RIGHT | OUT_TOP_BACK_LEFT | OUT_TOP_BACK_RIGHT - - AUDIO_CHANNEL_IN_LEFT = 0x4u, - AUDIO_CHANNEL_IN_RIGHT = 0x8u, - AUDIO_CHANNEL_IN_FRONT = 0x10u, - AUDIO_CHANNEL_IN_BACK = 0x20u, - AUDIO_CHANNEL_IN_LEFT_PROCESSED = 0x40u, - AUDIO_CHANNEL_IN_RIGHT_PROCESSED = 0x80u, - AUDIO_CHANNEL_IN_FRONT_PROCESSED = 0x100u, - AUDIO_CHANNEL_IN_BACK_PROCESSED = 0x200u, - AUDIO_CHANNEL_IN_PRESSURE = 0x400u, - AUDIO_CHANNEL_IN_X_AXIS = 0x800u, - AUDIO_CHANNEL_IN_Y_AXIS = 0x1000u, - AUDIO_CHANNEL_IN_Z_AXIS = 0x2000u, - AUDIO_CHANNEL_IN_BACK_LEFT = 0x10000u, - AUDIO_CHANNEL_IN_BACK_RIGHT = 0x20000u, - AUDIO_CHANNEL_IN_CENTER = 0x40000u, - AUDIO_CHANNEL_IN_LOW_FREQUENCY = 0x100000u, - AUDIO_CHANNEL_IN_TOP_LEFT = 0x200000u, - AUDIO_CHANNEL_IN_TOP_RIGHT = 0x400000u, - AUDIO_CHANNEL_IN_VOICE_UPLINK = 0x4000u, - AUDIO_CHANNEL_IN_VOICE_DNLINK = 0x8000u, - AUDIO_CHANNEL_IN_MONO = 0x10u, // IN_FRONT - AUDIO_CHANNEL_IN_STEREO = 0xCu, // IN_LEFT | IN_RIGHT - AUDIO_CHANNEL_IN_FRONT_BACK = 0x30u, // IN_FRONT | IN_BACK - AUDIO_CHANNEL_IN_6 = 0xFCu, // IN_LEFT | IN_RIGHT | IN_FRONT | IN_BACK | IN_LEFT_PROCESSED | IN_RIGHT_PROCESSED - AUDIO_CHANNEL_IN_2POINT0POINT2 = 0x60000Cu, // IN_LEFT | IN_RIGHT | IN_TOP_LEFT | IN_TOP_RIGHT - AUDIO_CHANNEL_IN_2POINT1POINT2 = 0x70000Cu, // IN_LEFT | IN_RIGHT | IN_TOP_LEFT | IN_TOP_RIGHT | IN_LOW_FREQUENCY - AUDIO_CHANNEL_IN_3POINT0POINT2 = 0x64000Cu, // IN_LEFT | IN_CENTER | IN_RIGHT | IN_TOP_LEFT | IN_TOP_RIGHT - AUDIO_CHANNEL_IN_3POINT1POINT2 = 0x74000Cu, // IN_LEFT | IN_CENTER | IN_RIGHT | IN_TOP_LEFT | IN_TOP_RIGHT | IN_LOW_FREQUENCY - AUDIO_CHANNEL_IN_5POINT1 = 0x17000Cu, // IN_LEFT | IN_CENTER | IN_RIGHT | IN_BACK_LEFT | IN_BACK_RIGHT | IN_LOW_FREQUENCY - AUDIO_CHANNEL_IN_VOICE_UPLINK_MONO = 0x4010u, // IN_VOICE_UPLINK | IN_MONO - AUDIO_CHANNEL_IN_VOICE_DNLINK_MONO = 0x8010u, // IN_VOICE_DNLINK | IN_MONO - AUDIO_CHANNEL_IN_VOICE_CALL_MONO = 0xC010u, // IN_VOICE_UPLINK_MONO | IN_VOICE_DNLINK_MONO - - AUDIO_CHANNEL_COUNT_MAX = 30u, - AUDIO_CHANNEL_INDEX_HDR = 0x80000000u, // REPRESENTATION_INDEX << COUNT_MAX - AUDIO_CHANNEL_INDEX_MASK_1 = 0x80000001u, // INDEX_HDR | (1 << 1) - 1 - AUDIO_CHANNEL_INDEX_MASK_2 = 0x80000003u, // INDEX_HDR | (1 << 2) - 1 - AUDIO_CHANNEL_INDEX_MASK_3 = 0x80000007u, // INDEX_HDR | (1 << 3) - 1 - AUDIO_CHANNEL_INDEX_MASK_4 = 0x8000000Fu, // INDEX_HDR | (1 << 4) - 1 - AUDIO_CHANNEL_INDEX_MASK_5 = 0x8000001Fu, // INDEX_HDR | (1 << 5) - 1 - AUDIO_CHANNEL_INDEX_MASK_6 = 0x8000003Fu, // INDEX_HDR | (1 << 6) - 1 - AUDIO_CHANNEL_INDEX_MASK_7 = 0x8000007Fu, // INDEX_HDR | (1 << 7) - 1 - AUDIO_CHANNEL_INDEX_MASK_8 = 0x800000FFu, // INDEX_HDR | (1 << 8) - 1 -}; - -typedef enum { -#ifndef AUDIO_NO_SYSTEM_DECLARATIONS - AUDIO_MODE_INVALID = -2, // (-2) - AUDIO_MODE_CURRENT = -1, // (-1) -#endif // AUDIO_NO_SYSTEM_DECLARATIONS - AUDIO_MODE_NORMAL = 0, - AUDIO_MODE_RINGTONE = 1, - AUDIO_MODE_IN_CALL = 2, - AUDIO_MODE_IN_COMMUNICATION = 3, -} audio_mode_t; - -enum { - AUDIO_DEVICE_NONE = 0x0u, - AUDIO_DEVICE_BIT_IN = 0x80000000u, - AUDIO_DEVICE_BIT_DEFAULT = 0x40000000u, - - AUDIO_DEVICE_OUT_EARPIECE = 0x1u, - AUDIO_DEVICE_OUT_SPEAKER = 0x2u, - AUDIO_DEVICE_OUT_WIRED_HEADSET = 0x4u, - AUDIO_DEVICE_OUT_WIRED_HEADPHONE = 0x8u, - AUDIO_DEVICE_OUT_BLUETOOTH_SCO = 0x10u, - AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET = 0x20u, - AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT = 0x40u, - AUDIO_DEVICE_OUT_BLUETOOTH_A2DP = 0x80u, - AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES = 0x100u, - AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER = 0x200u, - AUDIO_DEVICE_OUT_AUX_DIGITAL = 0x400u, - AUDIO_DEVICE_OUT_HDMI = 0x400u, // OUT_AUX_DIGITAL - AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET = 0x800u, - AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET = 0x1000u, - AUDIO_DEVICE_OUT_USB_ACCESSORY = 0x2000u, - AUDIO_DEVICE_OUT_USB_DEVICE = 0x4000u, - AUDIO_DEVICE_OUT_REMOTE_SUBMIX = 0x8000u, - AUDIO_DEVICE_OUT_TELEPHONY_TX = 0x10000u, - AUDIO_DEVICE_OUT_LINE = 0x20000u, - AUDIO_DEVICE_OUT_HDMI_ARC = 0x40000u, - AUDIO_DEVICE_OUT_SPDIF = 0x80000u, - AUDIO_DEVICE_OUT_FM = 0x100000u, - AUDIO_DEVICE_OUT_AUX_LINE = 0x200000u, - AUDIO_DEVICE_OUT_SPEAKER_SAFE = 0x400000u, - AUDIO_DEVICE_OUT_IP = 0x800000u, - AUDIO_DEVICE_OUT_BUS = 0x1000000u, - AUDIO_DEVICE_OUT_PROXY = 0x2000000u, - AUDIO_DEVICE_OUT_USB_HEADSET = 0x4000000u, - AUDIO_DEVICE_OUT_HEARING_AID = 0x8000000u, - AUDIO_DEVICE_OUT_ECHO_CANCELLER = 0x10000000u, - AUDIO_DEVICE_OUT_DEFAULT = 0x40000000u, // BIT_DEFAULT - - AUDIO_DEVICE_IN_COMMUNICATION = 0x80000001u, // BIT_IN | 0x1 - AUDIO_DEVICE_IN_AMBIENT = 0x80000002u, // BIT_IN | 0x2 - AUDIO_DEVICE_IN_BUILTIN_MIC = 0x80000004u, // BIT_IN | 0x4 - AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET = 0x80000008u, // BIT_IN | 0x8 - AUDIO_DEVICE_IN_WIRED_HEADSET = 0x80000010u, // BIT_IN | 0x10 - AUDIO_DEVICE_IN_AUX_DIGITAL = 0x80000020u, // BIT_IN | 0x20 - AUDIO_DEVICE_IN_HDMI = 0x80000020u, // IN_AUX_DIGITAL - AUDIO_DEVICE_IN_VOICE_CALL = 0x80000040u, // BIT_IN | 0x40 - AUDIO_DEVICE_IN_TELEPHONY_RX = 0x80000040u, // IN_VOICE_CALL - AUDIO_DEVICE_IN_BACK_MIC = 0x80000080u, // BIT_IN | 0x80 - AUDIO_DEVICE_IN_REMOTE_SUBMIX = 0x80000100u, // BIT_IN | 0x100 - AUDIO_DEVICE_IN_ANLG_DOCK_HEADSET = 0x80000200u, // BIT_IN | 0x200 - AUDIO_DEVICE_IN_DGTL_DOCK_HEADSET = 0x80000400u, // BIT_IN | 0x400 - AUDIO_DEVICE_IN_USB_ACCESSORY = 0x80000800u, // BIT_IN | 0x800 - AUDIO_DEVICE_IN_USB_DEVICE = 0x80001000u, // BIT_IN | 0x1000 - AUDIO_DEVICE_IN_FM_TUNER = 0x80002000u, // BIT_IN | 0x2000 - AUDIO_DEVICE_IN_TV_TUNER = 0x80004000u, // BIT_IN | 0x4000 - AUDIO_DEVICE_IN_LINE = 0x80008000u, // BIT_IN | 0x8000 - AUDIO_DEVICE_IN_SPDIF = 0x80010000u, // BIT_IN | 0x10000 - AUDIO_DEVICE_IN_BLUETOOTH_A2DP = 0x80020000u, // BIT_IN | 0x20000 - AUDIO_DEVICE_IN_LOOPBACK = 0x80040000u, // BIT_IN | 0x40000 - AUDIO_DEVICE_IN_IP = 0x80080000u, // BIT_IN | 0x80000 - AUDIO_DEVICE_IN_BUS = 0x80100000u, // BIT_IN | 0x100000 - AUDIO_DEVICE_IN_PROXY = 0x81000000u, // BIT_IN | 0x1000000 - AUDIO_DEVICE_IN_USB_HEADSET = 0x82000000u, // BIT_IN | 0x2000000 - AUDIO_DEVICE_IN_BLUETOOTH_BLE = 0x84000000u, // BIT_IN | 0x4000000 - AUDIO_DEVICE_IN_DEFAULT = 0xC0000000u, // BIT_IN | BIT_DEFAULT -}; - -typedef enum { - AUDIO_OUTPUT_FLAG_NONE = 0x0, - AUDIO_OUTPUT_FLAG_DIRECT = 0x1, - AUDIO_OUTPUT_FLAG_PRIMARY = 0x2, - AUDIO_OUTPUT_FLAG_FAST = 0x4, - AUDIO_OUTPUT_FLAG_DEEP_BUFFER = 0x8, - AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD = 0x10, - AUDIO_OUTPUT_FLAG_NON_BLOCKING = 0x20, - AUDIO_OUTPUT_FLAG_HW_AV_SYNC = 0x40, - AUDIO_OUTPUT_FLAG_TTS = 0x80, - AUDIO_OUTPUT_FLAG_RAW = 0x100, - AUDIO_OUTPUT_FLAG_SYNC = 0x200, - AUDIO_OUTPUT_FLAG_IEC958_NONAUDIO = 0x400, - AUDIO_OUTPUT_FLAG_DIRECT_PCM = 0x2000, - AUDIO_OUTPUT_FLAG_MMAP_NOIRQ = 0x4000, - AUDIO_OUTPUT_FLAG_VOIP_RX = 0x8000, - AUDIO_OUTPUT_FLAG_INCALL_MUSIC = 0x10000, -} audio_output_flags_t; - -typedef enum { - AUDIO_INPUT_FLAG_NONE = 0x0, - AUDIO_INPUT_FLAG_FAST = 0x1, - AUDIO_INPUT_FLAG_HW_HOTWORD = 0x2, - AUDIO_INPUT_FLAG_RAW = 0x4, - AUDIO_INPUT_FLAG_SYNC = 0x8, - AUDIO_INPUT_FLAG_MMAP_NOIRQ = 0x10, - AUDIO_INPUT_FLAG_VOIP_TX = 0x20, - AUDIO_INPUT_FLAG_HW_AV_SYNC = 0x40, -} audio_input_flags_t; - -typedef enum { - AUDIO_USAGE_UNKNOWN = 0, - AUDIO_USAGE_MEDIA = 1, - AUDIO_USAGE_VOICE_COMMUNICATION = 2, - AUDIO_USAGE_VOICE_COMMUNICATION_SIGNALLING = 3, - AUDIO_USAGE_ALARM = 4, - AUDIO_USAGE_NOTIFICATION = 5, - AUDIO_USAGE_NOTIFICATION_TELEPHONY_RINGTONE = 6, -#ifndef AUDIO_NO_SYSTEM_DECLARATIONS - AUDIO_USAGE_NOTIFICATION_COMMUNICATION_REQUEST = 7, - AUDIO_USAGE_NOTIFICATION_COMMUNICATION_INSTANT = 8, - AUDIO_USAGE_NOTIFICATION_COMMUNICATION_DELAYED = 9, - AUDIO_USAGE_NOTIFICATION_EVENT = 10, -#endif // AUDIO_NO_SYSTEM_DECLARATIONS - AUDIO_USAGE_ASSISTANCE_ACCESSIBILITY = 11, - AUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE = 12, - AUDIO_USAGE_ASSISTANCE_SONIFICATION = 13, - AUDIO_USAGE_GAME = 14, - AUDIO_USAGE_VIRTUAL_SOURCE = 15, - AUDIO_USAGE_ASSISTANT = 16, -} audio_usage_t; - -typedef enum { - AUDIO_CONTENT_TYPE_UNKNOWN = 0u, - AUDIO_CONTENT_TYPE_SPEECH = 1u, - AUDIO_CONTENT_TYPE_MUSIC = 2u, - AUDIO_CONTENT_TYPE_MOVIE = 3u, - AUDIO_CONTENT_TYPE_SONIFICATION = 4u, -} audio_content_type_t; - -enum { - AUDIO_GAIN_MODE_JOINT = 0x1u, - AUDIO_GAIN_MODE_CHANNELS = 0x2u, - AUDIO_GAIN_MODE_RAMP = 0x4u, -}; - -typedef enum { - AUDIO_PORT_ROLE_NONE = 0, - AUDIO_PORT_ROLE_SOURCE = 1, // (::android::hardware::audio::common::V4_0::AudioPortRole.NONE implicitly + 1) - AUDIO_PORT_ROLE_SINK = 2, // (::android::hardware::audio::common::V4_0::AudioPortRole.SOURCE implicitly + 1) -} audio_port_role_t; - -typedef enum { - AUDIO_PORT_TYPE_NONE = 0, - AUDIO_PORT_TYPE_DEVICE = 1, // (::android::hardware::audio::common::V4_0::AudioPortType.NONE implicitly + 1) - AUDIO_PORT_TYPE_MIX = 2, // (::android::hardware::audio::common::V4_0::AudioPortType.DEVICE implicitly + 1) - AUDIO_PORT_TYPE_SESSION = 3, // (::android::hardware::audio::common::V4_0::AudioPortType.MIX implicitly + 1) -} audio_port_type_t; - -enum { - AUDIO_PORT_CONFIG_SAMPLE_RATE = 0x1u, - AUDIO_PORT_CONFIG_CHANNEL_MASK = 0x2u, - AUDIO_PORT_CONFIG_FORMAT = 0x4u, - AUDIO_PORT_CONFIG_GAIN = 0x8u, -}; - -typedef enum { - AUDIO_LATENCY_LOW = 0, - AUDIO_LATENCY_NORMAL = 1, // (::android::hardware::audio::common::V4_0::AudioMixLatencyClass.LOW implicitly + 1) -} audio_mix_latency_class_t; - -#ifdef __cplusplus -} -#endif - -#endif // HIDL_GENERATED_ANDROID_HARDWARE_AUDIO_COMMON_V4_0_EXPORTED_CONSTANTS_H_ diff --git a/include/hardware/system/audio.h b/include/hardware/system/audio.h deleted file mode 100644 index 17526f8..0000000 --- a/include/hardware/system/audio.h +++ /dev/null @@ -1,1230 +0,0 @@ -/* - * Copyright (C) 2011 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -#ifndef ANDROID_AUDIO_CORE_H -#define ANDROID_AUDIO_CORE_H - -#include -#include -#include -#include -#include - -#include "cutils/bitops.h" - -#include "audio-base.h" -#include "audio-base-utils.h" - -__BEGIN_DECLS - -/* The enums were moved here mostly from - * frameworks/base/include/media/AudioSystem.h - */ - -/* represents an invalid uid for tracks; the calling or client uid is often substituted. */ -#define AUDIO_UID_INVALID ((uid_t)-1) - -/* device address used to refer to the standard remote submix */ -#define AUDIO_REMOTE_SUBMIX_DEVICE_ADDRESS "0" - -/* AudioFlinger and AudioPolicy services use I/O handles to identify audio sources and sinks */ -typedef int audio_io_handle_t; - -typedef uint32_t audio_flags_mask_t; - -/* Do not change these values without updating their counterparts - * in frameworks/base/media/java/android/media/AudioAttributes.java - */ -enum { - AUDIO_FLAG_NONE = 0x0, - AUDIO_FLAG_AUDIBILITY_ENFORCED = 0x1, - AUDIO_FLAG_SECURE = 0x2, - AUDIO_FLAG_SCO = 0x4, - AUDIO_FLAG_BEACON = 0x8, - AUDIO_FLAG_HW_AV_SYNC = 0x10, - AUDIO_FLAG_HW_HOTWORD = 0x20, - AUDIO_FLAG_BYPASS_INTERRUPTION_POLICY = 0x40, - AUDIO_FLAG_BYPASS_MUTE = 0x80, - AUDIO_FLAG_LOW_LATENCY = 0x100, - AUDIO_FLAG_DEEP_BUFFER = 0x200, -}; - -/* Audio attributes */ -#define AUDIO_ATTRIBUTES_TAGS_MAX_SIZE 256 -typedef struct { - audio_content_type_t content_type; - audio_usage_t usage; - audio_source_t source; - audio_flags_mask_t flags; - char tags[AUDIO_ATTRIBUTES_TAGS_MAX_SIZE]; /* UTF8 */ -} __attribute__((packed)) audio_attributes_t; // sent through Binder; - -/* a unique ID allocated by AudioFlinger for use as an audio_io_handle_t, audio_session_t, - * effect ID (int), audio_module_handle_t, and audio_patch_handle_t. - * Audio port IDs (audio_port_handle_t) are allocated by AudioPolicy - * in a different namespace than AudioFlinger unique IDs. - */ -typedef int audio_unique_id_t; - -/* Possible uses for an audio_unique_id_t */ -typedef enum { - AUDIO_UNIQUE_ID_USE_UNSPECIFIED = 0, - AUDIO_UNIQUE_ID_USE_SESSION = 1, // for allocated sessions, not special AUDIO_SESSION_* - AUDIO_UNIQUE_ID_USE_MODULE = 2, - AUDIO_UNIQUE_ID_USE_EFFECT = 3, - AUDIO_UNIQUE_ID_USE_PATCH = 4, - AUDIO_UNIQUE_ID_USE_OUTPUT = 5, - AUDIO_UNIQUE_ID_USE_INPUT = 6, - AUDIO_UNIQUE_ID_USE_PLAYER = 7, - AUDIO_UNIQUE_ID_USE_MAX = 8, // must be a power-of-two - AUDIO_UNIQUE_ID_USE_MASK = AUDIO_UNIQUE_ID_USE_MAX - 1 -} audio_unique_id_use_t; - -/* Return the use of an audio_unique_id_t */ -static inline audio_unique_id_use_t audio_unique_id_get_use(audio_unique_id_t id) -{ - return (audio_unique_id_use_t) (id & AUDIO_UNIQUE_ID_USE_MASK); -} - -/* Reserved audio_unique_id_t values. FIXME: not a complete list. */ -#define AUDIO_UNIQUE_ID_ALLOCATE AUDIO_SESSION_ALLOCATE - -/* A channel mask per se only defines the presence or absence of a channel, not the order. - * But see AUDIO_INTERLEAVE_* below for the platform convention of order. - * - * audio_channel_mask_t is an opaque type and its internal layout should not - * be assumed as it may change in the future. - * Instead, always use the functions declared in this header to examine. - * - * These are the current representations: - * - * AUDIO_CHANNEL_REPRESENTATION_POSITION - * is a channel mask representation for position assignment. - * Each low-order bit corresponds to the spatial position of a transducer (output), - * or interpretation of channel (input). - * The user of a channel mask needs to know the context of whether it is for output or input. - * The constants AUDIO_CHANNEL_OUT_* or AUDIO_CHANNEL_IN_* apply to the bits portion. - * It is not permitted for no bits to be set. - * - * AUDIO_CHANNEL_REPRESENTATION_INDEX - * is a channel mask representation for index assignment. - * Each low-order bit corresponds to a selected channel. - * There is no platform interpretation of the various bits. - * There is no concept of output or input. - * It is not permitted for no bits to be set. - * - * All other representations are reserved for future use. - * - * Warning: current representation distinguishes between input and output, but this will not the be - * case in future revisions of the platform. Wherever there is an ambiguity between input and output - * that is currently resolved by checking the channel mask, the implementer should look for ways to - * fix it with additional information outside of the mask. - */ -typedef uint32_t audio_channel_mask_t; - -/* v4a_print(2) of maximum number of representations, not part of public API */ -#define AUDIO_CHANNEL_REPRESENTATION_LOG2 2 - -/* The return value is undefined if the channel mask is invalid. */ -static inline uint32_t audio_channel_mask_get_bits(audio_channel_mask_t channel) -{ - return channel & ((1 << AUDIO_CHANNEL_COUNT_MAX) - 1); -} - -typedef uint32_t audio_channel_representation_t; - -/* The return value is undefined if the channel mask is invalid. */ -static inline audio_channel_representation_t audio_channel_mask_get_representation( - audio_channel_mask_t channel) -{ - // The right shift should be sufficient, but also "and" for safety in case mask is not 32 bits - return (audio_channel_representation_t) - ((channel >> AUDIO_CHANNEL_COUNT_MAX) & ((1 << AUDIO_CHANNEL_REPRESENTATION_LOG2) - 1)); -} - -/* Returns true if the channel mask is valid, - * or returns false for AUDIO_CHANNEL_NONE, AUDIO_CHANNEL_INVALID, and other invalid values. - * This function is unable to determine whether a channel mask for position assignment - * is invalid because an output mask has an invalid output bit set, - * or because an input mask has an invalid input bit set. - * All other APIs that take a channel mask assume that it is valid. - */ -static inline bool audio_channel_mask_is_valid(audio_channel_mask_t channel) -{ - uint32_t bits = audio_channel_mask_get_bits(channel); - audio_channel_representation_t representation = audio_channel_mask_get_representation(channel); - switch (representation) { - case AUDIO_CHANNEL_REPRESENTATION_POSITION: - case AUDIO_CHANNEL_REPRESENTATION_INDEX: - break; - default: - bits = 0; - break; - } - return bits != 0; -} - -/* Not part of public API */ -static inline audio_channel_mask_t audio_channel_mask_from_representation_and_bits( - audio_channel_representation_t representation, uint32_t bits) -{ - return (audio_channel_mask_t) ((representation << AUDIO_CHANNEL_COUNT_MAX) | bits); -} - -/** - * Expresses the convention when stereo audio samples are stored interleaved - * in an array. This should improve readability by allowing code to use - * symbolic indices instead of hard-coded [0] and [1]. - * - * For multi-channel beyond stereo, the platform convention is that channels - * are interleaved in order from least significant channel mask bit to most - * significant channel mask bit, with unused bits skipped. Any exceptions - * to this convention will be noted at the appropriate API. - */ -enum { - AUDIO_INTERLEAVE_LEFT = 0, - AUDIO_INTERLEAVE_RIGHT = 1, -}; - -/* This enum is deprecated */ -typedef enum { - AUDIO_IN_ACOUSTICS_NONE = 0, - AUDIO_IN_ACOUSTICS_AGC_ENABLE = 0x0001, - AUDIO_IN_ACOUSTICS_AGC_DISABLE = 0, - AUDIO_IN_ACOUSTICS_NS_ENABLE = 0x0002, - AUDIO_IN_ACOUSTICS_NS_DISABLE = 0, - AUDIO_IN_ACOUSTICS_TX_IIR_ENABLE = 0x0004, - AUDIO_IN_ACOUSTICS_TX_DISABLE = 0, -} audio_in_acoustics_t; - -typedef uint32_t audio_devices_t; -/** - * Stub audio output device. Used in policy configuration file on platforms without audio outputs. - * This alias value to AUDIO_DEVICE_OUT_DEFAULT is only used in the audio policy context. - */ -#define AUDIO_DEVICE_OUT_STUB AUDIO_DEVICE_OUT_DEFAULT -/** - * Stub audio input device. Used in policy configuration file on platforms without audio inputs. - * This alias value to AUDIO_DEVICE_IN_DEFAULT is only used in the audio policy context. - */ -#define AUDIO_DEVICE_IN_STUB AUDIO_DEVICE_IN_DEFAULT - -/* Additional information about compressed streams offloaded to - * hardware playback - * The version and size fields must be initialized by the caller by using - * one of the constants defined here. - * Must be aligned to transmit as raw memory through Binder. - */ -typedef struct { - uint16_t version; // version of the info structure - uint16_t size; // total size of the structure including version and size - uint32_t sample_rate; // sample rate in Hz - audio_channel_mask_t channel_mask; // channel mask - audio_format_t format; // audio format - audio_stream_type_t stream_type; // stream type - uint32_t bit_rate; // bit rate in bits per second - int64_t duration_us; // duration in microseconds, -1 if unknown - bool has_video; // true if stream is tied to a video stream - bool is_streaming; // true if streaming, false if local playback - uint32_t bit_width; - uint32_t offload_buffer_size; // offload fragment size - audio_usage_t usage; -} __attribute__((aligned(8))) audio_offload_info_t; - -#define AUDIO_MAKE_OFFLOAD_INFO_VERSION(maj,min) \ - ((((maj) & 0xff) << 8) | ((min) & 0xff)) - -#define AUDIO_OFFLOAD_INFO_VERSION_0_1 AUDIO_MAKE_OFFLOAD_INFO_VERSION(0, 1) -#define AUDIO_OFFLOAD_INFO_VERSION_CURRENT AUDIO_OFFLOAD_INFO_VERSION_0_1 - -static const audio_offload_info_t AUDIO_INFO_INITIALIZER = { - /* .version = */ AUDIO_OFFLOAD_INFO_VERSION_CURRENT, - /* .size = */ sizeof(audio_offload_info_t), - /* .sample_rate = */ 0, - /* .channel_mask = */ 0, - /* .format = */ AUDIO_FORMAT_DEFAULT, - /* .stream_type = */ AUDIO_STREAM_VOICE_CALL, - /* .bit_rate = */ 0, - /* .duration_us = */ 0, - /* .has_video = */ false, - /* .is_streaming = */ false, - /* .bit_width = */ 16, - /* .offload_buffer_size = */ 0, - /* .usage = */ AUDIO_USAGE_UNKNOWN -}; - -/* common audio stream configuration parameters - * You should memset() the entire structure to zero before use to - * ensure forward compatibility - * Must be aligned to transmit as raw memory through Binder. - */ -struct __attribute__((aligned(8))) audio_config { - uint32_t sample_rate; - audio_channel_mask_t channel_mask; - audio_format_t format; - audio_offload_info_t offload_info; - uint32_t frame_count; -}; -typedef struct audio_config audio_config_t; - -static const audio_config_t AUDIO_CONFIG_INITIALIZER = { - /* .sample_rate = */ 0, - /* .channel_mask = */ AUDIO_CHANNEL_NONE, - /* .format = */ AUDIO_FORMAT_DEFAULT, - /* .offload_info = */ { - /* .version = */ AUDIO_OFFLOAD_INFO_VERSION_CURRENT, - /* .size = */ sizeof(audio_offload_info_t), - /* .sample_rate = */ 0, - /* .channel_mask = */ 0, - /* .format = */ AUDIO_FORMAT_DEFAULT, - /* .stream_type = */ AUDIO_STREAM_VOICE_CALL, - /* .bit_rate = */ 0, - /* .duration_us = */ 0, - /* .has_video = */ false, - /* .is_streaming = */ false, - /* .bit_width = */ 16, - /* .offload_buffer_size = */ 0, - /* .usage = */ AUDIO_USAGE_UNKNOWN - }, - /* .frame_count = */ 0, -}; - -struct audio_config_base { - uint32_t sample_rate; - audio_channel_mask_t channel_mask; - audio_format_t format; -}; - -typedef struct audio_config_base audio_config_base_t; - -static const audio_config_base_t AUDIO_CONFIG_BASE_INITIALIZER = { - /* .sample_rate = */ 0, - /* .channel_mask = */ AUDIO_CHANNEL_NONE, - /* .format = */ AUDIO_FORMAT_DEFAULT -}; - -/* audio hw module handle functions or structures referencing a module */ -typedef int audio_module_handle_t; - -/****************************** - * Volume control - *****************************/ - -/** 3 dB headroom are allowed on float samples (3db = 10^(3/20) = 1.412538). -* See: https://developer.android.com/reference/android/media/AudioTrack.html#write(float[], int, int, int) -*/ -#define FLOAT_NOMINAL_RANGE_HEADROOM 1.412538 - -/* If the audio hardware supports gain control on some audio paths, - * the platform can expose them in the audio_policy.conf file. The audio HAL - * will then implement gain control functions that will use the following data - * structures. */ - -typedef uint32_t audio_gain_mode_t; - - -/* An audio_gain struct is a representation of a gain stage. - * A gain stage is always attached to an audio port. */ -struct audio_gain { - audio_gain_mode_t mode; /* e.g. AUDIO_GAIN_MODE_JOINT */ - audio_channel_mask_t channel_mask; /* channels which gain an be controlled. - N/A if AUDIO_GAIN_MODE_CHANNELS is not supported */ - int min_value; /* minimum gain value in millibels */ - int max_value; /* maximum gain value in millibels */ - int default_value; /* default gain value in millibels */ - unsigned int step_value; /* gain step in millibels */ - unsigned int min_ramp_ms; /* minimum ramp duration in ms */ - unsigned int max_ramp_ms; /* maximum ramp duration in ms */ -}; - -/* The gain configuration structure is used to get or set the gain values of a - * given port */ -struct audio_gain_config { - int index; /* index of the corresponding audio_gain in the - audio_port gains[] table */ - audio_gain_mode_t mode; /* mode requested for this command */ - audio_channel_mask_t channel_mask; /* channels which gain value follows. - N/A in joint mode */ - - // note this "8" is not FCC_8, so it won't need to be changed for > 8 channels - int values[sizeof(audio_channel_mask_t) * 8]; /* gain values in millibels - for each channel ordered from LSb to MSb in - channel mask. The number of values is 1 in joint - mode or popcount(channel_mask) */ - unsigned int ramp_duration_ms; /* ramp duration in ms */ -}; - -/****************************** - * Routing control - *****************************/ - -/* Types defined here are used to describe an audio source or sink at internal - * framework interfaces (audio policy, patch panel) or at the audio HAL. - * Sink and sources are grouped in a concept of “audio port” representing an - * audio end point at the edge of the system managed by the module exposing - * the interface. */ - -/* Each port has a unique ID or handle allocated by policy manager */ -typedef int audio_port_handle_t; - -/* the maximum length for the human-readable device name */ -#define AUDIO_PORT_MAX_NAME_LEN 128 - -/* maximum audio device address length */ -#define AUDIO_DEVICE_MAX_ADDRESS_LEN 32 - -/* extension for audio port configuration structure when the audio port is a - * hardware device */ -struct audio_port_config_device_ext { - audio_module_handle_t hw_module; /* module the device is attached to */ - audio_devices_t type; /* device type (e.g AUDIO_DEVICE_OUT_SPEAKER) */ - char address[AUDIO_DEVICE_MAX_ADDRESS_LEN]; /* device address. "" if N/A */ -}; - -/* extension for audio port configuration structure when the audio port is a - * sub mix */ -struct audio_port_config_mix_ext { - audio_module_handle_t hw_module; /* module the stream is attached to */ - audio_io_handle_t handle; /* I/O handle of the input/output stream */ - union { - //TODO: change use case for output streams: use strategy and mixer attributes - audio_stream_type_t stream; - audio_source_t source; - } usecase; -}; - -/* extension for audio port configuration structure when the audio port is an - * audio session */ -struct audio_port_config_session_ext { - audio_session_t session; /* audio session */ -}; - -/* audio port configuration structure used to specify a particular configuration of - * an audio port */ -struct audio_port_config { - audio_port_handle_t id; /* port unique ID */ - audio_port_role_t role; /* sink or source */ - audio_port_type_t type; /* device, mix ... */ - unsigned int config_mask; /* e.g AUDIO_PORT_CONFIG_ALL */ - unsigned int sample_rate; /* sampling rate in Hz */ - audio_channel_mask_t channel_mask; /* channel mask if applicable */ - audio_format_t format; /* format if applicable */ - struct audio_gain_config gain; /* gain to apply if applicable */ - union { - struct audio_port_config_device_ext device; /* device specific info */ - struct audio_port_config_mix_ext mix; /* mix specific info */ - struct audio_port_config_session_ext session; /* session specific info */ - } ext; -}; - - -/* max number of sampling rates in audio port */ -#define AUDIO_PORT_MAX_SAMPLING_RATES 32 -/* max number of channel masks in audio port */ -#define AUDIO_PORT_MAX_CHANNEL_MASKS 32 -/* max number of audio formats in audio port */ -#define AUDIO_PORT_MAX_FORMATS 32 -/* max number of gain controls in audio port */ -#define AUDIO_PORT_MAX_GAINS 16 - -/* extension for audio port structure when the audio port is a hardware device */ -struct audio_port_device_ext { - audio_module_handle_t hw_module; /* module the device is attached to */ - audio_devices_t type; /* device type (e.g AUDIO_DEVICE_OUT_SPEAKER) */ - char address[AUDIO_DEVICE_MAX_ADDRESS_LEN]; -}; - -/* extension for audio port structure when the audio port is a sub mix */ -struct audio_port_mix_ext { - audio_module_handle_t hw_module; /* module the stream is attached to */ - audio_io_handle_t handle; /* I/O handle of the input.output stream */ - audio_mix_latency_class_t latency_class; /* latency class */ - // other attributes: routing strategies -}; - -/* extension for audio port structure when the audio port is an audio session */ -struct audio_port_session_ext { - audio_session_t session; /* audio session */ -}; - -struct audio_port { - audio_port_handle_t id; /* port unique ID */ - audio_port_role_t role; /* sink or source */ - audio_port_type_t type; /* device, mix ... */ - char name[AUDIO_PORT_MAX_NAME_LEN]; - unsigned int num_sample_rates; /* number of sampling rates in following array */ - unsigned int sample_rates[AUDIO_PORT_MAX_SAMPLING_RATES]; - unsigned int num_channel_masks; /* number of channel masks in following array */ - audio_channel_mask_t channel_masks[AUDIO_PORT_MAX_CHANNEL_MASKS]; - unsigned int num_formats; /* number of formats in following array */ - audio_format_t formats[AUDIO_PORT_MAX_FORMATS]; - unsigned int num_gains; /* number of gains in following array */ - struct audio_gain gains[AUDIO_PORT_MAX_GAINS]; - struct audio_port_config active_config; /* current audio port configuration */ - union { - struct audio_port_device_ext device; - struct audio_port_mix_ext mix; - struct audio_port_session_ext session; - } ext; -}; - -/* An audio patch represents a connection between one or more source ports and - * one or more sink ports. Patches are connected and disconnected by audio policy manager or by - * applications via framework APIs. - * Each patch is identified by a handle at the interface used to create that patch. For instance, - * when a patch is created by the audio HAL, the HAL allocates and returns a handle. - * This handle is unique to a given audio HAL hardware module. - * But the same patch receives another system wide unique handle allocated by the framework. - * This unique handle is used for all transactions inside the framework. - */ -typedef int audio_patch_handle_t; - -#define AUDIO_PATCH_PORTS_MAX 16 - -struct audio_patch { - audio_patch_handle_t id; /* patch unique ID */ - unsigned int num_sources; /* number of sources in following array */ - struct audio_port_config sources[AUDIO_PATCH_PORTS_MAX]; - unsigned int num_sinks; /* number of sinks in following array */ - struct audio_port_config sinks[AUDIO_PATCH_PORTS_MAX]; -}; - - - -/* a HW synchronization source returned by the audio HAL */ -typedef uint32_t audio_hw_sync_t; - -/* an invalid HW synchronization source indicating an error */ -#define AUDIO_HW_SYNC_INVALID 0 - -/** - * Mmap buffer descriptor returned by audio_stream->create_mmap_buffer(). - * note\ Used by streams opened in mmap mode. - */ -struct audio_mmap_buffer_info { - void* shared_memory_address; /**< base address of mmap memory buffer. - For use by local process only */ - int32_t shared_memory_fd; /**< FD for mmap memory buffer */ - int32_t buffer_size_frames; /**< total buffer size in frames */ - int32_t burst_size_frames; /**< transfer size granularity in frames */ -}; - -/** - * Mmap buffer read/write position returned by audio_stream->get_mmap_position(). - * note\ Used by streams opened in mmap mode. - */ -struct audio_mmap_position { - int64_t time_nanoseconds; /**< timestamp in ns, CLOCK_MONOTONIC */ - int32_t position_frames; /**< increasing 32 bit frame count reset when stream->stop() - is called */ -}; - -/** Metadata of a record track for an in stream. */ -typedef struct playback_track_metadata { - audio_usage_t usage; - audio_content_type_t content_type; - float gain; // Normalized linear volume. 0=silence, 1=0dbfs... -} playback_track_metadata_t; - -/** Metadata of a playback track for an out stream. */ -typedef struct record_track_metadata { - audio_source_t source; - float gain; // Normalized linear volume. 0=silence, 1=0dbfs... -} record_track_metadata_t; - - -/****************************** - * Helper functions - *****************************/ - -static inline bool audio_is_output_device(audio_devices_t device) -{ - if (((device & AUDIO_DEVICE_BIT_IN) == 0) && - (popcount(device) == 1) && ((device & ~AUDIO_DEVICE_OUT_ALL) == 0)) - return true; - else - return false; -} - -static inline bool audio_is_input_device(audio_devices_t device) -{ - if ((device & AUDIO_DEVICE_BIT_IN) != 0) { - device &= ~AUDIO_DEVICE_BIT_IN; - if ((popcount(device) == 1) && ((device & ~AUDIO_DEVICE_IN_ALL) == 0)) - return true; - } - return false; -} - -static inline bool audio_is_output_devices(audio_devices_t device) -{ - return (device & AUDIO_DEVICE_BIT_IN) == 0; -} - -static inline bool audio_is_a2dp_in_device(audio_devices_t device) -{ - if ((device & AUDIO_DEVICE_BIT_IN) != 0) { - device &= ~AUDIO_DEVICE_BIT_IN; - if ((popcount(device) == 1) && (device & AUDIO_DEVICE_IN_BLUETOOTH_A2DP)) - return true; - } - return false; -} - -static inline bool audio_is_a2dp_out_device(audio_devices_t device) -{ - if ((popcount(device) == 1) && (device & AUDIO_DEVICE_OUT_ALL_A2DP)) - return true; - else - return false; -} - -// Deprecated - use audio_is_a2dp_out_device() instead -static inline bool audio_is_a2dp_device(audio_devices_t device) -{ - return audio_is_a2dp_out_device(device); -} - -static inline bool audio_is_bluetooth_sco_device(audio_devices_t device) -{ - if ((device & AUDIO_DEVICE_BIT_IN) == 0) { - if ((popcount(device) == 1) && ((device & ~AUDIO_DEVICE_OUT_ALL_SCO) == 0)) - return true; - } else { - device &= ~AUDIO_DEVICE_BIT_IN; - if ((popcount(device) == 1) && ((device & ~AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET) == 0)) - return true; - } - - return false; -} - -static inline bool audio_is_hearing_aid_out_device(audio_devices_t device) -{ - return device == AUDIO_DEVICE_OUT_HEARING_AID; -} - -static inline bool audio_is_usb_out_device(audio_devices_t device) -{ - return ((popcount(device) == 1) && (device & AUDIO_DEVICE_OUT_ALL_USB)); -} - -static inline bool audio_is_usb_in_device(audio_devices_t device) -{ - if ((device & AUDIO_DEVICE_BIT_IN) != 0) { - device &= ~AUDIO_DEVICE_BIT_IN; - if (popcount(device) == 1 && (device & AUDIO_DEVICE_IN_ALL_USB) != 0) - return true; - } - return false; -} - -/* OBSOLETE - use audio_is_usb_out_device() instead. */ -static inline bool audio_is_usb_device(audio_devices_t device) -{ - return audio_is_usb_out_device(device); -} - -static inline bool audio_is_remote_submix_device(audio_devices_t device) -{ - if ((audio_is_output_devices(device) && - (device & AUDIO_DEVICE_OUT_REMOTE_SUBMIX) == AUDIO_DEVICE_OUT_REMOTE_SUBMIX) - || (!audio_is_output_devices(device) && - (device & AUDIO_DEVICE_IN_REMOTE_SUBMIX) == AUDIO_DEVICE_IN_REMOTE_SUBMIX)) - return true; - else - return false; -} - -/* Returns true if: - * representation is valid, and - * there is at least one channel bit set which _could_ correspond to an input channel, and - * there are no channel bits set which could _not_ correspond to an input channel. - * Otherwise returns false. - */ -static inline bool audio_is_input_channel(audio_channel_mask_t channel) -{ - uint32_t bits = audio_channel_mask_get_bits(channel); - switch (audio_channel_mask_get_representation(channel)) { - case AUDIO_CHANNEL_REPRESENTATION_POSITION: - if (bits & ~AUDIO_CHANNEL_IN_ALL) { - bits = 0; - } - // fall through - case AUDIO_CHANNEL_REPRESENTATION_INDEX: - return bits != 0; - default: - return false; - } -} - -/* Returns true if: - * representation is valid, and - * there is at least one channel bit set which _could_ correspond to an output channel, and - * there are no channel bits set which could _not_ correspond to an output channel. - * Otherwise returns false. - */ -static inline bool audio_is_output_channel(audio_channel_mask_t channel) -{ - uint32_t bits = audio_channel_mask_get_bits(channel); - switch (audio_channel_mask_get_representation(channel)) { - case AUDIO_CHANNEL_REPRESENTATION_POSITION: - if (bits & ~AUDIO_CHANNEL_OUT_ALL) { - bits = 0; - } - // fall through - case AUDIO_CHANNEL_REPRESENTATION_INDEX: - return bits != 0; - default: - return false; - } -} - -/* Returns the number of channels from an input channel mask, - * used in the context of audio input or recording. - * If a channel bit is set which could _not_ correspond to an input channel, - * it is excluded from the count. - * Returns zero if the representation is invalid. - */ -static inline uint32_t audio_channel_count_from_in_mask(audio_channel_mask_t channel) -{ - uint32_t bits = audio_channel_mask_get_bits(channel); - switch (audio_channel_mask_get_representation(channel)) { - case AUDIO_CHANNEL_REPRESENTATION_POSITION: - // TODO: We can now merge with from_out_mask and remove anding - bits &= AUDIO_CHANNEL_IN_ALL; - // fall through - case AUDIO_CHANNEL_REPRESENTATION_INDEX: - return popcount(bits); - default: - return 0; - } -} - -/* Returns the number of channels from an output channel mask, - * used in the context of audio output or playback. - * If a channel bit is set which could _not_ correspond to an output channel, - * it is excluded from the count. - * Returns zero if the representation is invalid. - */ -static inline uint32_t audio_channel_count_from_out_mask(audio_channel_mask_t channel) -{ - uint32_t bits = audio_channel_mask_get_bits(channel); - switch (audio_channel_mask_get_representation(channel)) { - case AUDIO_CHANNEL_REPRESENTATION_POSITION: - // TODO: We can now merge with from_in_mask and remove anding - bits &= AUDIO_CHANNEL_OUT_ALL; - // fall through - case AUDIO_CHANNEL_REPRESENTATION_INDEX: - return popcount(bits); - default: - return 0; - } -} - -/* Derive a channel mask for index assignment from a channel count. - * Returns the matching channel mask, - * or AUDIO_CHANNEL_NONE if the channel count is zero, - * or AUDIO_CHANNEL_INVALID if the channel count exceeds AUDIO_CHANNEL_COUNT_MAX. - */ -static inline audio_channel_mask_t audio_channel_mask_for_index_assignment_from_count( - uint32_t channel_count) -{ - if (channel_count == 0) { - return AUDIO_CHANNEL_NONE; - } - if (channel_count > AUDIO_CHANNEL_COUNT_MAX) { - return AUDIO_CHANNEL_INVALID; - } - uint32_t bits = (1 << channel_count) - 1; - return audio_channel_mask_from_representation_and_bits( - AUDIO_CHANNEL_REPRESENTATION_INDEX, bits); -} - -/* Derive an output channel mask for position assignment from a channel count. - * This is to be used when the content channel mask is unknown. The 1, 2, 4, 5, 6, 7 and 8 channel - * cases are mapped to the standard game/home-theater layouts, but note that 4 is mapped to quad, - * and not stereo + FC + mono surround. A channel count of 3 is arbitrarily mapped to stereo + FC - * for continuity with stereo. - * Returns the matching channel mask, - * or AUDIO_CHANNEL_NONE if the channel count is zero, - * or AUDIO_CHANNEL_INVALID if the channel count exceeds that of the - * configurations for which a default output channel mask is defined. - */ -static inline audio_channel_mask_t audio_channel_out_mask_from_count(uint32_t channel_count) -{ - uint32_t bits; - switch (channel_count) { - case 0: - return AUDIO_CHANNEL_NONE; - case 1: - bits = AUDIO_CHANNEL_OUT_MONO; - break; - case 2: - bits = AUDIO_CHANNEL_OUT_STEREO; - break; - case 3: - bits = AUDIO_CHANNEL_OUT_STEREO | AUDIO_CHANNEL_OUT_FRONT_CENTER; - break; - case 4: // 4.0 - bits = AUDIO_CHANNEL_OUT_QUAD; - break; - case 5: // 5.0 - bits = AUDIO_CHANNEL_OUT_QUAD | AUDIO_CHANNEL_OUT_FRONT_CENTER; - break; - case 6: // 5.1 - bits = AUDIO_CHANNEL_OUT_5POINT1; - break; - case 7: // 6.1 - bits = AUDIO_CHANNEL_OUT_5POINT1 | AUDIO_CHANNEL_OUT_BACK_CENTER; - break; - case 8: - bits = AUDIO_CHANNEL_OUT_7POINT1; - break; - // FIXME FCC_8 - default: - return AUDIO_CHANNEL_INVALID; - } - return audio_channel_mask_from_representation_and_bits( - AUDIO_CHANNEL_REPRESENTATION_POSITION, bits); -} - -/* Derive a default input channel mask from a channel count. - * Assumes a position mask for mono and stereo, or an index mask for channel counts > 2. - * Returns the matching channel mask, - * or AUDIO_CHANNEL_NONE if the channel count is zero, - * or AUDIO_CHANNEL_INVALID if the channel count exceeds that of the - * configurations for which a default input channel mask is defined. - */ -static inline audio_channel_mask_t audio_channel_in_mask_from_count(uint32_t channel_count) -{ - uint32_t bits; - switch (channel_count) { - case 0: - return AUDIO_CHANNEL_NONE; - case 1: - bits = AUDIO_CHANNEL_IN_MONO; - break; - case 2: - bits = AUDIO_CHANNEL_IN_STEREO; - break; - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - // FIXME FCC_8 - return audio_channel_mask_for_index_assignment_from_count(channel_count); - default: - return AUDIO_CHANNEL_INVALID; - } - return audio_channel_mask_from_representation_and_bits( - AUDIO_CHANNEL_REPRESENTATION_POSITION, bits); -} - -static inline audio_channel_mask_t audio_channel_mask_in_to_out(audio_channel_mask_t in) -{ - switch (in) { - case AUDIO_CHANNEL_IN_MONO: - return AUDIO_CHANNEL_OUT_MONO; - case AUDIO_CHANNEL_IN_STEREO: - return AUDIO_CHANNEL_OUT_STEREO; - case AUDIO_CHANNEL_IN_5POINT1: - return AUDIO_CHANNEL_OUT_5POINT1; - case AUDIO_CHANNEL_IN_3POINT1POINT2: - return AUDIO_CHANNEL_OUT_3POINT1POINT2; - case AUDIO_CHANNEL_IN_3POINT0POINT2: - return AUDIO_CHANNEL_OUT_3POINT0POINT2; - case AUDIO_CHANNEL_IN_2POINT1POINT2: - return AUDIO_CHANNEL_OUT_2POINT1POINT2; - case AUDIO_CHANNEL_IN_2POINT0POINT2: - return AUDIO_CHANNEL_OUT_2POINT0POINT2; - default: - return AUDIO_CHANNEL_INVALID; - } -} - -static inline bool audio_is_valid_format(audio_format_t format) -{ - switch (format & AUDIO_FORMAT_MAIN_MASK) { - case AUDIO_FORMAT_PCM: - switch (format) { - case AUDIO_FORMAT_PCM_16_BIT: - case AUDIO_FORMAT_PCM_8_BIT: - case AUDIO_FORMAT_PCM_32_BIT: - case AUDIO_FORMAT_PCM_8_24_BIT: - case AUDIO_FORMAT_PCM_FLOAT: - case AUDIO_FORMAT_PCM_24_BIT_PACKED: - return true; - default: - return false; - } - /* not reached */ - case AUDIO_FORMAT_MP3: - case AUDIO_FORMAT_AMR_NB: - case AUDIO_FORMAT_AMR_WB: - case AUDIO_FORMAT_AAC: - case AUDIO_FORMAT_AAC_ADTS: - case AUDIO_FORMAT_HE_AAC_V1: - case AUDIO_FORMAT_HE_AAC_V2: - case AUDIO_FORMAT_AAC_ELD: - case AUDIO_FORMAT_AAC_XHE: - case AUDIO_FORMAT_VORBIS: - case AUDIO_FORMAT_OPUS: - case AUDIO_FORMAT_AC3: - case AUDIO_FORMAT_E_AC3: - case AUDIO_FORMAT_DTS: - case AUDIO_FORMAT_DTS_HD: - case AUDIO_FORMAT_IEC61937: - case AUDIO_FORMAT_DOLBY_TRUEHD: - case AUDIO_FORMAT_QCELP: - case AUDIO_FORMAT_EVRC: - case AUDIO_FORMAT_EVRCB: - case AUDIO_FORMAT_EVRCWB: - case AUDIO_FORMAT_AAC_ADIF: - case AUDIO_FORMAT_AMR_WB_PLUS: - case AUDIO_FORMAT_MP2: - case AUDIO_FORMAT_EVRCNW: - case AUDIO_FORMAT_FLAC: - case AUDIO_FORMAT_ALAC: - case AUDIO_FORMAT_APE: - case AUDIO_FORMAT_WMA: - case AUDIO_FORMAT_WMA_PRO: - case AUDIO_FORMAT_DSD: - case AUDIO_FORMAT_AC4: - case AUDIO_FORMAT_LDAC: - case AUDIO_FORMAT_E_AC3_JOC: - case AUDIO_FORMAT_MAT_1_0: - case AUDIO_FORMAT_MAT_2_0: - case AUDIO_FORMAT_MAT_2_1: - return true; - default: - return false; - } -} - -/** - * Extract the primary format, eg. PCM, AC3, etc. - */ -static inline audio_format_t audio_get_main_format(audio_format_t format) -{ - return (audio_format_t)(format & AUDIO_FORMAT_MAIN_MASK); -} - -/** - * Is the data plain PCM samples that can be scaled and mixed? - */ -static inline bool audio_is_linear_pcm(audio_format_t format) -{ - return (audio_get_main_format(format) == AUDIO_FORMAT_PCM); -} - -/** - * For this format, is the number of PCM audio frames directly proportional - * to the number of data bytes? - * - * In other words, is the format transported as PCM audio samples, - * but not necessarily scalable or mixable. - * This returns true for real PCM, but also for AUDIO_FORMAT_IEC61937, - * which is transported as 16 bit PCM audio, but where the encoded data - * cannot be mixed or scaled. - */ -static inline bool audio_has_proportional_frames(audio_format_t format) -{ - audio_format_t mainFormat = audio_get_main_format(format); - return (mainFormat == AUDIO_FORMAT_PCM - || mainFormat == AUDIO_FORMAT_IEC61937); -} - -static inline size_t audio_bytes_per_sample(audio_format_t format) -{ - size_t size = 0; - - switch (format) { - case AUDIO_FORMAT_PCM_32_BIT: - case AUDIO_FORMAT_PCM_8_24_BIT: - size = sizeof(int32_t); - break; - case AUDIO_FORMAT_PCM_24_BIT_PACKED: - size = sizeof(uint8_t) * 3; - break; - case AUDIO_FORMAT_PCM_16_BIT: - case AUDIO_FORMAT_IEC61937: - size = sizeof(int16_t); - break; - case AUDIO_FORMAT_PCM_8_BIT: - size = sizeof(uint8_t); - break; - case AUDIO_FORMAT_PCM_FLOAT: - size = sizeof(float); - break; - default: - break; - } - return size; -} - -static inline size_t audio_bytes_per_frame(uint32_t channel_count, audio_format_t format) -{ - // cannot overflow for reasonable channel_count - return channel_count * audio_bytes_per_sample(format); -} - -/* converts device address to string sent to audio HAL via set_parameters */ -static inline char *audio_device_address_to_parameter(audio_devices_t device, const char *address) -{ - const size_t kSize = AUDIO_DEVICE_MAX_ADDRESS_LEN + sizeof("a2dp_sink_address="); - char param[kSize]; - - if (device & AUDIO_DEVICE_OUT_ALL_A2DP) - snprintf(param, kSize, "%s=%s", "a2dp_sink_address", address); - else if (device & AUDIO_DEVICE_OUT_REMOTE_SUBMIX) - snprintf(param, kSize, "%s=%s", "mix", address); - else - snprintf(param, kSize, "%s", address); - - return strdup(param); -} - -static inline bool audio_device_is_digital(audio_devices_t device) { - if ((device & AUDIO_DEVICE_BIT_IN) != 0) { - // input - return (~AUDIO_DEVICE_BIT_IN & device & (AUDIO_DEVICE_IN_ALL_USB | - AUDIO_DEVICE_IN_HDMI | - AUDIO_DEVICE_IN_SPDIF | - AUDIO_DEVICE_IN_IP | - AUDIO_DEVICE_IN_BUS)) != 0; - } else { - // output - return (device & (AUDIO_DEVICE_OUT_ALL_USB | - AUDIO_DEVICE_OUT_HDMI | - AUDIO_DEVICE_OUT_HDMI_ARC | - AUDIO_DEVICE_OUT_SPDIF | - AUDIO_DEVICE_OUT_IP | - AUDIO_DEVICE_OUT_BUS)) != 0; - } -} - -// Unique effect ID (can be generated from the following site: -// http://www.itu.int/ITU-T/asn1/uuid.html) -// This struct is used for effects identification and in soundtrigger. -typedef struct audio_uuid_s { - uint32_t timeLow; - uint16_t timeMid; - uint16_t timeHiAndVersion; - uint16_t clockSeq; - uint8_t node[6]; -} audio_uuid_t; - -//TODO: audio_microphone_location_t need to move to HAL v4.0 -typedef enum { - AUDIO_MICROPHONE_LOCATION_UNKNOWN = 0, - AUDIO_MICROPHONE_LOCATION_MAINBODY = 1, - AUDIO_MICROPHONE_LOCATION_MAINBODY_MOVABLE = 2, - AUDIO_MICROPHONE_LOCATION_PERIPHERAL = 3, - AUDIO_MICROPHONE_LOCATION_CNT = 4, -} audio_microphone_location_t; - -//TODO: audio_microphone_directionality_t need to move to HAL v4.0 -typedef enum { - AUDIO_MICROPHONE_DIRECTIONALITY_UNKNOWN = 0, - AUDIO_MICROPHONE_DIRECTIONALITY_OMNI = 1, - AUDIO_MICROPHONE_DIRECTIONALITY_BI_DIRECTIONAL = 2, - AUDIO_MICROPHONE_DIRECTIONALITY_CARDIOID = 3, - AUDIO_MICROPHONE_DIRECTIONALITY_HYPER_CARDIOID = 4, - AUDIO_MICROPHONE_DIRECTIONALITY_SUPER_CARDIOID = 5, - AUDIO_MICROPHONE_DIRECTIONALITY_CNT = 6, -} audio_microphone_directionality_t; - -/* A 3D point which could be used to represent geometric location - * or orientation of a microphone. - */ -struct audio_microphone_coordinate { - float x; - float y; - float z; -}; - -/* An number to indicate which group the microphone locate. Main body is - * usually group 0. Developer could use this value to group the microphones - * that locate on the same peripheral or attachments. - */ -typedef int audio_microphone_group_t; - -typedef enum { - AUDIO_MICROPHONE_CHANNEL_MAPPING_UNUSED = 0, - AUDIO_MICROPHONE_CHANNEL_MAPPING_DIRECT = 1, - AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED = 2, - AUDIO_MICROPHONE_CHANNEL_MAPPING_CNT = 3, -} audio_microphone_channel_mapping_t; - -/* the maximum length for the microphone id */ -#define AUDIO_MICROPHONE_ID_MAX_LEN 32 -/* max number of frequency responses in a frequency response table */ -#define AUDIO_MICROPHONE_MAX_FREQUENCY_RESPONSES 256 -/* max number of microphone */ -#define AUDIO_MICROPHONE_MAX_COUNT 32 -/* the value of unknown spl */ -#define AUDIO_MICROPHONE_SPL_UNKNOWN -FLT_MAX -/* the value of unknown sensitivity */ -#define AUDIO_MICROPHONE_SENSITIVITY_UNKNOWN -FLT_MAX -/* the value of unknown coordinate */ -#define AUDIO_MICROPHONE_COORDINATE_UNKNOWN -FLT_MAX -/* the value used as address when the address of bottom microphone is empty */ -#define AUDIO_BOTTOM_MICROPHONE_ADDRESS "bottom" -/* the value used as address when the address of back microphone is empty */ -#define AUDIO_BACK_MICROPHONE_ADDRESS "back" - -struct audio_microphone_characteristic_t { - char device_id[AUDIO_MICROPHONE_ID_MAX_LEN]; - audio_port_handle_t id; - audio_devices_t device; - char address[AUDIO_DEVICE_MAX_ADDRESS_LEN]; - audio_microphone_channel_mapping_t channel_mapping[AUDIO_CHANNEL_COUNT_MAX]; - audio_microphone_location_t location; - audio_microphone_group_t group; - unsigned int index_in_the_group; - float sensitivity; - float max_spl; - float min_spl; - audio_microphone_directionality_t directionality; - unsigned int num_frequency_responses; - float frequency_responses[2][AUDIO_MICROPHONE_MAX_FREQUENCY_RESPONSES]; - struct audio_microphone_coordinate geometric_location; - struct audio_microphone_coordinate orientation; -}; - -__END_DECLS - -/** - * List of known audio HAL modules. This is the base name of the audio HAL - * library composed of the "audio." prefix, one of the base names below and - * a suffix specific to the device. - * e.g: audio.primary.goldfish.so or audio.a2dp.default.so - * - * The same module names are used in audio policy configuration files. - */ - -#define AUDIO_HARDWARE_MODULE_ID_PRIMARY "primary" -#define AUDIO_HARDWARE_MODULE_ID_A2DP "a2dp" -#define AUDIO_HARDWARE_MODULE_ID_USB "usb" -#define AUDIO_HARDWARE_MODULE_ID_REMOTE_SUBMIX "r_submix" -#define AUDIO_HARDWARE_MODULE_ID_CODEC_OFFLOAD "codec_offload" -#define AUDIO_HARDWARE_MODULE_ID_STUB "stub" -#define AUDIO_HARDWARE_MODULE_ID_HEARING_AID "hearing_aid" - -/** - * Multi-Stream Decoder (MSD) HAL service name. MSD HAL is used to mix - * encoded streams together with PCM streams, producing re-encoded - * streams or PCM streams. - * - * The service must register itself using this name, and audioserver - * tries to instantiate a device factory using this name as well. - * Note that the HIDL implementation library file name *must* have the - * suffix "msd" in order to be picked up by HIDL that is: - * - * android.hardware.audio@x.x-implmsd.so - */ -#define AUDIO_HAL_SERVICE_NAME_MSD "msd" - -/** - * Parameter definitions. - * Note that in the framework code it's recommended to use AudioParameter.h - * instead of these preprocessor defines, and for sure avoid just copying - * the constant values. - */ - -#define AUDIO_PARAMETER_VALUE_ON "on" -#define AUDIO_PARAMETER_VALUE_OFF "off" - -/** - * audio device parameters - */ - -/* BT SCO Noise Reduction + Echo Cancellation parameters */ -#define AUDIO_PARAMETER_KEY_BT_NREC "bt_headset_nrec" - -/* Get a new HW synchronization source identifier. - * Return a valid source (positive integer) or AUDIO_HW_SYNC_INVALID if an error occurs - * or no HW sync is available. */ -#define AUDIO_PARAMETER_HW_AV_SYNC "hw_av_sync" - -/* Screen state */ -#define AUDIO_PARAMETER_KEY_SCREEN_STATE "screen_state" - -/** - * audio stream parameters - */ - -#define AUDIO_PARAMETER_STREAM_ROUTING "routing" /* audio_devices_t */ -#define AUDIO_PARAMETER_STREAM_FORMAT "format" /* audio_format_t */ -#define AUDIO_PARAMETER_STREAM_CHANNELS "channels" /* audio_channel_mask_t */ -#define AUDIO_PARAMETER_STREAM_FRAME_COUNT "frame_count" /* size_t */ -#define AUDIO_PARAMETER_STREAM_INPUT_SOURCE "input_source" /* audio_source_t */ -#define AUDIO_PARAMETER_STREAM_SAMPLING_RATE "sampling_rate" /* uint32_t */ - -/* Request the presentation id to be decoded by a next gen audio decoder */ -#define AUDIO_PARAMETER_STREAM_PRESENTATION_ID "presentation_id" /* int32_t */ - -/* Request the program id to be decoded by a next gen audio decoder */ -#define AUDIO_PARAMETER_STREAM_PROGRAM_ID "program_id" /* int32_t */ - -#define AUDIO_PARAMETER_DEVICE_CONNECT "connect" /* audio_devices_t */ -#define AUDIO_PARAMETER_DEVICE_DISCONNECT "disconnect" /* audio_devices_t */ - -/* Enable mono audio playback if 1, else should be 0. */ -#define AUDIO_PARAMETER_MONO_OUTPUT "mono_output" - -/* Set the HW synchronization source for an output stream. */ -#define AUDIO_PARAMETER_STREAM_HW_AV_SYNC "hw_av_sync" - -/* Query supported formats. The response is a '|' separated list of strings from - * audio_format_t enum e.g: "sup_formats=AUDIO_FORMAT_PCM_16_BIT" */ -#define AUDIO_PARAMETER_STREAM_SUP_FORMATS "sup_formats" -/* Query supported channel masks. The response is a '|' separated list of strings from - * audio_channel_mask_t enum e.g: "sup_channels=AUDIO_CHANNEL_OUT_STEREO|AUDIO_CHANNEL_OUT_MONO" */ -#define AUDIO_PARAMETER_STREAM_SUP_CHANNELS "sup_channels" -/* Query supported sampling rates. The response is a '|' separated list of integer values e.g: - * "sup_sampling_rates=44100|48000" */ -#define AUDIO_PARAMETER_STREAM_SUP_SAMPLING_RATES "sup_sampling_rates" - -#define AUDIO_PARAMETER_VALUE_LIST_SEPARATOR "|" - -/* Reconfigure offloaded A2DP codec */ -#define AUDIO_PARAMETER_RECONFIG_A2DP "reconfigA2dp" -/* Query if HwModule supports reconfiguration of offloaded A2DP codec */ -#define AUDIO_PARAMETER_A2DP_RECONFIG_SUPPORTED "isReconfigA2dpSupported" - -/** - * audio codec parameters - */ - -#define AUDIO_OFFLOAD_CODEC_PARAMS "music_offload_codec_param" -#define AUDIO_OFFLOAD_CODEC_BIT_PER_SAMPLE "music_offload_bit_per_sample" -#define AUDIO_OFFLOAD_CODEC_BIT_RATE "music_offload_bit_rate" -#define AUDIO_OFFLOAD_CODEC_AVG_BIT_RATE "music_offload_avg_bit_rate" -#define AUDIO_OFFLOAD_CODEC_ID "music_offload_codec_id" -#define AUDIO_OFFLOAD_CODEC_BLOCK_ALIGN "music_offload_block_align" -#define AUDIO_OFFLOAD_CODEC_SAMPLE_RATE "music_offload_sample_rate" -#define AUDIO_OFFLOAD_CODEC_ENCODE_OPTION "music_offload_encode_option" -#define AUDIO_OFFLOAD_CODEC_NUM_CHANNEL "music_offload_num_channels" -#define AUDIO_OFFLOAD_CODEC_DOWN_SAMPLING "music_offload_down_sampling" -#define AUDIO_OFFLOAD_CODEC_DELAY_SAMPLES "delay_samples" -#define AUDIO_OFFLOAD_CODEC_PADDING_SAMPLES "padding_samples" - -#endif // ANDROID_AUDIO_CORE_H diff --git a/include/hardware/system/audio_policy.h b/include/hardware/system/audio_policy.h deleted file mode 100644 index 2d69507..0000000 --- a/include/hardware/system/audio_policy.h +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright (C) 2011 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -#ifndef ANDROID_AUDIO_POLICY_CORE_H -#define ANDROID_AUDIO_POLICY_CORE_H - -#include -#include -#include - -#include "cutils/bitops.h" - -__BEGIN_DECLS - -/* The enums were moved here mostly from - * frameworks/base/include/media/AudioSystem.h - */ - -/* device categories used for audio_policy->set_force_use() */ -typedef enum -{ - AUDIO_POLICY_FORCE_NONE, - AUDIO_POLICY_FORCE_SPEAKER, - AUDIO_POLICY_FORCE_HEADPHONES, - AUDIO_POLICY_FORCE_BT_SCO, - AUDIO_POLICY_FORCE_BT_A2DP, - AUDIO_POLICY_FORCE_WIRED_ACCESSORY, - AUDIO_POLICY_FORCE_BT_CAR_DOCK, - AUDIO_POLICY_FORCE_BT_DESK_DOCK, - AUDIO_POLICY_FORCE_ANALOG_DOCK, - AUDIO_POLICY_FORCE_DIGITAL_DOCK, - AUDIO_POLICY_FORCE_NO_BT_A2DP, /* A2DP sink is not preferred to speaker or wired HS */ - AUDIO_POLICY_FORCE_SYSTEM_ENFORCED, - AUDIO_POLICY_FORCE_HDMI_SYSTEM_AUDIO_ENFORCED, - - AUDIO_POLICY_FORCE_CFG_CNT, - AUDIO_POLICY_FORCE_CFG_MAX = AUDIO_POLICY_FORCE_CFG_CNT - 1, - - AUDIO_POLICY_FORCE_DEFAULT = AUDIO_POLICY_FORCE_NONE, -} audio_policy_forced_cfg_t; - -/* usages used for audio_policy->set_force_use() */ -typedef enum -{ - AUDIO_POLICY_FORCE_FOR_COMMUNICATION, - AUDIO_POLICY_FORCE_FOR_MEDIA, - AUDIO_POLICY_FORCE_FOR_RECORD, - AUDIO_POLICY_FORCE_FOR_DOCK, - AUDIO_POLICY_FORCE_FOR_SYSTEM, - AUDIO_POLICY_FORCE_FOR_HDMI_SYSTEM_AUDIO, - - AUDIO_POLICY_FORCE_USE_CNT, - AUDIO_POLICY_FORCE_USE_MAX = AUDIO_POLICY_FORCE_USE_CNT - 1, -} audio_policy_force_use_t; - -/* device connection states used for audio_policy->set_device_connection_state() - */ -typedef enum -{ - AUDIO_POLICY_DEVICE_STATE_UNAVAILABLE, - AUDIO_POLICY_DEVICE_STATE_AVAILABLE, - - AUDIO_POLICY_DEVICE_STATE_CNT, - AUDIO_POLICY_DEVICE_STATE_MAX = AUDIO_POLICY_DEVICE_STATE_CNT - 1, -} audio_policy_dev_state_t; - -typedef enum -{ - /* Used to generate a tone to notify the user of a - * notification/alarm/ringtone while they are in a call. */ - AUDIO_POLICY_TONE_IN_CALL_NOTIFICATION = 0, - - AUDIO_POLICY_TONE_CNT, - AUDIO_POLICY_TONE_MAX = AUDIO_POLICY_TONE_CNT - 1, -} audio_policy_tone_t; - - -static inline bool audio_is_low_visibility(audio_stream_type_t stream) -{ - switch (stream) - { - case AUDIO_STREAM_SYSTEM: - case AUDIO_STREAM_NOTIFICATION: - case AUDIO_STREAM_RING: - return true; - default: - return false; - } -} - - -__END_DECLS - -#endif // ANDROID_AUDIO_POLICY_CORE_H diff --git a/include/hardware/system/cutils/atomic.h b/include/hardware/system/cutils/atomic.h deleted file mode 100644 index 4587835..0000000 --- a/include/hardware/system/cutils/atomic.h +++ /dev/null @@ -1,152 +0,0 @@ -/* - * Copyright (C) 2007 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef ANDROID_CUTILS_ATOMIC_H -#define ANDROID_CUTILS_ATOMIC_H - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * A handful of basic atomic operations. - * THESE ARE HERE FOR LEGACY REASONS ONLY. AVOID. - * - * PREFERRED ALTERNATIVES: - * - Use C++/C/pthread locks/mutexes whenever there is not a - * convincing reason to do otherwise. Note that very clever and - * complicated, but correct, lock-free code is often slower than - * using locks, especially where nontrivial data structures - * are involved. - * - C11 stdatomic.h. - * - Where supported, C++11 std::atomic . - * - * PLEASE STOP READING HERE UNLESS YOU ARE TRYING TO UNDERSTAND - * OR UPDATE OLD CODE. - * - * The "acquire" and "release" terms can be defined intuitively in terms - * of the placement of memory barriers in a simple lock implementation: - * - wait until compare-and-swap(lock-is-free --> lock-is-held) succeeds - * - barrier - * - [do work] - * - barrier - * - store(lock-is-free) - * In very crude terms, the initial (acquire) barrier prevents any of the - * "work" from happening before the lock is held, and the later (release) - * barrier ensures that all of the work happens before the lock is released. - * (Think of cached writes, cache read-ahead, and instruction reordering - * around the CAS and store instructions.) - * - * The barriers must apply to both the compiler and the CPU. Note it is - * legal for instructions that occur before an "acquire" barrier to be - * moved down below it, and for instructions that occur after a "release" - * barrier to be moved up above it. - * - * The ARM-driven implementation we use here is short on subtlety, - * and actually requests a full barrier from the compiler and the CPU. - * The only difference between acquire and release is in whether they - * are issued before or after the atomic operation with which they - * are associated. To ease the transition to C/C++ atomic intrinsics, - * you should not rely on this, and instead assume that only the minimal - * acquire/release protection is provided. - * - * NOTE: all int32_t* values are expected to be aligned on 32-bit boundaries. - * If they are not, atomicity is not guaranteed. - */ - -/* - * Basic arithmetic and bitwise operations. These all provide a - * barrier with "release" ordering, and return the previous value. - * - * These have the same characteristics (e.g. what happens on overflow) - * as the equivalent non-atomic C operations. - */ -int32_t android_atomic_inc(volatile int32_t* addr); -int32_t android_atomic_dec(volatile int32_t* addr); -int32_t android_atomic_add(int32_t value, volatile int32_t* addr); -int32_t android_atomic_and(int32_t value, volatile int32_t* addr); -int32_t android_atomic_or(int32_t value, volatile int32_t* addr); - -/* - * Perform an atomic load with "acquire" or "release" ordering. - * - * Note that the notion of a "release" ordering for a load does not - * really fit into the C11 or C++11 memory model. The extra ordering - * is normally observable only by code using memory_order_relaxed - * atomics, or data races. In the rare cases in which such ordering - * is called for, use memory_order_relaxed atomics and a leading - * atomic_thread_fence (typically with memory_order_acquire, - * not memory_order_release!) instead. If you do not understand - * this comment, you are in the vast majority, and should not be - * using release loads or replacing them with anything other than - * locks or default sequentially consistent atomics. - * - * This is only necessary if you need the memory barrier. A 32-bit read - * from a 32-bit aligned address is atomic on all supported platforms. - */ -int32_t android_atomic_acquire_load(volatile const int32_t* addr); -int32_t android_atomic_release_load(volatile const int32_t* addr); - -/* - * Perform an atomic store with "acquire" or "release" ordering. - * - * Note that the notion of a "acquire" ordering for a store does not - * really fit into the C11 or C++11 memory model. The extra ordering - * is normally observable only by code using memory_order_relaxed - * atomics, or data races. In the rare cases in which such ordering - * is called for, use memory_order_relaxed atomics and a trailing - * atomic_thread_fence (typically with memory_order_release, - * not memory_order_acquire!) instead. - * - * This is only necessary if you need the memory barrier. A 32-bit write - * to a 32-bit aligned address is atomic on all supported platforms. - */ -void android_atomic_acquire_store(int32_t value, volatile int32_t* addr); -void android_atomic_release_store(int32_t value, volatile int32_t* addr); - -/* - * Compare-and-set operation with "acquire" or "release" ordering. - * - * This returns zero if the new value was successfully stored, which will - * only happen when *addr == oldvalue. - * - * (The return value is inverted from implementations on other platforms, - * but matches the ARM ldrex/strex result.) - * - * Implementations that use the release CAS in a loop may be less efficient - * than possible, because we re-issue the memory barrier on each iteration. - */ -int android_atomic_acquire_cas(int32_t oldvalue, int32_t newvalue, - volatile int32_t* addr); -int android_atomic_release_cas(int32_t oldvalue, int32_t newvalue, - volatile int32_t* addr); - -/* - * Aliases for code using an older version of this header. These are now - * deprecated and should not be used. The definitions will be removed - * in a future release. - */ -#define android_atomic_write android_atomic_release_store -#define android_atomic_cmpxchg android_atomic_release_cas - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif // ANDROID_CUTILS_ATOMIC_H diff --git a/include/hardware/system/cutils/bitops.h b/include/hardware/system/cutils/bitops.h deleted file mode 100644 index bdd989f..0000000 --- a/include/hardware/system/cutils/bitops.h +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright (C) 2011 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef __CUTILS_BITOPS_H -#define __CUTILS_BITOPS_H - -#include -#include -#include -#include - -__BEGIN_DECLS - -/* - * Bitmask Operations - * - * Note this doesn't provide any locking/exclusion, and isn't atomic. - * Additionally no bounds checking is done on the bitmask array. - * - * Example: - * - * int num_resources; - * unsigned int resource_bits[BITS_TO_WORDS(num_resources)]; - * bitmask_init(resource_bits, num_resources); - * ... - * int bit = bitmask_ffz(resource_bits, num_resources); - * bitmask_set(resource_bits, bit); - * ... - * if (bitmask_test(resource_bits, bit)) { ... } - * ... - * bitmask_clear(resource_bits, bit); - * - */ - -#define BITS_PER_WORD (sizeof(unsigned int) * 8) -#define BITS_TO_WORDS(x) (((x) + BITS_PER_WORD - 1) / BITS_PER_WORD) -#define BIT_IN_WORD(x) ((x) % BITS_PER_WORD) -#define BIT_WORD(x) ((x) / BITS_PER_WORD) -#define BIT_MASK(x) (1 << BIT_IN_WORD(x)) - -static inline void bitmask_init(unsigned int *bitmask, int num_bits) -{ - memset(bitmask, 0, BITS_TO_WORDS(num_bits)*sizeof(unsigned int)); -} - -static inline int bitmask_ffz(unsigned int *bitmask, int num_bits) -{ - int bit, result; - size_t i; - for (i = 0; i < BITS_TO_WORDS(num_bits); i++) - { - bit = ffs(~bitmask[i]); - if (bit) - { - // ffs is 1-indexed, return 0-indexed result - bit--; - result = BITS_PER_WORD * i + bit; - if (result >= num_bits) - return -1; - return result; - } - } - return -1; -} - -static inline int bitmask_weight(unsigned int *bitmask, int num_bits) -{ - size_t i; - int weight = 0; - for (i = 0; i < BITS_TO_WORDS(num_bits); i++) - weight += __builtin_popcount(bitmask[i]); - return weight; -} - -static inline void bitmask_set(unsigned int *bitmask, int bit) -{ - bitmask[BIT_WORD(bit)] |= BIT_MASK(bit); -} - -static inline void bitmask_clear(unsigned int *bitmask, int bit) -{ - bitmask[BIT_WORD(bit)] &= ~BIT_MASK(bit); -} - -static inline bool bitmask_test(unsigned int *bitmask, int bit) -{ - return bitmask[BIT_WORD(bit)] & BIT_MASK(bit); -} - -static inline int popcount(unsigned int x) -{ - return __builtin_popcount(x); -} - -static inline int popcountl(unsigned long x) -{ - return __builtin_popcountl(x); -} - -static inline int popcountll(unsigned long long x) -{ - return __builtin_popcountll(x); -} - -__END_DECLS - -#endif /* __CUTILS_BITOPS_H */ diff --git a/include/hardware/system/cutils/native_handle.h b/include/hardware/system/cutils/native_handle.h deleted file mode 100644 index 9c424c5..0000000 --- a/include/hardware/system/cutils/native_handle.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (C) 2009 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef NATIVE_HANDLE_H_ -#define NATIVE_HANDLE_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct native_handle -{ - int version; /* sizeof(native_handle_t) */ - int numFds; /* number of file-descriptors at &data[0] */ - int numInts; /* number of ints at &data[numFds] */ - int data[0]; /* numFds + numInts ints */ -} native_handle_t; - -/* - * native_handle_close - * - * closes the file descriptors contained in this native_handle_t - * - * return 0 on success, or a negative error code on failure - * - */ -int native_handle_close(const native_handle_t* h); - - -/* - * native_handle_create - * - * creates a native_handle_t and initializes it. must be destroyed with - * native_handle_delete(). - * - */ -native_handle_t* native_handle_create(int numFds, int numInts); - -/* - * native_handle_delete - * - * frees a native_handle_t allocated with native_handle_create(). - * This ONLY frees the memory allocated for the native_handle_t, but doesn't - * close the file descriptors; which can be achieved with native_handle_close(). - * - * return 0 on success, or a negative error code on failure - * - */ -int native_handle_delete(native_handle_t* h); - - -#ifdef __cplusplus -} -#endif - -#endif /* NATIVE_HANDLE_H_ */ diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 0000000..aa5587a --- /dev/null +++ b/settings.gradle @@ -0,0 +1,8 @@ +pluginManagement { + repositories { + google() + mavenCentral() + } +} + +rootProject.name = "V4AFX_Reworked" diff --git a/src/Effect.cpp b/src/cpp/Effect.cpp similarity index 99% rename from src/Effect.cpp rename to src/cpp/Effect.cpp index 0a01aaa..5856bb9 100644 --- a/src/Effect.cpp +++ b/src/cpp/Effect.cpp @@ -3,6 +3,7 @@ // #include +#include #include "Effect.h" #include "constants.h" diff --git a/src/Effect.h b/src/cpp/Effect.h similarity index 94% rename from src/Effect.h rename to src/cpp/Effect.h index 0842524..4c447f4 100644 --- a/src/Effect.h +++ b/src/cpp/Effect.h @@ -5,7 +5,7 @@ #pragma once #include -#include +#include "essential.h" class Effect { public: diff --git a/src/ProcessUnit_FX.cpp b/src/cpp/ProcessUnit_FX.cpp similarity index 100% rename from src/ProcessUnit_FX.cpp rename to src/cpp/ProcessUnit_FX.cpp diff --git a/src/ProcessUnit_FX.h b/src/cpp/ProcessUnit_FX.h similarity index 100% rename from src/ProcessUnit_FX.h rename to src/cpp/ProcessUnit_FX.h diff --git a/src/constants.h b/src/cpp/constants.h similarity index 63% rename from src/constants.h rename to src/cpp/constants.h index 19e0c87..f37280c 100644 --- a/src/constants.h +++ b/src/cpp/constants.h @@ -4,7 +4,15 @@ #pragma once +#ifdef ANDROID_TOOLCHAIN #include +#include +#else +#define __android_log_write(...) do {} while (0) +#define __android_log_print(...) do {} while (0) +#define ANDROID_LOG_INFO 1 +#include +#endif #define STR_HELPER(x) #x #define STR(x) STR_HELPER(x) diff --git a/src/effects/AnalogX.cpp b/src/cpp/effects/AnalogX.cpp similarity index 100% rename from src/effects/AnalogX.cpp rename to src/cpp/effects/AnalogX.cpp diff --git a/src/effects/AnalogX.h b/src/cpp/effects/AnalogX.h similarity index 100% rename from src/effects/AnalogX.h rename to src/cpp/effects/AnalogX.h diff --git a/src/effects/Cure.cpp b/src/cpp/effects/Cure.cpp similarity index 100% rename from src/effects/Cure.cpp rename to src/cpp/effects/Cure.cpp diff --git a/src/effects/Cure.h b/src/cpp/effects/Cure.h similarity index 100% rename from src/effects/Cure.h rename to src/cpp/effects/Cure.h diff --git a/src/effects/DiffSurround.cpp b/src/cpp/effects/DiffSurround.cpp similarity index 100% rename from src/effects/DiffSurround.cpp rename to src/cpp/effects/DiffSurround.cpp diff --git a/src/effects/DiffSurround.h b/src/cpp/effects/DiffSurround.h similarity index 100% rename from src/effects/DiffSurround.h rename to src/cpp/effects/DiffSurround.h diff --git a/src/effects/DynamicSystem.cpp b/src/cpp/effects/DynamicSystem.cpp similarity index 100% rename from src/effects/DynamicSystem.cpp rename to src/cpp/effects/DynamicSystem.cpp diff --git a/src/effects/DynamicSystem.h b/src/cpp/effects/DynamicSystem.h similarity index 100% rename from src/effects/DynamicSystem.h rename to src/cpp/effects/DynamicSystem.h diff --git a/src/effects/Reverberation.cpp b/src/cpp/effects/Reverberation.cpp similarity index 100% rename from src/effects/Reverberation.cpp rename to src/cpp/effects/Reverberation.cpp diff --git a/src/effects/Reverberation.h b/src/cpp/effects/Reverberation.h similarity index 100% rename from src/effects/Reverberation.h rename to src/cpp/effects/Reverberation.h diff --git a/src/effects/SpeakerCorrection.cpp b/src/cpp/effects/SpeakerCorrection.cpp similarity index 100% rename from src/effects/SpeakerCorrection.cpp rename to src/cpp/effects/SpeakerCorrection.cpp diff --git a/src/effects/SpeakerCorrection.h b/src/cpp/effects/SpeakerCorrection.h similarity index 100% rename from src/effects/SpeakerCorrection.h rename to src/cpp/effects/SpeakerCorrection.h diff --git a/src/effects/SpectrumExtend.cpp b/src/cpp/effects/SpectrumExtend.cpp similarity index 100% rename from src/effects/SpectrumExtend.cpp rename to src/cpp/effects/SpectrumExtend.cpp diff --git a/src/effects/SpectrumExtend.h b/src/cpp/effects/SpectrumExtend.h similarity index 100% rename from src/effects/SpectrumExtend.h rename to src/cpp/effects/SpectrumExtend.h diff --git a/src/effects/TubeSimulator.cpp b/src/cpp/effects/TubeSimulator.cpp similarity index 100% rename from src/effects/TubeSimulator.cpp rename to src/cpp/effects/TubeSimulator.cpp diff --git a/src/effects/TubeSimulator.h b/src/cpp/effects/TubeSimulator.h similarity index 100% rename from src/effects/TubeSimulator.h rename to src/cpp/effects/TubeSimulator.h diff --git a/src/effects/VHE.cpp b/src/cpp/effects/VHE.cpp similarity index 100% rename from src/effects/VHE.cpp rename to src/cpp/effects/VHE.cpp diff --git a/src/effects/VHE.h b/src/cpp/effects/VHE.h similarity index 100% rename from src/effects/VHE.h rename to src/cpp/effects/VHE.h diff --git a/src/effects/ViPERClarity.cpp b/src/cpp/effects/ViPERClarity.cpp similarity index 100% rename from src/effects/ViPERClarity.cpp rename to src/cpp/effects/ViPERClarity.cpp diff --git a/src/effects/ViPERClarity.h b/src/cpp/effects/ViPERClarity.h similarity index 100% rename from src/effects/ViPERClarity.h rename to src/cpp/effects/ViPERClarity.h diff --git a/src/functions/kissfft/README.md b/src/cpp/functions/kissfft/README.md similarity index 100% rename from src/functions/kissfft/README.md rename to src/cpp/functions/kissfft/README.md diff --git a/src/functions/kissfft/_kiss_fft_guts.h b/src/cpp/functions/kissfft/_kiss_fft_guts.h similarity index 100% rename from src/functions/kissfft/_kiss_fft_guts.h rename to src/cpp/functions/kissfft/_kiss_fft_guts.h diff --git a/src/functions/kissfft/kiss_fft.cpp b/src/cpp/functions/kissfft/kiss_fft.cpp similarity index 100% rename from src/functions/kissfft/kiss_fft.cpp rename to src/cpp/functions/kissfft/kiss_fft.cpp diff --git a/src/functions/kissfft/kiss_fft.h b/src/cpp/functions/kissfft/kiss_fft.h similarity index 100% rename from src/functions/kissfft/kiss_fft.h rename to src/cpp/functions/kissfft/kiss_fft.h diff --git a/src/functions/kissfft/kiss_fftr.cpp b/src/cpp/functions/kissfft/kiss_fftr.cpp similarity index 100% rename from src/functions/kissfft/kiss_fftr.cpp rename to src/cpp/functions/kissfft/kiss_fftr.cpp diff --git a/src/functions/kissfft/kiss_fftr.h b/src/cpp/functions/kissfft/kiss_fftr.h similarity index 100% rename from src/functions/kissfft/kiss_fftr.h rename to src/cpp/functions/kissfft/kiss_fftr.h diff --git a/src/utils/CAllpassFilter.cpp b/src/cpp/utils/CAllpassFilter.cpp similarity index 100% rename from src/utils/CAllpassFilter.cpp rename to src/cpp/utils/CAllpassFilter.cpp diff --git a/src/utils/CAllpassFilter.h b/src/cpp/utils/CAllpassFilter.h similarity index 100% rename from src/utils/CAllpassFilter.h rename to src/cpp/utils/CAllpassFilter.h diff --git a/src/utils/CCombFilter.cpp b/src/cpp/utils/CCombFilter.cpp similarity index 100% rename from src/utils/CCombFilter.cpp rename to src/cpp/utils/CCombFilter.cpp diff --git a/src/utils/CCombFilter.h b/src/cpp/utils/CCombFilter.h similarity index 100% rename from src/utils/CCombFilter.h rename to src/cpp/utils/CCombFilter.h diff --git a/src/utils/CRevModel.cpp b/src/cpp/utils/CRevModel.cpp similarity index 100% rename from src/utils/CRevModel.cpp rename to src/cpp/utils/CRevModel.cpp diff --git a/src/utils/CRevModel.h b/src/cpp/utils/CRevModel.h similarity index 100% rename from src/utils/CRevModel.h rename to src/cpp/utils/CRevModel.h diff --git a/src/utils/Crossfeed.cpp b/src/cpp/utils/Crossfeed.cpp similarity index 100% rename from src/utils/Crossfeed.cpp rename to src/cpp/utils/Crossfeed.cpp diff --git a/src/utils/Crossfeed.h b/src/cpp/utils/Crossfeed.h similarity index 100% rename from src/utils/Crossfeed.h rename to src/cpp/utils/Crossfeed.h diff --git a/src/utils/DepthSurround.cpp b/src/cpp/utils/DepthSurround.cpp similarity index 100% rename from src/utils/DepthSurround.cpp rename to src/cpp/utils/DepthSurround.cpp diff --git a/src/utils/DepthSurround.h b/src/cpp/utils/DepthSurround.h similarity index 100% rename from src/utils/DepthSurround.h rename to src/cpp/utils/DepthSurround.h diff --git a/src/utils/DynamicBass.cpp b/src/cpp/utils/DynamicBass.cpp similarity index 100% rename from src/utils/DynamicBass.cpp rename to src/cpp/utils/DynamicBass.cpp diff --git a/src/utils/DynamicBass.h b/src/cpp/utils/DynamicBass.h similarity index 100% rename from src/utils/DynamicBass.h rename to src/cpp/utils/DynamicBass.h diff --git a/src/utils/FixedBiquad.cpp b/src/cpp/utils/FixedBiquad.cpp similarity index 100% rename from src/utils/FixedBiquad.cpp rename to src/cpp/utils/FixedBiquad.cpp diff --git a/src/utils/FixedBiquad.h b/src/cpp/utils/FixedBiquad.h similarity index 100% rename from src/utils/FixedBiquad.h rename to src/cpp/utils/FixedBiquad.h diff --git a/src/cpp/utils/Harmonic.cpp b/src/cpp/utils/Harmonic.cpp new file mode 100644 index 0000000..c726d83 --- /dev/null +++ b/src/cpp/utils/Harmonic.cpp @@ -0,0 +1,121 @@ +// +// Created by mart on 7/30/21. +// + +#include +#include +#include +#include "Harmonic.h" + +static float HARMONIC_DEFAULT[10] = { + 1.f, + 0.f, + 0.f, + 0.f, + 0.f, + 0.f, + 0.f, + 0.f, + 0.f, + 0.f, +}; + +Harmonic::Harmonic() { + UpdateCoeffs(HARMONIC_DEFAULT); + Reset(); +} + +Harmonic::~Harmonic() { + +} + +float Harmonic::Process(float sample) { + float prevLast = this->lastProcessed; + this->lastProcessed = ( + sample * this->coeffs[0] + + sample * this->coeffs[1] + + sample * this->coeffs[2] + + sample * this->coeffs[3] + + sample * this->coeffs[4] + + sample * this->coeffs[5] + + sample * this->coeffs[6] + + sample * this->coeffs[7] + + sample * this->coeffs[8] + + sample * this->coeffs[9] + + sample * this->coeffs[10] + ); + this->prevOut = this->lastProcessed + this->prevOut * 0.999f - prevLast; + if (this->sampleCounter < this->buildup) { + this->sampleCounter++; + return 0; + } + return this->prevOut; +} + +void Harmonic::Reset() { + this->lastProcessed = 0.f; + this->prevOut = 0.f; + this->sampleCounter = 0.f; +} + +void Harmonic::SetHarmonics(float *coefficients) { + UpdateCoeffs(coefficients); + Reset(); +} + +void Harmonic::UpdateCoeffs(float *coefficients) { + float fVar5; + float fVar6; + float _coeffs[20]; + float afStack76[14]; + + memset(_coeffs, 0, 11 * sizeof(float)); + this->buildup = (int)fabsf(coefficients[10]); + memcpy(&_coeffs[1], coefficients, 10 * sizeof(float)); + + fVar6 = 1.f / ( + fabsf(_coeffs[1]) + + fabsf(_coeffs[2]) + + fabsf(_coeffs[3]) + + fabsf(_coeffs[4]) + + fabsf(_coeffs[5]) + + fabsf(_coeffs[6]) + + fabsf(_coeffs[7]) + + fabsf(_coeffs[8]) + + fabsf(_coeffs[9]) + + fabsf(_coeffs[10]) + ); + + for (int i = 0; i < 11; i++) { + _coeffs[i] *= fVar6; + } + + for (int i = 0; i < 11; i++) { + afStack76[2 + i] = 0; + _coeffs[10 + i] = 0; + } + + _coeffs[11] = _coeffs[10]; + fVar6 = _coeffs[11]; + for (int i = 2; i < 11; i++) { + for(int idx = 0; idx < i; idx++) { + _coeffs[11] = fVar6; + fVar5 = _coeffs[10 - idx + i]; + fVar6 = afStack76[2 - idx + i]; + afStack76[2 - idx + i] = _coeffs[11 - idx + i]; + _coeffs[11 - idx + i] = 2 * fVar5 - fVar6; + fVar6 = _coeffs[11]; + } + fVar6 = _coeffs[11 - i] - afStack76[2]; + afStack76[2] = _coeffs[11]; + } + + for (int i = 1; i < 11; i++) { + afStack76[2 + i] = afStack76[i - 1] - afStack76[13 - i]; + } + + _coeffs[11] = _coeffs[0] * 0.5f - _coeffs[11]; + for (int i = 0; i < 11; i++) { + this->coeffs[i] = _coeffs[11+i]; + } +} diff --git a/src/utils/Harmonic.h b/src/cpp/utils/Harmonic.h similarity index 100% rename from src/utils/Harmonic.h rename to src/cpp/utils/Harmonic.h diff --git a/src/utils/HiFi.cpp b/src/cpp/utils/HiFi.cpp similarity index 100% rename from src/utils/HiFi.cpp rename to src/cpp/utils/HiFi.cpp diff --git a/src/utils/HiFi.h b/src/cpp/utils/HiFi.h similarity index 100% rename from src/utils/HiFi.h rename to src/cpp/utils/HiFi.h diff --git a/src/utils/HighShelf.cpp b/src/cpp/utils/HighShelf.cpp similarity index 94% rename from src/utils/HighShelf.cpp rename to src/cpp/utils/HighShelf.cpp index 9a1520a..31690a8 100644 --- a/src/utils/HighShelf.cpp +++ b/src/cpp/utils/HighShelf.cpp @@ -27,5 +27,5 @@ void HighShelf::SetQuality(float q) { } void HighShelf::SetSamplingRate(uint32_t samplerate) { - // TODO + this->samplerate = samplerate; } diff --git a/src/utils/HighShelf.h b/src/cpp/utils/HighShelf.h similarity index 100% rename from src/utils/HighShelf.h rename to src/cpp/utils/HighShelf.h diff --git a/src/utils/IIR_1st.cpp b/src/cpp/utils/IIR_1st.cpp similarity index 100% rename from src/utils/IIR_1st.cpp rename to src/cpp/utils/IIR_1st.cpp diff --git a/src/utils/IIR_1st.h b/src/cpp/utils/IIR_1st.h similarity index 100% rename from src/utils/IIR_1st.h rename to src/cpp/utils/IIR_1st.h diff --git a/src/utils/IIR_NOrder_BW_BP.cpp b/src/cpp/utils/IIR_NOrder_BW_BP.cpp similarity index 100% rename from src/utils/IIR_NOrder_BW_BP.cpp rename to src/cpp/utils/IIR_NOrder_BW_BP.cpp diff --git a/src/utils/IIR_NOrder_BW_BP.h b/src/cpp/utils/IIR_NOrder_BW_BP.h similarity index 100% rename from src/utils/IIR_NOrder_BW_BP.h rename to src/cpp/utils/IIR_NOrder_BW_BP.h diff --git a/src/utils/IIR_NOrder_BW_LH.cpp b/src/cpp/utils/IIR_NOrder_BW_LH.cpp similarity index 100% rename from src/utils/IIR_NOrder_BW_LH.cpp rename to src/cpp/utils/IIR_NOrder_BW_LH.cpp diff --git a/src/utils/IIR_NOrder_BW_LH.h b/src/cpp/utils/IIR_NOrder_BW_LH.h similarity index 100% rename from src/utils/IIR_NOrder_BW_LH.h rename to src/cpp/utils/IIR_NOrder_BW_LH.h diff --git a/src/utils/MultiBiquad.cpp b/src/cpp/utils/MultiBiquad.cpp similarity index 100% rename from src/utils/MultiBiquad.cpp rename to src/cpp/utils/MultiBiquad.cpp diff --git a/src/utils/MultiBiquad.h b/src/cpp/utils/MultiBiquad.h similarity index 100% rename from src/utils/MultiBiquad.h rename to src/cpp/utils/MultiBiquad.h diff --git a/src/utils/NoiseSharpening.cpp b/src/cpp/utils/NoiseSharpening.cpp similarity index 100% rename from src/utils/NoiseSharpening.cpp rename to src/cpp/utils/NoiseSharpening.cpp diff --git a/src/utils/NoiseSharpening.h b/src/cpp/utils/NoiseSharpening.h similarity index 100% rename from src/utils/NoiseSharpening.h rename to src/cpp/utils/NoiseSharpening.h diff --git a/src/utils/PConvSingle_F32.cpp b/src/cpp/utils/PConvSingle_F32.cpp similarity index 94% rename from src/utils/PConvSingle_F32.cpp rename to src/cpp/utils/PConvSingle_F32.cpp index 801e67a..a195349 100644 --- a/src/utils/PConvSingle_F32.cpp +++ b/src/cpp/utils/PConvSingle_F32.cpp @@ -56,7 +56,7 @@ int PConvSingle_F32::LoadKernel(float *buf, int param_2, int segmentSize) { if (param_2 > 0 && segmentSize > 0 && segmentSize % 2 == 0) { this->enabled = false; ReleaseResources(); - this->data = malloc(0x140); // TODO: Sizeof + this->data = (PConvData *)malloc(0x140); // TODO: Sizeof memset(this->data, 0, 0x140); // Ditto this->segmentSize = segmentSize; int n = ProcessKernel(buf, param_2, 1); @@ -76,7 +76,7 @@ int PConvSingle_F32::LoadKernel(float *buf, float *param_2, int segmentSize, int if (param_5 > 0 && segmentSize > 0 && segmentSize % 2 == 0) { this->enabled = false; ReleaseResources(); - this->data = malloc(0x140); // TODO: Sizeof + this->data = (PConvData *)malloc(0x140); // TODO: Sizeof memset(this->data, 0, 0x140); // Ditto this->segmentSize = segmentSize; int n = ProcessKernel(1, param_2, param_4, param_5); diff --git a/src/utils/PConvSingle_F32.h b/src/cpp/utils/PConvSingle_F32.h similarity index 100% rename from src/utils/PConvSingle_F32.h rename to src/cpp/utils/PConvSingle_F32.h diff --git a/src/utils/PassFilter.cpp b/src/cpp/utils/PassFilter.cpp similarity index 100% rename from src/utils/PassFilter.cpp rename to src/cpp/utils/PassFilter.cpp diff --git a/src/utils/PassFilter.h b/src/cpp/utils/PassFilter.h similarity index 100% rename from src/utils/PassFilter.h rename to src/cpp/utils/PassFilter.h diff --git a/src/utils/PolesFilter.cpp b/src/cpp/utils/PolesFilter.cpp similarity index 100% rename from src/utils/PolesFilter.cpp rename to src/cpp/utils/PolesFilter.cpp diff --git a/src/utils/PolesFilter.h b/src/cpp/utils/PolesFilter.h similarity index 100% rename from src/utils/PolesFilter.h rename to src/cpp/utils/PolesFilter.h diff --git a/src/utils/Subwoofer.cpp b/src/cpp/utils/Subwoofer.cpp similarity index 100% rename from src/utils/Subwoofer.cpp rename to src/cpp/utils/Subwoofer.cpp diff --git a/src/utils/Subwoofer.h b/src/cpp/utils/Subwoofer.h similarity index 100% rename from src/utils/Subwoofer.h rename to src/cpp/utils/Subwoofer.h diff --git a/src/utils/TimeConstDelay.cpp b/src/cpp/utils/TimeConstDelay.cpp similarity index 100% rename from src/utils/TimeConstDelay.cpp rename to src/cpp/utils/TimeConstDelay.cpp diff --git a/src/utils/TimeConstDelay.h b/src/cpp/utils/TimeConstDelay.h similarity index 100% rename from src/utils/TimeConstDelay.h rename to src/cpp/utils/TimeConstDelay.h diff --git a/src/utils/WaveBuffer_I32.cpp b/src/cpp/utils/WaveBuffer_I32.cpp similarity index 100% rename from src/utils/WaveBuffer_I32.cpp rename to src/cpp/utils/WaveBuffer_I32.cpp diff --git a/src/utils/WaveBuffer_I32.h b/src/cpp/utils/WaveBuffer_I32.h similarity index 100% rename from src/utils/WaveBuffer_I32.h rename to src/cpp/utils/WaveBuffer_I32.h diff --git a/src/viper.cpp b/src/cpp/viper.cpp similarity index 99% rename from src/viper.cpp rename to src/cpp/viper.cpp index e69bb3e..b126287 100644 --- a/src/viper.cpp +++ b/src/cpp/viper.cpp @@ -1,5 +1,4 @@ #include -#include #include #include "Effect.h" diff --git a/src/viper.h b/src/cpp/viper.h similarity index 100% rename from src/viper.h rename to src/cpp/viper.h diff --git a/include/hardware/audio_effect.h b/src/include/essential.h similarity index 61% rename from include/hardware/audio_effect.h rename to src/include/essential.h index d38e8ac..b4b0da5 100644 --- a/include/hardware/audio_effect.h +++ b/src/include/essential.h @@ -1,51 +1,3 @@ -/* - * Copyright (C) 2011 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -#ifndef ANDROID_AUDIO_EFFECT_H -#define ANDROID_AUDIO_EFFECT_H - -#include -#include -#include -#include -#include - -#include "system/cutils/bitops.h" - -#include "system/audio.h" - - -__BEGIN_DECLS - - -///////////////////////////////////////////////// -// Common Definitions -///////////////////////////////////////////////// - -// -//--- Effect descriptor structure effect_descriptor_t -// - -// Unique effect ID (can be generated from the following site: -// http://www.itu.int/ITU-T/asn1/uuid.html) -// This format is used for both "type" and "uuid" fields of the effect descriptor structure. -// - When used for effect type and the engine is implementing and effect corresponding to a standard -// OpenSL ES interface, this ID must be the one defined in OpenSLES_IID.h for that interface. -// - When used as uuid, it should be a unique UUID for this particular implementation. typedef struct effect_uuid_s { uint32_t timeLow; @@ -279,11 +231,6 @@ typedef struct effect_interface_s **effect_handle_t; // Forward definition of type audio_buffer_t typedef struct audio_buffer_s audio_buffer_t; - - - - - // Effect control interface definition struct effect_interface_s { @@ -415,7 +362,6 @@ struct effect_interface_s audio_buffer_t *outBuffer); }; - // //--- Standardized command codes for command() function // @@ -753,7 +699,7 @@ enum effect_command_e //-------------------------------------------------------------------------------------------------- // description: // 1.indicate if the playback thread the effect is attached to is offloaded or not -// 2.UpdateCoeffs the io handle of the playback thread the effect is attached to +// 2.update the io handle of the playback thread the effect is attached to //-------------------------------------------------------------------------------------------------- // command format: // size: sizeof(effect_offload_param_t) @@ -770,7 +716,6 @@ enum effect_command_e // command and response fields is free in this case //================================================================================================== - // Audio buffer descriptor used by process(), bufferProvider() functions and buffer_config_t // structure. Multi-channel audio is always interleaved. The channel order is from LSB to MSB with // regard to the channel mask definition in audio.h, audio_channel_mask_t e.g : @@ -790,20 +735,7 @@ typedef struct audio_buffer_s { }; } audio_buffer_t; -// The buffer_provider_s structure contains functions that can be used -// by the effect engine process() function to query and release input -// or output audio buffer. -// The getBuffer() function is called to retrieve a buffer where data -// should read from or written to by process() function. -// The releaseBuffer() function MUST be called when the buffer retrieved -// with getBuffer() is not needed anymore. -// The process function should use the buffer provider mechanism to retrieve -// input or output buffer if the inBuffer or outBuffer passed as argument is NULL -// and the buffer configuration (buffer_config_t) given by the EFFECT_CMD_SET_CONFIG -// command did not specify an audio buffer. - typedef int32_t (* buffer_function_t)(void *cookie, audio_buffer_t *buffer); - typedef struct buffer_provider_s { buffer_function_t getBuffer; // retrieve next buffer @@ -826,46 +758,14 @@ typedef struct buffer_config_s uint8_t accessMode; // read/write or accumulate in buffer (effect_buffer_access_e) uint16_t mask; // indicates which of the above fields is valid } buffer_config_t; - // Values for "accessMode" field of buffer_config_t: // overwrite, read only, accumulate (read/modify/write) -enum effect_buffer_access_e +typedef enum { EFFECT_BUFFER_ACCESS_WRITE, EFFECT_BUFFER_ACCESS_READ, EFFECT_BUFFER_ACCESS_ACCUMULATE - -}; - -// feature identifiers for EFFECT_CMD_GET_FEATURE_SUPPORTED_CONFIGS command -enum effect_feature_e -{ - EFFECT_FEATURE_AUX_CHANNELS, // supports auxiliary channels (e.g. dual mic noise suppressor) - EFFECT_FEATURE_CNT -}; - -// EFFECT_FEATURE_AUX_CHANNELS feature configuration descriptor. Describe a combination -// of main and auxiliary channels supported -typedef struct channel_config_s -{ - audio_channel_mask_t main_channels; // channel mask for main channels - audio_channel_mask_t aux_channels; // channel mask for auxiliary channels -} channel_config_t; - - -// Values for bit field "mask" in buffer_config_t. If a bit is set, the corresponding field -// in buffer_config_t must be taken into account when executing the EFFECT_CMD_SET_CONFIG command -#define EFFECT_CONFIG_BUFFER 0x0001 // buffer field must be taken into account -#define EFFECT_CONFIG_SMP_RATE 0x0002 // samplingRate field must be taken into account -#define EFFECT_CONFIG_CHANNELS 0x0004 // channels field must be taken into account -#define EFFECT_CONFIG_FORMAT 0x0008 // format field must be taken into account -#define EFFECT_CONFIG_ACC_MODE 0x0010 // accessMode field must be taken into account -#define EFFECT_CONFIG_PROVIDER 0x0020 // bufferProvider field must be taken into account -#define EFFECT_CONFIG_ALL (EFFECT_CONFIG_BUFFER | EFFECT_CONFIG_SMP_RATE | \ - EFFECT_CONFIG_CHANNELS | EFFECT_CONFIG_FORMAT | \ - EFFECT_CONFIG_ACC_MODE | EFFECT_CONFIG_PROVIDER) - - +} effect_buffer_access_e; // effect_config_s structure describes the format of the pCmdData argument of EFFECT_CMD_SET_CONFIG // command to configure audio parameters and buffers for effect engine input and output. typedef struct effect_config_s @@ -873,8 +773,6 @@ typedef struct effect_config_s buffer_config_t inputCfg; buffer_config_t outputCfg; } effect_config_t; - - // effect_param_s structure describes the format of the pCmdData argument of EFFECT_CMD_SET_PARAM // command and pCmdData and pReplyData of EFFECT_CMD_GET_PARAM command. // psize and vsize represent the actual size of parameter and value. @@ -907,14 +805,6 @@ typedef struct effect_param_s char data[]; // Start of Parameter + Value data } effect_param_t; -// structure used by EFFECT_CMD_OFFLOAD command -typedef struct effect_offload_param_s -{ - bool isOffload; // true if the playback thread the effect is attached to is offloaded - int ioHandle; // io handle of the playback thread the effect is attached to -} effect_offload_param_t; - - ///////////////////////////////////////////////// // Effect library interface ///////////////////////////////////////////////// @@ -1021,6 +911,597 @@ typedef struct audio_effect_library_s // Name of the hal_module_info as a string #define AUDIO_EFFECT_LIBRARY_INFO_SYM_AS_STR "AELI" -__END_DECLS +// Values for bit field "mask" in buffer_config_t. If a bit is set, the corresponding field +// in buffer_config_t must be taken into account when executing the EFFECT_CMD_SET_CONFIG command +#define EFFECT_CONFIG_BUFFER 0x0001 // buffer field must be taken into account +#define EFFECT_CONFIG_SMP_RATE 0x0002 // samplingRate field must be taken into account +#define EFFECT_CONFIG_CHANNELS 0x0004 // channels field must be taken into account +#define EFFECT_CONFIG_FORMAT 0x0008 // format field must be taken into account +#define EFFECT_CONFIG_ACC_MODE 0x0010 // accessMode field must be taken into account +#define EFFECT_CONFIG_PROVIDER 0x0020 // bufferProvider field must be taken into account +#define EFFECT_CONFIG_ALL (EFFECT_CONFIG_BUFFER | EFFECT_CONFIG_SMP_RATE | \ + EFFECT_CONFIG_CHANNELS | EFFECT_CONFIG_FORMAT | \ + EFFECT_CONFIG_ACC_MODE | EFFECT_CONFIG_PROVIDER) -#endif // ANDROID_AUDIO_EFFECT_H +enum { + AUDIO_IO_HANDLE_NONE = 0, + AUDIO_MODULE_HANDLE_NONE = 0, + AUDIO_PORT_HANDLE_NONE = 0, + AUDIO_PATCH_HANDLE_NONE = 0, +}; + +typedef enum { + AUDIO_STREAM_DEFAULT = -1, // (-1) + AUDIO_STREAM_MIN = 0, + AUDIO_STREAM_VOICE_CALL = 0, + AUDIO_STREAM_SYSTEM = 1, + AUDIO_STREAM_RING = 2, + AUDIO_STREAM_MUSIC = 3, + AUDIO_STREAM_ALARM = 4, + AUDIO_STREAM_NOTIFICATION = 5, + AUDIO_STREAM_BLUETOOTH_SCO = 6, + AUDIO_STREAM_ENFORCED_AUDIBLE = 7, + AUDIO_STREAM_DTMF = 8, + AUDIO_STREAM_TTS = 9, + AUDIO_STREAM_ACCESSIBILITY = 10, +#ifndef AUDIO_NO_SYSTEM_DECLARATIONS + /** For dynamic policy output mixes. Only used by the audio policy */ + AUDIO_STREAM_REROUTING = 11, + /** For audio flinger tracks volume. Only used by the audioflinger */ + AUDIO_STREAM_PATCH = 12, +#endif // AUDIO_NO_SYSTEM_DECLARATIONS +} audio_stream_type_t; + +typedef enum { + AUDIO_SOURCE_DEFAULT = 0, + AUDIO_SOURCE_MIC = 1, + AUDIO_SOURCE_VOICE_UPLINK = 2, + AUDIO_SOURCE_VOICE_DOWNLINK = 3, + AUDIO_SOURCE_VOICE_CALL = 4, + AUDIO_SOURCE_CAMCORDER = 5, + AUDIO_SOURCE_VOICE_RECOGNITION = 6, + AUDIO_SOURCE_VOICE_COMMUNICATION = 7, + AUDIO_SOURCE_REMOTE_SUBMIX = 8, + AUDIO_SOURCE_UNPROCESSED = 9, + AUDIO_SOURCE_FM_TUNER = 1998, +#ifndef AUDIO_NO_SYSTEM_DECLARATIONS + /** + * A low-priority, preemptible audio source for for background software + * hotword detection. Same tuning as VOICE_RECOGNITION. + * Used only internally by the framework. + */ + AUDIO_SOURCE_HOTWORD = 1999, +#endif // AUDIO_NO_SYSTEM_DECLARATIONS +} audio_source_t; + +typedef enum { + AUDIO_SESSION_OUTPUT_STAGE = -1, // (-1) + AUDIO_SESSION_OUTPUT_MIX = 0, + AUDIO_SESSION_ALLOCATE = 0, + AUDIO_SESSION_NONE = 0, +} audio_session_t; + +typedef enum { + AUDIO_FORMAT_INVALID = 0xFFFFFFFFu, + AUDIO_FORMAT_DEFAULT = 0, + AUDIO_FORMAT_PCM = 0x00000000u, + AUDIO_FORMAT_MP3 = 0x01000000u, + AUDIO_FORMAT_AMR_NB = 0x02000000u, + AUDIO_FORMAT_AMR_WB = 0x03000000u, + AUDIO_FORMAT_AAC = 0x04000000u, + AUDIO_FORMAT_HE_AAC_V1 = 0x05000000u, + AUDIO_FORMAT_HE_AAC_V2 = 0x06000000u, + AUDIO_FORMAT_VORBIS = 0x07000000u, + AUDIO_FORMAT_OPUS = 0x08000000u, + AUDIO_FORMAT_AC3 = 0x09000000u, + AUDIO_FORMAT_E_AC3 = 0x0A000000u, + AUDIO_FORMAT_DTS = 0x0B000000u, + AUDIO_FORMAT_DTS_HD = 0x0C000000u, + AUDIO_FORMAT_IEC61937 = 0x0D000000u, + AUDIO_FORMAT_DOLBY_TRUEHD = 0x0E000000u, + AUDIO_FORMAT_EVRC = 0x10000000u, + AUDIO_FORMAT_EVRCB = 0x11000000u, + AUDIO_FORMAT_EVRCWB = 0x12000000u, + AUDIO_FORMAT_EVRCNW = 0x13000000u, + AUDIO_FORMAT_AAC_ADIF = 0x14000000u, + AUDIO_FORMAT_WMA = 0x15000000u, + AUDIO_FORMAT_WMA_PRO = 0x16000000u, + AUDIO_FORMAT_AMR_WB_PLUS = 0x17000000u, + AUDIO_FORMAT_MP2 = 0x18000000u, + AUDIO_FORMAT_QCELP = 0x19000000u, + AUDIO_FORMAT_DSD = 0x1A000000u, + AUDIO_FORMAT_FLAC = 0x1B000000u, + AUDIO_FORMAT_ALAC = 0x1C000000u, + AUDIO_FORMAT_APE = 0x1D000000u, + AUDIO_FORMAT_AAC_ADTS = 0x1E000000u, + AUDIO_FORMAT_SBC = 0x1F000000u, + AUDIO_FORMAT_APTX = 0x20000000u, + AUDIO_FORMAT_APTX_HD = 0x21000000u, + AUDIO_FORMAT_AC4 = 0x22000000u, + AUDIO_FORMAT_LDAC = 0x23000000u, + AUDIO_FORMAT_MAT = 0x24000000u, + AUDIO_FORMAT_MAIN_MASK = 0xFF000000u, + AUDIO_FORMAT_SUB_MASK = 0x00FFFFFFu, + + /* Subformats */ + AUDIO_FORMAT_PCM_SUB_16_BIT = 0x1u, + AUDIO_FORMAT_PCM_SUB_8_BIT = 0x2u, + AUDIO_FORMAT_PCM_SUB_32_BIT = 0x3u, + AUDIO_FORMAT_PCM_SUB_8_24_BIT = 0x4u, + AUDIO_FORMAT_PCM_SUB_FLOAT = 0x5u, + AUDIO_FORMAT_PCM_SUB_24_BIT_PACKED = 0x6u, + + AUDIO_FORMAT_MP3_SUB_NONE = 0x0u, + + AUDIO_FORMAT_AMR_SUB_NONE = 0x0u, + + AUDIO_FORMAT_AAC_SUB_MAIN = 0x1u, + AUDIO_FORMAT_AAC_SUB_LC = 0x2u, + AUDIO_FORMAT_AAC_SUB_SSR = 0x4u, + AUDIO_FORMAT_AAC_SUB_LTP = 0x8u, + AUDIO_FORMAT_AAC_SUB_HE_V1 = 0x10u, + AUDIO_FORMAT_AAC_SUB_SCALABLE = 0x20u, + AUDIO_FORMAT_AAC_SUB_ERLC = 0x40u, + AUDIO_FORMAT_AAC_SUB_LD = 0x80u, + AUDIO_FORMAT_AAC_SUB_HE_V2 = 0x100u, + AUDIO_FORMAT_AAC_SUB_ELD = 0x200u, + AUDIO_FORMAT_AAC_SUB_XHE = 0x300u, + + AUDIO_FORMAT_VORBIS_SUB_NONE = 0x0u, + + AUDIO_FORMAT_E_AC3_SUB_JOC = 0x1u, + + AUDIO_FORMAT_MAT_SUB_1_0 = 0x1u, + AUDIO_FORMAT_MAT_SUB_2_0 = 0x2u, + AUDIO_FORMAT_MAT_SUB_2_1 = 0x3u, + + /* Aliases */ + AUDIO_FORMAT_PCM_16_BIT = 0x1u, // (PCM | PCM_SUB_16_BIT) + AUDIO_FORMAT_PCM_8_BIT = 0x2u, // (PCM | PCM_SUB_8_BIT) + AUDIO_FORMAT_PCM_32_BIT = 0x3u, // (PCM | PCM_SUB_32_BIT) + AUDIO_FORMAT_PCM_8_24_BIT = 0x4u, // (PCM | PCM_SUB_8_24_BIT) + AUDIO_FORMAT_PCM_FLOAT = 0x5u, // (PCM | PCM_SUB_FLOAT) + AUDIO_FORMAT_PCM_24_BIT_PACKED = 0x6u, // (PCM | PCM_SUB_24_BIT_PACKED) + AUDIO_FORMAT_AAC_MAIN = 0x4000001u, // (AAC | AAC_SUB_MAIN) + AUDIO_FORMAT_AAC_LC = 0x4000002u, // (AAC | AAC_SUB_LC) + AUDIO_FORMAT_AAC_SSR = 0x4000004u, // (AAC | AAC_SUB_SSR) + AUDIO_FORMAT_AAC_LTP = 0x4000008u, // (AAC | AAC_SUB_LTP) + AUDIO_FORMAT_AAC_HE_V1 = 0x4000010u, // (AAC | AAC_SUB_HE_V1) + AUDIO_FORMAT_AAC_SCALABLE = 0x4000020u, // (AAC | AAC_SUB_SCALABLE) + AUDIO_FORMAT_AAC_ERLC = 0x4000040u, // (AAC | AAC_SUB_ERLC) + AUDIO_FORMAT_AAC_LD = 0x4000080u, // (AAC | AAC_SUB_LD) + AUDIO_FORMAT_AAC_HE_V2 = 0x4000100u, // (AAC | AAC_SUB_HE_V2) + AUDIO_FORMAT_AAC_ELD = 0x4000200u, // (AAC | AAC_SUB_ELD) + AUDIO_FORMAT_AAC_XHE = 0x4000300u, // (AAC | AAC_SUB_XHE) + AUDIO_FORMAT_AAC_ADTS_MAIN = 0x1e000001u, // (AAC_ADTS | AAC_SUB_MAIN) + AUDIO_FORMAT_AAC_ADTS_LC = 0x1e000002u, // (AAC_ADTS | AAC_SUB_LC) + AUDIO_FORMAT_AAC_ADTS_SSR = 0x1e000004u, // (AAC_ADTS | AAC_SUB_SSR) + AUDIO_FORMAT_AAC_ADTS_LTP = 0x1e000008u, // (AAC_ADTS | AAC_SUB_LTP) + AUDIO_FORMAT_AAC_ADTS_HE_V1 = 0x1e000010u, // (AAC_ADTS | AAC_SUB_HE_V1) + AUDIO_FORMAT_AAC_ADTS_SCALABLE = 0x1e000020u, // (AAC_ADTS | AAC_SUB_SCALABLE) + AUDIO_FORMAT_AAC_ADTS_ERLC = 0x1e000040u, // (AAC_ADTS | AAC_SUB_ERLC) + AUDIO_FORMAT_AAC_ADTS_LD = 0x1e000080u, // (AAC_ADTS | AAC_SUB_LD) + AUDIO_FORMAT_AAC_ADTS_HE_V2 = 0x1e000100u, // (AAC_ADTS | AAC_SUB_HE_V2) + AUDIO_FORMAT_AAC_ADTS_ELD = 0x1e000200u, // (AAC_ADTS | AAC_SUB_ELD) + AUDIO_FORMAT_AAC_ADTS_XHE = 0x1e000300u, // (AAC_ADTS | AAC_SUB_XHE) + AUDIO_FORMAT_E_AC3_JOC = 0xA000001u, // (E_AC3 | E_AC3_SUB_JOC) + AUDIO_FORMAT_MAT_1_0 = 0x24000001u, // (MAT | MAT_SUB_1_0) + AUDIO_FORMAT_MAT_2_0 = 0x24000002u, // (MAT | MAT_SUB_2_0) + AUDIO_FORMAT_MAT_2_1 = 0x24000003u, // (MAT | MAT_SUB_2_1) +} audio_format_t; + +typedef enum { +#ifndef AUDIO_NO_SYSTEM_DECLARATIONS + AUDIO_MODE_INVALID = -2, // (-2) + AUDIO_MODE_CURRENT = -1, // (-1) +#endif // AUDIO_NO_SYSTEM_DECLARATIONS + AUDIO_MODE_NORMAL = 0, + AUDIO_MODE_RINGTONE = 1, + AUDIO_MODE_IN_CALL = 2, + AUDIO_MODE_IN_COMMUNICATION = 3, +} audio_mode_t; + +enum { + AUDIO_DEVICE_NONE = 0x0u, + AUDIO_DEVICE_BIT_IN = 0x80000000u, + AUDIO_DEVICE_BIT_DEFAULT = 0x40000000u, + + AUDIO_DEVICE_OUT_EARPIECE = 0x1u, + AUDIO_DEVICE_OUT_SPEAKER = 0x2u, + AUDIO_DEVICE_OUT_WIRED_HEADSET = 0x4u, + AUDIO_DEVICE_OUT_WIRED_HEADPHONE = 0x8u, + AUDIO_DEVICE_OUT_BLUETOOTH_SCO = 0x10u, + AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET = 0x20u, + AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT = 0x40u, + AUDIO_DEVICE_OUT_BLUETOOTH_A2DP = 0x80u, + AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES = 0x100u, + AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER = 0x200u, + AUDIO_DEVICE_OUT_AUX_DIGITAL = 0x400u, + AUDIO_DEVICE_OUT_HDMI = 0x400u, // OUT_AUX_DIGITAL + AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET = 0x800u, + AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET = 0x1000u, + AUDIO_DEVICE_OUT_USB_ACCESSORY = 0x2000u, + AUDIO_DEVICE_OUT_USB_DEVICE = 0x4000u, + AUDIO_DEVICE_OUT_REMOTE_SUBMIX = 0x8000u, + AUDIO_DEVICE_OUT_TELEPHONY_TX = 0x10000u, + AUDIO_DEVICE_OUT_LINE = 0x20000u, + AUDIO_DEVICE_OUT_HDMI_ARC = 0x40000u, + AUDIO_DEVICE_OUT_SPDIF = 0x80000u, + AUDIO_DEVICE_OUT_FM = 0x100000u, + AUDIO_DEVICE_OUT_AUX_LINE = 0x200000u, + AUDIO_DEVICE_OUT_SPEAKER_SAFE = 0x400000u, + AUDIO_DEVICE_OUT_IP = 0x800000u, + AUDIO_DEVICE_OUT_BUS = 0x1000000u, + AUDIO_DEVICE_OUT_PROXY = 0x2000000u, + AUDIO_DEVICE_OUT_USB_HEADSET = 0x4000000u, + AUDIO_DEVICE_OUT_HEARING_AID = 0x8000000u, + AUDIO_DEVICE_OUT_ECHO_CANCELLER = 0x10000000u, + AUDIO_DEVICE_OUT_DEFAULT = 0x40000000u, // BIT_DEFAULT + + AUDIO_DEVICE_IN_COMMUNICATION = 0x80000001u, // BIT_IN | 0x1 + AUDIO_DEVICE_IN_AMBIENT = 0x80000002u, // BIT_IN | 0x2 + AUDIO_DEVICE_IN_BUILTIN_MIC = 0x80000004u, // BIT_IN | 0x4 + AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET = 0x80000008u, // BIT_IN | 0x8 + AUDIO_DEVICE_IN_WIRED_HEADSET = 0x80000010u, // BIT_IN | 0x10 + AUDIO_DEVICE_IN_AUX_DIGITAL = 0x80000020u, // BIT_IN | 0x20 + AUDIO_DEVICE_IN_HDMI = 0x80000020u, // IN_AUX_DIGITAL + AUDIO_DEVICE_IN_VOICE_CALL = 0x80000040u, // BIT_IN | 0x40 + AUDIO_DEVICE_IN_TELEPHONY_RX = 0x80000040u, // IN_VOICE_CALL + AUDIO_DEVICE_IN_BACK_MIC = 0x80000080u, // BIT_IN | 0x80 + AUDIO_DEVICE_IN_REMOTE_SUBMIX = 0x80000100u, // BIT_IN | 0x100 + AUDIO_DEVICE_IN_ANLG_DOCK_HEADSET = 0x80000200u, // BIT_IN | 0x200 + AUDIO_DEVICE_IN_DGTL_DOCK_HEADSET = 0x80000400u, // BIT_IN | 0x400 + AUDIO_DEVICE_IN_USB_ACCESSORY = 0x80000800u, // BIT_IN | 0x800 + AUDIO_DEVICE_IN_USB_DEVICE = 0x80001000u, // BIT_IN | 0x1000 + AUDIO_DEVICE_IN_FM_TUNER = 0x80002000u, // BIT_IN | 0x2000 + AUDIO_DEVICE_IN_TV_TUNER = 0x80004000u, // BIT_IN | 0x4000 + AUDIO_DEVICE_IN_LINE = 0x80008000u, // BIT_IN | 0x8000 + AUDIO_DEVICE_IN_SPDIF = 0x80010000u, // BIT_IN | 0x10000 + AUDIO_DEVICE_IN_BLUETOOTH_A2DP = 0x80020000u, // BIT_IN | 0x20000 + AUDIO_DEVICE_IN_LOOPBACK = 0x80040000u, // BIT_IN | 0x40000 + AUDIO_DEVICE_IN_IP = 0x80080000u, // BIT_IN | 0x80000 + AUDIO_DEVICE_IN_BUS = 0x80100000u, // BIT_IN | 0x100000 + AUDIO_DEVICE_IN_PROXY = 0x81000000u, // BIT_IN | 0x1000000 + AUDIO_DEVICE_IN_USB_HEADSET = 0x82000000u, // BIT_IN | 0x2000000 + AUDIO_DEVICE_IN_BLUETOOTH_BLE = 0x84000000u, // BIT_IN | 0x4000000 + AUDIO_DEVICE_IN_DEFAULT = 0xC0000000u, // BIT_IN | BIT_DEFAULT +}; + +typedef enum { + AUDIO_OUTPUT_FLAG_NONE = 0x0, + AUDIO_OUTPUT_FLAG_DIRECT = 0x1, + AUDIO_OUTPUT_FLAG_PRIMARY = 0x2, + AUDIO_OUTPUT_FLAG_FAST = 0x4, + AUDIO_OUTPUT_FLAG_DEEP_BUFFER = 0x8, + AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD = 0x10, + AUDIO_OUTPUT_FLAG_NON_BLOCKING = 0x20, + AUDIO_OUTPUT_FLAG_HW_AV_SYNC = 0x40, + AUDIO_OUTPUT_FLAG_TTS = 0x80, + AUDIO_OUTPUT_FLAG_RAW = 0x100, + AUDIO_OUTPUT_FLAG_SYNC = 0x200, + AUDIO_OUTPUT_FLAG_IEC958_NONAUDIO = 0x400, + AUDIO_OUTPUT_FLAG_DIRECT_PCM = 0x2000, + AUDIO_OUTPUT_FLAG_MMAP_NOIRQ = 0x4000, + AUDIO_OUTPUT_FLAG_VOIP_RX = 0x8000, + AUDIO_OUTPUT_FLAG_INCALL_MUSIC = 0x10000, +} audio_output_flags_t; + +typedef enum { + AUDIO_INPUT_FLAG_NONE = 0x0, + AUDIO_INPUT_FLAG_FAST = 0x1, + AUDIO_INPUT_FLAG_HW_HOTWORD = 0x2, + AUDIO_INPUT_FLAG_RAW = 0x4, + AUDIO_INPUT_FLAG_SYNC = 0x8, + AUDIO_INPUT_FLAG_MMAP_NOIRQ = 0x10, + AUDIO_INPUT_FLAG_VOIP_TX = 0x20, + AUDIO_INPUT_FLAG_HW_AV_SYNC = 0x40, +} audio_input_flags_t; + +typedef enum { + AUDIO_USAGE_UNKNOWN = 0, + AUDIO_USAGE_MEDIA = 1, + AUDIO_USAGE_VOICE_COMMUNICATION = 2, + AUDIO_USAGE_VOICE_COMMUNICATION_SIGNALLING = 3, + AUDIO_USAGE_ALARM = 4, + AUDIO_USAGE_NOTIFICATION = 5, + AUDIO_USAGE_NOTIFICATION_TELEPHONY_RINGTONE = 6, +#ifndef AUDIO_NO_SYSTEM_DECLARATIONS + AUDIO_USAGE_NOTIFICATION_COMMUNICATION_REQUEST = 7, + AUDIO_USAGE_NOTIFICATION_COMMUNICATION_INSTANT = 8, + AUDIO_USAGE_NOTIFICATION_COMMUNICATION_DELAYED = 9, + AUDIO_USAGE_NOTIFICATION_EVENT = 10, +#endif // AUDIO_NO_SYSTEM_DECLARATIONS + AUDIO_USAGE_ASSISTANCE_ACCESSIBILITY = 11, + AUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE = 12, + AUDIO_USAGE_ASSISTANCE_SONIFICATION = 13, + AUDIO_USAGE_GAME = 14, + AUDIO_USAGE_VIRTUAL_SOURCE = 15, + AUDIO_USAGE_ASSISTANT = 16, +} audio_usage_t; + +typedef enum { + AUDIO_CONTENT_TYPE_UNKNOWN = 0u, + AUDIO_CONTENT_TYPE_SPEECH = 1u, + AUDIO_CONTENT_TYPE_MUSIC = 2u, + AUDIO_CONTENT_TYPE_MOVIE = 3u, + AUDIO_CONTENT_TYPE_SONIFICATION = 4u, +} audio_content_type_t; + +enum { + AUDIO_GAIN_MODE_JOINT = 0x1u, + AUDIO_GAIN_MODE_CHANNELS = 0x2u, + AUDIO_GAIN_MODE_RAMP = 0x4u, +}; + +typedef enum { + AUDIO_PORT_ROLE_NONE = 0, + AUDIO_PORT_ROLE_SOURCE = 1, // (::android::hardware::audio::common::V4_0::AudioPortRole.NONE implicitly + 1) + AUDIO_PORT_ROLE_SINK = 2, // (::android::hardware::audio::common::V4_0::AudioPortRole.SOURCE implicitly + 1) +} audio_port_role_t; + +typedef enum { + AUDIO_PORT_TYPE_NONE = 0, + AUDIO_PORT_TYPE_DEVICE = 1, // (::android::hardware::audio::common::V4_0::AudioPortType.NONE implicitly + 1) + AUDIO_PORT_TYPE_MIX = 2, // (::android::hardware::audio::common::V4_0::AudioPortType.DEVICE implicitly + 1) + AUDIO_PORT_TYPE_SESSION = 3, // (::android::hardware::audio::common::V4_0::AudioPortType.MIX implicitly + 1) +} audio_port_type_t; + +enum { + AUDIO_PORT_CONFIG_SAMPLE_RATE = 0x1u, + AUDIO_PORT_CONFIG_CHANNEL_MASK = 0x2u, + AUDIO_PORT_CONFIG_FORMAT = 0x4u, + AUDIO_PORT_CONFIG_GAIN = 0x8u, +}; + +typedef enum { + AUDIO_LATENCY_LOW = 0, + AUDIO_LATENCY_NORMAL = 1, // (::android::hardware::audio::common::V4_0::AudioMixLatencyClass.LOW implicitly + 1) +} audio_mix_latency_class_t; + +enum { + FCC_2 = 2, + FCC_8 = 8, +}; + +enum { + AUDIO_CHANNEL_REPRESENTATION_POSITION = 0x0u, + AUDIO_CHANNEL_REPRESENTATION_INDEX = 0x2u, + AUDIO_CHANNEL_NONE = 0x0u, + AUDIO_CHANNEL_INVALID = 0xC0000000u, + + AUDIO_CHANNEL_OUT_FRONT_LEFT = 0x1u, + AUDIO_CHANNEL_OUT_FRONT_RIGHT = 0x2u, + AUDIO_CHANNEL_OUT_FRONT_CENTER = 0x4u, + AUDIO_CHANNEL_OUT_LOW_FREQUENCY = 0x8u, + AUDIO_CHANNEL_OUT_BACK_LEFT = 0x10u, + AUDIO_CHANNEL_OUT_BACK_RIGHT = 0x20u, + AUDIO_CHANNEL_OUT_FRONT_LEFT_OF_CENTER = 0x40u, + AUDIO_CHANNEL_OUT_FRONT_RIGHT_OF_CENTER = 0x80u, + AUDIO_CHANNEL_OUT_BACK_CENTER = 0x100u, + AUDIO_CHANNEL_OUT_SIDE_LEFT = 0x200u, + AUDIO_CHANNEL_OUT_SIDE_RIGHT = 0x400u, + AUDIO_CHANNEL_OUT_TOP_CENTER = 0x800u, + AUDIO_CHANNEL_OUT_TOP_FRONT_LEFT = 0x1000u, + AUDIO_CHANNEL_OUT_TOP_FRONT_CENTER = 0x2000u, + AUDIO_CHANNEL_OUT_TOP_FRONT_RIGHT = 0x4000u, + AUDIO_CHANNEL_OUT_TOP_BACK_LEFT = 0x8000u, + AUDIO_CHANNEL_OUT_TOP_BACK_CENTER = 0x10000u, + AUDIO_CHANNEL_OUT_TOP_BACK_RIGHT = 0x20000u, + AUDIO_CHANNEL_OUT_TOP_SIDE_LEFT = 0x40000u, + AUDIO_CHANNEL_OUT_TOP_SIDE_RIGHT = 0x80000u, + AUDIO_CHANNEL_OUT_MONO = 0x1u, // OUT_FRONT_LEFT + AUDIO_CHANNEL_OUT_STEREO = 0x3u, // OUT_FRONT_LEFT | OUT_FRONT_RIGHT + AUDIO_CHANNEL_OUT_2POINT1 = 0xBu, // OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_LOW_FREQUENCY + AUDIO_CHANNEL_OUT_2POINT0POINT2 = 0xC0003u, // OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_TOP_SIDE_LEFT | OUT_TOP_SIDE_RIGHT + AUDIO_CHANNEL_OUT_2POINT1POINT2 = 0xC000Bu, // OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_TOP_SIDE_LEFT | OUT_TOP_SIDE_RIGHT | OUT_LOW_FREQUENCY + AUDIO_CHANNEL_OUT_3POINT0POINT2 = 0xC0007u, // OUT_FRONT_LEFT | OUT_FRONT_CENTER | OUT_FRONT_RIGHT | OUT_TOP_SIDE_LEFT | OUT_TOP_SIDE_RIGHT + AUDIO_CHANNEL_OUT_3POINT1POINT2 = 0xC000Fu, // OUT_FRONT_LEFT | OUT_FRONT_CENTER | OUT_FRONT_RIGHT | OUT_TOP_SIDE_LEFT | OUT_TOP_SIDE_RIGHT | OUT_LOW_FREQUENCY + AUDIO_CHANNEL_OUT_QUAD = 0x33u, // OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_BACK_LEFT | OUT_BACK_RIGHT + AUDIO_CHANNEL_OUT_QUAD_BACK = 0x33u, // OUT_QUAD + AUDIO_CHANNEL_OUT_QUAD_SIDE = 0x603u, // OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_SIDE_LEFT | OUT_SIDE_RIGHT + AUDIO_CHANNEL_OUT_SURROUND = 0x107u, // OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_FRONT_CENTER | OUT_BACK_CENTER + AUDIO_CHANNEL_OUT_PENTA = 0x37u, // OUT_QUAD | OUT_FRONT_CENTER + AUDIO_CHANNEL_OUT_5POINT1 = 0x3Fu, // OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_FRONT_CENTER | OUT_LOW_FREQUENCY | OUT_BACK_LEFT | OUT_BACK_RIGHT + AUDIO_CHANNEL_OUT_5POINT1_BACK = 0x3Fu, // OUT_5POINT1 + AUDIO_CHANNEL_OUT_5POINT1_SIDE = 0x60Fu, // OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_FRONT_CENTER | OUT_LOW_FREQUENCY | OUT_SIDE_LEFT | OUT_SIDE_RIGHT + AUDIO_CHANNEL_OUT_5POINT1POINT2 = 0xC003Fu, // OUT_5POINT1 | OUT_TOP_SIDE_LEFT | OUT_TOP_SIDE_RIGHT + AUDIO_CHANNEL_OUT_5POINT1POINT4 = 0x2D03Fu, // OUT_5POINT1 | OUT_TOP_FRONT_LEFT | OUT_TOP_FRONT_RIGHT | OUT_TOP_BACK_LEFT | OUT_TOP_BACK_RIGHT + AUDIO_CHANNEL_OUT_6POINT1 = 0x13Fu, // OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_FRONT_CENTER | OUT_LOW_FREQUENCY | OUT_BACK_LEFT | OUT_BACK_RIGHT | OUT_BACK_CENTER + AUDIO_CHANNEL_OUT_7POINT1 = 0x63Fu, // OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_FRONT_CENTER | OUT_LOW_FREQUENCY | OUT_BACK_LEFT | OUT_BACK_RIGHT | OUT_SIDE_LEFT | OUT_SIDE_RIGHT + AUDIO_CHANNEL_OUT_7POINT1POINT2 = 0xC063Fu, // OUT_7POINT1 | OUT_TOP_SIDE_LEFT | OUT_TOP_SIDE_RIGHT + AUDIO_CHANNEL_OUT_7POINT1POINT4 = 0x2D63Fu, // OUT_7POINT1 | OUT_TOP_FRONT_LEFT | OUT_TOP_FRONT_RIGHT | OUT_TOP_BACK_LEFT | OUT_TOP_BACK_RIGHT + + AUDIO_CHANNEL_IN_LEFT = 0x4u, + AUDIO_CHANNEL_IN_RIGHT = 0x8u, + AUDIO_CHANNEL_IN_FRONT = 0x10u, + AUDIO_CHANNEL_IN_BACK = 0x20u, + AUDIO_CHANNEL_IN_LEFT_PROCESSED = 0x40u, + AUDIO_CHANNEL_IN_RIGHT_PROCESSED = 0x80u, + AUDIO_CHANNEL_IN_FRONT_PROCESSED = 0x100u, + AUDIO_CHANNEL_IN_BACK_PROCESSED = 0x200u, + AUDIO_CHANNEL_IN_PRESSURE = 0x400u, + AUDIO_CHANNEL_IN_X_AXIS = 0x800u, + AUDIO_CHANNEL_IN_Y_AXIS = 0x1000u, + AUDIO_CHANNEL_IN_Z_AXIS = 0x2000u, + AUDIO_CHANNEL_IN_BACK_LEFT = 0x10000u, + AUDIO_CHANNEL_IN_BACK_RIGHT = 0x20000u, + AUDIO_CHANNEL_IN_CENTER = 0x40000u, + AUDIO_CHANNEL_IN_LOW_FREQUENCY = 0x100000u, + AUDIO_CHANNEL_IN_TOP_LEFT = 0x200000u, + AUDIO_CHANNEL_IN_TOP_RIGHT = 0x400000u, + AUDIO_CHANNEL_IN_VOICE_UPLINK = 0x4000u, + AUDIO_CHANNEL_IN_VOICE_DNLINK = 0x8000u, + AUDIO_CHANNEL_IN_MONO = 0x10u, // IN_FRONT + AUDIO_CHANNEL_IN_STEREO = 0xCu, // IN_LEFT | IN_RIGHT + AUDIO_CHANNEL_IN_FRONT_BACK = 0x30u, // IN_FRONT | IN_BACK + AUDIO_CHANNEL_IN_6 = 0xFCu, // IN_LEFT | IN_RIGHT | IN_FRONT | IN_BACK | IN_LEFT_PROCESSED | IN_RIGHT_PROCESSED + AUDIO_CHANNEL_IN_2POINT0POINT2 = 0x60000Cu, // IN_LEFT | IN_RIGHT | IN_TOP_LEFT | IN_TOP_RIGHT + AUDIO_CHANNEL_IN_2POINT1POINT2 = 0x70000Cu, // IN_LEFT | IN_RIGHT | IN_TOP_LEFT | IN_TOP_RIGHT | IN_LOW_FREQUENCY + AUDIO_CHANNEL_IN_3POINT0POINT2 = 0x64000Cu, // IN_LEFT | IN_CENTER | IN_RIGHT | IN_TOP_LEFT | IN_TOP_RIGHT + AUDIO_CHANNEL_IN_3POINT1POINT2 = 0x74000Cu, // IN_LEFT | IN_CENTER | IN_RIGHT | IN_TOP_LEFT | IN_TOP_RIGHT | IN_LOW_FREQUENCY + AUDIO_CHANNEL_IN_5POINT1 = 0x17000Cu, // IN_LEFT | IN_CENTER | IN_RIGHT | IN_BACK_LEFT | IN_BACK_RIGHT | IN_LOW_FREQUENCY + AUDIO_CHANNEL_IN_VOICE_UPLINK_MONO = 0x4010u, // IN_VOICE_UPLINK | IN_MONO + AUDIO_CHANNEL_IN_VOICE_DNLINK_MONO = 0x8010u, // IN_VOICE_DNLINK | IN_MONO + AUDIO_CHANNEL_IN_VOICE_CALL_MONO = 0xC010u, // IN_VOICE_UPLINK_MONO | IN_VOICE_DNLINK_MONO + + AUDIO_CHANNEL_COUNT_MAX = 30u, + AUDIO_CHANNEL_INDEX_HDR = 0x80000000u, // REPRESENTATION_INDEX << COUNT_MAX + AUDIO_CHANNEL_INDEX_MASK_1 = 0x80000001u, // INDEX_HDR | (1 << 1) - 1 + AUDIO_CHANNEL_INDEX_MASK_2 = 0x80000003u, // INDEX_HDR | (1 << 2) - 1 + AUDIO_CHANNEL_INDEX_MASK_3 = 0x80000007u, // INDEX_HDR | (1 << 3) - 1 + AUDIO_CHANNEL_INDEX_MASK_4 = 0x8000000Fu, // INDEX_HDR | (1 << 4) - 1 + AUDIO_CHANNEL_INDEX_MASK_5 = 0x8000001Fu, // INDEX_HDR | (1 << 5) - 1 + AUDIO_CHANNEL_INDEX_MASK_6 = 0x8000003Fu, // INDEX_HDR | (1 << 6) - 1 + AUDIO_CHANNEL_INDEX_MASK_7 = 0x8000007Fu, // INDEX_HDR | (1 << 7) - 1 + AUDIO_CHANNEL_INDEX_MASK_8 = 0x800000FFu, // INDEX_HDR | (1 << 8) - 1 +}; + + +enum { + /** Number of audio stream available to vendors. */ + AUDIO_STREAM_PUBLIC_CNT = AUDIO_STREAM_ACCESSIBILITY + 1, + +#ifndef AUDIO_NO_SYSTEM_DECLARATIONS + /** Total number of stream handled by the policy*/ + AUDIO_STREAM_FOR_POLICY_CNT= AUDIO_STREAM_REROUTING + 1, +#endif + + /** Total number of stream. */ + AUDIO_STREAM_CNT = AUDIO_STREAM_PATCH + 1, + + AUDIO_SOURCE_MAX = AUDIO_SOURCE_UNPROCESSED, + AUDIO_SOURCE_CNT = AUDIO_SOURCE_MAX + 1, + + AUDIO_MODE_MAX = AUDIO_MODE_IN_COMMUNICATION, + AUDIO_MODE_CNT = AUDIO_MODE_MAX + 1, + + /** For retrocompatibility AUDIO_MODE_* and AUDIO_STREAM_* must be signed. */ + AUDIO_DETAIL_NEGATIVE_VALUE = -1, +}; + +enum { + AUDIO_CHANNEL_OUT_ALL = AUDIO_CHANNEL_OUT_FRONT_LEFT | + AUDIO_CHANNEL_OUT_FRONT_RIGHT | + AUDIO_CHANNEL_OUT_FRONT_CENTER | + AUDIO_CHANNEL_OUT_LOW_FREQUENCY | + AUDIO_CHANNEL_OUT_BACK_LEFT | + AUDIO_CHANNEL_OUT_BACK_RIGHT | + AUDIO_CHANNEL_OUT_FRONT_LEFT_OF_CENTER | + AUDIO_CHANNEL_OUT_FRONT_RIGHT_OF_CENTER | + AUDIO_CHANNEL_OUT_BACK_CENTER | + AUDIO_CHANNEL_OUT_SIDE_LEFT | + AUDIO_CHANNEL_OUT_SIDE_RIGHT | + AUDIO_CHANNEL_OUT_TOP_CENTER | + AUDIO_CHANNEL_OUT_TOP_FRONT_LEFT | + AUDIO_CHANNEL_OUT_TOP_FRONT_CENTER | + AUDIO_CHANNEL_OUT_TOP_FRONT_RIGHT | + AUDIO_CHANNEL_OUT_TOP_BACK_LEFT | + AUDIO_CHANNEL_OUT_TOP_BACK_CENTER | + AUDIO_CHANNEL_OUT_TOP_BACK_RIGHT | + AUDIO_CHANNEL_OUT_TOP_SIDE_LEFT | + AUDIO_CHANNEL_OUT_TOP_SIDE_RIGHT, + + AUDIO_CHANNEL_IN_ALL = AUDIO_CHANNEL_IN_LEFT | + AUDIO_CHANNEL_IN_RIGHT | + AUDIO_CHANNEL_IN_FRONT | + AUDIO_CHANNEL_IN_BACK| + AUDIO_CHANNEL_IN_LEFT_PROCESSED | + AUDIO_CHANNEL_IN_RIGHT_PROCESSED | + AUDIO_CHANNEL_IN_FRONT_PROCESSED | + AUDIO_CHANNEL_IN_BACK_PROCESSED| + AUDIO_CHANNEL_IN_PRESSURE | + AUDIO_CHANNEL_IN_X_AXIS | + AUDIO_CHANNEL_IN_Y_AXIS | + AUDIO_CHANNEL_IN_Z_AXIS | + AUDIO_CHANNEL_IN_VOICE_UPLINK | + AUDIO_CHANNEL_IN_VOICE_DNLINK | + AUDIO_CHANNEL_IN_BACK_LEFT | + AUDIO_CHANNEL_IN_BACK_RIGHT | + AUDIO_CHANNEL_IN_CENTER | + AUDIO_CHANNEL_IN_LOW_FREQUENCY | + AUDIO_CHANNEL_IN_TOP_LEFT | + AUDIO_CHANNEL_IN_TOP_RIGHT, + + AUDIO_DEVICE_OUT_ALL = AUDIO_DEVICE_OUT_EARPIECE | + AUDIO_DEVICE_OUT_SPEAKER | + AUDIO_DEVICE_OUT_WIRED_HEADSET | + AUDIO_DEVICE_OUT_WIRED_HEADPHONE | + AUDIO_DEVICE_OUT_BLUETOOTH_SCO | + AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET | + AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT | + AUDIO_DEVICE_OUT_BLUETOOTH_A2DP | + AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES | + AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER | + AUDIO_DEVICE_OUT_HDMI | + AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET | + AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET | + AUDIO_DEVICE_OUT_USB_ACCESSORY | + AUDIO_DEVICE_OUT_USB_DEVICE | + AUDIO_DEVICE_OUT_REMOTE_SUBMIX | + AUDIO_DEVICE_OUT_TELEPHONY_TX | + AUDIO_DEVICE_OUT_LINE | + AUDIO_DEVICE_OUT_HDMI_ARC | + AUDIO_DEVICE_OUT_SPDIF | + AUDIO_DEVICE_OUT_FM | + AUDIO_DEVICE_OUT_AUX_LINE | + AUDIO_DEVICE_OUT_SPEAKER_SAFE | + AUDIO_DEVICE_OUT_IP | + AUDIO_DEVICE_OUT_BUS | + AUDIO_DEVICE_OUT_PROXY | + AUDIO_DEVICE_OUT_USB_HEADSET | + AUDIO_DEVICE_OUT_HEARING_AID | + AUDIO_DEVICE_OUT_ECHO_CANCELLER | + AUDIO_DEVICE_OUT_DEFAULT, + + AUDIO_DEVICE_OUT_ALL_A2DP = AUDIO_DEVICE_OUT_BLUETOOTH_A2DP | + AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES | + AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER, + + AUDIO_DEVICE_OUT_ALL_SCO = AUDIO_DEVICE_OUT_BLUETOOTH_SCO | + AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET | + AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT, + + AUDIO_DEVICE_OUT_ALL_USB = AUDIO_DEVICE_OUT_USB_ACCESSORY | + AUDIO_DEVICE_OUT_USB_DEVICE | + AUDIO_DEVICE_OUT_USB_HEADSET, + + AUDIO_DEVICE_IN_ALL = AUDIO_DEVICE_IN_COMMUNICATION | + AUDIO_DEVICE_IN_AMBIENT | + AUDIO_DEVICE_IN_BUILTIN_MIC | + AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET | + AUDIO_DEVICE_IN_WIRED_HEADSET | + AUDIO_DEVICE_IN_HDMI | + AUDIO_DEVICE_IN_TELEPHONY_RX | + AUDIO_DEVICE_IN_BACK_MIC | + AUDIO_DEVICE_IN_REMOTE_SUBMIX | + AUDIO_DEVICE_IN_ANLG_DOCK_HEADSET | + AUDIO_DEVICE_IN_DGTL_DOCK_HEADSET | + AUDIO_DEVICE_IN_USB_ACCESSORY | + AUDIO_DEVICE_IN_USB_DEVICE | + AUDIO_DEVICE_IN_FM_TUNER | + AUDIO_DEVICE_IN_TV_TUNER | + AUDIO_DEVICE_IN_LINE | + AUDIO_DEVICE_IN_SPDIF | + AUDIO_DEVICE_IN_BLUETOOTH_A2DP | + AUDIO_DEVICE_IN_LOOPBACK | + AUDIO_DEVICE_IN_IP | + AUDIO_DEVICE_IN_BUS | + AUDIO_DEVICE_IN_PROXY | + AUDIO_DEVICE_IN_USB_HEADSET | + AUDIO_DEVICE_IN_BLUETOOTH_BLE | + AUDIO_DEVICE_IN_DEFAULT, + + AUDIO_DEVICE_IN_ALL_SCO = AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET, + + AUDIO_DEVICE_IN_ALL_USB = AUDIO_DEVICE_IN_USB_ACCESSORY | + AUDIO_DEVICE_IN_USB_DEVICE | + AUDIO_DEVICE_IN_USB_HEADSET, + + AUDIO_USAGE_MAX = AUDIO_USAGE_ASSISTANT, + AUDIO_USAGE_CNT = AUDIO_USAGE_ASSISTANT + 1, + + AUDIO_PORT_CONFIG_ALL = AUDIO_PORT_CONFIG_SAMPLE_RATE | + AUDIO_PORT_CONFIG_CHANNEL_MASK | + AUDIO_PORT_CONFIG_FORMAT | + AUDIO_PORT_CONFIG_GAIN, +}; // enum diff --git a/src/main/AndroidManifest.xml b/src/main/AndroidManifest.xml new file mode 100644 index 0000000..a513319 --- /dev/null +++ b/src/main/AndroidManifest.xml @@ -0,0 +1,6 @@ + + + \ No newline at end of file diff --git a/src/utils/Harmonic.cpp b/src/utils/Harmonic.cpp deleted file mode 100644 index 5a28f42..0000000 --- a/src/utils/Harmonic.cpp +++ /dev/null @@ -1,65 +0,0 @@ -// -// Created by mart on 7/30/21. -// - -#include "Harmonic.h" - -static float HARMONIC_DEFAULT[10] = { - 1.f, - 0.f, - 0.f, - 0.f, - 0.f, - 0.f, - 0.f, - 0.f, - 0.f, - 0.f, -}; - -Harmonic::Harmonic() { - UpdateCoeffs(HARMONIC_DEFAULT); - Reset(); -} - -Harmonic::~Harmonic() { - -} - -float Harmonic::Process(float sample) { - float prevLast = this->lastProcessed; - this->lastProcessed = ( - sample * this->coeffs[0] + - sample * this->coeffs[1] + - sample * this->coeffs[2] + - sample * this->coeffs[3] + - sample * this->coeffs[4] + - sample * this->coeffs[5] + - sample * this->coeffs[6] + - sample * this->coeffs[7] + - sample * this->coeffs[8] + - sample * this->coeffs[9] + - sample * this->coeffs[10] - ); - this->prevOut = this->lastProcessed + this->prevOut * 0.999f - prevLast; - if (this->sampleCounter < this->buildup) { - this->sampleCounter++; - return 0; - } - return this->prevOut; -} - -void Harmonic::Reset() { - this->lastProcessed = 0.f; - this->prevOut = 0.f; - this->sampleCounter = 0.f; -} - -void Harmonic::SetHarmonics(float *coeffs) { - UpdateCoeffs(coeffs); - Reset(); -} - -void Harmonic::UpdateCoeffs(float *coeffs) { - // TODO -}