Home | History | Annotate | Download | only in 5_multimedia
      1 ## 5.4\. Audio Recording
      2 
      3 While some of the requirements outlined in this section are listed as SHOULD
      4 since Android 4.3, the Compatibility Definition for future versions are planned
      5 to change these to MUST. Existing and new Android devices are **STRONGLY
      6 RECOMMENDED** to meet these requirements that are listed as SHOULD, or they
      7 will not be able to attain Android compatibility when upgraded to the future
      8 version.
      9 
     10 ### 5.4.1\. Raw Audio Capture
     11 
     12 If device implementations declare `android.hardware.microphone`, they:
     13 
     14 *   [C-1-1] MUST allow capture of raw audio content with the following
     15 characteristics:
     16 
     17    *   **Format**: Linear PCM, 16-bit
     18    *   **Sampling rates**: 8000, 11025, 16000, 44100 Hz
     19    *   **Channels**: Mono
     20 
     21 *   [C-1-2] MUST capture at above sample rates without up-sampling.
     22 *   [C-1-3] MUST include an appropriate anti-aliasing filter when the
     23 sample rates given above are captured with down-sampling.
     24 *   SHOULD allow AM radio and DVD quality capture of raw audio content, which
     25 means the following characteristics:
     26 
     27    *   **Format**: Linear PCM, 16-bit
     28    *   **Sampling rates**: 22050, 48000 Hz
     29    *   **Channels**: Stereo
     30 
     31 If device implementations allow AM radio and DVD quality capture of raw audio
     32 content, they:
     33 
     34 *   [C-2-1] MUST capture without up-sampling at any ratio higher
     35 than 16000:22050 or 44100:48000.
     36 *   [C-2-2] MUST include an appropriate anti-aliasing filter for any
     37 up-sampling or down-sampling.
     38 
     39 ### 5.4.2\. Capture for Voice Recognition
     40 
     41 If device implementations declare `android.hardware.microphone`, they:
     42 
     43 *   [C-1-1] MUST capture
     44     `android.media.MediaRecorder.AudioSource.VOICE_RECOGNITION` audio source at
     45     one of the sampling rates, 44100 and 48000.
     46 *   [C-1-2] MUST, by default, disable any noise reduction audio processing when
     47     recording an audio stream from the `AudioSource.VOICE_RECOGNITION` audio
     48     source.
     49 *   [C-1-3] MUST, by default, disable any automatic gain control when recording
     50     an audio stream from the `AudioSource.VOICE_RECOGNITION` audio source.
     51 *   SHOULD record the voice recognition audio stream with approximately flat
     52     amplitude versus frequency characteristics: specifically, 3 dB, from 100 Hz
     53     to 4000 Hz.
     54 *   SHOULD record the voice recognition audio stream with input sensitivity set
     55     such that a 90 dB sound power level (SPL) source at 1000 Hz yields RMS of
     56     2500 for 16-bit samples.
     57 *   SHOULD record the voice recognition audio stream so that the PCM amplitude
     58     levels linearly track input SPL changes over at least a 30 dB range from -18
     59     dB to +12 dB re 90 dB SPL at the microphone.
     60 *   SHOULD record the voice recognition audio stream with total harmonic
     61     distortion (THD) less than 1% for 1 kHz at 90 dB SPL input level at the
     62     microphone.
     63 
     64 If device impelementations declare `android.hardware.microphone` and noise
     65 suppression (reduction) technologies tuned for speech recognition, they:
     66 
     67 *   [C-2-1] MUST allow this audio affect to be controllable with the
     68     `android.media.audiofx.NoiseSuppressor` API.
     69 *   [C-2-2] MUST uniquely identfiy each noise suppression technology
     70     implementation via the `AudioEffect.Descriptor.uuid` field.
     71 
     72 ### 5.4.3\. Capture for Rerouting of Playback
     73 
     74 The `android.media.MediaRecorder.AudioSource` class includes the `REMOTE_SUBMIX`
     75 audio source.
     76 
     77 If device implementations declare both `android.hardware.audio.output` and
     78 `android.hardware.microphone`, they:
     79 
     80 *   [C-1-1] MUST properly implement the `REMOTE_SUBMIX` audio source so that
     81 when an application uses the `android.media.AudioRecord` API to record from this
     82 audio source, it captures a mix of all audio streams except for the following:
     83 
     84     * `AudioManager.STREAM_RING`
     85     * `AudioManager.STREAM_ALARM`
     86     * `AudioManager.STREAM_NOTIFICATION`
     87 
     88