This section explains how to implement the audio Hardware Abstraction Layer (HAL), provides details about configuring an audio policy (file formats, code organization, pre-processing effects), and describes how to configure the shared library (creating the Android.mk file).

Implementing the audio HAL

The audio HAL is composed of the following interfaces:

You must implement all interfaces.

Audio header files

For a reference of the properties you can define, refer to the audio header files:

For an example, refer to the implementation for the Galaxy Nexus at device/samsung/tuna/audio.

Next steps

In addition to implementing the audio HAL, you must also create an audio policy configuration file that describes your audio topology and package the HAL implementation into a shared library. You can also configure pre-processing effects such as automatic gain control and noise suppression.