From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Misael Lopez Cruz <misael.lopez@ti.com>,
Liam Girdwood <lrg@ti.com>,
alsa-devel@alsa-project.org
Subject: Re: [PATCH 2/5] ASoC: twl6040: Prevent extra power transitions during resume
Date: Fri, 11 Jan 2013 14:40:20 +0100 [thread overview]
Message-ID: <50F01644.30703@ti.com> (raw)
In-Reply-To: <20130111115207.GW20956@opensource.wolfsonmicro.com>
On 01/11/2013 12:52 PM, Mark Brown wrote:
> On Fri, Jan 11, 2013 at 11:32:32AM +0100, Peter Ujfalusi wrote:
>
>> - twl6040_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
>> - twl6040_set_bias_level(codec, codec->dapm.suspend_bias_level);
>> + if (codec->dapm.bias_level != codec->dapm.suspend_bias_level) {
>> + twl6040_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
>> + twl6040_set_bias_level(codec, codec->dapm.suspend_bias_level);
>> + }
>
> The device should always be in either _STANDBY or _OFF (depending on if
> it supports idle_bias_off) before it tries to suspend so
> suspend_bias_level ought to be redundant. We should really get round to
> killing it...
Yes, that's true. At the moment I can just send the codec to _STANDBY in
resume since I don't have idle_bias_off support ready (due to external
dependencies, but I'm working on it). But when we have idle_bias_off support
we want to avoid sending the codec to _STANDBY here just that ASoC core will
put us back to _OFF later on. On/Off is a bit expensive on twl6040.
Since the core saves the previous bias_level in before suspend I can just do
this here:
twl6040_set_bias_level(codec, codec->dapm.suspend_bias_level);
If we were in _OFF before it is going to do nothing, but if we were in
_STANDBY it brings the codec back.
--
Péter
next prev parent reply other threads:[~2013-01-11 13:40 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-11 10:32 [PATCH 0/5] ASoC: twl6040: Updates for 3.9 Peter Ujfalusi
2013-01-11 10:32 ` [PATCH 1/5] ASoC: twl6040: Convert PLUGINT to no-suspend irq Peter Ujfalusi
2013-01-11 10:32 ` [PATCH 2/5] ASoC: twl6040: Prevent extra power transitions during resume Peter Ujfalusi
2013-01-11 11:52 ` Mark Brown
2013-01-11 13:40 ` Peter Ujfalusi [this message]
2013-01-11 13:46 ` Mark Brown
2013-01-11 13:55 ` Peter Ujfalusi
2013-01-11 14:24 ` Mark Brown
2013-01-11 14:44 ` Peter Ujfalusi
2013-01-11 15:02 ` Mark Brown
2013-01-11 10:32 ` [PATCH 3/5] ASoC: twl6040: Convert to use devm_* when possible Peter Ujfalusi
2013-01-11 10:32 ` [PATCH 4/5] ASoC: twl6040: Switch to use system workqueue for jack reporting Peter Ujfalusi
2013-01-11 10:32 ` [PATCH 5/5] ASoC: twl6040: Remove leftover code from hs/hf ramp implementation Peter Ujfalusi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50F01644.30703@ti.com \
--to=peter.ujfalusi@ti.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=lrg@ti.com \
--cc=misael.lopez@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.