* [PATCH 1/2] ASoC: rt5640: Power down LDO while suspended
@ 2013-10-16 16:33 Mark Brown
2013-10-16 16:33 ` [PATCH 2/2] ASoC: rt5640: Don't go to standby on resume Mark Brown
2013-10-16 17:47 ` [PATCH 1/2] ASoC: rt5640: Power down LDO while suspended Stephen Warren
0 siblings, 2 replies; 3+ messages in thread
From: Mark Brown @ 2013-10-16 16:33 UTC (permalink / raw)
To: Liam Girdwood, Bard Liao, Stephen Warren
Cc: alsa-devel, linaro-kernel, Mark Brown
From: Mark Brown <broonie@linaro.org>
If we have control over the LDO then disable it during suspend; the device
is already being put into reset so will be non-functional over suspend
anyway and this will save a small amount of power.
Signed-off-by: Mark Brown <broonie@linaro.org>
---
sound/soc/codecs/rt5640.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/sound/soc/codecs/rt5640.c b/sound/soc/codecs/rt5640.c
index 641eeeb..b0cde92 100644
--- a/sound/soc/codecs/rt5640.c
+++ b/sound/soc/codecs/rt5640.c
@@ -1979,12 +1979,20 @@ static int rt5640_suspend(struct snd_soc_codec *codec)
rt5640_reset(codec);
regcache_cache_only(rt5640->regmap, true);
regcache_mark_dirty(rt5640->regmap);
+ if (gpio_is_valid(rt5640->pdata.ldo1_en))
+ gpio_set_value_cansleep(rt5640->pdata.ldo1_en, 0);
return 0;
}
static int rt5640_resume(struct snd_soc_codec *codec)
{
+ struct rt5640_priv *rt5640 = snd_soc_codec_get_drvdata(codec);
+
+ if (gpio_is_valid(rt5640->pdata.ldo1_en)) {
+ gpio_set_value_cansleep(rt5640->pdata.ldo1_en, 1);
+ msleep(400);
+ }
rt5640_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
return 0;
--
1.8.4.rc3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] ASoC: rt5640: Don't go to standby on resume
2013-10-16 16:33 [PATCH 1/2] ASoC: rt5640: Power down LDO while suspended Mark Brown
@ 2013-10-16 16:33 ` Mark Brown
2013-10-16 17:47 ` [PATCH 1/2] ASoC: rt5640: Power down LDO while suspended Stephen Warren
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2013-10-16 16:33 UTC (permalink / raw)
To: Liam Girdwood, Bard Liao, Stephen Warren
Cc: alsa-devel, linaro-kernel, Mark Brown
From: Mark Brown <broonie@linaro.org>
There is no need for the CODEC to go to standby on resume since the core will
power it up as needed and in any case it is an idle_bias_off CODEC so would
normally sit with bias off while idle.
Signed-off-by: Mark Brown <broonie@linaro.org>
---
sound/soc/codecs/rt5640.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/sound/soc/codecs/rt5640.c b/sound/soc/codecs/rt5640.c
index b0cde92..4d041d3 100644
--- a/sound/soc/codecs/rt5640.c
+++ b/sound/soc/codecs/rt5640.c
@@ -1993,7 +1993,6 @@ static int rt5640_resume(struct snd_soc_codec *codec)
gpio_set_value_cansleep(rt5640->pdata.ldo1_en, 1);
msleep(400);
}
- rt5640_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
return 0;
}
--
1.8.4.rc3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] ASoC: rt5640: Power down LDO while suspended
2013-10-16 16:33 [PATCH 1/2] ASoC: rt5640: Power down LDO while suspended Mark Brown
2013-10-16 16:33 ` [PATCH 2/2] ASoC: rt5640: Don't go to standby on resume Mark Brown
@ 2013-10-16 17:47 ` Stephen Warren
1 sibling, 0 replies; 3+ messages in thread
From: Stephen Warren @ 2013-10-16 17:47 UTC (permalink / raw)
To: Mark Brown, Liam Girdwood, Bard Liao, Stephen Warren
Cc: alsa-devel, linaro-kernel, Mark Brown
On 10/16/2013 10:33 AM, Mark Brown wrote:
> From: Mark Brown <broonie@linaro.org>
>
> If we have control over the LDO then disable it during suspend; the device
> is already being put into reset so will be non-functional over suspend
> anyway and this will save a small amount of power.
The series,
Tested-by: Stephen Warren <swarren@nvidia.com>
On Tegra Beaver and Dalmore boards. As you may have noticed, Tegra audio
doesn't work after resume at the moment, but that's true irrespective of
these patches, and I believe is a problem without our DMA or I2S
drivers, and nothing to do with the CODEC. The CODEC certainly still
responds to I2C accesses (e.g. triggered by alsamixer) after this patch,
and wouldn't if the LDO1_EN GPIO wasn't correctly set.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-10-16 17:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-16 16:33 [PATCH 1/2] ASoC: rt5640: Power down LDO while suspended Mark Brown
2013-10-16 16:33 ` [PATCH 2/2] ASoC: rt5640: Don't go to standby on resume Mark Brown
2013-10-16 17:47 ` [PATCH 1/2] ASoC: rt5640: Power down LDO while suspended Stephen Warren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).