diff options
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2011-10-10 08:34:15 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-10-10 11:18:11 -0400 |
commit | fc8e5b4c6bc4194b27644142d51d466ecd9f1bd0 (patch) | |
tree | 59931aea037d318db832e7a3e1e95d3483f8a384 /sound/soc | |
parent | cd4a3d5d0d1794ee08d716b5b88f46efa52f9a7d (diff) |
ASoC: sdp4430: 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')
-rw-r--r-- | sound/soc/omap/sdp4430.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/sound/soc/omap/sdp4430.c b/sound/soc/omap/sdp4430.c index 98f05dc4c394..ebe1bbbeaffd 100644 --- a/sound/soc/omap/sdp4430.c +++ b/sound/soc/omap/sdp4430.c | |||
@@ -123,15 +123,6 @@ static int sdp4430_twl6040_init(struct snd_soc_pcm_runtime *rtd) | |||
123 | struct snd_soc_dapm_context *dapm = &codec->dapm; | 123 | struct snd_soc_dapm_context *dapm = &codec->dapm; |
124 | int ret, hs_trim; | 124 | int ret, hs_trim; |
125 | 125 | ||
126 | /* Add SDP4430 specific widgets */ | ||
127 | ret = snd_soc_dapm_new_controls(dapm, sdp4430_twl6040_dapm_widgets, | ||
128 | ARRAY_SIZE(sdp4430_twl6040_dapm_widgets)); | ||
129 | if (ret) | ||
130 | return ret; | ||
131 | |||
132 | /* Set up SDP4430 specific audio path audio_map */ | ||
133 | snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map)); | ||
134 | |||
135 | /* SDP4430 connected pins */ | 126 | /* SDP4430 connected pins */ |
136 | snd_soc_dapm_enable_pin(dapm, "Ext Mic"); | 127 | snd_soc_dapm_enable_pin(dapm, "Ext Mic"); |
137 | snd_soc_dapm_enable_pin(dapm, "Ext Spk"); | 128 | snd_soc_dapm_enable_pin(dapm, "Ext Spk"); |
@@ -182,6 +173,11 @@ static struct snd_soc_card snd_soc_sdp4430 = { | |||
182 | .name = "SDP4430", | 173 | .name = "SDP4430", |
183 | .dai_link = &sdp4430_dai, | 174 | .dai_link = &sdp4430_dai, |
184 | .num_links = 1, | 175 | .num_links = 1, |
176 | |||
177 | .dapm_widgets = sdp4430_twl6040_dapm_widgets, | ||
178 | .num_dapm_widgets = ARRAY_SIZE(sdp4430_twl6040_dapm_widgets), | ||
179 | .dapm_routes = audio_map, | ||
180 | .num_dapm_routes = ARRAY_SIZE(audio_map), | ||
185 | }; | 181 | }; |
186 | 182 | ||
187 | static struct platform_device *sdp4430_snd_device; | 183 | static struct platform_device *sdp4430_snd_device; |