aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorLiam Girdwood <lrg@ti.com>2011-02-08 11:45:20 +0000
committerColin Cross <ccross@android.com>2011-06-14 09:06:13 -0700
commit4d8228fa4ceaa4e3ab33e84deac24c15dc33be1e (patch)
treecb662e7f6199cbff48244fa8273f2b511513280a /include/sound
parentc1c9708569dfd998bd33708b622b889654074ac5 (diff)
downloadkernel_samsung_espresso10-4d8228fa4ceaa4e3ab33e84deac24c15dc33be1e.zip
kernel_samsung_espresso10-4d8228fa4ceaa4e3ab33e84deac24c15dc33be1e.tar.gz
kernel_samsung_espresso10-4d8228fa4ceaa4e3ab33e84deac24c15dc33be1e.tar.bz2
ASoC: dapm - allow custom widgets to update power events.
In preparation for ASoC DSP support. Allow for the operation of custom mixer and mux DAPM widgets that can call snd_soc_dapm_mixer_update_power() and snd_soc_dapm_mux_update_power() directly after updating their status. This adds two previously static calls to the public DAPM API. Signed-off-by: Liam Girdwood <lrg@ti.com>
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/soc-dapm.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index 7800e79..9e59c96 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -266,6 +266,12 @@
.get = snd_soc_dapm_get_enum_virt, \
.put = snd_soc_dapm_put_enum_virt, \
.private_value = (unsigned long)&xenum }
+#define SOC_DAPM_ENUM_EXT(xname, xenum, xget, xput) \
+{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
+ .info = snd_soc_info_enum_double, \
+ .get = xget, \
+ .put = xput, \
+ .private_value = (unsigned long)&xenum }
#define SOC_DAPM_VALUE_ENUM(xname, xenum) \
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
.info = snd_soc_info_enum_double, \
@@ -358,6 +364,12 @@ const char *snd_soc_dapm_get_aif(struct snd_soc_dapm_context *dapm,
int snd_soc_dapm_stream_event(struct snd_soc_pcm_runtime *rtd,
const char *stream, int event);
void snd_soc_dapm_shutdown(struct snd_soc_card *card);
+/* external DAPM widget events */
+int snd_soc_dapm_mixer_update_power(struct snd_soc_dapm_widget *widget,
+ struct snd_kcontrol *kcontrol, int connect);
+int snd_soc_dapm_mux_update_power(struct snd_soc_dapm_widget *widget,
+ struct snd_kcontrol *kcontrol, int change,
+ int mux, struct soc_enum *e);
/* dapm sys fs - used by the core */
int snd_soc_dapm_sys_add(struct device *dev);