diff options
author | Ola Lilja <ola.o.lilja@stericsson.com> | 2012-05-24 09:26:25 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-06-03 08:06:38 -0400 |
commit | d7e7eb91551ad99244b989d71d092cb0375648fa (patch) | |
tree | 08403f479dc33e0c3459c37e4824cfde4a971211 /include/sound | |
parent | 1aad779fccdbb4d79af7b9de93dfd2bfe807e052 (diff) |
ASoC: core: Add widget SND_SOC_DAPM_CLOCK_SUPPLY
Adds a supply-widget variant for connection to the clock-framework.
This widget-type corresponds to the variant for regulators.
Signed-off-by: Ola Lilja <ola.o.lilja@stericsson.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'include/sound')
-rw-r--r-- | include/sound/soc-dapm.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index e3833d9f1914..05559e571d44 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h | |||
@@ -229,6 +229,10 @@ struct device; | |||
229 | { .id = snd_soc_dapm_adc, .name = wname, .sname = stname, .reg = wreg, \ | 229 | { .id = snd_soc_dapm_adc, .name = wname, .sname = stname, .reg = wreg, \ |
230 | .shift = wshift, .invert = winvert, \ | 230 | .shift = wshift, .invert = winvert, \ |
231 | .event = wevent, .event_flags = wflags} | 231 | .event = wevent, .event_flags = wflags} |
232 | #define SND_SOC_DAPM_CLOCK_SUPPLY(wname) \ | ||
233 | { .id = snd_soc_dapm_clock_supply, .name = wname, \ | ||
234 | .reg = SND_SOC_NOPM, .event = dapm_clock_event, \ | ||
235 | .event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD } | ||
232 | 236 | ||
233 | /* generic widgets */ | 237 | /* generic widgets */ |
234 | #define SND_SOC_DAPM_REG(wid, wname, wreg, wshift, wmask, won_val, woff_val) \ | 238 | #define SND_SOC_DAPM_REG(wid, wname, wreg, wshift, wmask, won_val, woff_val) \ |
@@ -245,6 +249,7 @@ struct device; | |||
245 | .reg = SND_SOC_NOPM, .shift = wdelay, .event = dapm_regulator_event, \ | 249 | .reg = SND_SOC_NOPM, .shift = wdelay, .event = dapm_regulator_event, \ |
246 | .event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD } | 250 | .event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD } |
247 | 251 | ||
252 | |||
248 | /* dapm kcontrol types */ | 253 | /* dapm kcontrol types */ |
249 | #define SOC_DAPM_SINGLE(xname, reg, shift, max, invert) \ | 254 | #define SOC_DAPM_SINGLE(xname, reg, shift, max, invert) \ |
250 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ | 255 | { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ |
@@ -327,6 +332,8 @@ int dapm_reg_event(struct snd_soc_dapm_widget *w, | |||
327 | struct snd_kcontrol *kcontrol, int event); | 332 | struct snd_kcontrol *kcontrol, int event); |
328 | int dapm_regulator_event(struct snd_soc_dapm_widget *w, | 333 | int dapm_regulator_event(struct snd_soc_dapm_widget *w, |
329 | struct snd_kcontrol *kcontrol, int event); | 334 | struct snd_kcontrol *kcontrol, int event); |
335 | int dapm_clock_event(struct snd_soc_dapm_widget *w, | ||
336 | struct snd_kcontrol *kcontrol, int event); | ||
330 | 337 | ||
331 | /* dapm controls */ | 338 | /* dapm controls */ |
332 | int snd_soc_dapm_put_volsw(struct snd_kcontrol *kcontrol, | 339 | int snd_soc_dapm_put_volsw(struct snd_kcontrol *kcontrol, |
@@ -432,6 +439,7 @@ enum snd_soc_dapm_type { | |||
432 | snd_soc_dapm_post, /* machine specific post widget - exec last */ | 439 | snd_soc_dapm_post, /* machine specific post widget - exec last */ |
433 | snd_soc_dapm_supply, /* power/clock supply */ | 440 | snd_soc_dapm_supply, /* power/clock supply */ |
434 | snd_soc_dapm_regulator_supply, /* external regulator */ | 441 | snd_soc_dapm_regulator_supply, /* external regulator */ |
442 | snd_soc_dapm_clock_supply, /* external clock */ | ||
435 | snd_soc_dapm_aif_in, /* audio interface input */ | 443 | snd_soc_dapm_aif_in, /* audio interface input */ |
436 | snd_soc_dapm_aif_out, /* audio interface output */ | 444 | snd_soc_dapm_aif_out, /* audio interface output */ |
437 | snd_soc_dapm_siggen, /* signal generator */ | 445 | snd_soc_dapm_siggen, /* signal generator */ |
@@ -537,6 +545,8 @@ struct snd_soc_dapm_widget { | |||
537 | struct list_head dirty; | 545 | struct list_head dirty; |
538 | int inputs; | 546 | int inputs; |
539 | int outputs; | 547 | int outputs; |
548 | |||
549 | struct clk *clk; | ||
540 | }; | 550 | }; |
541 | 551 | ||
542 | struct snd_soc_dapm_update { | 552 | struct snd_soc_dapm_update { |