ASoC: wm8962: Update register CLASS_D_CONTROL_1 to be non-volatile
authorCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Tue, 13 May 2014 12:45:15 +0000 (13:45 +0100)
committerJiri Slaby <jslaby@suse.cz>
Mon, 9 Jun 2014 13:53:39 +0000 (15:53 +0200)
commit50366435d4c0eee0b76fe4d04fd5f5d15a6a7c90
tree006e37db92fb2d545bd31222c3943cba10e5d01d
parentad7a831e71fa8d469536bb7548a87a769eba4be6
ASoC: wm8962: Update register CLASS_D_CONTROL_1 to be non-volatile

commit 44330ab516c15dda8a1e660eeaf0003f84e43e3f upstream.

The register CLASS_D_CONTROL_1 is marked as volatile because it contains
a bit, DAC_MUTE, which is also mirrored in the ADC_DAC_CONTROL_1
register. This causes problems for the "Speaker Switch" control, which
will report an error if the CODEC is suspended because it relies on a
volatile register.

To resolve this issue mark CLASS_D_CONTROL_1 as non-volatile and
manually keep the register cache in sync by updating both bits when
changing the mute status.

Reported-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
sound/soc/codecs/wm8962.c
sound/soc/codecs/wm8962.h