diff options
Diffstat (limited to 'sound/soc/codecs/wm8985.c')
-rw-r--r-- | sound/soc/codecs/wm8985.c | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/sound/soc/codecs/wm8985.c b/sound/soc/codecs/wm8985.c index e62a4c55a9c3..ee3aba3098cd 100644 --- a/sound/soc/codecs/wm8985.c +++ b/sound/soc/codecs/wm8985.c | |||
@@ -428,7 +428,7 @@ static const struct snd_soc_dapm_widget wm8985_dapm_widgets[] = { | |||
428 | SND_SOC_DAPM_OUTPUT("SPKR") | 428 | SND_SOC_DAPM_OUTPUT("SPKR") |
429 | }; | 429 | }; |
430 | 430 | ||
431 | static const struct snd_soc_dapm_route audio_map[] = { | 431 | static const struct snd_soc_dapm_route wm8985_dapm_routes[] = { |
432 | { "Right Output Mixer", "PCM Switch", "Right DAC" }, | 432 | { "Right Output Mixer", "PCM Switch", "Right DAC" }, |
433 | { "Right Output Mixer", "Aux Switch", "AUXR" }, | 433 | { "Right Output Mixer", "Aux Switch", "AUXR" }, |
434 | { "Right Output Mixer", "Line Switch", "Right Boost Mixer" }, | 434 | { "Right Output Mixer", "Line Switch", "Right Boost Mixer" }, |
@@ -531,17 +531,6 @@ static int eqmode_put(struct snd_kcontrol *kcontrol, | |||
531 | return 0; | 531 | return 0; |
532 | } | 532 | } |
533 | 533 | ||
534 | static int wm8985_add_widgets(struct snd_soc_codec *codec) | ||
535 | { | ||
536 | struct snd_soc_dapm_context *dapm = &codec->dapm; | ||
537 | |||
538 | snd_soc_dapm_new_controls(dapm, wm8985_dapm_widgets, | ||
539 | ARRAY_SIZE(wm8985_dapm_widgets)); | ||
540 | snd_soc_dapm_add_routes(dapm, audio_map, | ||
541 | ARRAY_SIZE(audio_map)); | ||
542 | return 0; | ||
543 | } | ||
544 | |||
545 | static int wm8985_reset(struct snd_soc_codec *codec) | 534 | static int wm8985_reset(struct snd_soc_codec *codec) |
546 | { | 535 | { |
547 | return snd_soc_write(codec, WM8985_SOFTWARE_RESET, 0x0); | 536 | return snd_soc_write(codec, WM8985_SOFTWARE_RESET, 0x0); |
@@ -1017,10 +1006,6 @@ static int wm8985_probe(struct snd_soc_codec *codec) | |||
1017 | cache[WM8985_BIAS_CTRL] |= WM8985_BIASCUT; | 1006 | cache[WM8985_BIAS_CTRL] |= WM8985_BIASCUT; |
1018 | codec->cache_sync = 1; | 1007 | codec->cache_sync = 1; |
1019 | 1008 | ||
1020 | snd_soc_add_controls(codec, wm8985_snd_controls, | ||
1021 | ARRAY_SIZE(wm8985_snd_controls)); | ||
1022 | wm8985_add_widgets(codec); | ||
1023 | |||
1024 | wm8985_set_bias_level(codec, SND_SOC_BIAS_STANDBY); | 1009 | wm8985_set_bias_level(codec, SND_SOC_BIAS_STANDBY); |
1025 | return 0; | 1010 | return 0; |
1026 | 1011 | ||
@@ -1068,9 +1053,16 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8985 = { | |||
1068 | .suspend = wm8985_suspend, | 1053 | .suspend = wm8985_suspend, |
1069 | .resume = wm8985_resume, | 1054 | .resume = wm8985_resume, |
1070 | .set_bias_level = wm8985_set_bias_level, | 1055 | .set_bias_level = wm8985_set_bias_level, |
1056 | |||
1057 | .controls = wm8985_snd_controls, | ||
1058 | .num_controls = ARRAY_SIZE(wm8985_snd_controls), | ||
1059 | .dapm_widgets = wm8985_dapm_widgets, | ||
1071 | .reg_cache_size = ARRAY_SIZE(wm8985_reg_defs), | 1060 | .reg_cache_size = ARRAY_SIZE(wm8985_reg_defs), |
1072 | .reg_word_size = sizeof(u16), | 1061 | .reg_word_size = sizeof(u16), |
1073 | .reg_cache_default = wm8985_reg_defs | 1062 | .reg_cache_default = wm8985_reg_defs |
1063 | .num_dapm_widgets = ARRAY_SIZE(wm8985_dapm_widgets), | ||
1064 | .dapm_routes = wm8985_dapm_routes, | ||
1065 | .num_dapm_routes = ARRAY_SIZE(wm8985_dapm_routes), | ||
1074 | }; | 1066 | }; |
1075 | 1067 | ||
1076 | #if defined(CONFIG_SPI_MASTER) | 1068 | #if defined(CONFIG_SPI_MASTER) |