blob: f61c74c12436ca36f0cb0562ee4a09961c67f032 [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".
59</dl>
60
Glenn Kasten963fd952013-04-18 17:26:23 -070061<dt>frame</dt>
62<dd>
63A set of samples, one per channel, at a point in time.
64</dd>
65
66<dt>frames per buffer</dt>
67<dd>
68The number of frames handed from one module to the next at once;
69for example the audio HAL interface uses this concept.
70</dd>
71
Glenn Kasten5df2d522013-09-27 11:50:35 -070072<dt>gain</dt>
73<dd>
74A multiplicative factor greater than or equal to 1.0,
75applied to an audio signal to increase the signal level.
76Compare to "attenuation".
77</dd>
78
Glenn Kasten298f3822013-06-12 17:17:36 -070079<dt>Hz</dt>
80<dd>
81The units for sample rate or frame rate.
82</dd>
83
84<dt>latency</dt>
85<dd>
86Time delay as a signal passes through a system.
87</dd>
88
Glenn Kasten963fd952013-04-18 17:26:23 -070089<dt>mono</dt>
90<dd>
91One channel.
92</dd>
93
Glenn Kasten5df2d522013-09-27 11:50:35 -070094<dt>multichannel</dt>
95<dd>
96See "surround sound".
97Strictly, since stereo is more than one channel, it is also "multi" channel.
98But that usage would be confusing.
99</dd>
100
101<dt>PCM</dt>
102<dd>
103Pulse Code Modulation, the most common low-level encoding of digital audio.
104The audio signal is sampled at a regular interval, called the sample rate,
105and then quantized to discrete values within a particular range depending on the bit depth.
106For example, for 16-bit PCM, the sample values are integers between -32768 and +32767.
107</dd>
108
Glenn Kasten963fd952013-04-18 17:26:23 -0700109<dt>sample</dt>
110<dd>
111A number representing the audio value for a single channel at a point in time.
112</dd>
113
114<dt>sample rate or frame rate</dt>
115<dd>
116Number of frames per second;
117note that "frame rate" is thus more accurate,
Clay Murphyc28f2372013-09-25 16:13:40 -0700118but "sample rate" is conventionally used to mean "frame rate."
Glenn Kasten963fd952013-04-18 17:26:23 -0700119</dd>
120
121<dt>stereo</dt>
122<dd>
123Two channels.
124</dd>
125
Glenn Kasten5df2d522013-09-27 11:50:35 -0700126<dt>stereo widening</dt>
127<dd>
128An effect applied to a stereo signal, to make another stereo signal which sounds fuller and richer.
129The effect can also be applied to a mono signal, in which case it is a type of upmixing.
130</dd>
131
132<dt>surround sound</dt>
133<dd>
134Various techniques for increasing the ability of a listener to perceive
135sound position beyond stereo left and right.
136</dd>
137
138<dt>upmixing</dt>
139<dd>
140To increase the number of channels, e.g. from mono to stereo, or from stereo to surround sound.
141This can be accomplished by duplication, panning, or more advanced signal processing.
142Compare to "downmixing".
Glenn Kasten963fd952013-04-18 17:26:23 -0700143</dl>
144
Glenn Kasten5df2d522013-09-27 11:50:35 -0700145<dt>virtualizer</dt>
146<dd>
147An effect that attempts to spatialize audio channels, such as trying to
148simulate more speakers, or give the illusion that various sound sources have position.
149</dd>
150
151<h3 id="hardwareTerms">Hardware and Accessories</h3>
152
153<p>
154These terms are related to audio hardware and accessories.
155</p>
156
157<h4 id="interDeviceTerms">Inter-device interconnect</h4>
158
159<p>
160These technologies connect audio and video components between devices,
161and are readily visible at the external connectors. The HAL implementor
162may need to be aware of these, as well as the end user.
163</p>
164
165<dl>
166
167<dt>Bluetooth</dt>
168<dd>
169A short range wireless technology.
170The major audio-related
171<a class="external-link" href="http://en.wikipedia.org/wiki/Bluetooth_profile"
172target="_android">Bluetooth profiles</a>
173and
174<a class="external-link" href="http://en.wikipedia.org/wiki/Bluetooth_protocols"
175target="_android">Bluetooth protocols</a>
176are described at these Wikipedia articles:
177
178<ul>
179
180<li><a class="external-link"
181href="http://en.wikipedia.org/wiki/Bluetooth_profile#Advanced_Audio_Distribution_Profile_.28A2DP.29"
182target="_android">A2DP</a>
183for music
184</li>
185
186<li><a class="external-link"
187href="http://en.wikipedia.org/wiki/Bluetooth_protocols#Synchronous_connection-oriented_.28SCO.29_link"
188target="_android">SCO</a>
189for telephony
190</li>
191
192</ul>
193
194</dd>
195
196<dt>DisplayPort</dt>
197<dd>
198Digital display interface by VESA.
199</dd>
200
201<dt>HDMI</dt>
202<dd>
203High-Definition Multimedia Interface, an interface for transferring
204audio and video data. For mobile devices, either a micro-HDMI (type D) or MHL connector is used.
205</dd>
206
207<dt>MHL</dt>
208<dd>
209Mobile High-Definition Link is a mobile audio/video interface, often
210over micro-USB connector.
211</dd>
212
213<dt>phone connector</dt>
214<dd>
215A mini or sub-mini phone connector
216connects a device to wired headphones, headset, or line-level amplifier.
217</dd>
218
219<dt>SlimPort</dt>
220<dd>
221An adapter from micro-USB to HDMI.
222</dd>
223
224<dt>S/PDIF</dt>
225<dd>
226Sony/Philips Digital Interface Format is an interconnect for uncompressed PCM.
227See Wikipedia article <a class="external-link" href="http://en.wikipedia.org/wiki/S/PDIF"
228target="_android">S/PDIF</a>.
229</dd>
230
231<dt>USB</dt>
232<dd>
233Universal Serial Bus.
234See Wikipedia article <a class="external-link" href="http://en.wikipedia.org/wiki/USB" target="_android">USB</a>.
235</dd>
236
237</dl>
238
239<h4 id="intraDeviceTerms">Intra-device interconnect</h4>
240
241<p>
242These technologies connect internal audio components within a given
243device, and are not visible without disassembling the device. The HAL
244implementor may need to be aware of these, but not the end user.
245</p>
246
247See these Wikipedia articles:
248<ul>
249<li><a class="external-link" href="http://en.wikipedia.org/wiki/General-purpose_input/output"
250target="_android">GPIO</a></li>
251<li><a class="external-link" href="http://en.wikipedia.org/wiki/I%C2%B2C" target="_android">I²C</a></li>
252<li><a class="external-link" href="http://en.wikipedia.org/wiki/I%C2%B2S" target="_android">I²S</a></li>
253<li><a class="external-link" href="http://en.wikipedia.org/wiki/McASP" target="_android">McASP</a></li>
254<li><a class="external-link" href="http://en.wikipedia.org/wiki/SLIMbus" target="_android">SLIMbus</a></li>
255<li><a class="external-link" href="http://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus"
256target="_android">SPI</a></li>
257</ul>
258
259<h3 id="signalTerms">Audio Signal Path</h3>
260
261<p>
262These terms are related to the signal path that audio data follows from
263an application to the transducer, or vice-versa.
264</p>
265
266<dt>ADC</dt>
267<dd>
268Analog to digital converter, a module that converts an analog signal
269(continuous in both time and amplitude) to a digital signal (discrete in
270both time and amplitude). Conceptually, an ADC consists of a periodic
271sample-and-hold followed by a quantizer, although it does not have to
272be implemented that way. An ADC is usually preceded by a low-pass filter
273to remove any high frequency components that are not representable using
274the desired sample rate. See Wikipedia article
275<a class="external-link" href="http://en.wikipedia.org/wiki/Analog-to-digital_converter"
276target="_android">Analog-to-digital_converter</a>.
277</dd>
278
279<dt>AP</dt>
280<dd>
281Application processor, the main general-purpose computer on a mobile device.
282</dd>
283
284<dt>codec</dt>
285<dd>
286Coder-decoder, a module that encodes and/or decodes an audio signal
287from one representation to another. Typically this is analog to PCM, or PCM to analog.
288Strictly, the term "codec" is reserved for modules that both encode and decode,
289however it can also more loosely refer to only one of these.
290See Wikipedia article
291<a class="external-link" href="http://en.wikipedia.org/wiki/Audio_codec" target="_android">Audio codec</a>.
292</dd>
293
294<dt>DAC</dt>
295<dd>
296Digital to analog converter, a module that converts a digital signal
297(discrete in both time and amplitude) to an analog signal
298(continuous in both time and amplitude). A DAC is usually followed by
299a low-pass filter to remove any high frequency components introduced
300by digital quantization.
301See Wikipedia article
302<a class="external-link" href="http://en.wikipedia.org/wiki/Digital-to-analog_converter"
303target="_android">Digital-to-analog converter</a>.
304</dd>
305
306<dt>DSP</dt>
307<dd>
308Digital Signal Processor, an optional component which is typically located
309after the application processor (for output), or before the application processor (for input).
310The primary purpose of a DSP is to off-load the application processor,
311and provide signal processing features at a lower power cost.
312</dd>
313
314<dt>PDM</dt>
315<dd>
316Pulse-density modulation
317is a form of modulation used to represent an analog signal by a digital signal,
318where the relative density of 1s versus 0s indicates the signal level.
319It is commonly used by digital to analog converters.
320See Wikipedia article
321<a class="external-link" href="http://en.wikipedia.org/wiki/Pulse-density_modulation"
322target="_android">Pulse-density modulation</a>.
323</dd>
324
325<dt>PWM</dt>
326<dd>
327Pulse-width modulation
328is a form of modulation used to represent an analog signal by a digital signal,
329where the relative width of a digital pulse indicates the signal level.
330It is commonly used by analog to digital converters.
331See Wikipedia article
332<a class="external-link" href="http://en.wikipedia.org/wiki/Pulse-width_modulation"
333target="_android">Pulse-width modulation</a>.
334</dd>
335
336</p>
337
Glenn Kasten963fd952013-04-18 17:26:23 -0700338<h2 id="androidSpecificTerms">Android-Specific Terms</h2>
339
340<p>
Clay Murphyc28f2372013-09-25 16:13:40 -0700341These are terms specific to the Android audio framework, or that
Glenn Kasten963fd952013-04-18 17:26:23 -0700342may have a special meaning within Android beyond their general meaning.
343</p>
344
345<dl>
346
347<dt>ALSA</dt>
348<dd>
349Advanced Linux Sound Architecture. As the name suggests, it is an audio
350framework primarily for Linux, but it has influenced other systems.
351See Wikipedia article
352<a class="external-link" href="http://en.wikipedia.org/wiki/Advanced_Linux_Sound_Architecture" target="_android">ALSA</a>
353for the general definition. As used within Android, it refers primarily
354to the kernel audio framework and drivers, not to the user-mode API. See
355tinyalsa.
356</dd>
357
Glenn Kasten298f3822013-06-12 17:17:36 -0700358<dt>AudioEffect</dt>
359<dd>
360An API and implementation framework for output (post-processing) effects
361and input (pre-processing) effects. The API is defined at
Glenn Kasten5df2d522013-09-27 11:50:35 -0700362<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 -0700363</dd>
364
Glenn Kasten963fd952013-04-18 17:26:23 -0700365<dt>AudioFlinger</dt>
366<dd>
367The sound server implementation for Android. AudioFlinger
368runs within the mediaserver process. See Wikipedia article
369<a class="external-link" href="http://en.wikipedia.org/wiki/Sound_server" target="_android">Sound server</a>
370for the generic definition.
371</dd>
372
373<dt>AudioMixer</dt>
374<dd>
375The module within AudioFlinger responsible for
376combining multiple tracks and applying attenuation
377(volume) and certain effects. The Wikipedia article
378<a class="external-link" href="http://en.wikipedia.org/wiki/Audio_mixing_(recorded_music)" target="_android">Audio mixing (recorded music)</a>
379may be useful for understanding the generic
380concept. But that article describes a mixer more as a hardware device
381or a software application, rather than a software module within a system.
382</dd>
383
Glenn Kasten5df2d522013-09-27 11:50:35 -0700384<dt>audio policy</dt>
385<dd>
386Service responsible for all actions that require a policy decision
387to be made first, such as opening a new I/O stream, re-routing after a
388change and stream volume management.
389</dd>
390
Glenn Kasten963fd952013-04-18 17:26:23 -0700391<dt>AudioRecord</dt>
392<dd>
393The primary low-level client API for receiving data from an audio
Clay Murphyc28f2372013-09-25 16:13:40 -0700394input device such as microphone. The data is usually in pulse-code modulation
395(PCM) format.
Glenn Kasten5df2d522013-09-27 11:50:35 -0700396The API is defined at
397<a href="http://developer.android.com/reference/android/media/AudioRecord.html"
398target="_android">android.media.AudioRecord</a>.
399</dd>
Glenn Kasten963fd952013-04-18 17:26:23 -0700400</dd>
401
402<dt>AudioResampler</dt>
403<dd>
404The module within AudioFlinger responsible for sample-rate conversion. See Wikipedia article
405<a class="external-link" href="http://en.wikipedia.org/wiki/Resampling_(audio)" target="_android">Resampling (audio)</a>
406for the generic definition.
407</dd>
408
Glenn Kasten963fd952013-04-18 17:26:23 -0700409<dt>AudioTrack</dt>
410<dd>
411The primary low-level client API for sending data to an audio output
412device such as a speaker. The data is usually in PCM format.
Glenn Kasten5df2d522013-09-27 11:50:35 -0700413The API is defined at
414<a href="http://developer.android.com/reference/android/media/AudioTrack.html"
415target="_android">android.media.AudioTrack</a>.
Glenn Kasten963fd952013-04-18 17:26:23 -0700416</dd>
417
418<dt>client</dt>
419<dd>
420Usually same as application or app, but sometimes the "client" of
421AudioFlinger is actually a thread running within the mediaserver system
422process. An example of that is when playing media that is decoded by a
423MediaPlayer object.
424</dd>
425
426<dt>HAL</dt>
427<dd>
428Hardware Abstraction Layer. HAL is a generic term in Android. With
429respect to audio, it is a layer between AudioFlinger and the kernel
430device driver with a C API, which replaces the earlier C++ libaudio.
431</dd>
432
433<dt>FastMixer</dt>
434<dd>
435A thread within AudioFlinger that services lower latency "fast tracks"
436and drives the primary output device.
437</dd>
438
439<dt>fast track</dt>
440<dd>
441An AudioTrack client with lower latency but fewer features, on some devices.
442</dd>
443
444<dt>MediaPlayer</dt>
445<dd>
446A higher-level client API than AudioTrack, for playing either encoded
Clay Murphyc28f2372013-09-25 16:13:40 -0700447content, or content which includes multimedia audio and video tracks.
Glenn Kasten963fd952013-04-18 17:26:23 -0700448</dd>
449
Glenn Kasten298f3822013-06-12 17:17:36 -0700450<dt>media.log</dt>
451<dd>
452An AudioFlinger debugging feature, available in custom builds only,
453for logging audio events to a circular buffer where they can then be
454dumped retroactively when needed.
455</dd>
456
Glenn Kasten963fd952013-04-18 17:26:23 -0700457<dt>mediaserver</dt>
458<dd>
459An Android system process that contains a number of media-related
460services, including AudioFlinger.
461</dd>
462
463<dt>NBAIO</dt>
464<dd>
465An abstraction for "non-blocking" audio input/output ports used within
466AudioFlinger. The name can be misleading, as some implementations of
467the NBAIO API actually do support blocking. The key implementations of
468NBAIO are for pipes of various kinds.
469</dd>
470
471<dt>normal mixer</dt>
472<dd>
473A thread within AudioFlinger that services most full-featured
474AudioTrack clients, and either directly drives an output device or feeds
Clay Murphyc28f2372013-09-25 16:13:40 -0700475its sub-mix into FastMixer via a pipe.
Glenn Kasten963fd952013-04-18 17:26:23 -0700476</dd>
477
478<dt>OpenSL ES</dt>
479<dd>
480An audio API standard by The Khronos Group. Android versions since
481API level 9 support a native audio API which is based on a subset of
482OpenSL ES 1.0.1.
483</dd>
484
Glenn Kasten5df2d522013-09-27 11:50:35 -0700485<dt>SoundPool</dt>
486<dd>
487A higher-level client API than AudioTrack, used for playing sampled
488audio clips. It is useful for triggering UI feedback, game sounds, etc.
489The API is defined at
490<a href="http://developer.android.com/reference/android/media/SoundPool.html"
491target="_android">android.media.SoundPool</a>.
492</dd>
493</dd>
494
495<dt>Stagefright</dt>
496<dd>
497See <a href="{@docRoot}devices/media.html">Media</a>.
498</dd>
499
Glenn Kasten963fd952013-04-18 17:26:23 -0700500<dt>StateQueue</dt>
501<dd>
502A module within AudioFlinger responsible for synchronizing state
503among threads. Whereas NBAIO is used to pass data, StateQueue is used
504to pass control information.
505</dd>
506
Glenn Kasten298f3822013-06-12 17:17:36 -0700507<dt>tee sink</dt>
508<dd>
509An AudioFlinger debugging feature, available in custom builds only,
510for retaining a short fragment of recent audio for later analysis.
511This permits comparison between what was actually played or recorded
512vs. what was expected.
513</dd>
514
Glenn Kasten963fd952013-04-18 17:26:23 -0700515<dt>tinyalsa</dt>
516<dd>
517A small user-mode API above ALSA kernel with BSD license, recommended
Clay Murphyc28f2372013-09-25 16:13:40 -0700518for use in HAL implementations.
Glenn Kasten963fd952013-04-18 17:26:23 -0700519</dd>
520
521<dt>track</dt>
522<dd>
523An audio stream, controlled by the AudioTrack API.
524</dd>
525
526</dl>
527
528</p>
529