diff options
Diffstat (limited to 'en/devices/audio')
-rw-r--r-- | en/devices/audio/implement-policy.html | 14 | ||||
-rw-r--r-- | en/devices/audio/implement-pre-processing.html | 4 | ||||
-rw-r--r-- | en/devices/audio/implement-shared-library.html | 17 | ||||
-rw-r--r-- | en/devices/audio/latency_design.html | 5 |
4 files changed, 21 insertions, 19 deletions
diff --git a/en/devices/audio/implement-policy.html b/en/devices/audio/implement-policy.html index 16cd0820..a6ccf0e9 100644 --- a/en/devices/audio/implement-policy.html +++ b/en/devices/audio/implement-policy.html @@ -75,10 +75,9 @@ shows many of these features in use.</p> <code>/system/etc</code>. To view a simple audio policy configuration in the new XML file format, view the example below.</p> -<p> <section class="expandable"> <h4 class="showalways">Show audio policy example</h4> -<pre> +<pre class="devsite-click-to-copy"> <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <audioPolicyConfiguration version="1.0" xmlns:xi="http://www.w3.org/2001/XInclude"> <globalConfiguration speaker_drc_enabled="true"/> @@ -139,7 +138,6 @@ XML file format, view the example below.</p> <xi:include href="default_volume_tables.xml"/> </audioPolicyConfiguration> </pre></section> -</p> <p>The top level structure contains modules that correspond to each audio HAL hardware module, where each module has a list of mix ports, device ports, and @@ -160,7 +158,7 @@ overwritten.</p> <section class="expandable"> <h4 class="showalways">Show volume table example</h4> -<p><pre> +<pre class="devsite-click-to-copy"> <?xml version="1.0" encoding="UTF-8"?> <volumes> <reference name="FULL_SCALE_VOLUME_CURVE"> @@ -178,11 +176,11 @@ overwritten.</p> <point>100,0</point> </reference> </volumes> -</pre></p></section> +</pre></section> <section class="expandable"> <h4 class="showalways">Show volumes example</h4> -<p><pre> +<pre class="devsite-click-to-copy"> <?xml version="1.0" encoding="UTF-8"?> <volumes> <volume stream="AUDIO_STREAM_VOICE_CALL" deviceCategory="DEVICE_CATEGORY_HEADSET" ref="DEFAULT_VOLUME_CURVE"/> @@ -255,7 +253,7 @@ overwritten.</p> <volume stream="AUDIO_STREAM_PATCH" deviceCategory="DEVICE_CATEGORY_EARPIECE" ref="FULL_SCALE_VOLUME_CURVE"/> <volume stream="AUDIO_STREAM_PATCH" deviceCategory="DEVICE_CATEGORY_EXT_MEDIA" ref="FULL_SCALE_VOLUME_CURVE"/> </volumes> -</pre></p></section> +</pre></section> <h2 id=file_inclusions>File inclusions</h2> <p>The XML Inclusions (XInclude) method can be used to include audio policy @@ -391,7 +389,7 @@ product. The following example from a Galaxy Nexus shows a <em>dynamic</em> channel mask, which means the audio policy manager queries the actual channel masks supported by the HDMI sink after connection.</p> -<pre> +<pre class="devsite-click-to-copy"> audio_hw_modules { primary { outputs { diff --git a/en/devices/audio/implement-pre-processing.html b/en/devices/audio/implement-pre-processing.html index e42dfc1c..adbf156f 100644 --- a/en/devices/audio/implement-pre-processing.html +++ b/en/devices/audio/implement-pre-processing.html @@ -83,7 +83,7 @@ audio HAL implementation's default behavior.</p> the <code>AudioSource</code> configuration in this manner, the framework will automatically request from the audio HAL the use of those effects.</p> -<p><pre> +<pre class="devsite-click-to-copy"> pre_processing { voice_communication { aec {} @@ -93,7 +93,7 @@ pre_processing { agc {} } } -</pre></p> +</pre> <h2 id=tuning>Source tuning</h2> diff --git a/en/devices/audio/implement-shared-library.html b/en/devices/audio/implement-shared-library.html index 0c999c81..9f687079 100644 --- a/en/devices/audio/implement-shared-library.html +++ b/en/devices/audio/implement-shared-library.html @@ -34,7 +34,7 @@ directory to contain your library's source files.</li> <li>Create an <code>Android.mk</code> file to build the shared library. Ensure the Makefile contains the following line: <br> -<pre> +<pre class="devsite-click-to-copy"> LOCAL_MODULE := audio.primary.<device> </pre> <br> @@ -46,7 +46,8 @@ hardware located on the device. The module names <code>audio.usb.<device></code> are also available for Bluetooth and USB audio interfaces. Here is an example of an <code>Android.mk</code> from the Galaxy Nexus audio hardware:</p> -<p><pre> + +<pre class="devsite-click-to-copy"> LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) @@ -62,29 +63,29 @@ LOCAL_SHARED_LIBRARIES := liblog libcutils libtinyalsa libaudioutils libdl LOCAL_MODULE_TAGS := optional include $(BUILD_SHARED_LIBRARY) -</pre></p> +</pre> </li> <br> <li>If your product supports low latency audio as specified by the Android CDD, copy the corresponding XML feature file into your product. For example, in your product's <code>device/<company>/<device>/device.mk</code> Makefile: -<p><pre> +<pre class="devsite-click-to-copy"> PRODUCT_COPY_FILES := ... PRODUCT_COPY_FILES += \ frameworks/native/data/etc/android.hardware.audio.low_latency.xml:system/etc/permissions/android.hardware.audio.low_latency.xml \ -</pre></p> +</pre> </li> <br> <li>Copy the audio policy configuration file you created earlier to the <code>system/etc/</code> directory in your product's <code>device/<company>/<device>/device.mk</code> Makefile. For example: -<p><pre> +<pre class="devsite-click-to-copy"> PRODUCT_COPY_FILES += \ device/samsung/tuna/audio/audio_policy.conf:system/etc/audio_policy.conf -</pre></p> +</pre> </li> <br> <li>Declare the shared modules of your audio HAL that are required by your @@ -92,7 +93,7 @@ product in the product's <code>device/<company>/<device>/device.mk</code> Makefile. For example, the Galaxy Nexus requires the primary and Bluetooth audio HAL modules: -<pre> +<pre class="devsite-click-to-copy"> PRODUCT_PACKAGES += \ audio.primary.tuna \ audio.a2dp.default diff --git a/en/devices/audio/latency_design.html b/en/devices/audio/latency_design.html index f777c8ab..59ab47e0 100644 --- a/en/devices/audio/latency_design.html +++ b/en/devices/audio/latency_design.html @@ -43,7 +43,10 @@ The client can optionally set bit <code>AUDIO_OUTPUT_FLAG_FAST</code> in the </p> <ul> -<li>Android native audio based on OpenSL ES</li> +<li>Android native audio based on <a +href="https://developer.android.com/ndk/guides/audio/opensl/index.html">OpenSL +ES</a> or <a +href="https://developer.android.com/ndk/guides/audio/aaudio/aaudio.html">AAudio</a></li> <li><a href="http://developer.android.com/reference/android/media/SoundPool.html">android.media.SoundPool</a></li> <li><a href="http://developer.android.com/reference/android/media/ToneGenerator.html">android.media.ToneGenerator</a></li> </ul> |