ASoC: WM8903: fix the resume sequence
Joseph Lo [Mon, 16 Apr 2012 06:02:57 +0000 (14:02 +0800)]
The bias control must be done after the default register value
been restored.

Bug 964400

Change-Id: Iefbd96506573d5ea0e1b3123bb34c38e34e75068
Signed-off-by: Joseph Lo <josephl@nvidia.com>
Reviewed-on: http://git-master/r/96658
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Scott Peterson <speterson@nvidia.com>

sound/soc/codecs/wm8903.c

index 0218d6c..df4d0ee 100644 (file)
@@ -1778,9 +1778,6 @@ static int wm8903_resume(struct snd_soc_codec *codec)
        if (wm8903->irq)
                enable_irq(wm8903->irq);
 
-       /* 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++)
@@ -1791,6 +1788,9 @@ static int wm8903_resume(struct snd_soc_codec *codec)
                dev_err(codec->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;
 }