From: Zidan Wang <b50113@freescale.com>
To: broonie@kernel.org
Cc: lgirdwood@gmail.com, perex@perex.cz, tiwai@suse.de,
lars@metafoo.de, ckeepax@opensource.wolfsonmicro.com,
Li.Xiubo@freescale.com, patches@opensource.wolfsonmicro.com,
alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
Zidan Wang <b50113@freescale.com>
Subject: [alsa-devel][PATCH v2 2/2] ASoC: wm8960: LRCM operation should after software reset
Date: Thu, 20 Nov 2014 16:41:18 +0800 [thread overview]
Message-ID: <1416472878-12108-2-git-send-email-b50113@freescale.com> (raw)
In-Reply-To: <1416472878-12108-1-git-send-email-b50113@freescale.com>
When shared_lrclk is set, LRCM will be enabled. But the following software
reset in wm8960_probe will reset it to the default state. So LRCM operation
should after software reset.
Signed-off-by: Zidan Wang <b50113@freescale.com>
---
sound/soc/codecs/wm8960.c | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c
index e5d89a2..a7f60b7 100644
--- a/sound/soc/codecs/wm8960.c
+++ b/sound/soc/codecs/wm8960.c
@@ -976,6 +976,14 @@ static int wm8960_probe(struct snd_soc_codec *codec)
return ret;
}
+ if (pdata->shared_lrclk) {
+ ret = snd_soc_update_bits(codec, WM8960_ADDCTL2, 0x4, 0x4);
+ if (ret < 0) {
+ dev_err(codec->dev, "Failed to enable LRCM: %d\n", ret);
+ return ret;
+ }
+ }
+
wm8960->set_bias_level(codec, SND_SOC_BIAS_STANDBY);
/* Latch the update bits */
@@ -1059,16 +1067,6 @@ static int wm8960_i2c_probe(struct i2c_client *i2c,
else if (i2c->dev.of_node)
wm8960_set_pdata_from_of(i2c, &wm8960->pdata);
- if (pdata && pdata->shared_lrclk) {
- ret = regmap_update_bits(wm8960->regmap, WM8960_ADDCTL2,
- 0x4, 0x4);
- if (ret != 0) {
- dev_err(&i2c->dev, "Failed to enable LRCM: %d\n",
- ret);
- return ret;
- }
- }
-
i2c_set_clientdata(i2c, wm8960);
ret = snd_soc_register_codec(&i2c->dev,
--
1.9.1
next prev parent reply other threads:[~2014-11-20 8:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-20 8:41 [PATCH v2 1/2] ASoC: wm8960: Add device tree support Zidan Wang
2014-11-20 8:41 ` Zidan Wang [this message]
2014-11-20 9:12 ` [alsa-devel][PATCH v2 2/2] ASoC: wm8960: LRCM operation should after software reset Charles Keepax
2014-11-20 8:56 ` [alsa-devel][PATCH v2 1/2] ASoC: wm8960: Add device tree support Lars-Peter Clausen
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=1416472878-12108-2-git-send-email-b50113@freescale.com \
--to=b50113@freescale.com \
--cc=Li.Xiubo@freescale.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=ckeepax@opensource.wolfsonmicro.com \
--cc=lars@metafoo.de \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@opensource.wolfsonmicro.com \
--cc=perex@perex.cz \
--cc=tiwai@suse.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