aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2010-01-02 13:14:07 +0000
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-01-04 21:50:23 +0000
commitd11c5ab186310389b8e573be00279bab0a565d30 (patch)
tree597d6dbf03887e131b839bd4bb8556eb5b95e132
parent5baf831541c61546c00e8d6f294cb10ed5d25e7d (diff)
downloadmrst-s0i3-test-d11c5ab186310389b8e573be00279bab0a565d30.tar.gz
mrst-s0i3-test-d11c5ab186310389b8e573be00279bab0a565d30.tar.xz
mrst-s0i3-test-d11c5ab186310389b8e573be00279bab0a565d30.zip
ASoC: Only restore non-default registers for WM8731
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
-rw-r--r--sound/soc/codecs/wm8731.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c
index 3a497810f93..5a2619dbf28 100644
--- a/sound/soc/codecs/wm8731.c
+++ b/sound/soc/codecs/wm8731.c
@@ -456,6 +456,9 @@ static int wm8731_resume(struct platform_device *pdev)
/* Sync reg_cache with the hardware */
for (i = 0; i < ARRAY_SIZE(wm8731_reg); i++) {
+ if (cache[i] == wm8731_reg[i])
+ continue;
+
data[0] = (i << 1) | ((cache[i] >> 8) & 0x0001);
data[1] = cache[i] & 0x00ff;
codec->hw_write(codec->control_data, data, 2);