diff options
author | Android Partner Docs <noreply@android.com> | 2018-08-08 13:50:33 -0700 |
---|---|---|
committer | Clay Murphy <claym@google.com> | 2018-08-08 14:05:32 -0700 |
commit | ea448b829ef3c5eefcadcd50fdf74c873eeadd86 (patch) | |
tree | 34c2647a8d8c2dffdbcdac2c5ba11d41d1426da8 /en/devices/audio | |
parent | 19a77ba572d415186ce503e4bf8be87fe45d08eb (diff) | |
download | source.android.com-ea448b829ef3c5eefcadcd50fdf74c873eeadd86.tar.gz |
Docs: Changes to source.android.com
- 207940242 One more fix: add header for Television Requirements. by Gina Dimino <gdimino@google.com>
- 207936055 Update health README link. by Android Partner Docs <noreply@android.com>
- 207929938 Errata run for Android 9 CDD. by Gina Dimino <gdimino@google.com>
- 207897850 Fix typos in Develop and Configure index pages by Kenneth Lau <kennethlau@google.com>
- 207813977 Devsite localized content from translation request 958913. by Android Partner Docs <noreply@android.com>
- 207813949 Devsite localized content from translation request 953118. by Android Partner Docs <noreply@android.com>
- 207813941 Devsite localized content from translation request 961934. by Android Partner Docs <noreply@android.com>
- 207813934 Devsite localized content from translation request 552632. by Android Partner Docs <noreply@android.com>
- 207813463 Update line numbers in links by Kenneth Lau <kennethlau@google.com>
- 207796341 Fixing the URL for the CDD link in versions file. by Gina Dimino <gdimino@google.com>
- 207779392 Fix incorrect link by Kenneth Lau <kennethlau@google.com>
- 207777680 Update build numbers for 2018/08 releases by Android Partner Docs <noreply@android.com>
- 207775888 Update links to AOSP by Kenneth Lau <kennethlau@google.com>
- 207769948 Update links to AOSP by Kenneth Lau <kennethlau@google.com>
- 207763826 Clarify system for HIDL passthrough loading. by Android Partner Docs <noreply@android.com>
- 207733156 Fixing malformed links in html for kernel patches, adding... by Heidi von Markham <hvm@google.com>
- 207650104 Remove link by Heidi von Markham <hvm@google.com>
- 207640627 Tags for Android P. by Android Partner Docs <noreply@android.com>
- 207626815 Making link absolute by Clay Murphy <claym@google.com>
- 207611166 Add Background Restrictions into Release Notes. by Christina Nguyen <cqn@google.com>
- 207606267 Fixing unclosed tag, reformatting for clarity by Heidi von Markham <hvm@google.com>
- 207604244 Fix malformed link by Clay Murphy <claym@google.com>
- 207598416 adding subscript by Heidi von Markham <hvm@google.com>
- 207595049 Fix link in section 3.5.1. by Gina Dimino <gdimino@google.com>
- 207590813 Fix broken link due to file path change by Christina Nguyen <cqn@google.com>
- 207588930 Update Power nav to include changes to mgmt page (broken ... by Christina Nguyen <cqn@google.com>
- 207588102 Separate out the Power Management article into "Applicati... by Christina Nguyen <cqn@google.com>
- 207583000 Fix broken links in HAL interface section by Kenneth Lau <kennethlau@google.com>
- 207582699 Put index files in place as redirects are not taking hold by Clay Murphy <claym@google.com>
- 207575443 P release notes: fix bad links, remove "P release" by Mark Hecomovich <mheco@google.com>
- 207574657 Fix link typo from release notes to Carrier ID page by Christina Nguyen <cqn@google.com>
- 207559561 Integrate SAC next branch into mainline for Android P/9 p... by Mark Hecomovich <mheco@google.com>
- 207559252 Publish links to July localized versions within Japanese ... by Clay Murphy <claym@google.com>
- 207122872 Devsite localized content from translation request 958912. by Android Partner Docs <noreply@android.com>
- 207122854 Devsite localized content from translation request 961384. by Android Partner Docs <noreply@android.com>
- 207007888 Add blurb about the SystemUpdateSampler app on SAC so use... by Christina Nguyen <cqn@google.com>
- 206862073 Update Camera HAL testing page by Kenneth Lau <kennethlau@google.com>
- 206805870 Devsite localized content from translation request 960240. by Android Partner Docs <noreply@android.com>
- 206805861 Devsite localized content from translation request 954945. by Android Partner Docs <noreply@android.com>
PiperOrigin-RevId: 207940242
Change-Id: I3dee204c744e2e6062ac56810b88aefabf84636a
Diffstat (limited to 'en/devices/audio')
-rw-r--r-- | en/devices/audio/attributes.html | 348 | ||||
-rw-r--r-- | en/devices/audio/highres-effects.html | 164 | ||||
-rw-r--r-- | en/devices/audio/index.html | 1 |
3 files changed, 421 insertions, 92 deletions
diff --git a/en/devices/audio/attributes.html b/en/devices/audio/attributes.html index 61825c00..9cf34e82 100644 --- a/en/devices/audio/attributes.html +++ b/en/devices/audio/attributes.html @@ -4,6 +4,7 @@ <meta name="project_path" value="/_project.yaml" /> <meta name="book_path" value="/_book.yaml" /> </head> + {% include "_versions.html" %} <body> <!-- Copyright 2017 The Android Open Source Project @@ -22,84 +23,127 @@ --> +<p> + Audio players support attributes that define how the audio system handles + routing, volume, and focus decisions for the specified source. Applications + can attach attributes to an audio playback (such as music played by a + streaming service or a notification for a new email) then pass the audio + source attributes to the framework, where the audio system uses the attributes + to make mixing decisions and to notify applications about the state of the + system. +</p> + +<aside class="note"><strong>Note:</strong> Applications can also attach + attributes to an audio recording (such as audio captured in a video + recording), but this functionality is not exposed in the public API. +</aside> + +<p> + In Android 4.4 and earlier, the framework made mixing decisions using only + the audio stream type. However, basing such decisions on stream type was too + limiting to produce quality output across multiple applications and devices. + For example, on a mobile device, some applications (i.e. Google Maps) played + driving directions on the STREAM_MUSIC stream type; however, on mobile devices + in projection mode (i.e. Android Auto), applications cannot mix driving + directions with other media streams. +</p> + +<p> + Using the + <a href="http://developer.android.com/reference/android/media/AudioAttributes.html" class="external">Audio + Attribute API</a>, applications provide the audio system with detailed + information about a specific audio source, including usage (why the source is + playing), content type (what the source is playing), flags (how the source + should be played), and contexts (new in Android {{ androidPVersionNumber }}). + Syntax: +</p> + +<pre class="prettyprint"> +AudioAttributes { + mUsage + mContentType + mSource + mFlags + mTags / mFormattedTags / mBundle (key value pairs) +} +</pre> -<p>Audio players support attributes that define how the audio system handles routing, volume, and -focus decisions for the specified source. Applications can attach attributes to an audio playback -(such as music played by a streaming service or a notification for a new email) then pass the audio -source attributes to the framework, where the audio system uses the attributes to make mixing -decisions and to notify applications about the state of the system.</p> - -<p class="note"><strong>Note:</strong> Applications can also attach attributes to an audio -recording (such as audio captured in a video recording), but this functionality is not exposed in -the public API.</p> - -<p>In Android 4.4 and earlier, the framework made mixing decisions using only the audio stream type. -However, basing such decisions on stream type was too limiting to produce quality output across -multiple applications and devices. For example, on a mobile device, some applications (i.e. -Google Maps) played driving directions on the STREAM_MUSIC stream type; however, on mobile -devices in projection mode (i.e. Android Auto), applications cannot mix driving directions with -other media streams.</p> - -<p>Using the <a href="http://developer.android.com/reference/android/media/AudioAttributes.html"> -audio attribute API</a>, applications can now provide the audio system with detailed information -about a specific audio source:</p> <ul> -<li><b>Usage</b>. Specifies why the source is playing and controls routing, focus, and volume -decisions.</li> -<li><b>Content type</b>. Specifies what the source is playing (music, movie, speech, -sonification, unknown).</li> -<li><b>Flags</b>. Specifies how the source should be played. Includes support for audibility -enforcement (camera shutter sounds required in some countries) and hardware audio/video -synchronization.</li> + <li><strong>Usage</strong>. Specifies why the source is playing and controls + routing, focus, and volume decisions.</li> + <li><strong>Content type</strong>. Specifies what the source is playing + (music, movie, speech, sonification, unknown).</li> + <li><strong>Context</strong>. Usage values abstracted to the Audio HAL. + <li><strong>Flags</strong>. Specifies how the source should be played. + Includes support for audibility enforcement (camera shutter sounds required in + some countries) and hardware audio/video synchronization.</li> </ul> -<p>For dynamics processing, applications must distinguish between movie, music, and speech content. -Information about the data itself may also matter, such as loudness and peak sample value.</p> +<p> + For dynamics processing, applications must distinguish between movie, music, + and speech content. Information about the data itself may also matter, such as + loudness and peak sample value. +</p> <h2 id="using">Using attributes</h2> -<p>Usage specifies the context in which the stream is used, providing information about why the -sound is playing and what the sound is used for. Usage information is more expressive than a stream -type and allows platforms or routing policies to refine volume or routing decisions.</p> +<p> + Usage specifies the context in which the stream is used, providing + information about why the sound is playing and what the sound is used for. + Usage information is more expressive than a stream type and allows platforms + or routing policies to refine volume or routing decisions. +</p> -<p>Supply one of the following usage values for any instance:</p> +<p> + Supply one of the following usage values for any instance: +</p> <ul> -<li><code>USAGE_UNKNOWN</code></li> -<li><code>USAGE_MEDIA</code></li> -<li><code>USAGE_VOICE_COMMUNICATION</code></li> -<li><code>USAGE_VOICE_COMMUNICATION_SIGNALLING</code></li> -<li><code>USAGE_ALARM</code></li> -<li><code>USAGE_NOTIFICATION</code></li> -<li><code>USAGE_NOTIFICATION_RINGTONE</code></li> -<li><code>USAGE_NOTIFICATION_COMMUNICATION_INSTANT</code></li> -<li><code>USAGE_NOTIFICATION_COMMUNICATION_DELAYED</code></li> -<li><code>USAGE_NOTIFICATION_EVENT</code></li> -<li><code>USAGE_ASSISTANCE_ACCESSIBILITY</code></li> -<li><code>USAGE_ASSISTANCE_NAVIGATION_GUIDANCE</code></li> -<li><code>USAGE_ASSISTANCE_SONIFICATION</code></li> -<li><code>USAGE_GAME</code></li> +<li>USAGE_UNKNOWN</li> +<li>USAGE_MEDIA</li> +<li>USAGE_VOICE_COMMUNICATION</li> +<li>USAGE_VOICE_COMMUNICATION_SIGNALLING</li> +<li>USAGE_ALARM</li> +<li>USAGE_NOTIFICATION</li> +<li>USAGE_NOTIFICATION_TELEPHONY_RINGTONE</li> +<li>USAGE_NOTIFICATION_COMMUNICATION_REQUEST</li> +<li>USAGE_NOTIFICATION_COMMUNICATION_INSTANT</li> +<li>USAGE_NOTIFICATION_COMMUNICATION_DELAYED</li> +<li>USAGE_NOTIFICATION_EVENT</li> +<li>USAGE_ASSISTANCE_ACCESSIBILITY</li> +<li>USAGE_ASSISTANCE_NAVIGATION_GUIDANCE</li> +<li>USAGE_ASSISTANCE_SONIFICATION</li> +<li>USAGE_GAME</li> +<li>USAGE_VIRTUAL_SOURCE</li> +<li>USAGE_ASSISTANT</li> </ul> -<p>Audio attribute usage values are mutually exclusive. For examples, refer to <code> -<a href="http://developer.android.com/reference/android/media/AudioAttributes.html#USAGE_MEDIA"> -USAGE_MEDIA</a></code> and <code> -<a href="http://developer.android.com/reference/android/media/AudioAttributes.html#USAGE_ALARM"> -USAGE_ALARM</a></code> definitions; for exceptions, refer to the <code> -<a href="http://developer.android.com/reference/android/media/AudioAttributes.Builder.html"> -AudioAttributes.Builder</a></code> definition.</p> +<p> + Audio attribute usage values are mutually exclusive. For examples, refer to + <code><a href="http://developer.android.com/reference/android/media/AudioAttributes.html#USAGE_MEDIA" class="external">USAGE_MEDIA</a></code> + and + <code><a href="http://developer.android.com/reference/android/media/AudioAttributes.html#USAGE_ALARM" class="external">USAGE_ALARM</a></code> + definitions; for exceptions, refer to the + <code><a href="http://developer.android.com/reference/android/media/AudioAttributes.Builder.html" class="external">AudioAttributes.Builder</a></code> + definition. +</p> <h2 id="content-type">Content type</h2> -<p>Content type defines what the sound is and expresses the general category of the content such as -movie, speech, or beep/ringtone. The audio framework uses content type information to selectively -configure audio post-processing blocks. While supplying the content type is optional, you should -include type information whenever the content type is known, such as using -<code>CONTENT_TYPE_MOVIE</code> for a movie streaming service or <code>CONTENT_TYPE_MUSIC</code> -for a music playback application.</p> +<p> + Content type defines what the sound is and expresses the general category of + the content such as movie, speech, or beep/ringtone. The audio framework uses + content type information to selectively configure audio post-processing + blocks. While supplying the content type is optional, you should include type + information whenever the content type is known, such as using + <code>CONTENT_TYPE_MOVIE</code> for a movie streaming service or + <code>CONTENT_TYPE_MUSIC</code> for a music playback application. +</p> -<p>Supply one of the following content type values for any instance:</p> +<p> + Supply one of the following content type values for any instance: +</p> <ul> <li><code>CONTENT_TYPE_UNKNOWN</code> (default)</li> @@ -109,33 +153,121 @@ for a music playback application.</p> <li><code>CONTENT_TYPE_SPEECH</code></li> </ul> -<p>Audio attribute content type values are mutually exclusive. For details on content types, -refer to the <a href="http://developer.android.com/reference/android/media/AudioAttributes.html"> -audio attribute API</a>.</p> +<p> + Audio attribute content type values are mutually exclusive. For details on content types, + refer to the + <a href="http://developer.android.com/reference/android/media/AudioAttributes.html" class="external">audio + attribute API</a>. +</p> + +<h2 id="contexts">Contexts</h2> + +<p> + Each sound in Android is identified by the responsible application and reason + for generating the sound; and Android device uses this information to + determine how to present the sound. In Android 8.x and lower, applications can + report the sound generation reason using legacy stream types (e.g. + <code>AudioSystem.STREAM_MUSIC</code>) or <code>AudioAttributes</code>. In + Android {{ androidPVersionNumber }}, <code>AudioAttributes.usage</code> values + are abstracted at the HAL level as <em>Contexts</em>. +</p> + +<table> +<thead> +<tr> +<th>HAL audio contexts</th> +<th>AudioAttributes usage</th> +</tr> +</thead> +<tbody> +<tr> +<td>MUSIC</td> +<td>MEDIA</td> +</tr> +<tr> +<td>VOICE_COMMAND</td> +<td>USAGE_ASSISTANT</td> +</tr> +<tr> +<td>NAVIGATION</td> +<td>ASSISTANCE_NAVIGATION_GUIDANCE</td> +</tr> +<tr> +<td>CALL</td> +<td>VOICE_COMMUNICATION</td> +</tr> +<tr> +<td>RINGTONE</td> +<td>NOTIFICATION_RINGTONE</td> +</tr> +<tr> +<td>NOTIFICATION</td> +<td>NOTIFICATION</td> +</tr> +<tr> +<td>ALARM</td> +<td>ALARM</td> +</tr> +<tr> +<td>SYSTEM_SOUND</td> +<td>ASSISTANCE_SONIFICATION</td> +</tr> +<tr> +<td>UNKNOWN</td> +<td>UNKNOWN</td> +</tr> +</tbody> +</table> + +<p> + You can supply one of the following <code>CONTEXT_NUMBER</code> values for any + instance: +</p> + +<ul> +<li>MUSIC_CONTEXT // Music playback</li> +<li>NAVIGATION_CONTEXT // Navigation directions</li> +<li>VOICE_COMMAND_CONTEXT // Voice command session</li> +<li>CALL_RING_CONTEXT // Voice call ringing</li> +<li>CALL_CONTEXT // Voice call</li> +<li>ALARM_CONTEXT // Alarm sound from Android</li> +<li>NOTIFICATION_CONTEXT // Notifications</li> +<li>SYSTEM_SOUND_CONTEXT // User interaction sounds (button clicks, etc)</li> +</ul> + <h2 id="flags">Flags</h2> -<p>Flags specify how the audio framework applies effects to the audio playback. Supply one or more -of the following flags for an instance:</p> +<p> + Flags specify how the audio framework applies effects to the audio playback. + Supply one or more of the following flags for an instance: +</p> <ul> -<li><code>FLAG_AUDIBILITY_ENFORCED</code>. Requests the system ensure the audibility of the -sound. Use to address the needs of legacy <code>STREAM_SYSTEM_ENFORCED</code> (such as forcing -camera shutter sounds).</li> -<li><code>HW_AV_SYNC</code>. Requests the system select an output stream that supports hardware A/V -synchronization.</li> + <li><code>FLAG_AUDIBILITY_ENFORCED</code>. Requests the system to ensure the + audibility of the sound. Use to address the needs of legacy + <code>STREAM_SYSTEM_ENFORCED</code> (such as forcing camera shutter sounds). + </li> + <li><code>HW_AV_SYNC</code>. Requests the system to select an output stream + that supports hardware A/V synchronization.</li> </ul> -<p>Audio attribute flags are non-exclusive (can be combined). For details on these flags, -refer to the <a href="http://developer.android.com/reference/android/media/AudioAttributes.html"> -audio attribute API</a>.</p> +<p> + Audio attribute flags are non-exclusive and can be combined. For details on + these flags, refer to the + <a href="http://developer.android.com/reference/android/media/AudioAttributes.html" class="external">audio + attribute API</a>. +</p> <h2 id="example">Example</h2> -<p>In this example, AudioAttributes.Builder defines the AudioAttributes to be used by a new -AudioTrack instance:</p> +<p> + In this example, <code>AudioAttributes.Builder</code> defines the + <code>AudioAttributes</code> to be used by a new <code>AudioTrack</code> + instance: +</p> -<pre class="devsite-click-to-copy"> +<pre class="prettyprint"> AudioTrack myTrack = new AudioTrack( new AudioAttributes.Builder() .setUsage(AudioAttributes.USAGE_MEDIA) @@ -146,21 +278,28 @@ AudioTrack myTrack = new AudioTrack( <h2 id="compatibility">Compatibility</h2> -<p>Application developers should use audio attributes when creating or updating applications for -Android 5.0. However, applications are not required to take advantage of attributes; they can -handle legacy stream types only or remain unaware of attributes (i.e. a generic media player that -doesn't know anything about the content it's playing).</p> - -<p>In such cases, the framework maintains backwards compatibility with older devices and Android -releases by automatically translating legacy audio stream types to audio attributes. However, the -framework does not enforce or guarantee this mapping across devices, manufacturers, or Android -releases.</p> - -<p>Compatibility mappings:</p> +<p> + Application developers should use audio attributes when creating or updating + applications for Android 5.0 and higher. However, applications are not + required to take advantage of attributes; they can handle legacy stream types + only or remain unaware of attributes (i.e. a generic media player that doesn't + know anything about the content it's playing). +</p> + +<p> + In such cases, the framework maintains backwards compatibility with older + devices and Android releases by automatically translating legacy audio stream + types to audio attributes. However, the framework does not enforce or + guarantee this mapping across devices, manufacturers, or Android releases. +</p> + +<p> + Compatibility mappings: +</p> <table> <tr> - <th>Android 5.0</th> + <th>Android 5.0 and higher</th> <th>Android 4.4 and earlier</th> </tr> <tr> @@ -252,8 +391,35 @@ releases.</p> </tr> </table> -<p class="note"><strong>Note:</strong> @hide streams are used internally by the framework but are -not part of the public API.</p> +<aside class="note"><strong>Note:</strong> @hide streams are used internally by + the framework but are not part of the public API. +</aside> + +<h2 id="deprecated">Deprecated stream types</h2> + +<p> + Android {{ androidPVersionNumber }} deprecates the following stream types for + automotive use: +</p> + +<ul> +<li>STREAM_DEFAULT</li> +<li>STREAM_VOICE_CALL</li> +<li>STREAM_SYSTEM</li> +<li>STREAM_RING</li> +<li>STREAM_MUSIC</li> +<li>STREAM_ALARM</li> +<li>STREAM_NOTIFICATION</li> +<li>STREAM_BLUETOOTH_SCO</li> +<li>STREAM_SYSTEM_ENFORCED</li> +<li>STREAM_DTMF</li> +<li>STREAM_TTS</li> +<li>STREAM_ACCESSIBILITY</li> +</ul> + +<p>For more details, see + <a href="/devices/automotive/audio">Automotive Audio</a>. +</p> </body> </html> diff --git a/en/devices/audio/highres-effects.html b/en/devices/audio/highres-effects.html new file mode 100644 index 00000000..eb94a707 --- /dev/null +++ b/en/devices/audio/highres-effects.html @@ -0,0 +1,164 @@ +<html devsite=""> +<head> + <title>High-Resolution Audio Effects</title> + <meta name="project_path" value="/_project.yaml"> + <meta name="book_path" value="/_book.yaml"> +</head> + +<body> + {% include "_versions.html" %} + <!-- + Copyright 2018 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + + + <p>The Android {{ androidPVersionNumber }} release includes the following + improvements for high-resolution audio:</p> + + + <ul> + <li>Effect processing is converted from int16 to float format, one of the + few remaining int16 pipelines in AudioFlinger. This effect processing + change requires implementation work from vendors providing custom effects. + That work is described in the following sections.</li> + + + <li>The following improvements do not require any partner implementation: + + <ul> + <li>The number of simultaneous client output tracks increases from 14 + to 40, as limited client AudioTracks have been an issue for + applications in Android 8.x.</li> + + + <li>Maximum client/server memory increases from 4MB to 32MB (depending + on total device memory) to allow more simultaneous high-resolution + audio tracks.</li> + + + <li>Total mixed tracks increases from 32 to 256 to prevent resource + contention between applications and the System UI.</li> + </ul> + </li> + </ul> + + + <h2 id="output-effect-changes">Output effect changes</h2> + + + <p>Prior to the Android {{ androidPVersionNumber }} release, effect chain processing +was implemented in stereo int16 sample format. This had several limitations:</p> + + + <ul> + <li>All output effects forced conversion from floating point audio data to + int16, causing loss of precision.</li> + + + <li>Output effects were rejected from output sinks with a channel count + greater than 2.</li> + </ul> + + + <p>In the Android {{ androidPVersionNumber }} release, the effect chain processing + pipeline is upgraded to support the multichannel float format. Key points:</p> + + + <ul> + <li>Android software effects are already migrated to stereo float.</li> + + + <li>Legacy effects are supported with format adapters, which convert float + to int16 as needed.</li> + </ul> + + + <h2 id="implementing-output-effects">Implementing output effects</h2> + + + <p>A reference implementation for output effects is available under + <code>frameworks/av/media/libeffects</code>.</p> + + + <p>Partners implementing their own custom output effects should do the + following for the Android {{ androidPVersionNumber }} release:</p> + + + <ul> + <li>Update output effects to support the multichannel float format: + + <ul> + <li>Int16 processing support is no longer required.</li> + + + <li>Support output channel counts from 2 - 8 (for future compatibility + consider counts from 1 - 30).</li> + + + <li>Support input channel counts matching output channel count for + insert effects. Auxiliary effects will continue to see an input channel + count of 1 (mono).</li> + + + <li>Support both channel position masks (canonical) and channel index + masks of (1 << n) - 1.</li> + </ul> + </li> + + + <li>If you must continue to support legacy vendor output effects and cannot + update them, then verify legacy code as follows: + + <ul> + <li>Legacy output (insert) effects <strong>must reject</strong> + unsupported configurations in <code>EFFECT_CMD_SET_CONFIG</code>. + + <ul> + <li>Check that format is int16.</li> + + + <li>Check that the input and output channel masks are stereo.</li> + + + <li>If not, return <code>-EINVAL</code>.</li> + </ul> + </li> + + + <li>Legacy output (auxiliary) effects are configured by AudioFlinger + with a mono input channel mask and potentially multichannel output + channel masks, depending on whether the output sink is multichannel. + They <strong>must reject</strong> unsupported configurations in <code> + EFFECT_CMD_SET_CONFIG</code>. + + <ul> + <li>Check that the format is int16.</li> + + + <li>Check that the input channel mask is mono and the output + channel mask is stereo.</li> + + + <li>If not, return <code>-EINVAL</code>.</li> + </ul> + </li> + + + <li>Verify legacy code. Please do not assume it will work!</li> + </ul> + </li> + </ul> +</body> +</html> diff --git a/en/devices/audio/index.html b/en/devices/audio/index.html index e016b929..d99d1dca 100644 --- a/en/devices/audio/index.html +++ b/en/devices/audio/index.html @@ -33,7 +33,6 @@ hardware. This section includes implementation instructions and tips for improving performance. </p> -<h2 id="Architecture">Audio Architecture</h2> <p> Android audio architecture defines how audio functionality is implemented and points to the relevant source code involved in the implementation. |