aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/s3c24xx
diff options
context:
space:
mode:
authorLiam Girdwood <lg@opensource.wolfsonmicro.com>2008-07-07 08:35:17 -0400
committerJaroslav Kysela <perex@perex.cz>2008-07-10 03:32:30 -0400
commita5302181e5321664047f75715242aac4e0bbd17c (patch)
treeeb5b8a618062099981b65eeaca4cdb9b1fe7c826 /sound/soc/s3c24xx
parentbe321a890c25272965129ffe4b3b59a519fcf583 (diff)
ALSA: asoc: core - refactored DAPM pin control API.
Refactored snd_soc_dapm_set_endpoint() to snd_soc_dapm_enable_pin() and snd_soc_dapm_disable_pin(). Renamed snd_soc_dapm_sync_endpoints() to snd_soc_dapm_sync(). Renamed snd_soc_dapm_get_endpoint_status() to snd_soc_dapm_get_pin_status(). Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/soc/s3c24xx')
-rw-r--r--sound/soc/s3c24xx/neo1973_wm8753.c116
1 files changed, 58 insertions, 58 deletions
diff --git a/sound/soc/s3c24xx/neo1973_wm8753.c b/sound/soc/s3c24xx/neo1973_wm8753.c
index 34851238dea0..f053e85ff608 100644
--- a/sound/soc/s3c24xx/neo1973_wm8753.c
+++ b/sound/soc/s3c24xx/neo1973_wm8753.c
@@ -250,77 +250,77 @@ static int set_scenario_endpoints(struct snd_soc_codec *codec, int scenario)
250 250
251 switch (neo1973_scenario) { 251 switch (neo1973_scenario) {
252 case NEO_AUDIO_OFF: 252 case NEO_AUDIO_OFF:
253 snd_soc_dapm_set_endpoint(codec, "Audio Out", 0); 253 snd_soc_dapm_disable_pin(codec, "Audio Out");
254 snd_soc_dapm_set_endpoint(codec, "GSM Line Out", 0); 254 snd_soc_dapm_disable_pin(codec, "GSM Line Out");
255 snd_soc_dapm_set_endpoint(codec, "GSM Line In", 0); 255 snd_soc_dapm_disable_pin(codec, "GSM Line In");
256 snd_soc_dapm_set_endpoint(codec, "Headset Mic", 0); 256 snd_soc_dapm_disable_pin(codec, "Headset Mic");
257 snd_soc_dapm_set_endpoint(codec, "Call Mic", 0); 257 snd_soc_dapm_disable_pin(codec, "Call Mic");
258 break; 258 break;
259 case NEO_GSM_CALL_AUDIO_HANDSET: 259 case NEO_GSM_CALL_AUDIO_HANDSET:
260 snd_soc_dapm_set_endpoint(codec, "Audio Out", 1); 260 snd_soc_dapm_enable_pin(codec, "Audio Out");
261 snd_soc_dapm_set_endpoint(codec, "GSM Line Out", 1); 261 snd_soc_dapm_enable_pin(codec, "GSM Line Out");
262 snd_soc_dapm_set_endpoint(codec, "GSM Line In", 1); 262 snd_soc_dapm_enable_pin(codec, "GSM Line In");
263 snd_soc_dapm_set_endpoint(codec, "Headset Mic", 0); 263 snd_soc_dapm_disable_pin(codec, "Headset Mic");
264 snd_soc_dapm_set_endpoint(codec, "Call Mic", 1); 264 snd_soc_dapm_enable_pin(codec, "Call Mic");
265 break; 265 break;
266 case NEO_GSM_CALL_AUDIO_HEADSET: 266 case NEO_GSM_CALL_AUDIO_HEADSET:
267 snd_soc_dapm_set_endpoint(codec, "Audio Out", 1); 267 snd_soc_dapm_enable_pin(codec, "Audio Out");
268 snd_soc_dapm_set_endpoint(codec, "GSM Line Out", 1); 268 snd_soc_dapm_enable_pin(codec, "GSM Line Out");
269 snd_soc_dapm_set_endpoint(codec, "GSM Line In", 1); 269 snd_soc_dapm_enable_pin(codec, "GSM Line In");
270 snd_soc_dapm_set_endpoint(codec, "Headset Mic", 1); 270 snd_soc_dapm_enable_pin(codec, "Headset Mic");
271 snd_soc_dapm_set_endpoint(codec, "Call Mic", 0); 271 snd_soc_dapm_disable_pin(codec, "Call Mic");
272 break; 272 break;
273 case NEO_GSM_CALL_AUDIO_BLUETOOTH: 273 case NEO_GSM_CALL_AUDIO_BLUETOOTH:
274 snd_soc_dapm_set_endpoint(codec, "Audio Out", 0); 274 snd_soc_dapm_disable_pin(codec, "Audio Out");
275 snd_soc_dapm_set_endpoint(codec, "GSM Line Out", 1); 275 snd_soc_dapm_enable_pin(codec, "GSM Line Out");
276 snd_soc_dapm_set_endpoint(codec, "GSM Line In", 1); 276 snd_soc_dapm_enable_pin(codec, "GSM Line In");
277 snd_soc_dapm_set_endpoint(codec, "Headset Mic", 0); 277 snd_soc_dapm_disable_pin(codec, "Headset Mic");
278 snd_soc_dapm_set_endpoint(codec, "Call Mic", 0); 278 snd_soc_dapm_disable_pin(codec, "Call Mic");
279 break; 279 break;
280 case NEO_STEREO_TO_SPEAKERS: 280 case NEO_STEREO_TO_SPEAKERS:
281 snd_soc_dapm_set_endpoint(codec, "Audio Out", 1); 281 snd_soc_dapm_enable_pin(codec, "Audio Out");
282 snd_soc_dapm_set_endpoint(codec, "GSM Line Out", 0); 282 snd_soc_dapm_disable_pin(codec, "GSM Line Out");
283 snd_soc_dapm_set_endpoint(codec, "GSM Line In", 0); 283 snd_soc_dapm_disable_pin(codec, "GSM Line In");
284 snd_soc_dapm_set_endpoint(codec, "Headset Mic", 0); 284 snd_soc_dapm_disable_pin(codec, "Headset Mic");
285 snd_soc_dapm_set_endpoint(codec, "Call Mic", 0); 285 snd_soc_dapm_disable_pin(codec, "Call Mic");
286 break; 286 break;
287 case NEO_STEREO_TO_HEADPHONES: 287 case NEO_STEREO_TO_HEADPHONES:
288 snd_soc_dapm_set_endpoint(codec, "Audio Out", 1); 288 snd_soc_dapm_enable_pin(codec, "Audio Out");
289 snd_soc_dapm_set_endpoint(codec, "GSM Line Out", 0); 289 snd_soc_dapm_disable_pin(codec, "GSM Line Out");
290 snd_soc_dapm_set_endpoint(codec, "GSM Line In", 0); 290 snd_soc_dapm_disable_pin(codec, "GSM Line In");
291 snd_soc_dapm_set_endpoint(codec, "Headset Mic", 0); 291 snd_soc_dapm_disable_pin(codec, "Headset Mic");
292 snd_soc_dapm_set_endpoint(codec, "Call Mic", 0); 292 snd_soc_dapm_disable_pin(codec, "Call Mic");
293 break; 293 break;
294 case NEO_CAPTURE_HANDSET: 294 case NEO_CAPTURE_HANDSET:
295 snd_soc_dapm_set_endpoint(codec, "Audio Out", 0); 295 snd_soc_dapm_disable_pin(codec, "Audio Out");
296 snd_soc_dapm_set_endpoint(codec, "GSM Line Out", 0); 296 snd_soc_dapm_disable_pin(codec, "GSM Line Out");
297 snd_soc_dapm_set_endpoint(codec, "GSM Line In", 0); 297 snd_soc_dapm_disable_pin(codec, "GSM Line In");
298 snd_soc_dapm_set_endpoint(codec, "Headset Mic", 0); 298 snd_soc_dapm_disable_pin(codec, "Headset Mic");
299 snd_soc_dapm_set_endpoint(codec, "Call Mic", 1); 299 snd_soc_dapm_enable_pin(codec, "Call Mic");
300 break; 300 break;
301 case NEO_CAPTURE_HEADSET: 301 case NEO_CAPTURE_HEADSET:
302 snd_soc_dapm_set_endpoint(codec, "Audio Out", 0); 302 snd_soc_dapm_disable_pin(codec, "Audio Out");
303 snd_soc_dapm_set_endpoint(codec, "GSM Line Out", 0); 303 snd_soc_dapm_disable_pin(codec, "GSM Line Out");
304 snd_soc_dapm_set_endpoint(codec, "GSM Line In", 0); 304 snd_soc_dapm_disable_pin(codec, "GSM Line In");
305 snd_soc_dapm_set_endpoint(codec, "Headset Mic", 1); 305 snd_soc_dapm_enable_pin(codec, "Headset Mic");
306 snd_soc_dapm_set_endpoint(codec, "Call Mic", 0); 306 snd_soc_dapm_disable_pin(codec, "Call Mic");
307 break; 307 break;
308 case NEO_CAPTURE_BLUETOOTH: 308 case NEO_CAPTURE_BLUETOOTH:
309 snd_soc_dapm_set_endpoint(codec, "Audio Out", 0); 309 snd_soc_dapm_disable_pin(codec, "Audio Out");
310 snd_soc_dapm_set_endpoint(codec, "GSM Line Out", 0); 310 snd_soc_dapm_disable_pin(codec, "GSM Line Out");
311 snd_soc_dapm_set_endpoint(codec, "GSM Line In", 0); 311 snd_soc_dapm_disable_pin(codec, "GSM Line In");
312 snd_soc_dapm_set_endpoint(codec, "Headset Mic", 0); 312 snd_soc_dapm_disable_pin(codec, "Headset Mic");
313 snd_soc_dapm_set_endpoint(codec, "Call Mic", 0); 313 snd_soc_dapm_disable_pin(codec, "Call Mic");
314 break; 314 break;
315 default: 315 default:
316 snd_soc_dapm_set_endpoint(codec, "Audio Out", 0); 316 snd_soc_dapm_disable_pin(codec, "Audio Out");
317 snd_soc_dapm_set_endpoint(codec, "GSM Line Out", 0); 317 snd_soc_dapm_disable_pin(codec, "GSM Line Out");
318 snd_soc_dapm_set_endpoint(codec, "GSM Line In", 0); 318 snd_soc_dapm_disable_pin(codec, "GSM Line In");
319 snd_soc_dapm_set_endpoint(codec, "Headset Mic", 0); 319 snd_soc_dapm_disable_pin(codec, "Headset Mic");
320 snd_soc_dapm_set_endpoint(codec, "Call Mic", 0); 320 snd_soc_dapm_disable_pin(codec, "Call Mic");
321 } 321 }
322 322
323 snd_soc_dapm_sync_endpoints(codec); 323 snd_soc_dapm_sync(codec);
324 324
325 return 0; 325 return 0;
326} 326}
@@ -511,12 +511,12 @@ static int neo1973_wm8753_init(struct snd_soc_codec *codec)
511 DBG("Entered %s\n", __func__); 511 DBG("Entered %s\n", __func__);
512 512
513 /* set up NC codec pins */ 513 /* set up NC codec pins */
514 snd_soc_dapm_set_endpoint(codec, "LOUT2", 0); 514 snd_soc_dapm_disable_pin(codec, "LOUT2");
515 snd_soc_dapm_set_endpoint(codec, "ROUT2", 0); 515 snd_soc_dapm_disable_pin(codec, "ROUT2");
516 snd_soc_dapm_set_endpoint(codec, "OUT3", 0); 516 snd_soc_dapm_disable_pin(codec, "OUT3");
517 snd_soc_dapm_set_endpoint(codec, "OUT4", 0); 517 snd_soc_dapm_disable_pin(codec, "OUT4");
518 snd_soc_dapm_set_endpoint(codec, "LINE1", 0); 518 snd_soc_dapm_disable_pin(codec, "LINE1");
519 snd_soc_dapm_set_endpoint(codec, "LINE2", 0); 519 snd_soc_dapm_disable_pin(codec, "LINE2");
520 520
521 521
522 /* set endpoints to default mode */ 522 /* set endpoints to default mode */
@@ -539,7 +539,7 @@ static int neo1973_wm8753_init(struct snd_soc_codec *codec)
539 err = snd_soc_dapm_add_routes(codec, dapm_routes, 539 err = snd_soc_dapm_add_routes(codec, dapm_routes,
540 ARRAY_SIZE(dapm_routes)); 540 ARRAY_SIZE(dapm_routes));
541 541
542 snd_soc_dapm_sync_endpoints(codec); 542 snd_soc_dapm_sync(codec);
543 return 0; 543 return 0;
544} 544}
545 545