Commit 680fa1f8 authored by Mark Brown's avatar Mark Brown

ASoC: Convert WM9081 to table based control init

At least for the core controls, the optionally selected controls are still
added programatically.
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: default avatarLiam Girdwood <lrg@ti.com>
parent 6473a148
...@@ -1248,8 +1248,6 @@ static int wm9081_probe(struct snd_soc_codec *codec) ...@@ -1248,8 +1248,6 @@ static int wm9081_probe(struct snd_soc_codec *codec)
snd_soc_write(codec, WM9081_ANALOGUE_SPEAKER_PGA, snd_soc_write(codec, WM9081_ANALOGUE_SPEAKER_PGA,
reg | WM9081_SPKPGAZC); reg | WM9081_SPKPGAZC);
snd_soc_add_controls(codec, wm9081_snd_controls,
ARRAY_SIZE(wm9081_snd_controls));
if (!wm9081->pdata.num_retune_configs) { if (!wm9081->pdata.num_retune_configs) {
dev_dbg(codec->dev, dev_dbg(codec->dev,
"No ReTune Mobile data, using normal EQ\n"); "No ReTune Mobile data, using normal EQ\n");
...@@ -1309,6 +1307,8 @@ static struct snd_soc_codec_driver soc_codec_dev_wm9081 = { ...@@ -1309,6 +1307,8 @@ static struct snd_soc_codec_driver soc_codec_dev_wm9081 = {
.reg_cache_default = wm9081_reg_defaults, .reg_cache_default = wm9081_reg_defaults,
.volatile_register = wm9081_volatile_register, .volatile_register = wm9081_volatile_register,
.controls = wm9081_snd_controls,
.num_controls = ARRAY_SIZE(wm9081_snd_controls),
.dapm_widgets = wm9081_dapm_widgets, .dapm_widgets = wm9081_dapm_widgets,
.num_dapm_widgets = ARRAY_SIZE(wm9081_dapm_widgets), .num_dapm_widgets = ARRAY_SIZE(wm9081_dapm_widgets),
.dapm_routes = wm9081_audio_paths, .dapm_routes = wm9081_audio_paths,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment