aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-10-08 08:30:55 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-10-10 06:07:33 -0400
commit257fe5930dadc69e7da3e16a310e7fa22fbecdcf (patch)
tree543ca1653467e30bb66907d78016a425bd38879d /sound
parent8ae232299e0cc87671e27bd4446acee32c3ccc1d (diff)
ASoC: Convert SmartQ to table based init
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Sangbeom Kim <sbkim73@samsung.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/samsung/smartq_wm8987.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/sound/soc/samsung/smartq_wm8987.c b/sound/soc/samsung/smartq_wm8987.c
index 6db4e554ea03..6ac6bc2bcc4e 100644
--- a/sound/soc/samsung/smartq_wm8987.c
+++ b/sound/soc/samsung/smartq_wm8987.c
@@ -153,20 +153,6 @@ static int smartq_wm8987_init(struct snd_soc_pcm_runtime *rtd)
153 struct snd_soc_dapm_context *dapm = &codec->dapm; 153 struct snd_soc_dapm_context *dapm = &codec->dapm;
154 int err = 0; 154 int err = 0;
155 155
156 /* Add SmartQ specific widgets */
157 snd_soc_dapm_new_controls(dapm, wm8987_dapm_widgets,
158 ARRAY_SIZE(wm8987_dapm_widgets));
159
160 /* add SmartQ specific controls */
161 err = snd_soc_add_controls(codec, wm8987_smartq_controls,
162 ARRAY_SIZE(wm8987_smartq_controls));
163
164 if (err < 0)
165 return err;
166
167 /* setup SmartQ specific audio path */
168 snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map));
169
170 /* set endpoints to not connected */ 156 /* set endpoints to not connected */
171 snd_soc_dapm_nc_pin(dapm, "LINPUT1"); 157 snd_soc_dapm_nc_pin(dapm, "LINPUT1");
172 snd_soc_dapm_nc_pin(dapm, "RINPUT1"); 158 snd_soc_dapm_nc_pin(dapm, "RINPUT1");
@@ -213,6 +199,13 @@ static struct snd_soc_card snd_soc_smartq = {
213 .name = "SmartQ", 199 .name = "SmartQ",
214 .dai_link = smartq_dai, 200 .dai_link = smartq_dai,
215 .num_links = ARRAY_SIZE(smartq_dai), 201 .num_links = ARRAY_SIZE(smartq_dai),
202
203 .dapm_widgets = wm8987_dapm_widgets,
204 .num_dapm_widgets = ARRAY_SIZE(wm8987_dapm_widgets),
205 .dapm_routes = audio_map,
206 .num_dapm_routes = ARRAY_SIZE(audio_map),
207 .controls = wm8987_smartq_controls,
208 .num_controls = ARRAY_SIZE(wm8987_smartq_controls),
216}; 209};
217 210
218static struct platform_device *smartq_snd_device; 211static struct platform_device *smartq_snd_device;