diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2008-05-13 08:54:43 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2008-05-19 11:32:08 -0400 |
commit | a65f0568f6cc8433877fb71dd7d36b551854b0bc (patch) | |
tree | 6bf1077f5381b3f3de8c75cb9c6dbefe5e4d3c70 /sound/soc/codecs/wm9712.c | |
parent | 3ff3f64ba04b3e5a86dce5239b10268798f68ad7 (diff) |
[ALSA] soc - Convert Wolfson codec drivers to use bulk DAPM registration
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/soc/codecs/wm9712.c')
-rw-r--r-- | sound/soc/codecs/wm9712.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/sound/soc/codecs/wm9712.c b/sound/soc/codecs/wm9712.c index e26cfcf0b4fc..d9789f1c8903 100644 --- a/sound/soc/codecs/wm9712.c +++ b/sound/soc/codecs/wm9712.c | |||
@@ -348,7 +348,7 @@ SND_SOC_DAPM_INPUT("MIC1"), | |||
348 | SND_SOC_DAPM_INPUT("MIC2"), | 348 | SND_SOC_DAPM_INPUT("MIC2"), |
349 | }; | 349 | }; |
350 | 350 | ||
351 | static const char *audio_map[][3] = { | 351 | static const struct snd_soc_dapm_route audio_map[] = { |
352 | /* virtual mixer - mixes left & right channels for spk and mono */ | 352 | /* virtual mixer - mixes left & right channels for spk and mono */ |
353 | {"AC97 Mixer", NULL, "Left DAC"}, | 353 | {"AC97 Mixer", NULL, "Left DAC"}, |
354 | {"AC97 Mixer", NULL, "Right DAC"}, | 354 | {"AC97 Mixer", NULL, "Right DAC"}, |
@@ -443,21 +443,14 @@ static const char *audio_map[][3] = { | |||
443 | {"Speaker PGA", NULL, "Speaker Mux"}, | 443 | {"Speaker PGA", NULL, "Speaker Mux"}, |
444 | {"LOUT2", NULL, "Speaker PGA"}, | 444 | {"LOUT2", NULL, "Speaker PGA"}, |
445 | {"ROUT2", NULL, "Speaker PGA"}, | 445 | {"ROUT2", NULL, "Speaker PGA"}, |
446 | |||
447 | {NULL, NULL, NULL}, | ||
448 | }; | 446 | }; |
449 | 447 | ||
450 | static int wm9712_add_widgets(struct snd_soc_codec *codec) | 448 | static int wm9712_add_widgets(struct snd_soc_codec *codec) |
451 | { | 449 | { |
452 | int i; | 450 | snd_soc_dapm_new_controls(codec, wm9712_dapm_widgets, |
453 | 451 | ARRAY_SIZE(wm9712_dapm_widgets)); | |
454 | for (i = 0; i < ARRAY_SIZE(wm9712_dapm_widgets); i++) | ||
455 | snd_soc_dapm_new_control(codec, &wm9712_dapm_widgets[i]); | ||
456 | 452 | ||
457 | /* set up audio path connects */ | 453 | snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map)); |
458 | for (i = 0; audio_map[i][0] != NULL; i++) | ||
459 | snd_soc_dapm_connect_input(codec, audio_map[i][0], | ||
460 | audio_map[i][1], audio_map[i][2]); | ||
461 | 454 | ||
462 | snd_soc_dapm_new_widgets(codec); | 455 | snd_soc_dapm_new_widgets(codec); |
463 | return 0; | 456 | return 0; |