diff options
author | Sachiyo Sugimoto <sachiyo@google.com> | 2017-09-01 22:23:32 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-09-01 22:23:32 +0000 |
commit | c7c988dfc25244d3fc1fcd4db02ea8a9eff013fb (patch) | |
tree | 5ad67444f7af1e280a65bc8247ddceff5b06b004 | |
parent | 88309fb360f11083892968af6635ac60dbfdf7ad (diff) | |
parent | aa1e1864e2ecdf4c66a98a663333f766f5e3b8a9 (diff) | |
download | platform_compatibility_cdd-c7c988dfc25244d3fc1fcd4db02ea8a9eff013fb.tar.gz platform_compatibility_cdd-c7c988dfc25244d3fc1fcd4db02ea8a9eff013fb.tar.bz2 platform_compatibility_cdd-c7c988dfc25244d3fc1fcd4db02ea8a9eff013fb.zip |
Merge "Docs: Restructure Section 5.10" into oc-dev
am: aa1e1864e2
Change-Id: Ic56024fd1dbe6cb3379ddc855f361dec08988cc3
-rw-r--r-- | 5_multimedia/5_10_professional-audio.md | 145 |
1 files changed, 85 insertions, 60 deletions
diff --git a/5_multimedia/5_10_professional-audio.md b/5_multimedia/5_10_professional-audio.md index 3fcffd45..e90d0005 100644 --- a/5_multimedia/5_10_professional-audio.md +++ b/5_multimedia/5_10_professional-audio.md @@ -1,68 +1,93 @@ ## 5.10\. Professional Audio -If a device implementation meets _all_ of the following requirements, it is -STRONGLY RECOMMENDED to report support for feature android.hardware.audio.pro -via the -[android.content.pm.PackageManager](http://developer.android.com/reference/android/content/pm/PackageManager.html) -class. +If device implementations report support for feature +`android.hardware.audio.pro` via the +[android.content.pm.PackageManager]( +http://developer.android.com/reference/android/content/pm/PackageManager.html) +class, they: -* The device implementation MUST report support for feature -android.hardware.audio.low_latency. -* The continuous round-trip audio latency, as defined in section 5.6 Audio -Latency, MUST be 20 milliseconds or less and SHOULD be 10 milliseconds or less -over at least one supported path. -* If the device includes a 4 conductor 3.5mm audio jack, the continuous -round-trip audio latency MUST be 20 milliseconds or less over the audio jack -path, and SHOULD be 10 milliseconds or less over the audio jack path. -* The device implementation MUST include a USB port(s) supporting USB host -mode and USB peripheral mode. -* The USB host mode MUST implement the USB audio class. -* If the device omits a 4 conductor 3.5mm audio jack, the continuous -round-trip audio latency MUST be 20 milliseconds or less, and SHOULD be -10 milliseconds or less over the USB host mode port using USB audio class. -* If the device includes an HDMI port, the device implementation MUST support -output in stereo and eight channels at 20-bit or 24-bit depth and 192 kHz -without bit-depth loss or resampling. -* The device implementation MUST report support for feature -android.software.midi. -* If the device includes a 4 conductor 3.5mm audio jack, the device -implementation is STRONGLY RECOMMENDED to comply with section [Mobile device -(jack) specifications](https://source.android.com/accessories/headset/specification.html#mobile_device_jack_specifications) -of the [Wired Audio Headset Specification (v1.1)](https://source.android.com/accessories/headset/specification.html). - -Latencies and USB audio requirements MUST be met using the +* [C-1-1] MUST report support for feature +`android.hardware.audio.low_latency`. +* [C-1-2] MUST have the continuous round-trip audio latency, as defined in +[section 5.6 Audio Latency](#5_6_audio_latency), MUST be 20 milliseconds or less and SHOULD be +10 milliseconds or less over at least one supported path. +* [C-1-3] MUST include a USB port(s) supporting USB host mode and USB +peripheral mode. +* [C-1-4] MUST report support for feature `android.software.midi`. +* [C-1-5] MUST meet latencies and USB audio requirements using the [OpenSL ES](https://developer.android.com/ndk/guides/audio/opensl-for-android.html) PCM buffer queue API. +* SHOULD provide a sustainable level of CPU performance while audio is active. +* SHOULD minimize audio clock inaccuracy and drift relative to standard time. +* SHOULD minimize audio clock drift relative to the CPU `CLOCK_MONOTONIC` when both +are active. +* SHOULD minimize audio latency over on-device transducers. +* SHOULD minimize audio latency over USB digital audio. +* SHOULD document audio latency measurements over all paths. +* SHOULD minimize jitter in audio buffer completion callback entry times, as this +affects usable percentage of full CPU bandwidth by the callback. +* SHOULD provide zero audio underruns (output) or overruns (input) under normal use +at reported latency. +* SHOULD provide zero inter-channel latency difference. +* SHOULD minimize MIDI mean latency over all transports. +* SHOULD minimize MIDI latency variability under load (jitter) over all transports. +* SHOULD provide accurate MIDI timestamps over all transports. +* SHOULD minimize audio signal noise over on-device transducers, including the +period immediately after cold start. +* SHOULD provide zero audio clock difference between the input and output sides of +corresponding end-points, when both are active. Examples of corresponding +end-points include the on-device microphone and speaker, or the audio jack input +and output. +* SHOULD handle audio buffer completion callbacks for the input and output sides +of corresponding end-points on the same thread when both are active, and enter +the output callback immediately after the return from the input callback. Or +if it is not feasible to handle the callbacks on the same thread, then enter the +output callback shortly after entering the input callback to permit the +application to have a consistent timing of the input and output sides. +* SHOULD minimize the phase difference between HAL audio buffering for the input +and output sides of corresponding end-points. +* SHOULD minimize touch latency. +* SHOULD minimize touch latency variability under load (jitter). + +If device implementations meet all of the above requirements, they: + +* [SR] STRONGLY RECOMMENDED to report support for feature +`android.hardware.audio.pro` via the [`android.content.pm.PackageManager`]( +http://developer.android.com/reference/android/content/pm/PackageManager.html) +class. -Device implementations that meet these requirements via -the OpenSL ES PCM buffer queue API are STRONGLY RECOMMENDED to also meet the -same requirements via the +If device implementations meet the requirements via the OpenSL ES PCM buffer +queue API, they: + +* [SR] STRONGLY RECOMMENDED to also meet the same requirements via the [AAudio](https://developer.android.com/ndk/guides/audio/aaudio/aaudio.html) API. -In addition, a device implementation that reports support for this feature SHOULD: - -* Provide a sustainable level of CPU performance while audio is active. -* Minimize audio clock inaccuracy and drift relative to standard time. -* Minimize audio clock drift relative to the CPU `CLOCK_MONOTONIC` when both are active. -* Minimize audio latency over on-device transducers. -* Minimize audio latency over USB digital audio. -* Document audio latency measurements over all paths. -* Minimize jitter in audio buffer completion callback entry times, as this affects usable percentage of full CPU bandwidth by the callback. -* Provide zero audio underruns (output) or overruns (input) under normal use at reported latency. -* Provide zero inter-channel latency difference. -* Minimize MIDI mean latency over all transports. -* Minimize MIDI latency variability under load (jitter) over all transports. -* Provide accurate MIDI timestamps over all transports. -* Minimize audio signal noise over on-device transducers, including the period immediately after cold start. -* Provide zero audio clock difference between the input and output sides of corresponding - end-points, when both are active. Examples of corresponding end-points include - the on-device microphone and speaker, or the audio jack input and output. -* Handle audio buffer completion callbacks for the input and output sides of corresponding - end-points on the same thread when both are active, and enter the output callback immediately - after the return from the input callback. Or if it is not feasible to handle the callbacks - on the same thread, then enter the output callback shortly after entering the input callback - to permit the application to have a consistent timing of the input and output sides. -* Minimize the phase difference between HAL audio buffering for the input and output - sides of corresponding end-points. -* Minimize touch latency. -* Minimize touch latency variability under load (jitter). +If device implementations include a 4 conductor 3.5mm audio jack, they: + +* [C-2-1] MUST have the continuous round-trip audio latency to be 20 +milliseconds or less over the audio jack path. +* [SR] STRONGLY RECOMMENDED to comply with +section [Mobile device (jack) specifications]( +https://source.android.com/devices/accessories/headset/jack-headset-spec) +of the [Wired Audio Headset Specification (v1.1)]( +https://source.android.com/devices/accessories/headset/plug-headset-spec). +* The continuous round-trip audio latency SHOULD be 10 milliseconds +or less over the audio jack path. + +If device implementations omit a 4 conductor 3.5mm audio jack, they: + +* [C-3-1] MUST have a continuous round-trip audio latency of 20 +milliseconds or less. +* The continuous round-trip audio latency SHOULD be 10 milliseconds +or less over the USB host mode port using USB audio class. + + +If device implementations include a USB port(s) supporting USB host mode, they: + +* [C-4-1] MUST implement the USB audio class. + + +If device implementations include an HDMI port, they: + +* [C-5-1] MUST support output in stereo and eight channels at 20-bit or +24-bit depth and 192 kHz without bit-depth loss or resampling. |