aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2009-10-06 10:21:04 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2009-10-06 10:57:02 -0400
commitd2b247a8be57647d1745535acd58169fbcbe431a (patch)
treeca87ca863440ae512ffc7758c91441abe2d28ca6 /include
parent3a65577d2199a7b33c85fd32838020c39da200f3 (diff)
ASoC: Add virtual enumeration support for DAPM muxes
Sometimes it is desirable to have a mux which does not reflect any direct register configuration but which will instead only have an effect implicitly (for example, as a result of changing which parts of the device are powered up). Provide a virtual mux for this purpose. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'include')
-rw-r--r--include/sound/soc-dapm.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index 67224db60348..c5c95e1da65b 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -206,6 +206,12 @@
206 .get = snd_soc_dapm_get_enum_double, \ 206 .get = snd_soc_dapm_get_enum_double, \
207 .put = snd_soc_dapm_put_enum_double, \ 207 .put = snd_soc_dapm_put_enum_double, \
208 .private_value = (unsigned long)&xenum } 208 .private_value = (unsigned long)&xenum }
209#define SOC_DAPM_ENUM_VIRT(xname, xenum) \
210{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
211 .info = snd_soc_info_enum_double, \
212 .get = snd_soc_dapm_get_enum_virt, \
213 .put = snd_soc_dapm_put_enum_virt, \
214 .private_value = (unsigned long)&xenum }
209#define SOC_DAPM_VALUE_ENUM(xname, xenum) \ 215#define SOC_DAPM_VALUE_ENUM(xname, xenum) \
210{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ 216{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
211 .info = snd_soc_info_enum_double, \ 217 .info = snd_soc_info_enum_double, \
@@ -260,6 +266,10 @@ int snd_soc_dapm_get_enum_double(struct snd_kcontrol *kcontrol,
260 struct snd_ctl_elem_value *ucontrol); 266 struct snd_ctl_elem_value *ucontrol);
261int snd_soc_dapm_put_enum_double(struct snd_kcontrol *kcontrol, 267int snd_soc_dapm_put_enum_double(struct snd_kcontrol *kcontrol,
262 struct snd_ctl_elem_value *ucontrol); 268 struct snd_ctl_elem_value *ucontrol);
269int snd_soc_dapm_get_enum_virt(struct snd_kcontrol *kcontrol,
270 struct snd_ctl_elem_value *ucontrol);
271int snd_soc_dapm_put_enum_virt(struct snd_kcontrol *kcontrol,
272 struct snd_ctl_elem_value *ucontrol);
263int snd_soc_dapm_get_value_enum_double(struct snd_kcontrol *kcontrol, 273int snd_soc_dapm_get_value_enum_double(struct snd_kcontrol *kcontrol,
264 struct snd_ctl_elem_value *ucontrol); 274 struct snd_ctl_elem_value *ucontrol);
265int snd_soc_dapm_put_value_enum_double(struct snd_kcontrol *kcontrol, 275int snd_soc_dapm_put_value_enum_double(struct snd_kcontrol *kcontrol,