diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-01-21 18:24:25 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-01-21 18:28:22 -0500 |
commit | dd21353f35082fa77d1c8672fffebf324954eb09 (patch) | |
tree | 5c30d2aed95aa02aac1e50f2bd73aaae0fc01dcd | |
parent | 411a3450c9539043c794a5f4a6bdb03bb040670a (diff) |
ASoC: wm8988: Convert to table based DAPM and control init
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r-- | sound/soc/codecs/wm8988.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sound/soc/codecs/wm8988.c b/sound/soc/codecs/wm8988.c index ab52963dd04c..40aebafb35e6 100644 --- a/sound/soc/codecs/wm8988.c +++ b/sound/soc/codecs/wm8988.c | |||
@@ -317,7 +317,7 @@ static const struct snd_soc_dapm_widget wm8988_dapm_widgets[] = { | |||
317 | SND_SOC_DAPM_INPUT("RINPUT2"), | 317 | SND_SOC_DAPM_INPUT("RINPUT2"), |
318 | }; | 318 | }; |
319 | 319 | ||
320 | static const struct snd_soc_dapm_route audio_map[] = { | 320 | static const struct snd_soc_dapm_route wm8988_dapm_routes[] = { |
321 | 321 | ||
322 | { "Left Line Mux", "Line 1", "LINPUT1" }, | 322 | { "Left Line Mux", "Line 1", "LINPUT1" }, |
323 | { "Left Line Mux", "Line 2", "LINPUT2" }, | 323 | { "Left Line Mux", "Line 2", "LINPUT2" }, |
@@ -743,7 +743,6 @@ static int wm8988_resume(struct snd_soc_codec *codec) | |||
743 | static int wm8988_probe(struct snd_soc_codec *codec) | 743 | static int wm8988_probe(struct snd_soc_codec *codec) |
744 | { | 744 | { |
745 | struct wm8988_priv *wm8988 = snd_soc_codec_get_drvdata(codec); | 745 | struct wm8988_priv *wm8988 = snd_soc_codec_get_drvdata(codec); |
746 | struct snd_soc_dapm_context *dapm = &codec->dapm; | ||
747 | int ret = 0; | 746 | int ret = 0; |
748 | 747 | ||
749 | ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8988->control_type); | 748 | ret = snd_soc_codec_set_cache_io(codec, 7, 9, wm8988->control_type); |
@@ -767,12 +766,6 @@ static int wm8988_probe(struct snd_soc_codec *codec) | |||
767 | 766 | ||
768 | wm8988_set_bias_level(codec, SND_SOC_BIAS_STANDBY); | 767 | wm8988_set_bias_level(codec, SND_SOC_BIAS_STANDBY); |
769 | 768 | ||
770 | snd_soc_add_controls(codec, wm8988_snd_controls, | ||
771 | ARRAY_SIZE(wm8988_snd_controls)); | ||
772 | snd_soc_dapm_new_controls(dapm, wm8988_dapm_widgets, | ||
773 | ARRAY_SIZE(wm8988_dapm_widgets)); | ||
774 | snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map)); | ||
775 | |||
776 | return 0; | 769 | return 0; |
777 | } | 770 | } |
778 | 771 | ||
@@ -791,6 +784,13 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8988 = { | |||
791 | .reg_cache_size = ARRAY_SIZE(wm8988_reg), | 784 | .reg_cache_size = ARRAY_SIZE(wm8988_reg), |
792 | .reg_word_size = sizeof(u16), | 785 | .reg_word_size = sizeof(u16), |
793 | .reg_cache_default = wm8988_reg, | 786 | .reg_cache_default = wm8988_reg, |
787 | |||
788 | .controls = wm8988_snd_controls, | ||
789 | .num_controls = ARRAY_SIZE(wm8988_snd_controls), | ||
790 | .dapm_widgets = wm8988_dapm_widgets, | ||
791 | .num_dapm_widgets = ARRAY_SIZE(wm8988_dapm_widgets), | ||
792 | .dapm_routes = wm8988_dapm_routes, | ||
793 | .num_dapm_routes = ARRAY_SIZE(wm8988_dapm_routes), | ||
794 | }; | 794 | }; |
795 | 795 | ||
796 | #if defined(CONFIG_SPI_MASTER) | 796 | #if defined(CONFIG_SPI_MASTER) |