diff options
Diffstat (limited to 'Documentation/sound/alsa/soc/dapm.txt')
-rw-r--r-- | Documentation/sound/alsa/soc/dapm.txt | 51 |
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 | |||
4 | 1. Description | 4 | 1. Description |
5 | ============== | 5 | ============== |
6 | 6 | ||
7 | Dynamic Audio Power Management (DAPM) is designed to allow portable Linux devices | 7 | Dynamic Audio Power Management (DAPM) is designed to allow portable |
8 | to use the minimum amount of power within the audio subsystem at all times. It | 8 | Linux devices to use the minimum amount of power within the audio |
9 | is independent of other kernel PM and as such, can easily co-exist with the | 9 | subsystem at all times. It is independent of other kernel PM and as |
10 | other PM systems. | 10 | such, can easily co-exist with the other PM systems. |
11 | 11 | ||
12 | DAPM is also completely transparent to all user space applications as all power | 12 | DAPM is also completely transparent to all user space applications as |
13 | switching is done within the ASoC core. No code changes or recompiling are | 13 | all power switching is done within the ASoC core. No code changes or |
14 | required for user space applications. DAPM makes power switching decisions based | 14 | recompiling are required for user space applications. DAPM makes power |
15 | upon any audio stream (capture/playback) activity and audio mixer settings | 15 | switching decisions based upon any audio stream (capture/playback) |
16 | within the device. | 16 | activity and audio mixer settings within the device. |
17 | 17 | ||
18 | DAPM spans the whole machine. It covers power control within the entire audio | 18 | DAPM spans the whole machine. It covers power control within the entire |
19 | subsystem, this includes internal codec power blocks and machine level power | 19 | audio subsystem, this includes internal codec power blocks and machine |
20 | systems. | 20 | level power systems. |
21 | 21 | ||
22 | There are 4 power domains within DAPM | 22 | There 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. | |||
51 | Audio DAPM widgets fall into a number of types:- | 51 | Audio 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. | |||
78 | 2.1 Stream Domain Widgets | 78 | 2.1 Stream Domain Widgets |
79 | ------------------------- | 79 | ------------------------- |
80 | 80 | ||
81 | Stream Widgets relate to the stream power domain and only consist of ADC's | 81 | Stream 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 | ||
84 | Stream widgets have the following format:- | 84 | Stream widgets have the following format:- |
85 | 85 | ||
86 | SND_SOC_DAPM_DAC(name, stream name, reg, shift, invert), | 86 | SND_SOC_DAPM_DAC(name, stream name, reg, shift, invert), |
87 | 87 | ||
88 | NOTE: the stream name must match the corresponding stream name in your codecs | 88 | NOTE: the stream name must match the corresponding stream name in your codec |
89 | snd_soc_codec_dai. | 89 | snd_soc_codec_dai. |
90 | 90 | ||
91 | e.g. stream widgets for HiFi playback and capture | 91 | e.g. stream widgets for HiFi playback and capture |
@@ -97,7 +97,7 @@ SND_SOC_DAPM_ADC("HiFi ADC", "HiFi Capture", REG, 2, 1), | |||
97 | 2.2 Path Domain Widgets | 97 | 2.2 Path Domain Widgets |
98 | ----------------------- | 98 | ----------------------- |
99 | 99 | ||
100 | Path domain widgets have a ability to control or effect the audio signal or | 100 | Path domain widgets have a ability to control or affect the audio signal or |
101 | audio paths within the audio subsystem. They have the following form:- | 101 | audio paths within the audio subsystem. They have the following form:- |
102 | 102 | ||
103 | SND_SOC_DAPM_PGA(name, reg, shift, invert, controls, num_controls) | 103 | SND_SOC_DAPM_PGA(name, reg, shift, invert, controls, num_controls) |
@@ -149,7 +149,7 @@ SND_SOC_DAPM_MIC("Mic Jack", spitz_mic_bias), | |||
149 | 2.4 Codec Domain | 149 | 2.4 Codec Domain |
150 | ---------------- | 150 | ---------------- |
151 | 151 | ||
152 | The Codec power domain has no widgets and is handled by the codecs DAPM event | 152 | The codec power domain has no widgets and is handled by the codecs DAPM event |
153 | handler. This handler is called when the codec powerstate is changed wrt to any | 153 | handler. This handler is called when the codec powerstate is changed wrt to any |
154 | stream event or by kernel PM events. | 154 | stream event or by kernel PM events. |
155 | 155 | ||
@@ -158,8 +158,8 @@ stream event or by kernel PM events. | |||
158 | ------------------- | 158 | ------------------- |
159 | 159 | ||
160 | Sometimes widgets exist in the codec or machine audio map that don't have any | 160 | Sometimes widgets exist in the codec or machine audio map that don't have any |
161 | corresponding register bit for power control. In this case it's necessary to | 161 | corresponding soft power control. In this case it is necessary to create |
162 | create a virtual widget - a widget with no control bits e.g. | 162 | a virtual widget - a widget with no control bits e.g. |
163 | 163 | ||
164 | SND_SOC_DAPM_MIXER("AC97 Mixer", SND_SOC_DAPM_NOPM, 0, 0, NULL, 0), | 164 | SND_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(). | |||
172 | 3. Codec Widget Interconnections | 172 | 3. Codec Widget Interconnections |
173 | ================================ | 173 | ================================ |
174 | 174 | ||
175 | Widgets are connected to each other within the codec and machine by audio | 175 | Widgets are connected to each other within the codec and machine by audio paths |
176 | paths (called interconnections). Each interconnection must be defined in order | 176 | (called interconnections). Each interconnection must be defined in order to |
177 | to create a map of all audio paths between widgets. | 177 | create a map of all audio paths between widgets. |
178 | |||
178 | This is easiest with a diagram of the codec (and schematic of the machine audio | 179 | This is easiest with a diagram of the codec (and schematic of the machine audio |
179 | system), as it requires joining widgets together via their audio signal paths. | 180 | system), as it requires joining widgets together via their audio signal paths. |
180 | 181 | ||
181 | i.e. from the WM8731 codec's output mixer (wm8731.c) | 182 | e.g., from the WM8731 output mixer (wm8731.c) |
182 | 183 | ||
183 | The WM8731 output mixer has 3 inputs (sources) | 184 | The WM8731 output mixer has 3 inputs (sources) |
184 | 185 | ||