From: zengzm.kernel@gmail.com
To: alsa-devel@alsa-project.org
Cc: festevam@gmail.com, broonie@opensource.wolfsonmicro.com,
w.sang@pengutronix.de, julia.lawall@lip6.fr,
zengzm.kernel@gmail.com, shawn.guo@linaro.org,
B29396@freescale.com, lrg@ti.com
Subject: [PATCH 1/2] ASoC: sgtl5000: Fix wrong register name in restore
Date: Mon, 16 Jan 2012 15:15:52 +0800 [thread overview]
Message-ID: <1326698152-25747-1-git-send-email-zengzm.kernel@gmail.com> (raw)
From: Zeng Zhaoming <zengzm.kernel@gmail.com>
Correct SGTL5000_CHIP_CLK_CTRL to SGTL5000_CHIP_REF_CTRL in
sgtl5000_restore_regs(), and add comment to explain the
restore order.
Signed-off-by: Zeng Zhaoming <zengzm.kernel@gmail.com>
---
sound/soc/codecs/sgtl5000.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
index fc9b127..71df1fe 100644
--- a/sound/soc/codecs/sgtl5000.c
+++ b/sound/soc/codecs/sgtl5000.c
@@ -987,12 +987,12 @@ static int sgtl5000_restore_regs(struct snd_soc_codec *codec)
/* restore regular registers */
for (reg = 0; reg <= SGTL5000_CHIP_SHORT_CTRL; reg += 2) {
- /* this regs depends on the others */
+ /* These regs should restore in particular order */
if (reg == SGTL5000_CHIP_ANA_POWER ||
reg == SGTL5000_CHIP_CLK_CTRL ||
reg == SGTL5000_CHIP_LINREG_CTRL ||
reg == SGTL5000_CHIP_LINE_OUT_CTRL ||
- reg == SGTL5000_CHIP_CLK_CTRL)
+ reg == SGTL5000_CHIP_REF_CTRL)
continue;
snd_soc_write(codec, reg, cache[reg]);
@@ -1005,6 +1005,13 @@ static int sgtl5000_restore_regs(struct snd_soc_codec *codec)
/*
* restore power and other regs according
* to set_power() and set_clock()
+ * the order of restore is:
+ * 1. SGTL5000_CHIP_CLK_CTRL MCLK_FREQ bits (1:0) should be restore after
+ * SGTL5000_CHIP_ANA_POWER PLL bits set
+ * 2. SGTL5000_CHIP_LINREG_CTRL should be set before
+ * SGTL5000_CHIP_ANA_POWER LINREG_D restored
+ * 3. SGTL5000_CHIP_REF_CTRL controls Analog Ground Voltage,
+ * I prefer to resotre it after SGTL5000_CHIP_ANA_POWER restored
*/
snd_soc_write(codec, SGTL5000_CHIP_LINREG_CTRL,
cache[SGTL5000_CHIP_LINREG_CTRL]);
--
1.7.6.1.385.gb7fcd0
next reply other threads:[~2012-01-16 7:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-16 7:15 zengzm.kernel [this message]
2012-01-16 8:35 ` [PATCH 1/2] ASoC: sgtl5000: Fix wrong register name in restore Dong Aisheng-B29396
2012-01-16 8:55 ` Zeng Zhaoming
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=1326698152-25747-1-git-send-email-zengzm.kernel@gmail.com \
--to=zengzm.kernel@gmail.com \
--cc=B29396@freescale.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=festevam@gmail.com \
--cc=julia.lawall@lip6.fr \
--cc=lrg@ti.com \
--cc=shawn.guo@linaro.org \
--cc=w.sang@pengutronix.de \
/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 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).