diff options
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2011-10-10 08:34:13 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-10-10 11:18:11 -0400 |
commit | 1083dbd1d75723960908f3d6bd32befb22944856 (patch) | |
tree | 0caa6b017aeefd0e6c7e3e48594325b5f4899aaa /sound/soc/omap | |
parent | cb4248779d317eb5a0f554b298134689c395c4fd (diff) |
ASoC: zoom2: Let core to deal with the DAPM widgets
Pass the DAPM widgets/routes via the snd_soc_card struct
to core.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/omap')
-rw-r--r-- | sound/soc/omap/zoom2.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/sound/soc/omap/zoom2.c b/sound/soc/omap/zoom2.c index 9a8288d5ea49..4d01e16e036d 100644 --- a/sound/soc/omap/zoom2.c +++ b/sound/soc/omap/zoom2.c | |||
@@ -98,16 +98,6 @@ static int zoom2_twl4030_init(struct snd_soc_pcm_runtime *rtd) | |||
98 | { | 98 | { |
99 | struct snd_soc_codec *codec = rtd->codec; | 99 | struct snd_soc_codec *codec = rtd->codec; |
100 | struct snd_soc_dapm_context *dapm = &codec->dapm; | 100 | struct snd_soc_dapm_context *dapm = &codec->dapm; |
101 | int ret; | ||
102 | |||
103 | /* Add Zoom2 specific widgets */ | ||
104 | ret = snd_soc_dapm_new_controls(dapm, zoom2_twl4030_dapm_widgets, | ||
105 | ARRAY_SIZE(zoom2_twl4030_dapm_widgets)); | ||
106 | if (ret) | ||
107 | return ret; | ||
108 | |||
109 | /* Set up Zoom2 specific audio path audio_map */ | ||
110 | snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map)); | ||
111 | 101 | ||
112 | /* Zoom2 connected pins */ | 102 | /* Zoom2 connected pins */ |
113 | snd_soc_dapm_enable_pin(dapm, "Ext Mic"); | 103 | snd_soc_dapm_enable_pin(dapm, "Ext Mic"); |
@@ -175,6 +165,11 @@ static struct snd_soc_card snd_soc_zoom2 = { | |||
175 | .name = "Zoom2", | 165 | .name = "Zoom2", |
176 | .dai_link = zoom2_dai, | 166 | .dai_link = zoom2_dai, |
177 | .num_links = ARRAY_SIZE(zoom2_dai), | 167 | .num_links = ARRAY_SIZE(zoom2_dai), |
168 | |||
169 | .dapm_widgets = zoom2_twl4030_dapm_widgets, | ||
170 | .num_dapm_widgets = ARRAY_SIZE(zoom2_twl4030_dapm_widgets), | ||
171 | .dapm_routes = audio_map, | ||
172 | .num_dapm_routes = ARRAY_SIZE(audio_map), | ||
178 | }; | 173 | }; |
179 | 174 | ||
180 | static struct platform_device *zoom2_snd_device; | 175 | static struct platform_device *zoom2_snd_device; |