If device implementations report support for feature
android.hardware.audio.pro
via the
android.content.pm.PackageManager
class, they:
[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
, 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 both the
OpenSL ES
PCM
buffer queue and
AAudio native audio
APIs.
[SR] Are STRONGLY RECOMMENDED to provide a consistent level of CPU performance
while audio is active and CPU load is varying. This should be tested using
SimpleSynth
commit
1bd6391
. The SimpleSynth app needs to be run with below parameters and
achieve zero underruns after 10 minutes:
Work cycles: 200,000
Variable load: ON (this will switch between 100% and 10% of the work cycles
value every 2 seconds and is designed to test CPU governor behavior)
Stabilized load: OFF
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).
SHOULD have a latency from touch input to audio output of less than or equal to 40 ms.
If device implementations meet all of the above requirements, they:
Page 67 of 132