ASoC: max98090: sync regcache on entering STANDBY
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> Cc: stable@vger.kernel.org
This commit is contained in:
parent
38dbfb59d1
commit
c42c8922c4
1 changed files with 10 additions and 10 deletions
|
@ -1769,16 +1769,6 @@ static int max98090_set_bias_level(struct snd_soc_codec *codec,
|
||||||
|
|
||||||
switch (level) {
|
switch (level) {
|
||||||
case SND_SOC_BIAS_ON:
|
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) {
|
if (max98090->jack_state == M98090_JACK_STATE_HEADSET) {
|
||||||
/*
|
/*
|
||||||
* Set to normal bias level.
|
* Set to normal bias level.
|
||||||
|
@ -1792,6 +1782,16 @@ static int max98090_set_bias_level(struct snd_soc_codec *codec,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SND_SOC_BIAS_STANDBY:
|
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:
|
case SND_SOC_BIAS_OFF:
|
||||||
/* Set internal pull-up to lowest power mode */
|
/* Set internal pull-up to lowest power mode */
|
||||||
snd_soc_update_bits(codec, M98090_REG_JACK_DETECT,
|
snd_soc_update_bits(codec, M98090_REG_JACK_DETECT,
|
||||||
|
|
Loading…
Add table
Reference in a new issue