summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorDylan Reid <dgreid@chromium.org>2014-02-12 10:24:54 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-03-06 21:30:06 -0800
commitecbda0477f80d6aba7515f8d32169503c6d490fb (patch)
treef885dcb321fde282c165e325cb4c46420bf93d9f /sound
parent5a03bc087c33d172b46469ffbe669cd071b2cf45 (diff)
downloadlinux-3.10-ecbda0477f80d6aba7515f8d32169503c6d490fb.tar.gz
linux-3.10-ecbda0477f80d6aba7515f8d32169503c6d490fb.tar.bz2
linux-3.10-ecbda0477f80d6aba7515f8d32169503c6d490fb.zip
ASoC: max98090: sync regcache on entering STANDBY
commit c42c8922c46d33ed769e99618bdfba06866a0c72 upstream. Sync regcache when entering STANDBY from OFF. ON isn't entered with OFF as the current state, so the registers were not being re-synced after suspend/resume. The 98088 and 98095 already call regcache_sync from STANDBY. Signed-off-by: Dylan Reid <dgreid@chromium.org> Signed-off-by: Mark Brown <broonie@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/max98090.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/sound/soc/codecs/max98090.c b/sound/soc/codecs/max98090.c
index 8d14a76c724..819c90fe021 100644
--- a/sound/soc/codecs/max98090.c
+++ b/sound/soc/codecs/max98090.c
@@ -1755,16 +1755,6 @@ static int max98090_set_bias_level(struct snd_soc_codec *codec,
switch (level) {
case SND_SOC_BIAS_ON:
- if (codec->dapm.bias_level == SND_SOC_BIAS_OFF) {
- ret = regcache_sync(max98090->regmap);
-
- if (ret != 0) {
- dev_err(codec->dev,
- "Failed to sync cache: %d\n", ret);
- return ret;
- }
- }
-
if (max98090->jack_state == M98090_JACK_STATE_HEADSET) {
/*
* Set to normal bias level.
@@ -1778,6 +1768,16 @@ static int max98090_set_bias_level(struct snd_soc_codec *codec,
break;
case SND_SOC_BIAS_STANDBY:
+ if (codec->dapm.bias_level == SND_SOC_BIAS_OFF) {
+ ret = regcache_sync(max98090->regmap);
+ if (ret != 0) {
+ dev_err(codec->dev,
+ "Failed to sync cache: %d\n", ret);
+ return ret;
+ }
+ }
+ break;
+
case SND_SOC_BIAS_OFF:
/* Set internal pull-up to lowest power mode */
snd_soc_update_bits(codec, M98090_REG_JACK_DETECT,