* [PATCH 2/2] ASoC: wm8960: Fix shared LRCLK support
@ 2013-08-14 1:15 Ma Haijun
2013-08-14 18:22 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Ma Haijun @ 2013-08-14 1:15 UTC (permalink / raw)
Cc: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai, patches,
alsa-devel, linux-kernel
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 2/2] ASoC: wm8960: Fix shared LRCLK support
2013-08-14 1:15 [PATCH 2/2] ASoC: wm8960: Fix shared LRCLK support Ma Haijun
@ 2013-08-14 18:22 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2013-08-14 18:22 UTC (permalink / raw)
To: Ma Haijun
Cc: Liam Girdwood, Jaroslav Kysela, Takashi Iwai, patches, alsa-devel,
linux-kernel
[-- Attachment #1: Type: text/plain, Size: 394 bytes --]
On Wed, Aug 14, 2013 at 09:15:39AM +0800, Ma Haijun wrote:
> Shared LRCLK initialization does not survive wm8960_reset,
> so place it after the reset.
This is a bit odd - why is it a good idea to be doing a reset and
shouldn't there be a register cache sync to restore the setting anyway?
I'm not sure this is the right fix for the prolem, it could just be
fixing one aspect of a wider issue.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-08-14 18:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-14 1:15 [PATCH 2/2] ASoC: wm8960: Fix shared LRCLK support Ma Haijun
2013-08-14 18:22 ` Mark Brown
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).