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/wm9713.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/wm9713.c')
-rw-r--r-- | sound/soc/codecs/wm9713.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/sound/soc/codecs/wm9713.c b/sound/soc/codecs/wm9713.c index 4863636e9d56..4f516a5a5616 100644 --- a/sound/soc/codecs/wm9713.c +++ b/sound/soc/codecs/wm9713.c | |||
@@ -453,7 +453,7 @@ SND_SOC_DAPM_INPUT("MIC2B"), | |||
453 | SND_SOC_DAPM_VMID("VMID"), | 453 | SND_SOC_DAPM_VMID("VMID"), |
454 | }; | 454 | }; |
455 | 455 | ||
456 | static const char *audio_map[][3] = { | 456 | static const struct snd_soc_dapm_route audio_map[] = { |
457 | /* left HP mixer */ | 457 | /* left HP mixer */ |
458 | {"Left HP Mixer", "PC Beep Playback Switch", "PCBEEP"}, | 458 | {"Left HP Mixer", "PC Beep Playback Switch", "PCBEEP"}, |
459 | {"Left HP Mixer", "Voice Playback Switch", "Voice DAC"}, | 459 | {"Left HP Mixer", "Voice Playback Switch", "Voice DAC"}, |
@@ -604,21 +604,14 @@ static const char *audio_map[][3] = { | |||
604 | {"Capture Mono Mux", "Stereo", "Capture Mixer"}, | 604 | {"Capture Mono Mux", "Stereo", "Capture Mixer"}, |
605 | {"Capture Mono Mux", "Left", "Left Capture Source"}, | 605 | {"Capture Mono Mux", "Left", "Left Capture Source"}, |
606 | {"Capture Mono Mux", "Right", "Right Capture Source"}, | 606 | {"Capture Mono Mux", "Right", "Right Capture Source"}, |
607 | |||
608 | {NULL, NULL, NULL}, | ||
609 | }; | 607 | }; |
610 | 608 | ||
611 | static int wm9713_add_widgets(struct snd_soc_codec *codec) | 609 | static int wm9713_add_widgets(struct snd_soc_codec *codec) |
612 | { | 610 | { |
613 | int i; | 611 | snd_soc_dapm_new_controls(codec, wm9713_dapm_widgets, |
614 | 612 | ARRAY_SIZE(wm9713_dapm_widgets)); | |
615 | for (i = 0; i < ARRAY_SIZE(wm9713_dapm_widgets); i++) | ||
616 | snd_soc_dapm_new_control(codec, &wm9713_dapm_widgets[i]); | ||
617 | 613 | ||
618 | /* set up audio path audio_mapnects */ | 614 | snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map)); |
619 | for (i = 0; audio_map[i][0] != NULL; i++) | ||
620 | snd_soc_dapm_connect_input(codec, audio_map[i][0], | ||
621 | audio_map[i][1], audio_map[i][2]); | ||
622 | 615 | ||
623 | snd_soc_dapm_new_widgets(codec); | 616 | snd_soc_dapm_new_widgets(codec); |
624 | return 0; | 617 | return 0; |