aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/samsung
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-10-08 08:30:06 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-10-10 06:07:26 -0400
commit6119d016b1dd036d4dd7a8cfad4e4d113be32d91 (patch)
tree7b66a02b7f521c9f12555651663817a07019190b /sound/soc/samsung
parent4f5448ae4b1b877c777a6f96af7bef31f505936d (diff)
ASoC: Convert H1940 to table based init
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Sangbeom Kim <sbkim73@samsung.com>
Diffstat (limited to 'sound/soc/samsung')
-rw-r--r--sound/soc/samsung/h1940_uda1380.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/sound/soc/samsung/h1940_uda1380.c b/sound/soc/samsung/h1940_uda1380.c
index 52025c92f04c..f75a4b60cf38 100644
--- a/sound/soc/samsung/h1940_uda1380.c
+++ b/sound/soc/samsung/h1940_uda1380.c
@@ -182,18 +182,6 @@ static int h1940_uda1380_init(struct snd_soc_pcm_runtime *rtd)
182 struct snd_soc_dapm_context *dapm = &codec->dapm; 182 struct snd_soc_dapm_context *dapm = &codec->dapm;
183 int err; 183 int err;
184 184
185 /* Add h1940 specific widgets */
186 err = snd_soc_dapm_new_controls(dapm, uda1380_dapm_widgets,
187 ARRAY_SIZE(uda1380_dapm_widgets));
188 if (err)
189 return err;
190
191 /* Set up h1940 specific audio path audio_mapnects */
192 err = snd_soc_dapm_add_routes(dapm, audio_map,
193 ARRAY_SIZE(audio_map));
194 if (err)
195 return err;
196
197 snd_soc_dapm_enable_pin(dapm, "Headphone Jack"); 185 snd_soc_dapm_enable_pin(dapm, "Headphone Jack");
198 snd_soc_dapm_enable_pin(dapm, "Speaker"); 186 snd_soc_dapm_enable_pin(dapm, "Speaker");
199 snd_soc_dapm_enable_pin(dapm, "Mic Jack"); 187 snd_soc_dapm_enable_pin(dapm, "Mic Jack");
@@ -228,6 +216,11 @@ static struct snd_soc_card h1940_asoc = {
228 .name = "h1940", 216 .name = "h1940",
229 .dai_link = h1940_uda1380_dai, 217 .dai_link = h1940_uda1380_dai,
230 .num_links = ARRAY_SIZE(h1940_uda1380_dai), 218 .num_links = ARRAY_SIZE(h1940_uda1380_dai),
219
220 .dapm_widgets = uda1380_dapm_widgets,
221 .num_dapm_widgets = ARRAY_SIZE(uda1380_dapm_widgets),
222 .dapm_routes = audio_map,
223 .num_dapm_routes = ARRAY_SIZE(audio_map),
231}; 224};
232 225
233static int __init h1940_init(void) 226static int __init h1940_init(void)