All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: rt5677: Reconfigure PLL1 after resume
@ 2015-12-15 21:51 Ben Zhang
  2015-12-16 19:21 ` Mark Brown
  2015-12-16 19:24 ` Applied "ASoC: rt5677: Reconfigure PLL1 after resume" to the asoc tree Mark Brown
  0 siblings, 2 replies; 5+ messages in thread
From: Ben Zhang @ 2015-12-15 21:51 UTC (permalink / raw)
  To: Mark Brown
  Cc: Oder Chiou, alsa-devel, Liam Girdwood, John Lin, Ben Zhang,
	Anatol Pomozov, Bard Liao, Dylan Reid

Sometimes PLL1 stops working if the codec loses power
during suspend (when pow-ldo2 or reset gpio is used).
MX-7Bh(RT5677_PLL1_CTRL2) is cleared and won't be restored
by regcache since it's volatile. MX-7Bh has one status bit
and M code for PLL1. rt5677_set_dai_pll doesn't reconfigure
PLL1 after resume because it thinks the PLL params are not
changed.

This patch clears the cached PLL params at resume so that
rt5677_set_dai_pll can reconfigure the PLL after resume.

Signed-off-by: Ben Zhang <benzh@chromium.org>
---
 sound/soc/codecs/rt5677.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sound/soc/codecs/rt5677.c b/sound/soc/codecs/rt5677.c
index f73fd12..c404f51 100644
--- a/sound/soc/codecs/rt5677.c
+++ b/sound/soc/codecs/rt5677.c
@@ -4792,6 +4792,9 @@ static int rt5677_resume(struct snd_soc_codec *codec)
 	struct rt5677_priv *rt5677 = snd_soc_codec_get_drvdata(codec);
 
 	if (!rt5677->dsp_vad_en) {
+		rt5677->pll_src = 0;
+		rt5677->pll_in = 0;
+		rt5677->pll_out = 0;
 		gpiod_set_value_cansleep(rt5677->pow_ldo2, 1);
 		gpiod_set_value_cansleep(rt5677->reset_pin, 0);
 		if (rt5677->pow_ldo2 || rt5677->reset_pin)
-- 
2.6.0.rc2.230.g3dd15c0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-12-17 12:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-15 21:51 [PATCH] ASoC: rt5677: Reconfigure PLL1 after resume Ben Zhang
2015-12-16 19:21 ` Mark Brown
2015-12-17  5:21   ` Bard Liao
2015-12-17 12:12     ` Mark Brown
2015-12-16 19:24 ` Applied "ASoC: rt5677: Reconfigure PLL1 after resume" to the asoc tree Mark Brown

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.