diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-03-07 11:39:50 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-03-08 13:56:08 -0500 |
commit | 149c7b441bc66b37325f0c494bfe9f303484bd88 (patch) | |
tree | 2a8a0b77bf0978f04f4ab4cc5541df0af1b6a0ff /sound/soc/codecs/wm9081.c | |
parent | 89b95ac09e408b5d88a8b3792dc76c863e45fb31 (diff) |
ASoC: Use data based init for WM9081 DAPM
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Diffstat (limited to 'sound/soc/codecs/wm9081.c')
-rw-r--r-- | sound/soc/codecs/wm9081.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sound/soc/codecs/wm9081.c b/sound/soc/codecs/wm9081.c index 7883f3ed797..8b1b2c9ab59 100644 --- a/sound/soc/codecs/wm9081.c +++ b/sound/soc/codecs/wm9081.c | |||
@@ -762,7 +762,7 @@ SND_SOC_DAPM_SUPPLY("TOCLK", WM9081_CLOCK_CONTROL_3, 2, 0, NULL, 0), | |||
762 | }; | 762 | }; |
763 | 763 | ||
764 | 764 | ||
765 | static const struct snd_soc_dapm_route audio_paths[] = { | 765 | static const struct snd_soc_dapm_route wm9081_audio_paths[] = { |
766 | { "DAC", NULL, "CLK_SYS" }, | 766 | { "DAC", NULL, "CLK_SYS" }, |
767 | { "DAC", NULL, "CLK_DSP" }, | 767 | { "DAC", NULL, "CLK_DSP" }, |
768 | 768 | ||
@@ -1232,7 +1232,6 @@ static struct snd_soc_dai_driver wm9081_dai = { | |||
1232 | static int wm9081_probe(struct snd_soc_codec *codec) | 1232 | static int wm9081_probe(struct snd_soc_codec *codec) |
1233 | { | 1233 | { |
1234 | struct wm9081_priv *wm9081 = snd_soc_codec_get_drvdata(codec); | 1234 | struct wm9081_priv *wm9081 = snd_soc_codec_get_drvdata(codec); |
1235 | struct snd_soc_dapm_context *dapm = &codec->dapm; | ||
1236 | int ret; | 1235 | int ret; |
1237 | u16 reg; | 1236 | u16 reg; |
1238 | 1237 | ||
@@ -1282,10 +1281,6 @@ static int wm9081_probe(struct snd_soc_codec *codec) | |||
1282 | ARRAY_SIZE(wm9081_eq_controls)); | 1281 | ARRAY_SIZE(wm9081_eq_controls)); |
1283 | } | 1282 | } |
1284 | 1283 | ||
1285 | snd_soc_dapm_new_controls(dapm, wm9081_dapm_widgets, | ||
1286 | ARRAY_SIZE(wm9081_dapm_widgets)); | ||
1287 | snd_soc_dapm_add_routes(dapm, audio_paths, ARRAY_SIZE(audio_paths)); | ||
1288 | |||
1289 | return ret; | 1284 | return ret; |
1290 | } | 1285 | } |
1291 | 1286 | ||
@@ -1334,6 +1329,10 @@ static struct snd_soc_codec_driver soc_codec_dev_wm9081 = { | |||
1334 | .reg_word_size = sizeof(u16), | 1329 | .reg_word_size = sizeof(u16), |
1335 | .reg_cache_default = wm9081_reg_defaults, | 1330 | .reg_cache_default = wm9081_reg_defaults, |
1336 | .volatile_register = wm9081_volatile_register, | 1331 | .volatile_register = wm9081_volatile_register, |
1332 | .dapm_widgets = wm9081_dapm_widgets, | ||
1333 | .num_dapm_widgets = ARRAY_SIZE(wm9081_dapm_widgets), | ||
1334 | .dapm_routes = wm9081_audio_paths, | ||
1335 | .num_dapm_routes = ARRAY_SIZE(wm9081_audio_paths), | ||
1337 | }; | 1336 | }; |
1338 | 1337 | ||
1339 | #if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) | 1338 | #if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) |