aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2014-05-06 04:32:15 -0400
committerMark Brown <broonie@linaro.org>2014-05-12 17:06:34 -0400
commitce85a4d726ecd286f933d4eedf01c5acb4f47a38 (patch)
tree97dc538834a6c246e0a9083d62e8e92e67ed55b1 /sound/soc
parentca5106ae3da0179dcee3ae21f3ea94f62e9fdb0c (diff)
ASoC: dapm: Fix SUSPEND -> OFF bias sequence
Currently when the DAPM context bias level is SUSPEND and the target bias level is OFF dapm_pre_sequence_async() will first transition to PREPARE and dapm_post_sequence_async() will then transition back from PREPARE to STANDBY and then to OFF. This patch makes sure that dapm_pre_sequence_async() only transitions to PREPARE when either going to ON or away from ON. This avoids the extra unnecessary transitions. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/soc-dapm.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index ef78a699bb20..6d6ceee447d5 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -1612,8 +1612,11 @@ static void dapm_pre_sequence_async(void *data, async_cookie_t cookie)
1612 "ASoC: Failed to turn on bias: %d\n", ret); 1612 "ASoC: Failed to turn on bias: %d\n", ret);
1613 } 1613 }
1614 1614
1615 /* Prepare for a STADDBY->ON or ON->STANDBY transition */ 1615 /* Prepare for a transition to ON or away from ON */
1616 if (d->bias_level != d->target_bias_level) { 1616 if ((d->target_bias_level == SND_SOC_BIAS_ON &&
1617 d->bias_level != SND_SOC_BIAS_ON) ||
1618 (d->target_bias_level != SND_SOC_BIAS_ON &&
1619 d->bias_level == SND_SOC_BIAS_ON)) {
1617 ret = snd_soc_dapm_set_bias_level(d, SND_SOC_BIAS_PREPARE); 1620 ret = snd_soc_dapm_set_bias_level(d, SND_SOC_BIAS_PREPARE);
1618 if (ret != 0) 1621 if (ret != 0)
1619 dev_err(d->dev, 1622 dev_err(d->dev,