alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: tlv312aic23: unbreak resume
@ 2012-04-29 15:37 Eric Bénard
  2012-04-30  9:11 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Bénard @ 2012-04-29 15:37 UTC (permalink / raw)
  To: alsa-devel; +Cc: axel.lin, broonie, lrg

* commit f9dfbf9 "ASoC: tlv320aic23: convert to soc-cache" leads to
a bug preventing resumeof the codec as regmap expects a 9 bits data
register but 0xFFFF is passed in tlv320aic23_set_bias_level and this
values gets cached preventing any write to the TLV320AIC23_PWR
register as the final value produced by regmap is (register << 9) | value

* this patch solves the problem by only working on the 9 bits the
register contains.

Signed-off-by: Eric Bénard <eric@eukrea.com>
---
 sound/soc/codecs/tlv320aic23.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/tlv320aic23.c b/sound/soc/codecs/tlv320aic23.c
index dfa41a9..e7de911 100644
--- a/sound/soc/codecs/tlv320aic23.c
+++ b/sound/soc/codecs/tlv320aic23.c
@@ -472,7 +472,7 @@ static int tlv320aic23_set_dai_sysclk(struct snd_soc_dai *codec_dai,
 static int tlv320aic23_set_bias_level(struct snd_soc_codec *codec,
 				      enum snd_soc_bias_level level)
 {
-	u16 reg = snd_soc_read(codec, TLV320AIC23_PWR) & 0xff7f;
+	u16 reg = snd_soc_read(codec, TLV320AIC23_PWR) & 0x17f;
 
 	switch (level) {
 	case SND_SOC_BIAS_ON:
@@ -491,7 +491,7 @@ static int tlv320aic23_set_bias_level(struct snd_soc_codec *codec,
 	case SND_SOC_BIAS_OFF:
 		/* everything off, dac mute, inactive */
 		snd_soc_write(codec, TLV320AIC23_ACTIVE, 0x0);
-		snd_soc_write(codec, TLV320AIC23_PWR, 0xffff);
+		snd_soc_write(codec, TLV320AIC23_PWR, 0x1ff);
 		break;
 	}
 	codec->dapm.bias_level = level;
-- 
1.7.7.6

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ASoC: tlv312aic23: unbreak resume
  2012-04-29 15:37 [PATCH] ASoC: tlv312aic23: unbreak resume Eric Bénard
@ 2012-04-30  9:11 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2012-04-30  9:11 UTC (permalink / raw)
  To: Eric Bénard; +Cc: alsa-devel, axel.lin, lrg


[-- Attachment #1.1: Type: text/plain, Size: 439 bytes --]

On Sun, Apr 29, 2012 at 05:37:57PM +0200, Eric Bénard wrote:
> * commit f9dfbf9 "ASoC: tlv320aic23: convert to soc-cache" leads to
> a bug preventing resumeof the codec as regmap expects a 9 bits data
> register but 0xFFFF is passed in tlv320aic23_set_bias_level and this
> values gets cached preventing any write to the TLV320AIC23_PWR
> register as the final value produced by regmap is (register << 9) | value

Applied, thanks.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-04-30  9:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-29 15:37 [PATCH] ASoC: tlv312aic23: unbreak resume Eric Bénard
2012-04-30  9:11 ` 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).