From 98d54eb3423b961039d7db01889f5c57d9128d76 Mon Sep 17 00:00:00 2001 From: Sumit Bhattacharya Date: Mon, 21 Feb 2011 13:08:43 +0530 Subject: wm8903: Fix wm8903_resume() implementation In wm8903_resume() codec should be powered up after restoring cached registers. Otherwise sequencer registers are getting overwritten after powering up of codec which was shutting down the codec during resume. Bug 792879 Bug 789967 Change-Id: Ic342a490f988ea1aa9597e6cd68e7d0a1000210a Reviewed-on: http://git-master/r/20270 Tested-by: Sumit Bhattacharya Reviewed-by: Vijay Mali Reviewed-by: Ravindra Lokhande Reviewed-by: Bharat Nihalani Reviewed-by: Scott Peterson --- sound/soc/codecs/wm8903.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sound') diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c index dbe9b52456ef..88d342ff4101 100644 --- a/sound/soc/codecs/wm8903.c +++ b/sound/soc/codecs/wm8903.c @@ -1628,9 +1628,6 @@ static int wm8903_resume(struct platform_device *pdev) u16 *tmp_cache = kmemdup(reg_cache, sizeof(wm8903_reg_defaults), GFP_KERNEL); - /* Bring the codec back up to standby first to minimise pop/clicks */ - wm8903_set_bias_level(codec, SND_SOC_BIAS_STANDBY); - /* Sync back everything else */ if (tmp_cache) { for (i = 2; i < ARRAY_SIZE(wm8903_reg_defaults); i++) @@ -1641,6 +1638,9 @@ static int wm8903_resume(struct platform_device *pdev) dev_err(&i2c->dev, "Failed to allocate temporary cache\n"); } + /* Bring the codec back up to standby first to minimise pop/clicks */ + wm8903_set_bias_level(codec, SND_SOC_BIAS_STANDBY); + return 0; } -- cgit v1.2.3