page.title=Audio @jd:body
Android's audio Hardware Abstraction Layer (HAL) connects the higher level, audio-specific framework APIs in android.media to the underlying audio driver and hardware.
The following figure and list describe how audio functionality is implemented and the relevant source code that is involved in the implementation:
frameworks/base/core/jni/
and frameworks/base/media/jni
directories.
This code calls the lower level native code to obtain access to the audio hardware.
frameworks/av/media/libmedia
and provides a
native equivalent to the android.media package. The native framework calls the Binder
IPC proxies to obtain access to audio-specific services of the media server.
frameworks/av/media/libmedia
directory and begin with the letter "I".
frameworks/av/services/audioflinger
, is the actual code that interacts with your
HAL implementations.
hardware/libhardware/include/hardware
. See audio.h for additional details.
Note: If you do choose ALSA, we recommend using external/tinyalsa
for the user portion of the driver because of its compatible licensing (The standard user-mode
library is GPL licensed).
See the rest of the pages within the Audio section for implementation instructions and ways to improve performance.