diff options
author | Heidi von Markham <hvm@google.com> | 2015-04-14 22:19:35 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-04-14 22:19:35 +0000 |
commit | 8f2379898d0ea64ca33ab39b71e9ad6cd2751366 (patch) | |
tree | 6b3772e1e9d2e39811072934db82c6ca979e408b /src/devices | |
parent | e0b8f5283563b3506b4c3b067f87ee0b6f268ea4 (diff) | |
parent | 5ef66574da29cf3eca2fde35fa1794d628b4d41d (diff) | |
download | source.android.com-8f2379898d0ea64ca33ab39b71e9ad6cd2751366.tar.gz |
am 5ef66574: am d2d685dc: Merge "Docs: Basic edits, 80 char column, consistent phrasing"
* commit '5ef66574da29cf3eca2fde35fa1794d628b4d41d':
Docs: Basic edits, 80 char column, consistent phrasing
Diffstat (limited to 'src/devices')
-rw-r--r-- | src/devices/audio/index.jd | 166 |
1 files changed, 92 insertions, 74 deletions
diff --git a/src/devices/audio/index.jd b/src/devices/audio/index.jd index b658e853..bfa616d5 100644 --- a/src/devices/audio/index.jd +++ b/src/devices/audio/index.jd @@ -25,88 +25,106 @@ page.title=Audio </div> </div> -<img style="float: right; margin: 0px 15px 15px 15px;" src="images/ape_fwk_hal_audio.png" alt="Android Audio HAL icon"/> +<img style="float: right; margin: 0px 15px 15px 15px;" +src="images/ape_fwk_hal_audio.png" alt="Android Audio HAL icon"/> + <p> - Android's audio Hardware Abstraction Layer (HAL) connects the higher-level, audio-specific - framework APIs in <a href="http://developer.android.com/reference/android/media/package-summary.html">android.media</a> to the underlying audio driver and hardware. This section includes implementation instructions and tips for improving performance.</p> +Android's audio Hardware Abstraction Layer (HAL) connects the higher-level, +audio-specific framework APIs in <a href="http://developer.android.com/reference/android/media/package-summary.html">android.media</a> to the underlying audio driver and +hardware. This section includes implementation instructions and tips for +improving performance. </p> + <h2 id="Architecture">Audio Architecture</h2> <p> - The following figure and list describe how audio functionality is implemented and the relevant - source code that is involved in the implementation: +Android audio architecture defines how audio functionality is implemented and +points to the relevant source code involved in the implementation. </p> - <img src="images/ape_fwk_audio.png" alt="Audio architecture" id="figure1" /> + +<img src="images/ape_fwk_audio.png" alt="Audio architecture" id="figure1" /> + <p class="img-caption"> - <strong>Figure 1.</strong> Android audio architecture +<strong>Figure 1.</strong> Android audio architecture </p> + <dl> - <dt> - Application framework - </dt> - <dd> - At the application framework level is the app code, which utilizes the - <a href="http://developer.android.com/reference/android/media/package-summary.html">android.media</a> - APIs to interact with the audio hardware. Internally, this code calls corresponding JNI glue - classes to access the native code that interacts with the audio hardware. - </dd> - <dt> - JNI - </dt> - <dd> - The JNI code associated with <a href="http://developer.android.com/reference/android/media/package-summary.html">android.media</a> is located in the - <code>frameworks/base/core/jni/</code> and <code>frameworks/base/media/jni</code> directories. - This code calls the lower level native code to obtain access to the audio hardware. - </dd> - <dt> - Native framework - </dt> - <dd> - The native framework is defined in <code>frameworks/av/media/libmedia</code> and provides a - native equivalent to the <a href="http://developer.android.com/reference/android/media/package-summary.html">android.media</a> package. The native framework calls the Binder - IPC proxies to obtain access to audio-specific services of the media server. - </dd> - <dt> - Binder IPC - </dt> - <dd> - The Binder IPC proxies facilitate communication over process boundaries. They are located in - the <code>frameworks/av/media/libmedia</code> directory and begin with the letter "I". - </dd> - <dt> - Media Server - </dt> - <dd> - The audio services in the media server, located in - <code>frameworks/av/services/audioflinger</code>, is the actual code that interacts with your - HAL implementations. - </dd> - <dt> - HAL - </dt> - <dd> - The HAL defines the standard interface that audio services call into - and that you must implement to have your audio hardware function correctly. The audio HAL - interfaces are located in -<code>hardware/libhardware/include/hardware</code>. See <a -href="{@docRoot}devices/halref/audio_8h_source.html"><hardware/audio.h></a> for additional details. - </dd> - <dt> - Kernel Driver - </dt> - <dd> - The audio driver interacts with the hardware and your implementation of the HAL. You can choose - to use ALSA, OSS, or a custom driver of your own at this level. The HAL is driver-agnostic. - <p> - <strong>Note:</strong> If you do choose ALSA, we recommend using <code>external/tinyalsa</code> - for the user portion of the driver because of its compatible licensing (The standard user-mode - library is GPL licensed). -</p> - </dd> -</dl> -<p> -Not shown: Android native audio based on OpenSL ES. + +<dt> +Application framework +</dt> +<dd> +The application framework includes the app code, which uses the <a href="http://developer.android.com/reference/android/media/package-summary.html">android.media</a> APIs to +interact with audio hardware. Internally, this code calls corresponding JNI glue +classes to access the native code that interacts with audio hardware. +</dd> + +<dt> +JNI +</dt> +<dd> +The JNI code associated with <a href="http://developer.android.com/reference/android/media/package-summary.html">android.media</a> calls lower level native code to access audio +hardware. JNI is located in <code>frameworks/base/core/jni/</code> and +<code>frameworks/base/media/jni</code>. +</dd> + +<dt> +Native framework +</dt> +<dd> +The native framework provides a native equivalent to the <a href="http://developer.android.com/reference/android/media/package-summary.html">android.media</a> package, calling +Binder IPC proxies to access the audio-specific services of the media server. +Native framework code is located in <code>frameworks/av/media/libmedia</code>. +</dd> + +<dt> +Binder IPC +</dt> +<dd> +Binder IPC proxies facilitate communication over process boundaries. Proxies are +located in <code>frameworks/av/media/libmedia</code> and begin with the letter +"I". +</dd> + +<dt> +Media server +</dt> +<dd> +The media server contains audio services, which are the actual code that +interacts with your HAL implementations. The media server is located in +<code>frameworks/av/services/audioflinger</code>. +</dd> + +<dt> +HAL +</dt> +<dd> +The HAL defines the standard interface that audio services call into and that +you must implement for your audio hardware to function correctly. The audio HAL +interfaces are located in <code>hardware/libhardware/include/hardware</code>. +For details, see <a +href="{@docRoot}devices/halref/audio_8h_source.html">hardware/audio.h</a>. +</dd> + +<dt> +Kernel driver +</dt> +<dd> +The audio driver interacts with your hardware and HAL implementation. You can +use Advanced Linux Sound Architecture (ALSA), Open Sound System (OSS), or a +custom driver (HAL is driver-agnostic). +<p class="note"><strong>Note</strong>: If you use ALSA, we recommend +<code>external/tinyalsa</code> for the user portion of the driver because of its +compatible licensing (the standard user-mode library is GPL-licensed).</p> +</dd> + +<dt> +Android native audio based on Open SL ES <em>(not shown)</em> +</dt> +<dd> This API is exposed as part of -<a href="https://developer.android.com/tools/sdk/ndk/index.html">Android NDK</a>, +<a href="https://developer.android.com/tools/sdk/ndk/index.html">Android NDK</a> and is at the same architecture level as <a href="http://developer.android.com/reference/android/media/package-summary.html">android.media</a>. -</p>
\ No newline at end of file +</dd> + +</dl>
\ No newline at end of file |