aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/omap/omap3pandora.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/omap/omap3pandora.c')
-rw-r--r--sound/soc/omap/omap3pandora.c45
1 files changed, 23 insertions, 22 deletions
diff --git a/sound/soc/omap/omap3pandora.c b/sound/soc/omap/omap3pandora.c
index 4ee33ce2cb98..8047c521e318 100644
--- a/sound/soc/omap/omap3pandora.c
+++ b/sound/soc/omap/omap3pandora.c
@@ -28,7 +28,6 @@
28#include <sound/core.h> 28#include <sound/core.h>
29#include <sound/pcm.h> 29#include <sound/pcm.h>
30#include <sound/soc.h> 30#include <sound/soc.h>
31#include <sound/soc-dapm.h>
32 31
33#include <asm/mach-types.h> 32#include <asm/mach-types.h>
34#include <plat/mcbsp.h> 33#include <plat/mcbsp.h>
@@ -170,51 +169,53 @@ static const struct snd_soc_dapm_route omap3pandora_in_map[] = {
170static int omap3pandora_out_init(struct snd_soc_pcm_runtime *rtd) 169static int omap3pandora_out_init(struct snd_soc_pcm_runtime *rtd)
171{ 170{
172 struct snd_soc_codec *codec = rtd->codec; 171 struct snd_soc_codec *codec = rtd->codec;
172 struct snd_soc_dapm_context *dapm = &codec->dapm;
173 int ret; 173 int ret;
174 174
175 /* All TWL4030 output pins are floating */ 175 /* All TWL4030 output pins are floating */
176 snd_soc_dapm_nc_pin(codec, "EARPIECE"); 176 snd_soc_dapm_nc_pin(dapm, "EARPIECE");
177 snd_soc_dapm_nc_pin(codec, "PREDRIVEL"); 177 snd_soc_dapm_nc_pin(dapm, "PREDRIVEL");
178 snd_soc_dapm_nc_pin(codec, "PREDRIVER"); 178 snd_soc_dapm_nc_pin(dapm, "PREDRIVER");
179 snd_soc_dapm_nc_pin(codec, "HSOL"); 179 snd_soc_dapm_nc_pin(dapm, "HSOL");
180 snd_soc_dapm_nc_pin(codec, "HSOR"); 180 snd_soc_dapm_nc_pin(dapm, "HSOR");
181 snd_soc_dapm_nc_pin(codec, "CARKITL"); 181 snd_soc_dapm_nc_pin(dapm, "CARKITL");
182 snd_soc_dapm_nc_pin(codec, "CARKITR"); 182 snd_soc_dapm_nc_pin(dapm, "CARKITR");
183 snd_soc_dapm_nc_pin(codec, "HFL"); 183 snd_soc_dapm_nc_pin(dapm, "HFL");
184 snd_soc_dapm_nc_pin(codec, "HFR"); 184 snd_soc_dapm_nc_pin(dapm, "HFR");
185 snd_soc_dapm_nc_pin(codec, "VIBRA"); 185 snd_soc_dapm_nc_pin(dapm, "VIBRA");
186 186
187 ret = snd_soc_dapm_new_controls(codec, omap3pandora_out_dapm_widgets, 187 ret = snd_soc_dapm_new_controls(dapm, omap3pandora_out_dapm_widgets,
188 ARRAY_SIZE(omap3pandora_out_dapm_widgets)); 188 ARRAY_SIZE(omap3pandora_out_dapm_widgets));
189 if (ret < 0) 189 if (ret < 0)
190 return ret; 190 return ret;
191 191
192 snd_soc_dapm_add_routes(codec, omap3pandora_out_map, 192 snd_soc_dapm_add_routes(dapm, omap3pandora_out_map,
193 ARRAY_SIZE(omap3pandora_out_map)); 193 ARRAY_SIZE(omap3pandora_out_map));
194 194
195 return snd_soc_dapm_sync(codec); 195 return snd_soc_dapm_sync(dapm);
196} 196}
197 197
198static int omap3pandora_in_init(struct snd_soc_pcm_runtime *rtd) 198static int omap3pandora_in_init(struct snd_soc_pcm_runtime *rtd)
199{ 199{
200 struct snd_soc_codec *codec = rtd->codec; 200 struct snd_soc_codec *codec = rtd->codec;
201 struct snd_soc_dapm_context *dapm = &codec->dapm;
201 int ret; 202 int ret;
202 203
203 /* Not comnnected */ 204 /* Not comnnected */
204 snd_soc_dapm_nc_pin(codec, "HSMIC"); 205 snd_soc_dapm_nc_pin(dapm, "HSMIC");
205 snd_soc_dapm_nc_pin(codec, "CARKITMIC"); 206 snd_soc_dapm_nc_pin(dapm, "CARKITMIC");
206 snd_soc_dapm_nc_pin(codec, "DIGIMIC0"); 207 snd_soc_dapm_nc_pin(dapm, "DIGIMIC0");
207 snd_soc_dapm_nc_pin(codec, "DIGIMIC1"); 208 snd_soc_dapm_nc_pin(dapm, "DIGIMIC1");
208 209
209 ret = snd_soc_dapm_new_controls(codec, omap3pandora_in_dapm_widgets, 210 ret = snd_soc_dapm_new_controls(dapm, omap3pandora_in_dapm_widgets,
210 ARRAY_SIZE(omap3pandora_in_dapm_widgets)); 211 ARRAY_SIZE(omap3pandora_in_dapm_widgets));
211 if (ret < 0) 212 if (ret < 0)
212 return ret; 213 return ret;
213 214
214 snd_soc_dapm_add_routes(codec, omap3pandora_in_map, 215 snd_soc_dapm_add_routes(dapm, omap3pandora_in_map,
215 ARRAY_SIZE(omap3pandora_in_map)); 216 ARRAY_SIZE(omap3pandora_in_map));
216 217
217 return snd_soc_dapm_sync(codec); 218 return snd_soc_dapm_sync(dapm);
218} 219}
219 220
220static struct snd_soc_ops omap3pandora_ops = { 221static struct snd_soc_ops omap3pandora_ops = {