* [alsa-devel][PATCH] ASoC: wm8960: LRCM operation should after software reset
@ 2014-11-26 11:02 Zidan Wang
2014-11-26 11:33 ` Lars-Peter Clausen
0 siblings, 1 reply; 3+ messages in thread
From: Zidan Wang @ 2014-11-26 11:02 UTC (permalink / raw)
To: broonie
Cc: lgirdwood, perex, tiwai, lars, ckeepax, Li.Xiubo, patches,
alsa-devel, linux-kernel, Zidan Wang
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 | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c
index bc8793cd..21db90c 100644
--- a/sound/soc/codecs/wm8960.c
+++ b/sound/soc/codecs/wm8960.c
@@ -960,6 +960,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;
+ }
+ }
+
/* Latch the update bits */
snd_soc_update_bits(codec, WM8960_LINVOL, 0x100, 0x100);
snd_soc_update_bits(codec, WM8960_RINVOL, 0x100, 0x100);
@@ -1030,15 +1038,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);
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [alsa-devel][PATCH] ASoC: wm8960: LRCM operation should after software reset
2014-11-26 11:02 [alsa-devel][PATCH] ASoC: wm8960: LRCM operation should after software reset Zidan Wang
@ 2014-11-26 11:33 ` Lars-Peter Clausen
2014-11-26 16:36 ` Mark Brown
0 siblings, 1 reply; 3+ messages in thread
From: Lars-Peter Clausen @ 2014-11-26 11:33 UTC (permalink / raw)
To: Zidan Wang, broonie
Cc: lgirdwood, perex, tiwai, ckeepax, Li.Xiubo, patches, alsa-devel,
linux-kernel
On 11/26/2014 12:02 PM, Zidan Wang wrote:
> 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.
It's probably a better idea to move the reset (together with the other
register updates) to the I2C driver probe.
- Lars
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [alsa-devel][PATCH] ASoC: wm8960: LRCM operation should after software reset
2014-11-26 11:33 ` Lars-Peter Clausen
@ 2014-11-26 16:36 ` Mark Brown
0 siblings, 0 replies; 3+ messages in thread
From: Mark Brown @ 2014-11-26 16:36 UTC (permalink / raw)
To: Lars-Peter Clausen
Cc: Zidan Wang, lgirdwood, perex, tiwai, ckeepax, Li.Xiubo, patches,
alsa-devel, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 450 bytes --]
On Wed, Nov 26, 2014 at 12:33:10PM +0100, Lars-Peter Clausen wrote:
> On 11/26/2014 12:02 PM, Zidan Wang wrote:
> >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.
> It's probably a better idea to move the reset (together with the other
> register updates) to the I2C driver probe.
Yes, this is not a good fix.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-11-26 16:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-26 11:02 [alsa-devel][PATCH] ASoC: wm8960: LRCM operation should after software reset Zidan Wang
2014-11-26 11:33 ` Lars-Peter Clausen
2014-11-26 16:36 ` 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).