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.
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
Audio AIDL HAL API
This section describes the Core, Effects, and Common HAL APIs for AIDL.
Use default implementation of the AIDL API at
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.
Some of the key interfaces of Core HAL, using AIDL, are as follows:
IModule.aidlis the entry point into the API.
- Streams are unidirectional and are used by AudioFlinger to send or receive
audio to and from the HAL through
ITelephony.aidlprovides controls specific to telephony functions.
IBluetooth.aidlprovides BT SCO and HFP controls that were on
IPrimaryModulein the HIDL API.
IConfig.aidlprovides system-wide configuration parameters.
ISoundDose.aidlprovides sound dose support. See Sound dose for more information.
- The latest version of the Core HAL API in development is in
- The latest released version of the Core HAL API is in
Some of the key interfaces of Effects HAL, using AIDL, are as follows:
IFactory.aidlis the entry point into the API.
Descriptor.aidlcontains all information such as capabilities and attributes for an effect implementation.
Capability.aidldefines effect capabilities that don't change at runtime.
Parameter.aidldefines all parameters supported by the effect instance.
IEffect.aidlis used to configure and control particular effect instances.
Effect-specific parcelables named after the effect.
The latest version of the Effects HAL API in development is in
The latest released version of the Effects HAL API is in
See the Audio Effects for more information.
Data structures and interfaces shared between various HALs such as BT HAL, core and effects Audio HALs are in the Common HAL.
The latest version of the Common AIDL HAL in development is in
The latest released version of the Common HAL API is in
Common stable data types
Stable data structure definitions are used both by HALs and the framework.
The latest version of the stable data types in development is in
The latest released version of the stable data types is in
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.