aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8750.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/wm8750.c')
-rw-r--r--sound/soc/codecs/wm8750.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/sound/soc/codecs/wm8750.c b/sound/soc/codecs/wm8750.c
index 62423f4493b..1f11ad24551 100644
--- a/sound/soc/codecs/wm8750.c
+++ b/sound/soc/codecs/wm8750.c
@@ -378,7 +378,7 @@ static const struct snd_soc_dapm_widget wm8750_dapm_widgets[] = {
378 SND_SOC_DAPM_INPUT("RINPUT3"), 378 SND_SOC_DAPM_INPUT("RINPUT3"),
379}; 379};
380 380
381static const char *audio_map[][3] = { 381static const struct snd_soc_dapm_route audio_map[] = {
382 /* left mixer */ 382 /* left mixer */
383 {"Left Mixer", "Playback Switch", "Left DAC"}, 383 {"Left Mixer", "Playback Switch", "Left DAC"},
384 {"Left Mixer", "Left Bypass Switch", "Left Line Mux"}, 384 {"Left Mixer", "Left Bypass Switch", "Left Line Mux"},
@@ -470,22 +470,14 @@ static const char *audio_map[][3] = {
470 /* ADC */ 470 /* ADC */
471 {"Left ADC", NULL, "Left ADC Mux"}, 471 {"Left ADC", NULL, "Left ADC Mux"},
472 {"Right ADC", NULL, "Right ADC Mux"}, 472 {"Right ADC", NULL, "Right ADC Mux"},
473
474 /* terminator */
475 {NULL, NULL, NULL},
476}; 473};
477 474
478static int wm8750_add_widgets(struct snd_soc_codec *codec) 475static int wm8750_add_widgets(struct snd_soc_codec *codec)
479{ 476{
480 int i; 477 snd_soc_dapm_new_controls(codec, wm8750_dapm_widgets,
481 478 ARRAY_SIZE(wm8750_dapm_widgets));
482 for (i = 0; i < ARRAY_SIZE(wm8750_dapm_widgets); i++)
483 snd_soc_dapm_new_control(codec, &wm8750_dapm_widgets[i]);
484 479
485 /* set up audio path audio_mapnects */ 480 snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map));
486 for (i = 0; audio_map[i][0] != NULL; i++)
487 snd_soc_dapm_connect_input(codec, audio_map[i][0],
488 audio_map[i][1], audio_map[i][2]);
489 481
490 snd_soc_dapm_new_widgets(codec); 482 snd_soc_dapm_new_widgets(codec);
491 return 0; 483 return 0;