“7a26019fdecdb45ff784ae4e3b7e0cc9045100ca”上不存在“drivers/hsi/git@gitcode.net:openanolis/cloud-kernel.git”
未验证 提交 e9149b8c 编写于 作者: M Michael Walle 提交者: Mark Brown

ASoC: wm8904: fix regcache handling

The current code assumes that the power is turned off in
SND_SOC_BIAS_OFF. If there are no actual regulator the codec isn't
turned off and the registers are not reset to their default values but
the regcache is still marked as dirty. Thus a value might not be written
to the hardware if it is set to the default value. Do a software reset
before turning off the power to make sure the registers are always reset
to their default states.
Signed-off-by: NMichael Walle <michael@walle.cc>
Acked-by: NCharles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20191112223629.21867-1-michael@walle.ccSigned-off-by: NMark Brown <broonie@kernel.org>
上级 8f157d4f
...@@ -1917,6 +1917,7 @@ static int wm8904_set_bias_level(struct snd_soc_component *component, ...@@ -1917,6 +1917,7 @@ static int wm8904_set_bias_level(struct snd_soc_component *component,
snd_soc_component_update_bits(component, WM8904_BIAS_CONTROL_0, snd_soc_component_update_bits(component, WM8904_BIAS_CONTROL_0,
WM8904_BIAS_ENA, 0); WM8904_BIAS_ENA, 0);
snd_soc_component_write(component, WM8904_SW_RESET_AND_ID, 0);
regcache_cache_only(wm8904->regmap, true); regcache_cache_only(wm8904->regmap, true);
regcache_mark_dirty(wm8904->regmap); regcache_mark_dirty(wm8904->regmap);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册