Starting March 27, 2025, we recommend using android-latest-release
instead of aosp-main
to build and contribute to AOSP. For more information, see Changes to AOSP.
AIDL Audio HAL
Stay organized with collections
Save and categorize content based on your preferences.
Starting with Android 14, the Audio HAL interface is
defined using Stable AIDL. Partners
and SoC vendors are encouraged to reimplement their Audio HAL to provide an
AIDL interface.
Extending the libaudiohal
library adds framework support for AIDL HAL.
With the AIDL implementation, the audio policy configuration specification is
moved to AIDL HAL. With this change, the Audio Policy Manager (APM) gets the
configuration from the HAL instead of consuming it from the vendor-provided XML
file.
Audio AIDL HAL API
This section describes the Core, Effects, and Common HAL APIs for AIDL.
Use default implementation of the AIDL API at
/hardware/interfaces/audio/aidl/default/
as a reference when implementing new versions of Audio HALs that
interact with kernel drivers.
See the
Audio HAL README file
for the Audio HAL directory structure for AIDL.
Core HAL
Some of the key interfaces of Core HAL,
using AIDL, are as follows:
Effects HAL
Some of the key interfaces of Effects HAL, using AIDL, are as follows:
See the Audio Effects for more
information.
Common HAL
Data structures and interfaces shared between various HALs such as BT HAL, core
and effects Audio HALs are in the Common HAL.
Common stable data types
Stable data structure definitions are used both by HALs and the framework.
Testing the Audio AIDL HAL API
New VTS
tests are provided for the AIDL interface.
There are no changes in the new HAL version that can affect security.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-06-26 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-26 UTC."],[],[],null,["# AIDL Audio HAL\n\nStarting with Android 14, the Audio HAL interface is\ndefined using [Stable AIDL](/docs/core/architecture/aidl/stable-aidl). Partners\nand SoC vendors are encouraged to reimplement their Audio HAL to provide an\nAIDL interface.\n\nExtending the `libaudiohal` library adds framework support for AIDL HAL.\nWith the AIDL implementation, the audio policy configuration specification is\nmoved to AIDL HAL. With this change, the Audio Policy Manager (APM) gets the\nconfiguration from the HAL instead of consuming it from the vendor-provided XML\nfile.\n\nAudio AIDL HAL API\n------------------\n\nThis section describes the Core, Effects, and Common HAL APIs for AIDL.\n\nUse default implementation of the AIDL API at\n[`/hardware/interfaces/audio/aidl/default/`](https://cs.android.com/android/platform/superproject/+/android-latest-release:hardware/interfaces/audio/aidl/default/)\nas a reference when implementing new versions of Audio HALs that\ninteract with kernel drivers.\n\nSee the\n[Audio HAL README file](https://cs.android.com/android/platform/superproject/+/android-latest-release:hardware/interfaces/audio/README.md)\nfor the Audio HAL directory structure for AIDL.\n\n### Core HAL\n\nSome of the [key interfaces of Core HAL](https://cs.android.com/android/platform/superproject/+/android-latest-release:hardware/interfaces/audio/aidl/android/hardware/audio/core/),\nusing AIDL, are as follows:\n\n- [`IModule.aidl`](https://cs.android.com/android/platform/superproject/+/android-latest-release:hardware/interfaces/audio/aidl/android/hardware/audio/core/IModule.aidl) is the entry point into the API.\n- Streams are unidirectional and are used by AudioFlinger to send or receive audio to and from the HAL through [`IStreamOut.aidl`](https://cs.android.com/android/platform/superproject/+/android-latest-release:hardware/interfaces/audio/aidl/android/hardware/audio/core/IStreamOut.aidl) and [`IStreamIn.aidl`](https://cs.android.com/android/platform/superproject/+/android-latest-release:hardware/interfaces/audio/aidl/android/hardware/audio/core/IStreamIn.aidl).\n- [`ITelephony.aidl`](https://cs.android.com/android/platform/superproject/+/android-latest-release:hardware/interfaces/audio/aidl/android/hardware/audio/core/ITelephony.aidl) provides controls specific to telephony functions.\n- [`IBluetooth.aidl`](https://cs.android.com/android/platform/superproject/+/android-latest-release:hardware/interfaces/audio/aidl/android/hardware/audio/core/IBluetooth.aidl) provides BT SCO and HFP controls that were on `IPrimaryModule` in the HIDL API.\n- [`IConfig.aidl`](https://cs.android.com/android/platform/superproject/+/android-latest-release:hardware/interfaces/audio/aidl/android/hardware/audio/core/IConfig.aidl) provides system-wide configuration parameters.\n- [`ISoundDose.aidl`](https://cs.android.com/android/platform/superproject/+/android-latest-release:hardware/interfaces/audio/aidl/android/hardware/audio/core/sounddose/ISoundDose.aidl) provides sound dose support. See [Sound dose](/docs/core/audio/sound-dose) for more information.\n- The latest version of the Core HAL API *in development* is in [`/hardware/interfaces/audio/aidl/android/hardware/audio/core/`](https://cs.android.com/android/platform/superproject/+/android-latest-release:hardware/interfaces/audio/aidl/android/hardware/audio/core/).\n- The latest *released* version of the Core HAL API is in [`/hardware/interfaces/audio/aidl/aidl_api/android.hardware.audio.core/`](https://cs.android.com/android/platform/superproject/+/android-latest-release:hardware/interfaces/audio/aidl/aidl_api/android.hardware.audio.core/).\n\n### Effects HAL\n\nSome of the key interfaces of Effects HAL, using AIDL, are as follows:\n\n- [`IFactory.aidl`](https://cs.android.com/android/platform/superproject/+/android-latest-release:hardware/interfaces/audio/aidl/android/hardware/audio/effect/IFactory.aidl) is the entry point into the API.\n- [`Descriptor.aidl`](https://cs.android.com/android/platform/superproject/+/android-latest-release:hardware/interfaces/audio/aidl/android/hardware/audio/effect/Descriptor.aidl) contains all information such as capabilities and attributes for an effect implementation.\n- [`Capability.aidl`](https://cs.android.com/android/platform/superproject/+/android-latest-release:hardware/interfaces/audio/aidl/android/hardware/audio/effect/Capability.aidl) defines effect capabilities that don't change at runtime.\n- [`Parameter.aidl`](https://cs.android.com/android/platform/superproject/+/android-latest-release:hardware/interfaces/audio/aidl/android/hardware/audio/effect/Parameter.aidl) defines all parameters supported by the effect instance.\n- [`IEffect.aidl`](https://cs.android.com/android/platform/superproject/+/android-latest-release:hardware/interfaces/audio/aidl/android/hardware/audio/effect/IEffect.aidl) is used to configure and control particular effect instances.\n- Effect-specific parcelables named after the effect.\n\n- The latest version of the Effects HAL API *in development* is in [`/hardware/interfaces/audio/aidl/android/hardware/audio/effect/`](https://cs.android.com/android/platform/superproject/+/android-latest-release:hardware/interfaces/audio/aidl/android/hardware/audio/effect/).\n\n- The latest *released* version of the Effects HAL API is in\n [`/hardware/interfaces/audio/aidl/aidl_api/android.hardware.audio.effect`](https://cs.android.com/android/platform/superproject/+/android-latest-release:hardware/interfaces/audio/aidl/aidl_api/android.hardware.audio.effect/).\n\nSee the [Audio Effects](/docs/core/audio/audio-effects) for more\ninformation.\n\n### Common HAL\n\nData structures and interfaces shared between various HALs such as BT HAL, core\nand effects Audio HALs are in the Common HAL.\n\n- The latest version of the Common AIDL HAL *in development* is in\n [`/hardware/interfaces/audio/aidl/android/hardware/audio/common/`](https://cs.android.com/android/platform/superproject/+/android-latest-release:hardware/interfaces/audio/aidl/android/hardware/audio/common/).\n\n- The latest *released* version of the Common HAL API is in\n [`/hardware/interfaces/audio/aidl/aidl_api/android.hardware.audio.common/current/android/hardware/audio/common/`](https://cs.android.com/android/platform/superproject/+/android-latest-release:hardware/interfaces/audio/aidl/aidl_api/android.hardware.audio.common/).\n\n#### Common stable data types\n\nStable data structure definitions are used both by HALs and the framework.\n\n- The latest version of the stable data types *in development* is in\n [`/system/hardware/interfaces/media/aidl/android/media/audio/common/`](https://cs.android.com/android/platform/superproject/+/android-latest-release:system/hardware/interfaces/media/aidl/android/media/audio/common/).\n\n- The latest *released* version of the stable data types is in\n [`/system/hardware/interfaces/media/aidl_api/android.media.audio.common.types/`](https://cs.android.com/android/platform/superproject/+/android-latest-release:system/hardware/interfaces/media/aidl_api/android.media.audio.common.types/).\n\nTesting the Audio AIDL HAL API\n------------------------------\n\nNew [VTS](https://android.googlesource.com/platform/hardware/interfaces/+/refs/heads/android16-release/audio/aidl/vts/)\ntests are provided for the AIDL interface.\n\nThere are no changes in the new HAL version that can affect security."]]