aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2012-04-24 05:41:32 -0400
committerLiam Girdwood <lrg@ti.com>2012-05-22 12:33:19 -0400
commit7d09f9e98956b29755f20d830252dec9300e7044 (patch)
tree502a7b1ba8060e6c05fd617ac49702e8fa78b9cb /sound
parentc2f98956e3635a897737cc08a60539752aa00dd7 (diff)
ASoC: omap-abe-twl6040: Move Digital Mic widget into dapm table
The needed change in routing will be done runtime for the non twl6040 connected widgets, like the Digital microphone. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@ti.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/omap/omap-abe-twl6040.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/sound/soc/omap/omap-abe-twl6040.c b/sound/soc/omap/omap-abe-twl6040.c
index 31ab6fee8943..4388de9b81f2 100644
--- a/sound/soc/omap/omap-abe-twl6040.c
+++ b/sound/soc/omap/omap-abe-twl6040.c
@@ -128,6 +128,9 @@ static const struct snd_soc_dapm_widget twl6040_dapm_widgets[] = {
128 SND_SOC_DAPM_MIC("Main Handset Mic", NULL), 128 SND_SOC_DAPM_MIC("Main Handset Mic", NULL),
129 SND_SOC_DAPM_MIC("Sub Handset Mic", NULL), 129 SND_SOC_DAPM_MIC("Sub Handset Mic", NULL),
130 SND_SOC_DAPM_LINE("Line In", NULL), 130 SND_SOC_DAPM_LINE("Line In", NULL),
131
132 /* Digital microphones */
133 SND_SOC_DAPM_MIC("Digital Mic", NULL),
131}; 134};
132 135
133static const struct snd_soc_dapm_route audio_map[] = { 136static const struct snd_soc_dapm_route audio_map[] = {
@@ -210,10 +213,6 @@ static int omap_abe_twl6040_init(struct snd_soc_pcm_runtime *rtd)
210 return ret; 213 return ret;
211} 214}
212 215
213static const struct snd_soc_dapm_widget dmic_dapm_widgets[] = {
214 SND_SOC_DAPM_MIC("Digital Mic", NULL),
215};
216
217static const struct snd_soc_dapm_route dmic_audio_map[] = { 216static const struct snd_soc_dapm_route dmic_audio_map[] = {
218 {"DMic", NULL, "Digital Mic"}, 217 {"DMic", NULL, "Digital Mic"},
219 {"Digital Mic", NULL, "Digital Mic1 Bias"}, 218 {"Digital Mic", NULL, "Digital Mic1 Bias"},
@@ -223,12 +222,6 @@ static int omap_abe_dmic_init(struct snd_soc_pcm_runtime *rtd)
223{ 222{
224 struct snd_soc_codec *codec = rtd->codec; 223 struct snd_soc_codec *codec = rtd->codec;
225 struct snd_soc_dapm_context *dapm = &codec->dapm; 224 struct snd_soc_dapm_context *dapm = &codec->dapm;
226 int ret;
227
228 ret = snd_soc_dapm_new_controls(dapm, dmic_dapm_widgets,
229 ARRAY_SIZE(dmic_dapm_widgets));
230 if (ret)
231 return ret;
232 225
233 return snd_soc_dapm_add_routes(dapm, dmic_audio_map, 226 return snd_soc_dapm_add_routes(dapm, dmic_audio_map,
234 ARRAY_SIZE(dmic_audio_map)); 227 ARRAY_SIZE(dmic_audio_map));