aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/s3c24xx/smartq_wm8987.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/s3c24xx/smartq_wm8987.c')
-rw-r--r--sound/soc/s3c24xx/smartq_wm8987.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/sound/soc/s3c24xx/smartq_wm8987.c b/sound/soc/s3c24xx/smartq_wm8987.c
index dd20ca7f4681..1f6da1e27b1e 100644
--- a/sound/soc/s3c24xx/smartq_wm8987.c
+++ b/sound/soc/s3c24xx/smartq_wm8987.c
@@ -158,10 +158,11 @@ static const struct snd_soc_dapm_route audio_map[] = {
158 158
159static int smartq_wm8987_init(struct snd_soc_codec *codec) 159static int smartq_wm8987_init(struct snd_soc_codec *codec)
160{ 160{
161 struct snd_soc_dapm_context *dapm = &codec->dapm;
161 int err = 0; 162 int err = 0;
162 163
163 /* Add SmartQ specific widgets */ 164 /* Add SmartQ specific widgets */
164 snd_soc_dapm_new_controls(codec, wm8987_dapm_widgets, 165 snd_soc_dapm_new_controls(dapm, wm8987_dapm_widgets,
165 ARRAY_SIZE(wm8987_dapm_widgets)); 166 ARRAY_SIZE(wm8987_dapm_widgets));
166 167
167 /* add SmartQ specific controls */ 168 /* add SmartQ specific controls */
@@ -172,20 +173,20 @@ static int smartq_wm8987_init(struct snd_soc_codec *codec)
172 return err; 173 return err;
173 174
174 /* setup SmartQ specific audio path */ 175 /* setup SmartQ specific audio path */
175 snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map)); 176 snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map));
176 177
177 /* set endpoints to not connected */ 178 /* set endpoints to not connected */
178 snd_soc_dapm_nc_pin(codec, "LINPUT1"); 179 snd_soc_dapm_nc_pin(dapm, "LINPUT1");
179 snd_soc_dapm_nc_pin(codec, "RINPUT1"); 180 snd_soc_dapm_nc_pin(dapm, "RINPUT1");
180 snd_soc_dapm_nc_pin(codec, "OUT3"); 181 snd_soc_dapm_nc_pin(dapm, "OUT3");
181 snd_soc_dapm_nc_pin(codec, "ROUT1"); 182 snd_soc_dapm_nc_pin(dapm, "ROUT1");
182 183
183 /* set endpoints to default off mode */ 184 /* set endpoints to default off mode */
184 snd_soc_dapm_enable_pin(codec, "Internal Speaker"); 185 snd_soc_dapm_enable_pin(dapm, "Internal Speaker");
185 snd_soc_dapm_enable_pin(codec, "Internal Mic"); 186 snd_soc_dapm_enable_pin(dapm, "Internal Mic");
186 snd_soc_dapm_disable_pin(codec, "Headphone Jack"); 187 snd_soc_dapm_disable_pin(dapm, "Headphone Jack");
187 188
188 err = snd_soc_dapm_sync(codec); 189 err = snd_soc_dapm_sync(dapm);
189 if (err) 190 if (err)
190 return err; 191 return err;
191 192