Home | History | Annotate | Download | only in 5_multimedia
      1 ## 5.10\. Professional Audio
      2 
      3 If device implementations report support for feature
      4 `android.hardware.audio.pro` via the
      5 [android.content.pm.PackageManager](
      6 http://developer.android.com/reference/android/content/pm/PackageManager.html)
      7 class, 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
     13 10 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
     15 peripheral 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)
     19 PCM 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
     23 are 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
     28 affects usable percentage of full CPU bandwidth by the callback.
     29 *    SHOULD provide zero audio underruns (output) or overruns (input) under normal use
     30 at 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
     36 period immediately after cold start.
     37 *    SHOULD provide zero audio clock difference between the input and output sides of
     38 corresponding end-points, when both are active. Examples of corresponding
     39 end-points include the on-device microphone and speaker, or the audio jack input
     40 and output.
     41 *    SHOULD handle audio buffer completion callbacks for the input and output sides
     42 of corresponding end-points on the same thread when both are active, and enter
     43 the output callback immediately after the return from the input callback.  Or
     44 if it is not feasible to handle the callbacks on the same thread, then enter the
     45 output callback shortly after entering the input callback to permit the
     46 application to have a consistent timing of the input and output sides.
     47 *    SHOULD minimize the phase difference between HAL audio buffering for the input
     48 and output sides of corresponding end-points.
     49 *    SHOULD minimize touch latency.
     50 *    SHOULD minimize touch latency variability under load (jitter).
     51 
     52 If 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`](
     56 http://developer.android.com/reference/android/content/pm/PackageManager.html)
     57 class.
     58 
     59 If device implementations meet the requirements via the OpenSL ES PCM buffer
     60 queue 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 
     65 If 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
     68 milliseconds or less over the audio jack path.
     69 *   [SR] STRONGLY RECOMMENDED to comply with
     70 section [Mobile device (jack) specifications](
     71 https://source.android.com/devices/accessories/headset/jack-headset-spec)
     72 of the [Wired Audio Headset Specification (v1.1)](
     73 https://source.android.com/devices/accessories/headset/plug-headset-spec).
     74 *   The continuous round-trip audio latency SHOULD be 10 milliseconds
     75 or less over the audio jack path.
     76 
     77 If 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
     80 milliseconds or less.
     81 *   The continuous round-trip audio latency SHOULD be 10 milliseconds
     82 or less over the USB host mode port using USB audio class.
     83 
     84 
     85 If 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 
     90 If device implementations include an HDMI port, they:
     91 
     92 *   [C-5-1] MUST support output in stereo and eight channels at 20-bit or
     93 24-bit depth and 192 kHz without bit-depth loss or resampling.
     94