aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2009-04-22 13:24:55 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2009-04-22 14:10:13 -0400
commit246d0a17f5e09af0794960164269fc8988a8811c (patch)
tree3c10da44183691038959ba0b53d5598ac1aaabc4 /include
parent1b4246a1fc487370665bf6c55aac8eae379642c0 (diff)
ASoC: Add power supply widget to DAPM
Many modern CODECs have shared resources on chip which must be enabled for portions of the chip to work but which can be disabled at other times in order to achieve power savings. Examples of such resources include power supplies and some internal clocks. Since these widgets are dependencies for the audio path but do not carry audio signals they require slightly different handling to most widgets - they do not contribute to the audio path and so should not be counted as either inputs or outputs during path walks. Cases where one supply provides a supply for another will require additional work. There is also room for more optimisation of the graph walking to avoid repeated checks for the same thing. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'include')
-rw-r--r--include/sound/soc-dapm.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index 839a97b63269..533f9f256496 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -154,12 +154,16 @@
154 .shift = wshift, .invert = winvert, \ 154 .shift = wshift, .invert = winvert, \
155 .event = wevent, .event_flags = wflags} 155 .event = wevent, .event_flags = wflags}
156 156
157/* generic register modifier widget */ 157/* generic widgets */
158#define SND_SOC_DAPM_REG(wid, wname, wreg, wshift, wmask, won_val, woff_val) \ 158#define SND_SOC_DAPM_REG(wid, wname, wreg, wshift, wmask, won_val, woff_val) \
159{ .id = wid, .name = wname, .kcontrols = NULL, .num_kcontrols = 0, \ 159{ .id = wid, .name = wname, .kcontrols = NULL, .num_kcontrols = 0, \
160 .reg = -((wreg) + 1), .shift = wshift, .mask = wmask, \ 160 .reg = -((wreg) + 1), .shift = wshift, .mask = wmask, \
161 .on_val = won_val, .off_val = woff_val, .event = dapm_reg_event, \ 161 .on_val = won_val, .off_val = woff_val, .event = dapm_reg_event, \
162 .event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD} 162 .event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD}
163#define SND_SOC_DAPM_SUPPLY(wname, wreg, wshift, winvert, wevent, wflags) \
164{ .id = snd_soc_dapm_supply, .name = wname, .reg = wreg, \
165 .shift = wshift, .invert = winvert, .event = wevent, \
166 .event_flags = wflags}
163 167
164/* dapm kcontrol types */ 168/* dapm kcontrol types */
165#define SOC_DAPM_SINGLE(xname, reg, shift, max, invert) \ 169#define SOC_DAPM_SINGLE(xname, reg, shift, max, invert) \
@@ -308,6 +312,7 @@ enum snd_soc_dapm_type {
308 snd_soc_dapm_vmid, /* codec bias/vmid - to minimise pops */ 312 snd_soc_dapm_vmid, /* codec bias/vmid - to minimise pops */
309 snd_soc_dapm_pre, /* machine specific pre widget - exec first */ 313 snd_soc_dapm_pre, /* machine specific pre widget - exec first */
310 snd_soc_dapm_post, /* machine specific post widget - exec last */ 314 snd_soc_dapm_post, /* machine specific post widget - exec last */
315 snd_soc_dapm_supply, /* power/clock supply */
311}; 316};
312 317
313/* 318/*