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.
Stay organized with collections
Save and categorize content based on your preferences.
Android's Audio hardware abstraction layer (HAL) connects the higher-level,
audio-specific framework APIs into
android.media
the underlying audio drivers and hardware. The Audio HAL defines the standard
interface that audio services call in to. The Audio HAL must be implemented for
the audio hardware to function correctly.
This page gives an overview of the Audio HAL and provides details of its API and
implementation requirements.
Audio HAL interface
Starting with Android 14, the Audio HAL interface is
defined using AIDL. For past versions, the
Audio HAL interface is defined using HIDL.
Partners and SoC vendors are encouraged to reimplement their
Audio HAL to provide an AIDL interface.
New HAL APIs for features added in Android 14 and
higher are supported only with the implementation of the AIDL interface.
Starting with Android 14, no new API is added to the
HIDL implementation.
Switching to AIDL and deprecating and removing support for previous
major Audio HAL versions frees up disk space and RAM on devices. This
leads to a smoother UX and allows for newer user-visible features for end users.
The Core HAL is the main API used by AudioFlinger to play audio and control
the audio routing.
The Effects HAL API is used by the effects framework to control audio effects.
You can also configure preprocessing effects
such as automatic gain control and noise suppression through the Effects HAL
API.
The Common HAL API is a library of common data types used by the Core and
Effects HAL APIs. The Common HAL has no interfaces and no associated VTS
tests as it defines only data structures.
In addition to implementing the Audio HAL and creating the audio policy
configuration file, you must adhere to the following HAL requirements:
If capture for Sound Trigger (capture from hotword DSP buffer) is supported
by one input profile, the implementation must support the number of active
streams on this profile corresponding to the number of concurrent sessions
supported by Sound Trigger HAL.
Concurrency of voice call TX and capture from the app processor as
detailed on the Concurrent capture page.
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-12 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-12 UTC."],[],[],null,["# Audio HAL\n\nAndroid's Audio hardware abstraction layer (HAL) connects the higher-level,\naudio-specific framework APIs into\n[`android.media`](http://developer.android.com/reference/android/media/package-summary.html)\nthe underlying audio drivers and hardware. The Audio HAL defines the standard\ninterface that audio services call in to. The Audio HAL must be implemented for\nthe audio hardware to function correctly.\n\nThis page gives an overview of the Audio HAL and provides details of its API and\nimplementation requirements.\n\nAudio HAL interface\n-------------------\n\nStarting with Android 14, the Audio HAL interface is\ndefined using [AIDL](/docs/core/audio/aidl-implement). For past versions, the\nAudio HAL interface is defined using [HIDL](/docs/core/audio/hidl-implement).\nPartners and SoC vendors are encouraged to reimplement their\nAudio HAL to provide an AIDL interface.\n\nNew HAL APIs for features added in Android 14 and\nhigher are supported **only** with the implementation of the AIDL interface.\nStarting with Android 14, no new API is added to the\nHIDL implementation.\n\nSwitching to AIDL and deprecating and removing support for previous\nmajor Audio HAL versions frees up disk space and RAM on devices. This\nleads to a smoother UX and allows for newer user-visible features for end users.\n\nSee [AIDL and HIDL Audio HAL comparison](/docs/core/audio/aidl-hidl-comp)\nfor more information about the differences between the AIDL and HIDL Audio HAL.\n\n### Audio HAL API\n\nThe Audio HAL contains the following APIs:\n\n- The Core HAL is the main API used by AudioFlinger to play audio and control the audio routing.\n- The Effects HAL API is used by the effects framework to control audio effects.\n You can also configure [preprocessing effects](/devices/audio/implement-pre-processing)\n such as automatic gain control and noise suppression through the Effects HAL\n API.\n\n | **Note:** The Audio Effects HAL API is similar to the [framework effects APIs](https://developer.android.com/reference/android/media/audiofx/AudioEffect).\n- The Common HAL API is a library of common data types used by the Core and\n Effects HAL APIs. The Common HAL has no interfaces and no associated VTS\n tests as it defines only data structures.\n\nSee [AIDL Audio HAL](/docs/core/audio/aidl-implement) and\n[HIDL Audio HAL](/docs/core/audio/hidl-implement) for specific details\nrelated to AIDL and HIDL respectively.\n| **Note:** Starting with Android 13, Audio HAL is updated to version 7.1.\n\nRequirements\n------------\n\nIn addition to implementing the Audio HAL and creating the audio policy\nconfiguration file, you must adhere to the following HAL requirements:\n\n- If capture for Sound Trigger (capture from hotword DSP buffer) is supported\n by one input profile, the implementation must support the number of active\n streams on this profile corresponding to the number of concurrent sessions\n supported by Sound Trigger HAL.\n\n | **Note:** The implementation of the [Sound trigger HAL](/docs/core/audio/sound-trigger) is located at `/hardware/interfaces/soundtrigger` and is coupled with the Audio HAL.\n- Concurrency of voice call TX and capture from the app processor as\n detailed on the [Concurrent capture](/docs/core/audio/concurrent) page."]]