[PATCH] ASoC: Add Openmoko state file compatibility for DAPM switches

Mark Brown broonie at opensource.wolfsonmicro.com
Tue Mar 3 11:56:51 CET 2009


Openmoko had similar controls with "DAPM " prefixed to them - add that
back to maintain compatibility with existing ALSA state files.

Signed-off-by: Mark Brown <broonie at opensource.wolfsonmicro.com>
---
 include/sound/soc-dapm.h |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index 3cc7d57..40e764f 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -182,8 +182,11 @@
 	.get = snd_soc_dapm_get_value_enum_double, \
 	.put = snd_soc_dapm_put_value_enum_double, \
 	.private_value = (unsigned long)&xenum }
+/* NOTE: Openmoko-specific "DAPM " prefix added to controls for
+ * backwards compatibility.
+ */
 #define SOC_DAPM_PIN_SWITCH(xname) \
-{	.iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname " Switch", \
+{	.iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = "DAPM " xname " Switch", \
 	.info = snd_soc_dapm_info_pin_switch, \
 	.get = snd_soc_dapm_get_pin_switch, \
 	.put = snd_soc_dapm_put_pin_switch, \
-- 
1.5.6.3




More information about the openmoko-kernel mailing list