aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/sound/alsa/soc/dapm.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/sound/alsa/soc/dapm.txt')
-rw-r--r--Documentation/sound/alsa/soc/dapm.txt51
1 files changed, 26 insertions, 25 deletions
diff --git a/Documentation/sound/alsa/soc/dapm.txt b/Documentation/sound/alsa/soc/dapm.txt
index ab0766fd7869..c784a18b94dc 100644
--- a/Documentation/sound/alsa/soc/dapm.txt
+++ b/Documentation/sound/alsa/soc/dapm.txt
@@ -4,20 +4,20 @@ Dynamic Audio Power Management for Portable Devices
41. Description 41. Description
5============== 5==============
6 6
7Dynamic Audio Power Management (DAPM) is designed to allow portable Linux devices 7Dynamic Audio Power Management (DAPM) is designed to allow portable
8to use the minimum amount of power within the audio subsystem at all times. It 8Linux devices to use the minimum amount of power within the audio
9is independent of other kernel PM and as such, can easily co-exist with the 9subsystem at all times. It is independent of other kernel PM and as
10other PM systems. 10such, can easily co-exist with the other PM systems.
11 11
12DAPM is also completely transparent to all user space applications as all power 12DAPM is also completely transparent to all user space applications as
13switching is done within the ASoC core. No code changes or recompiling are 13all power switching is done within the ASoC core. No code changes or
14required for user space applications. DAPM makes power switching decisions based 14recompiling are required for user space applications. DAPM makes power
15upon any audio stream (capture/playback) activity and audio mixer settings 15switching decisions based upon any audio stream (capture/playback)
16within the device. 16activity and audio mixer settings within the device.
17 17
18DAPM spans the whole machine. It covers power control within the entire audio 18DAPM spans the whole machine. It covers power control within the entire
19subsystem, this includes internal codec power blocks and machine level power 19audio subsystem, this includes internal codec power blocks and machine
20systems. 20level power systems.
21 21
22There are 4 power domains within DAPM 22There are 4 power domains within DAPM
23 23
@@ -34,7 +34,7 @@ There are 4 power domains within DAPM
34 Automatically set when mixer and mux settings are changed by the user. 34 Automatically set when mixer and mux settings are changed by the user.
35 e.g. alsamixer, amixer. 35 e.g. alsamixer, amixer.
36 36
37 4. Stream domain - DAC's and ADC's. 37 4. Stream domain - DACs and ADCs.
38 Enabled and disabled when stream playback/capture is started and 38 Enabled and disabled when stream playback/capture is started and
39 stopped respectively. e.g. aplay, arecord. 39 stopped respectively. e.g. aplay, arecord.
40 40
@@ -51,7 +51,7 @@ widgets hereafter.
51Audio DAPM widgets fall into a number of types:- 51Audio DAPM widgets fall into a number of types:-
52 52
53 o Mixer - Mixes several analog signals into a single analog signal. 53 o Mixer - Mixes several analog signals into a single analog signal.
54 o Mux - An analog switch that outputs only 1 of it's inputs. 54 o Mux - An analog switch that outputs only one of many inputs.
55 o PGA - A programmable gain amplifier or attenuation widget. 55 o PGA - A programmable gain amplifier or attenuation widget.
56 o ADC - Analog to Digital Converter 56 o ADC - Analog to Digital Converter
57 o DAC - Digital to Analog Converter 57 o DAC - Digital to Analog Converter
@@ -78,14 +78,14 @@ parameters for stream name and kcontrols.
782.1 Stream Domain Widgets 782.1 Stream Domain Widgets
79------------------------- 79-------------------------
80 80
81Stream Widgets relate to the stream power domain and only consist of ADC's 81Stream Widgets relate to the stream power domain and only consist of ADCs
82(analog to digital converters) and DAC's (digital to analog converters). 82(analog to digital converters) and DACs (digital to analog converters).
83 83
84Stream widgets have the following format:- 84Stream widgets have the following format:-
85 85
86SND_SOC_DAPM_DAC(name, stream name, reg, shift, invert), 86SND_SOC_DAPM_DAC(name, stream name, reg, shift, invert),
87 87
88NOTE: the stream name must match the corresponding stream name in your codecs 88NOTE: the stream name must match the corresponding stream name in your codec
89snd_soc_codec_dai. 89snd_soc_codec_dai.
90 90
91e.g. stream widgets for HiFi playback and capture 91e.g. stream widgets for HiFi playback and capture
@@ -97,7 +97,7 @@ SND_SOC_DAPM_ADC("HiFi ADC", "HiFi Capture", REG, 2, 1),
972.2 Path Domain Widgets 972.2 Path Domain Widgets
98----------------------- 98-----------------------
99 99
100Path domain widgets have a ability to control or effect the audio signal or 100Path domain widgets have a ability to control or affect the audio signal or
101audio paths within the audio subsystem. They have the following form:- 101audio paths within the audio subsystem. They have the following form:-
102 102
103SND_SOC_DAPM_PGA(name, reg, shift, invert, controls, num_controls) 103SND_SOC_DAPM_PGA(name, reg, shift, invert, controls, num_controls)
@@ -149,7 +149,7 @@ SND_SOC_DAPM_MIC("Mic Jack", spitz_mic_bias),
1492.4 Codec Domain 1492.4 Codec Domain
150---------------- 150----------------
151 151
152The Codec power domain has no widgets and is handled by the codecs DAPM event 152The codec power domain has no widgets and is handled by the codecs DAPM event
153handler. This handler is called when the codec powerstate is changed wrt to any 153handler. This handler is called when the codec powerstate is changed wrt to any
154stream event or by kernel PM events. 154stream event or by kernel PM events.
155 155
@@ -158,8 +158,8 @@ stream event or by kernel PM events.
158------------------- 158-------------------
159 159
160Sometimes widgets exist in the codec or machine audio map that don't have any 160Sometimes widgets exist in the codec or machine audio map that don't have any
161corresponding register bit for power control. In this case it's necessary to 161corresponding soft power control. In this case it is necessary to create
162create a virtual widget - a widget with no control bits e.g. 162a virtual widget - a widget with no control bits e.g.
163 163
164SND_SOC_DAPM_MIXER("AC97 Mixer", SND_SOC_DAPM_NOPM, 0, 0, NULL, 0), 164SND_SOC_DAPM_MIXER("AC97 Mixer", SND_SOC_DAPM_NOPM, 0, 0, NULL, 0),
165 165
@@ -172,13 +172,14 @@ subsystem individually with a call to snd_soc_dapm_new_control().
1723. Codec Widget Interconnections 1723. Codec Widget Interconnections
173================================ 173================================
174 174
175Widgets are connected to each other within the codec and machine by audio 175Widgets are connected to each other within the codec and machine by audio paths
176paths (called interconnections). Each interconnection must be defined in order 176(called interconnections). Each interconnection must be defined in order to
177to create a map of all audio paths between widgets. 177create a map of all audio paths between widgets.
178
178This is easiest with a diagram of the codec (and schematic of the machine audio 179This is easiest with a diagram of the codec (and schematic of the machine audio
179system), as it requires joining widgets together via their audio signal paths. 180system), as it requires joining widgets together via their audio signal paths.
180 181
181i.e. from the WM8731 codec's output mixer (wm8731.c) 182e.g., from the WM8731 output mixer (wm8731.c)
182 183
183The WM8731 output mixer has 3 inputs (sources) 184The WM8731 output mixer has 3 inputs (sources)
184 185