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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 7 Jun 2014 17:28:23 +0000 (10:28 -0700)
commit5e1367f31dab0cc508e795f66d34267eab1cff09
treeea0386a4a1ae05a830266c0d0c30b36543479c89
parentc33bed1fff471f165bd53943ba43ee0c506cac2b
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/soc/codecs/wm8962.c
sound/soc/codecs/wm8962.h