]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: wm8904: fix regcache handling
authorMichael Walle <michael@walle.cc>
Tue, 12 Nov 2019 22:36:29 +0000 (23:36 +0100)
committerMark Brown <broonie@kernel.org>
Fri, 15 Nov 2019 12:00:11 +0000 (12:00 +0000)
commit79fee4a0de14057d44bf48c68993f1ecec67eddd
tree3d7e1e50dda714798783d5aa95ca7b2d72b2fb54
parent49e395d81d8778c232d582e38c63b790e50547b3
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: Michael Walle <michael@walle.cc>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20191112223629.21867-1-michael@walle.cc
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/wm8904.c