From: Ma Haijun <mahaijuns@gmail.com>
To: unlisted-recipients:; (no To-header on input)
Cc: Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.de>,
patches@opensource.wolfsonmicro.com, alsa-devel@alsa-project.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] ASoC: wm8960: Fix shared LRCLK support
Date: Wed, 14 Aug 2013 09:15:39 +0800 [thread overview]
Message-ID: <1376442946-2803-2-git-send-email-mahaijuns@gmail.com> (raw)
Shared LRCLK initialization does not survive wm8960_reset,
so place it after the reset.
Signed-off-by: Ma Haijun <mahaijuns@gmail.com>
---
sound/soc/codecs/wm8960.c | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c
index 368d39f..b606dd3 100644
--- a/sound/soc/codecs/wm8960.c
+++ b/sound/soc/codecs/wm8960.c
@@ -990,6 +990,9 @@ static int wm8960_probe(struct snd_soc_codec *codec)
wm8960->set_bias_level(codec, SND_SOC_BIAS_STANDBY);
+ if (pdata && pdata->shared_lrclk)
+ snd_soc_update_bits(codec, WM8960_ADDCTL2, 0x4, 0x4);
+
/* Latch the update bits */
snd_soc_update_bits(codec, WM8960_LINVOL, 0x100, 0x100);
snd_soc_update_bits(codec, WM8960_RINVOL, 0x100, 0x100);
@@ -1041,7 +1044,6 @@ static const struct regmap_config wm8960_regmap = {
static int wm8960_i2c_probe(struct i2c_client *i2c,
const struct i2c_device_id *id)
{
- struct wm8960_data *pdata = dev_get_platdata(&i2c->dev);
struct wm8960_priv *wm8960;
int ret;
@@ -1054,16 +1056,6 @@ static int wm8960_i2c_probe(struct i2c_client *i2c,
if (IS_ERR(wm8960->regmap))
return PTR_ERR(wm8960->regmap);
- 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.8.1.2
next reply other threads:[~2013-08-14 4:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-14 1:15 Ma Haijun [this message]
2013-08-14 18:22 ` [PATCH 2/2] ASoC: wm8960: Fix shared LRCLK support Mark Brown
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=1376442946-2803-2-git-send-email-mahaijuns@gmail.com \
--to=mahaijuns@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).