diff options
Diffstat (limited to 'sound/soc/codecs/wm8753.c')
-rw-r--r-- | sound/soc/codecs/wm8753.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c index 9032b0c07c86..c32e6326be6c 100644 --- a/sound/soc/codecs/wm8753.c +++ b/sound/soc/codecs/wm8753.c | |||
@@ -523,7 +523,7 @@ SND_SOC_DAPM_INPUT("MIC2"), | |||
523 | SND_SOC_DAPM_VMID("VREF"), | 523 | SND_SOC_DAPM_VMID("VREF"), |
524 | }; | 524 | }; |
525 | 525 | ||
526 | static const char *audio_map[][3] = { | 526 | static const struct snd_soc_dapm_route audio_map[] = { |
527 | /* left mixer */ | 527 | /* left mixer */ |
528 | {"Left Mixer", "Left Playback Switch", "Left DAC"}, | 528 | {"Left Mixer", "Left Playback Switch", "Left DAC"}, |
529 | {"Left Mixer", "Voice Playback Switch", "Voice DAC"}, | 529 | {"Left Mixer", "Voice Playback Switch", "Voice DAC"}, |
@@ -674,23 +674,14 @@ static const char *audio_map[][3] = { | |||
674 | 674 | ||
675 | /* ACOP */ | 675 | /* ACOP */ |
676 | {"ACOP", NULL, "ALC Mixer"}, | 676 | {"ACOP", NULL, "ALC Mixer"}, |
677 | |||
678 | /* terminator */ | ||
679 | {NULL, NULL, NULL}, | ||
680 | }; | 677 | }; |
681 | 678 | ||
682 | static int wm8753_add_widgets(struct snd_soc_codec *codec) | 679 | static int wm8753_add_widgets(struct snd_soc_codec *codec) |
683 | { | 680 | { |
684 | int i; | 681 | snd_soc_dapm_new_controls(codec, wm8753_dapm_widgets, |
682 | ARRAY_SIZE(wm8753_dapm_widgets)); | ||
685 | 683 | ||
686 | for (i = 0; i < ARRAY_SIZE(wm8753_dapm_widgets); i++) | 684 | snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map)); |
687 | snd_soc_dapm_new_control(codec, &wm8753_dapm_widgets[i]); | ||
688 | |||
689 | /* set up the WM8753 audio map */ | ||
690 | for (i = 0; audio_map[i][0] != NULL; i++) { | ||
691 | snd_soc_dapm_connect_input(codec, audio_map[i][0], | ||
692 | audio_map[i][1], audio_map[i][2]); | ||
693 | } | ||
694 | 685 | ||
695 | snd_soc_dapm_new_widgets(codec); | 686 | snd_soc_dapm_new_widgets(codec); |
696 | return 0; | 687 | return 0; |