提交 9a812c6b 编写于 作者: L Lars-Peter Clausen 提交者: Mark Brown

ASoC: wm9712: Use table based control setup

Makes the code a bit cleaner.
Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
Acked-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 12ced338
...@@ -647,8 +647,6 @@ static int wm9712_soc_probe(struct snd_soc_codec *codec) ...@@ -647,8 +647,6 @@ static int wm9712_soc_probe(struct snd_soc_codec *codec)
ac97_write(codec, AC97_VIDEO, ac97_read(codec, AC97_VIDEO) | 0x3000); ac97_write(codec, AC97_VIDEO, ac97_read(codec, AC97_VIDEO) | 0x3000);
wm9712_set_bias_level(codec, SND_SOC_BIAS_STANDBY); wm9712_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
snd_soc_add_codec_controls(codec, wm9712_snd_ac97_controls,
ARRAY_SIZE(wm9712_snd_ac97_controls));
return 0; return 0;
...@@ -675,6 +673,9 @@ static struct snd_soc_codec_driver soc_codec_dev_wm9712 = { ...@@ -675,6 +673,9 @@ static struct snd_soc_codec_driver soc_codec_dev_wm9712 = {
.reg_word_size = sizeof(u16), .reg_word_size = sizeof(u16),
.reg_cache_step = 2, .reg_cache_step = 2,
.reg_cache_default = wm9712_reg, .reg_cache_default = wm9712_reg,
.controls = wm9712_snd_ac97_controls,
.num_controls = ARRAY_SIZE(wm9712_snd_ac97_controls),
.dapm_widgets = wm9712_dapm_widgets, .dapm_widgets = wm9712_dapm_widgets,
.num_dapm_widgets = ARRAY_SIZE(wm9712_dapm_widgets), .num_dapm_widgets = ARRAY_SIZE(wm9712_dapm_widgets),
.dapm_routes = wm9712_audio_map, .dapm_routes = wm9712_audio_map,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册