blob: c21e59548357326694d8f9d72a63b872fe85f905 [file] [log] [blame]
Glenn Kasten963fd952013-04-18 17:26:23 -07001page.title=Audio Terminology
2@jd:body
3
4<div id="qv-wrapper">
5 <div id="qv">
6 <h2>In this document</h2>
7 <ol id="auto-toc">
8 </ol>
9 </div>
10</div>
11
12<p>
13This document provides a glossary of audio-related terminology, including
14a list of widely used, generic terms and a list of terms that are specific
15to Android.
16</p>
17
18<h2 id="genericTerm">Generic Terms</h2>
19
20<p>
21These are audio terms that are widely used, with their conventional meanings.
22</p>
23
Glenn Kasten5df2d522013-09-27 11:50:35 -070024<h3 id="digitalAudioTerms">Digital Audio</h3>
25
Glenn Kasten963fd952013-04-18 17:26:23 -070026<dl>
27
Glenn Kasten298f3822013-06-12 17:17:36 -070028<dt>acoustics</dt>
29<dd>
30The study of the mechanical properties of sound, for example how the
31physical placement of transducers such as speakers and microphones on
32a device affects perceived audio quality.
33</dd>
34
Glenn Kasten5df2d522013-09-27 11:50:35 -070035<dt>attenuation</dt>
36<dd>
37A multiplicative factor less than or equal to 1.0,
38applied to an audio signal to decrease the signal level.
39Compare to "gain".
40</dd>
41
Glenn Kasten963fd952013-04-18 17:26:23 -070042<dt>bits per sample or bit depth</dt>
43<dd>
44Number of bits of information per sample.
45</dd>
46
47<dt>channel</dt>
48<dd>
49A single stream of audio information, usually corresponding to one
50location of recording or playback.
51</dd>
52
Glenn Kasten5df2d522013-09-27 11:50:35 -070053<dt>downmixing</dt>
54<dd>
55To decrease the number of channels, e.g. from stereo to mono, or from 5.1 to stereo.
56This can be accomplished by dropping some channels, mixing channels, or more advanced signal processing.
57Simple mixing without attenuation or limiting has the potential for overflow and clipping.
58Compare to "upmixing".
Glenn Kastenfdc7b7b2013-10-28 11:11:34 -070059</dd>
60
61<dt>duck</dt>
62<dd>
63To temporarily reduce the volume of one stream, when another stream
64becomes active. For example, if music is playing and a notification arrives,
65then the music stream could be ducked while the notification plays.
66Compare to "mute".
67</dd>
Glenn Kasten5df2d522013-09-27 11:50:35 -070068
Glenn Kasten963fd952013-04-18 17:26:23 -070069<dt>frame</dt>
70<dd>
71A set of samples, one per channel, at a point in time.
72</dd>
73
74<dt>frames per buffer</dt>
75<dd>
76The number of frames handed from one module to the next at once;
77for example the audio HAL interface uses this concept.
78</dd>
79
Glenn Kasten5df2d522013-09-27 11:50:35 -070080<dt>gain</dt>
81<dd>
82A multiplicative factor greater than or equal to 1.0,
83applied to an audio signal to increase the signal level.
84Compare to "attenuation".
85</dd>
86
Glenn Kasten298f3822013-06-12 17:17:36 -070087<dt>Hz</dt>
88<dd>
89The units for sample rate or frame rate.
90</dd>
91
92<dt>latency</dt>
93<dd>
94Time delay as a signal passes through a system.
95</dd>
96
Glenn Kasten963fd952013-04-18 17:26:23 -070097<dt>mono</dt>
98<dd>
99One channel.
100</dd>
101
Glenn Kasten5df2d522013-09-27 11:50:35 -0700102<dt>multichannel</dt>
103<dd>
104See "surround sound".
105Strictly, since stereo is more than one channel, it is also "multi" channel.
106But that usage would be confusing.
107</dd>
108
Glenn Kastenfdc7b7b2013-10-28 11:11:34 -0700109<dt>mute</dt>
110<dd>
111To (temporarily) force volume to be zero, independently from the usual volume controls.
112</dd>
113
Glenn Kasten5df2d522013-09-27 11:50:35 -0700114<dt>PCM</dt>
115<dd>
116Pulse Code Modulation, the most common low-level encoding of digital audio.
117The audio signal is sampled at a regular interval, called the sample rate,
118and then quantized to discrete values within a particular range depending on the bit depth.
119For example, for 16-bit PCM, the sample values are integers between -32768 and +32767.
120</dd>
121
Glenn Kastenfdc7b7b2013-10-28 11:11:34 -0700122<dt>ramp</dt>
123<dd>
124To gradually increase or decrease the level of a particular audio parameter,
125for example volume or the strength of an effect.
126A volume ramp is commonly applied when pausing and resuming music, to avoid a hard audible transition.
127</dd>
128
Glenn Kasten963fd952013-04-18 17:26:23 -0700129<dt>sample</dt>
130<dd>
131A number representing the audio value for a single channel at a point in time.
132</dd>
133
134<dt>sample rate or frame rate</dt>
135<dd>
136Number of frames per second;
137note that "frame rate" is thus more accurate,
Clay Murphyc28f2372013-09-25 16:13:40 -0700138but "sample rate" is conventionally used to mean "frame rate."
Glenn Kasten963fd952013-04-18 17:26:23 -0700139</dd>
140
Glenn Kastenfdc7b7b2013-10-28 11:11:34 -0700141<dt>sonification</dt>
142<dd>
143The use of sound to express feedback or information,
144for example touch sounds and keyboard sounds.
145</dd>
146
Glenn Kasten963fd952013-04-18 17:26:23 -0700147<dt>stereo</dt>
148<dd>
149Two channels.
150</dd>
151
Glenn Kasten5df2d522013-09-27 11:50:35 -0700152<dt>stereo widening</dt>
153<dd>
154An effect applied to a stereo signal, to make another stereo signal which sounds fuller and richer.
155The effect can also be applied to a mono signal, in which case it is a type of upmixing.
156</dd>
157
158<dt>surround sound</dt>
159<dd>
160Various techniques for increasing the ability of a listener to perceive
161sound position beyond stereo left and right.
162</dd>
163
164<dt>upmixing</dt>
165<dd>
166To increase the number of channels, e.g. from mono to stereo, or from stereo to surround sound.
167This can be accomplished by duplication, panning, or more advanced signal processing.
168Compare to "downmixing".
Glenn Kasten963fd952013-04-18 17:26:23 -0700169</dl>
170
Glenn Kasten5df2d522013-09-27 11:50:35 -0700171<dt>virtualizer</dt>
172<dd>
173An effect that attempts to spatialize audio channels, such as trying to
174simulate more speakers, or give the illusion that various sound sources have position.
175</dd>
176
Glenn Kastenfdc7b7b2013-10-28 11:11:34 -0700177<dt>volume</dt>
178<dd>
179Loudness, the subjective strength of an audio signal.
180</dd>
181
Glenn Kasten5df2d522013-09-27 11:50:35 -0700182<h3 id="hardwareTerms">Hardware and Accessories</h3>
183
184<p>
185These terms are related to audio hardware and accessories.
186</p>
187
188<h4 id="interDeviceTerms">Inter-device interconnect</h4>
189
190<p>
191These technologies connect audio and video components between devices,
192and are readily visible at the external connectors. The HAL implementor
193may need to be aware of these, as well as the end user.
194</p>
195
196<dl>
197
198<dt>Bluetooth</dt>
199<dd>
200A short range wireless technology.
201The major audio-related
202<a class="external-link" href="http://en.wikipedia.org/wiki/Bluetooth_profile"
203target="_android">Bluetooth profiles</a>
204and
205<a class="external-link" href="http://en.wikipedia.org/wiki/Bluetooth_protocols"
206target="_android">Bluetooth protocols</a>
207are described at these Wikipedia articles:
208
209<ul>
210
211<li><a class="external-link"
212href="http://en.wikipedia.org/wiki/Bluetooth_profile#Advanced_Audio_Distribution_Profile_.28A2DP.29"
213target="_android">A2DP</a>
214for music
215</li>
216
217<li><a class="external-link"
218href="http://en.wikipedia.org/wiki/Bluetooth_protocols#Synchronous_connection-oriented_.28SCO.29_link"
219target="_android">SCO</a>
220for telephony
221</li>
222
223</ul>
224
225</dd>
226
227<dt>DisplayPort</dt>
228<dd>
229Digital display interface by VESA.
230</dd>
231
232<dt>HDMI</dt>
233<dd>
234High-Definition Multimedia Interface, an interface for transferring
235audio and video data. For mobile devices, either a micro-HDMI (type D) or MHL connector is used.
236</dd>
237
238<dt>MHL</dt>
239<dd>
240Mobile High-Definition Link is a mobile audio/video interface, often
241over micro-USB connector.
242</dd>
243
244<dt>phone connector</dt>
245<dd>
246A mini or sub-mini phone connector
247connects a device to wired headphones, headset, or line-level amplifier.
248</dd>
249
250<dt>SlimPort</dt>
251<dd>
252An adapter from micro-USB to HDMI.
253</dd>
254
255<dt>S/PDIF</dt>
256<dd>
257Sony/Philips Digital Interface Format is an interconnect for uncompressed PCM.
258See Wikipedia article <a class="external-link" href="http://en.wikipedia.org/wiki/S/PDIF"
259target="_android">S/PDIF</a>.
260</dd>
261
262<dt>USB</dt>
263<dd>
264Universal Serial Bus.
265See Wikipedia article <a class="external-link" href="http://en.wikipedia.org/wiki/USB" target="_android">USB</a>.
266</dd>
267
268</dl>
269
270<h4 id="intraDeviceTerms">Intra-device interconnect</h4>
271
272<p>
273These technologies connect internal audio components within a given
274device, and are not visible without disassembling the device. The HAL
275implementor may need to be aware of these, but not the end user.
276</p>
277
278See these Wikipedia articles:
279<ul>
280<li><a class="external-link" href="http://en.wikipedia.org/wiki/General-purpose_input/output"
281target="_android">GPIO</a></li>
282<li><a class="external-link" href="http://en.wikipedia.org/wiki/I%C2%B2C" target="_android">I²C</a></li>
283<li><a class="external-link" href="http://en.wikipedia.org/wiki/I%C2%B2S" target="_android">I²S</a></li>
284<li><a class="external-link" href="http://en.wikipedia.org/wiki/McASP" target="_android">McASP</a></li>
285<li><a class="external-link" href="http://en.wikipedia.org/wiki/SLIMbus" target="_android">SLIMbus</a></li>
286<li><a class="external-link" href="http://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus"
287target="_android">SPI</a></li>
288</ul>
289
290<h3 id="signalTerms">Audio Signal Path</h3>
291
292<p>
293These terms are related to the signal path that audio data follows from
294an application to the transducer, or vice-versa.
295</p>
296
297<dt>ADC</dt>
298<dd>
299Analog to digital converter, a module that converts an analog signal
300(continuous in both time and amplitude) to a digital signal (discrete in
301both time and amplitude). Conceptually, an ADC consists of a periodic
302sample-and-hold followed by a quantizer, although it does not have to
303be implemented that way. An ADC is usually preceded by a low-pass filter
304to remove any high frequency components that are not representable using
305the desired sample rate. See Wikipedia article
306<a class="external-link" href="http://en.wikipedia.org/wiki/Analog-to-digital_converter"
307target="_android">Analog-to-digital_converter</a>.
308</dd>
309
310<dt>AP</dt>
311<dd>
312Application processor, the main general-purpose computer on a mobile device.
313</dd>
314
315<dt>codec</dt>
316<dd>
317Coder-decoder, a module that encodes and/or decodes an audio signal
318from one representation to another. Typically this is analog to PCM, or PCM to analog.
319Strictly, the term "codec" is reserved for modules that both encode and decode,
320however it can also more loosely refer to only one of these.
321See Wikipedia article
322<a class="external-link" href="http://en.wikipedia.org/wiki/Audio_codec" target="_android">Audio codec</a>.
323</dd>
324
325<dt>DAC</dt>
326<dd>
327Digital to analog converter, a module that converts a digital signal
328(discrete in both time and amplitude) to an analog signal
329(continuous in both time and amplitude). A DAC is usually followed by
330a low-pass filter to remove any high frequency components introduced
331by digital quantization.
332See Wikipedia article
333<a class="external-link" href="http://en.wikipedia.org/wiki/Digital-to-analog_converter"
334target="_android">Digital-to-analog converter</a>.
335</dd>
336
337<dt>DSP</dt>
338<dd>
339Digital Signal Processor, an optional component which is typically located
340after the application processor (for output), or before the application processor (for input).
341The primary purpose of a DSP is to off-load the application processor,
342and provide signal processing features at a lower power cost.
343</dd>
344
345<dt>PDM</dt>
346<dd>
347Pulse-density modulation
348is a form of modulation used to represent an analog signal by a digital signal,
349where the relative density of 1s versus 0s indicates the signal level.
350It is commonly used by digital to analog converters.
351See Wikipedia article
352<a class="external-link" href="http://en.wikipedia.org/wiki/Pulse-density_modulation"
353target="_android">Pulse-density modulation</a>.
354</dd>
355
356<dt>PWM</dt>
357<dd>
358Pulse-width modulation
359is a form of modulation used to represent an analog signal by a digital signal,
360where the relative width of a digital pulse indicates the signal level.
361It is commonly used by analog to digital converters.
362See Wikipedia article
363<a class="external-link" href="http://en.wikipedia.org/wiki/Pulse-width_modulation"
364target="_android">Pulse-width modulation</a>.
365</dd>
366
367</p>
368
Glenn Kasten963fd952013-04-18 17:26:23 -0700369<h2 id="androidSpecificTerms">Android-Specific Terms</h2>
370
371<p>
Clay Murphyc28f2372013-09-25 16:13:40 -0700372These are terms specific to the Android audio framework, or that
Glenn Kasten963fd952013-04-18 17:26:23 -0700373may have a special meaning within Android beyond their general meaning.
374</p>
375
376<dl>
377
378<dt>ALSA</dt>
379<dd>
380Advanced Linux Sound Architecture. As the name suggests, it is an audio
381framework primarily for Linux, but it has influenced other systems.
382See Wikipedia article
383<a class="external-link" href="http://en.wikipedia.org/wiki/Advanced_Linux_Sound_Architecture" target="_android">ALSA</a>
384for the general definition. As used within Android, it refers primarily
385to the kernel audio framework and drivers, not to the user-mode API. See
386tinyalsa.
387</dd>
388
Glenn Kasten298f3822013-06-12 17:17:36 -0700389<dt>AudioEffect</dt>
390<dd>
391An API and implementation framework for output (post-processing) effects
392and input (pre-processing) effects. The API is defined at
Glenn Kasten5df2d522013-09-27 11:50:35 -0700393<a href="http://developer.android.com/reference/android/media/audiofx/AudioEffect.html" target="_android">android.media.audiofx.AudioEffect</a>.
Glenn Kasten298f3822013-06-12 17:17:36 -0700394</dd>
395
Glenn Kasten963fd952013-04-18 17:26:23 -0700396<dt>AudioFlinger</dt>
397<dd>
398The sound server implementation for Android. AudioFlinger
399runs within the mediaserver process. See Wikipedia article
400<a class="external-link" href="http://en.wikipedia.org/wiki/Sound_server" target="_android">Sound server</a>
401for the generic definition.
402</dd>
403
Glenn Kastenfdc7b7b2013-10-28 11:11:34 -0700404<dt>audio focus</dt>
405<dd>
406A set of APIs for managing audio interactions across multiple independent apps.
407See <a href="http://developer.android.com/training/managing-audio/audio-focus.html">Managing Audio
408Focus</a> and the focus-related methods and constants of
409<a href="http://developer.android.com/reference/android/media/AudioManager.html">android.media.AudioManager</a>.
410</dd>
411
Glenn Kasten963fd952013-04-18 17:26:23 -0700412<dt>AudioMixer</dt>
413<dd>
414The module within AudioFlinger responsible for
415combining multiple tracks and applying attenuation
416(volume) and certain effects. The Wikipedia article
417<a class="external-link" href="http://en.wikipedia.org/wiki/Audio_mixing_(recorded_music)" target="_android">Audio mixing (recorded music)</a>
418may be useful for understanding the generic
419concept. But that article describes a mixer more as a hardware device
420or a software application, rather than a software module within a system.
421</dd>
422
Glenn Kasten5df2d522013-09-27 11:50:35 -0700423<dt>audio policy</dt>
424<dd>
425Service responsible for all actions that require a policy decision
426to be made first, such as opening a new I/O stream, re-routing after a
427change and stream volume management.
428</dd>
429
Glenn Kasten963fd952013-04-18 17:26:23 -0700430<dt>AudioRecord</dt>
431<dd>
432The primary low-level client API for receiving data from an audio
Clay Murphyc28f2372013-09-25 16:13:40 -0700433input device such as microphone. The data is usually in pulse-code modulation
434(PCM) format.
Glenn Kasten5df2d522013-09-27 11:50:35 -0700435The API is defined at
436<a href="http://developer.android.com/reference/android/media/AudioRecord.html"
437target="_android">android.media.AudioRecord</a>.
438</dd>
Glenn Kasten963fd952013-04-18 17:26:23 -0700439</dd>
440
441<dt>AudioResampler</dt>
442<dd>
443The module within AudioFlinger responsible for sample-rate conversion. See Wikipedia article
444<a class="external-link" href="http://en.wikipedia.org/wiki/Resampling_(audio)" target="_android">Resampling (audio)</a>
445for the generic definition.
446</dd>
447
Glenn Kasten963fd952013-04-18 17:26:23 -0700448<dt>AudioTrack</dt>
449<dd>
450The primary low-level client API for sending data to an audio output
451device such as a speaker. The data is usually in PCM format.
Glenn Kasten5df2d522013-09-27 11:50:35 -0700452The API is defined at
453<a href="http://developer.android.com/reference/android/media/AudioTrack.html"
454target="_android">android.media.AudioTrack</a>.
Glenn Kasten963fd952013-04-18 17:26:23 -0700455</dd>
456
457<dt>client</dt>
458<dd>
459Usually same as application or app, but sometimes the "client" of
460AudioFlinger is actually a thread running within the mediaserver system
461process. An example of that is when playing media that is decoded by a
462MediaPlayer object.
463</dd>
464
465<dt>HAL</dt>
466<dd>
467Hardware Abstraction Layer. HAL is a generic term in Android. With
468respect to audio, it is a layer between AudioFlinger and the kernel
469device driver with a C API, which replaces the earlier C++ libaudio.
470</dd>
471
472<dt>FastMixer</dt>
473<dd>
474A thread within AudioFlinger that services lower latency "fast tracks"
475and drives the primary output device.
476</dd>
477
478<dt>fast track</dt>
479<dd>
480An AudioTrack client with lower latency but fewer features, on some devices.
481</dd>
482
483<dt>MediaPlayer</dt>
484<dd>
485A higher-level client API than AudioTrack, for playing either encoded
Clay Murphyc28f2372013-09-25 16:13:40 -0700486content, or content which includes multimedia audio and video tracks.
Glenn Kasten963fd952013-04-18 17:26:23 -0700487</dd>
488
Glenn Kasten298f3822013-06-12 17:17:36 -0700489<dt>media.log</dt>
490<dd>
491An AudioFlinger debugging feature, available in custom builds only,
492for logging audio events to a circular buffer where they can then be
493dumped retroactively when needed.
494</dd>
495
Glenn Kasten963fd952013-04-18 17:26:23 -0700496<dt>mediaserver</dt>
497<dd>
498An Android system process that contains a number of media-related
499services, including AudioFlinger.
500</dd>
501
502<dt>NBAIO</dt>
503<dd>
504An abstraction for "non-blocking" audio input/output ports used within
505AudioFlinger. The name can be misleading, as some implementations of
506the NBAIO API actually do support blocking. The key implementations of
507NBAIO are for pipes of various kinds.
508</dd>
509
510<dt>normal mixer</dt>
511<dd>
512A thread within AudioFlinger that services most full-featured
513AudioTrack clients, and either directly drives an output device or feeds
Clay Murphyc28f2372013-09-25 16:13:40 -0700514its sub-mix into FastMixer via a pipe.
Glenn Kasten963fd952013-04-18 17:26:23 -0700515</dd>
516
517<dt>OpenSL ES</dt>
518<dd>
519An audio API standard by The Khronos Group. Android versions since
520API level 9 support a native audio API which is based on a subset of
521OpenSL ES 1.0.1.
522</dd>
523
Glenn Kastenfdc7b7b2013-10-28 11:11:34 -0700524<dt>silent mode</dt>
525<dd>
526A user-settable feature to mute the phone ringer and notifications,
527without affecting media playback (music, videos, games) or alarms.
528</dd>
529
Glenn Kasten5df2d522013-09-27 11:50:35 -0700530<dt>SoundPool</dt>
531<dd>
532A higher-level client API than AudioTrack, used for playing sampled
533audio clips. It is useful for triggering UI feedback, game sounds, etc.
534The API is defined at
535<a href="http://developer.android.com/reference/android/media/SoundPool.html"
536target="_android">android.media.SoundPool</a>.
537</dd>
538</dd>
539
540<dt>Stagefright</dt>
541<dd>
542See <a href="{@docRoot}devices/media.html">Media</a>.
543</dd>
544
Glenn Kasten963fd952013-04-18 17:26:23 -0700545<dt>StateQueue</dt>
546<dd>
547A module within AudioFlinger responsible for synchronizing state
548among threads. Whereas NBAIO is used to pass data, StateQueue is used
549to pass control information.
550</dd>
551
Glenn Kastenfdc7b7b2013-10-28 11:11:34 -0700552<dt>strategy</dt>
553<dd>
554A grouping of stream types with similar behavior, used by the audio policy service.
555</dd>
556
557<dt>stream type</dt>
558<dd>
559An enumeration that expresses a use case for audio output.
560The audio policy implementation uses the stream type, along with other parameters,
561to determine volume and routing decisions.
562Specific stream types are listed at
563<a href="http://developer.android.com/reference/android/media/AudioManager.html">android.media.AudioManager</a>.
564</dd>
565
Glenn Kasten298f3822013-06-12 17:17:36 -0700566<dt>tee sink</dt>
567<dd>
568An AudioFlinger debugging feature, available in custom builds only,
569for retaining a short fragment of recent audio for later analysis.
570This permits comparison between what was actually played or recorded
571vs. what was expected.
572</dd>
573
Glenn Kasten963fd952013-04-18 17:26:23 -0700574<dt>tinyalsa</dt>
575<dd>
576A small user-mode API above ALSA kernel with BSD license, recommended
Clay Murphyc28f2372013-09-25 16:13:40 -0700577for use in HAL implementations.
Glenn Kasten963fd952013-04-18 17:26:23 -0700578</dd>
579
Glenn Kastenfdc7b7b2013-10-28 11:11:34 -0700580<dt>ToneGenerator</dt>
581<dd>
582A higher-level client API than AudioTrack, used for playing DTMF signals.
583See the Wikipedia article
584<a class="external-link" href="http://en.wikipedia.org/wiki/Dual-tone_multi-frequency_signaling"
585target="_android">Dual-tone multi-frequency signaling</a>,
586and the API definition at
587<a href="http://developer.android.com/reference/android/media/ToneGenerator.html"
588target="_android">android.media.ToneGenerator</a>.
589</dd>
590
Glenn Kasten963fd952013-04-18 17:26:23 -0700591<dt>track</dt>
592<dd>
593An audio stream, controlled by the AudioTrack API.
594</dd>
595
Glenn Kastenfdc7b7b2013-10-28 11:11:34 -0700596<dt>volume attenuation curve</dt>
597<dd>
598A device-specific mapping from a generic volume index to a particular attenuation factor
599for a given output.
600</dd>
601
602<dt>volume index</dt>
603<dd>
604A unitless integer that expresses the desired relative volume of a stream.
605The volume-related APIs of
606<a href="http://developer.android.com/reference/android/media/AudioManager.html">android.media.AudioManager</a>
607operate in volume indices rather than absolute attenuation factors.
608</dd>
609
Glenn Kasten963fd952013-04-18 17:26:23 -0700610</dl>
611
612</p>
613