diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2008-05-13 08:58:03 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2008-05-19 07:19:19 -0400 |
commit | 8f3112d7a847c2933a42ce29f17899f585d09106 (patch) | |
tree | b6ef0fcafc44281f315b72923da684f94f1ace28 /sound/soc/s3c24xx | |
parent | 51e6a8411a9440f0fdba6cdd7d779e74f89debc4 (diff) |
[ALSA] soc - neo1973_wm8753 - Convert to bulk DAPM registration APIs
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Graeme Gregory <graeme@openmoko.org>
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.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/sound/soc/s3c24xx/neo1973_wm8753.c b/sound/soc/s3c24xx/neo1973_wm8753.c index e469186a407d..79c5027273cb 100644 --- a/sound/soc/s3c24xx/neo1973_wm8753.c +++ b/sound/soc/s3c24xx/neo1973_wm8753.c | |||
@@ -425,8 +425,7 @@ static const struct snd_soc_dapm_widget wm8753_dapm_widgets[] = { | |||
425 | }; | 425 | }; |
426 | 426 | ||
427 | 427 | ||
428 | /* example machine audio_mapnections */ | 428 | static const struct snd_soc_dapm_route dapm_routes[] = { |
429 | static const char *audio_map[][3] = { | ||
430 | 429 | ||
431 | /* Connections to the lm4857 amp */ | 430 | /* Connections to the lm4857 amp */ |
432 | {"Audio Out", NULL, "LOUT1"}, | 431 | {"Audio Out", NULL, "LOUT1"}, |
@@ -449,8 +448,6 @@ static const char *audio_map[][3] = { | |||
449 | 448 | ||
450 | /* Connect the ALC pins */ | 449 | /* Connect the ALC pins */ |
451 | {"ACIN", NULL, "ACOP"}, | 450 | {"ACIN", NULL, "ACOP"}, |
452 | |||
453 | {NULL, NULL, NULL}, | ||
454 | }; | 451 | }; |
455 | 452 | ||
456 | static const char *lm4857_mode[] = { | 453 | static const char *lm4857_mode[] = { |
@@ -526,8 +523,8 @@ static int neo1973_wm8753_init(struct snd_soc_codec *codec) | |||
526 | set_scenario_endpoints(codec, NEO_AUDIO_OFF); | 523 | set_scenario_endpoints(codec, NEO_AUDIO_OFF); |
527 | 524 | ||
528 | /* Add neo1973 specific widgets */ | 525 | /* Add neo1973 specific widgets */ |
529 | for (i = 0; i < ARRAY_SIZE(wm8753_dapm_widgets); i++) | 526 | snd_soc_dapm_new_controls(codec, wm8753_dapm_widgets, |
530 | snd_soc_dapm_new_control(codec, &wm8753_dapm_widgets[i]); | 527 | ARRAY_SIZE(wm8753_dapm_widgets)); |
531 | 528 | ||
532 | /* add neo1973 specific controls */ | 529 | /* add neo1973 specific controls */ |
533 | for (i = 0; i < ARRAY_SIZE(wm8753_neo1973_controls); i++) { | 530 | for (i = 0; i < ARRAY_SIZE(wm8753_neo1973_controls); i++) { |
@@ -538,11 +535,9 @@ static int neo1973_wm8753_init(struct snd_soc_codec *codec) | |||
538 | return err; | 535 | return err; |
539 | } | 536 | } |
540 | 537 | ||
541 | /* set up neo1973 specific audio path audio_mapnects */ | 538 | /* set up neo1973 specific audio routes */ |
542 | for (i = 0; audio_map[i][0] != NULL; i++) { | 539 | err = snd_soc_dapm_add_routes(codec, dapm_routes, |
543 | snd_soc_dapm_connect_input(codec, audio_map[i][0], | 540 | ARRAY_SIZE(dapm_routes)); |
544 | audio_map[i][1], audio_map[i][2]); | ||
545 | } | ||
546 | 541 | ||
547 | snd_soc_dapm_sync_endpoints(codec); | 542 | snd_soc_dapm_sync_endpoints(codec); |
548 | return 0; | 543 | return 0; |