• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1## 5.10\. Professional Audio
2
3If device implementations report support for feature
4`android.hardware.audio.pro` via the
5[android.content.pm.PackageManager](
6http://developer.android.com/reference/android/content/pm/PackageManager.html)
7class, they:
8
9*    [C-1-1] MUST report support for feature
10`android.hardware.audio.low_latency`.
11*    [C-1-2] MUST have the continuous round-trip audio latency, as defined in
12[section 5.6 Audio Latency](#5_6_audio_latency), MUST be 20 milliseconds or less and SHOULD be
1310 milliseconds or less over at least one supported path.
14*    [C-1-3] MUST include a USB port(s) supporting USB host mode and USB
15peripheral mode.
16*    [C-1-4] MUST report support for feature `android.software.midi`.
17*    [C-1-5] MUST meet latencies and USB audio requirements using the
18[OpenSL ES](https://developer.android.com/ndk/guides/audio/opensl-for-android.html)
19PCM buffer queue API.
20*    SHOULD provide a sustainable level of CPU performance while audio is active.
21*    SHOULD minimize audio clock inaccuracy and drift relative to standard time.
22*    SHOULD minimize audio clock drift relative to the CPU `CLOCK_MONOTONIC` when both
23are active.
24*    SHOULD minimize audio latency over on-device transducers.
25*    SHOULD minimize audio latency over USB digital audio.
26*    SHOULD document audio latency measurements over all paths.
27*    SHOULD minimize jitter in audio buffer completion callback entry times, as this
28affects usable percentage of full CPU bandwidth by the callback.
29*    SHOULD provide zero audio underruns (output) or overruns (input) under normal use
30at reported latency.
31*    SHOULD provide zero inter-channel latency difference.
32*    SHOULD minimize MIDI mean latency over all transports.
33*    SHOULD minimize MIDI latency variability under load (jitter) over all transports.
34*    SHOULD provide accurate MIDI timestamps over all transports.
35*    SHOULD minimize audio signal noise over on-device transducers, including the
36period immediately after cold start.
37*    SHOULD provide zero audio clock difference between the input and output sides of
38corresponding end-points, when both are active. Examples of corresponding
39end-points include the on-device microphone and speaker, or the audio jack input
40and output.
41*    SHOULD handle audio buffer completion callbacks for the input and output sides
42of corresponding end-points on the same thread when both are active, and enter
43the output callback immediately after the return from the input callback.  Or
44if it is not feasible to handle the callbacks on the same thread, then enter the
45output callback shortly after entering the input callback to permit the
46application to have a consistent timing of the input and output sides.
47*    SHOULD minimize the phase difference between HAL audio buffering for the input
48and output sides of corresponding end-points.
49*    SHOULD minimize touch latency.
50*    SHOULD minimize touch latency variability under load (jitter).
51
52If device implementations meet all of the above requirements, they:
53
54*   [SR] STRONGLY RECOMMENDED to report support for feature
55`android.hardware.audio.pro` via the [`android.content.pm.PackageManager`](
56http://developer.android.com/reference/android/content/pm/PackageManager.html)
57class.
58
59If device implementations meet the requirements via the OpenSL ES PCM buffer
60queue API, they:
61
62*    [SR] STRONGLY RECOMMENDED to also meet the same requirements via the
63[AAudio](https://developer.android.com/ndk/guides/audio/aaudio/aaudio.html) API.
64
65If device implementations include a 4 conductor 3.5mm audio jack, they:
66
67*   [C-2-1] MUST have the continuous round-trip audio latency to be 20
68milliseconds or less over the audio jack path.
69*   [SR] STRONGLY RECOMMENDED to comply with
70section [Mobile device (jack) specifications](
71https://source.android.com/devices/accessories/headset/jack-headset-spec)
72of the [Wired Audio Headset Specification (v1.1)](
73https://source.android.com/devices/accessories/headset/plug-headset-spec).
74*   The continuous round-trip audio latency SHOULD be 10 milliseconds
75or less over the audio jack path.
76
77If device implementations omit a 4 conductor 3.5mm audio jack, they:
78
79*   [C-3-1] MUST have a continuous round-trip audio latency of 20
80milliseconds or less.
81*   The continuous round-trip audio latency SHOULD be 10 milliseconds
82or less over the USB host mode port using USB audio class.
83
84
85If device implementations include a USB port(s) supporting USB host mode, they:
86
87*   [C-4-1] MUST implement the USB audio class.
88
89
90If device implementations include an HDMI port, they:
91
92*   [C-5-1] MUST support output in stereo and eight channels at 20-bit or
9324-bit depth and 192 kHz without bit-depth loss or resampling.
94