Skip to content

Commit e875c1e

Browse files
Eric Bénardbroonie
authored andcommitted
ASoC: tlv312aic23: unbreak resume
* 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 <[email protected]> Signed-off-by: Mark Brown <[email protected]> Cc: [email protected]
1 parent a3a53fe commit e875c1e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sound/soc/codecs/tlv320aic23.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ static int tlv320aic23_set_dai_sysclk(struct snd_soc_dai *codec_dai,
472472
static int tlv320aic23_set_bias_level(struct snd_soc_codec *codec,
473473
enum snd_soc_bias_level level)
474474
{
475-
u16 reg = snd_soc_read(codec, TLV320AIC23_PWR) & 0xff7f;
475+
u16 reg = snd_soc_read(codec, TLV320AIC23_PWR) & 0x17f;
476476

477477
switch (level) {
478478
case SND_SOC_BIAS_ON:
@@ -491,7 +491,7 @@ static int tlv320aic23_set_bias_level(struct snd_soc_codec *codec,
491491
case SND_SOC_BIAS_OFF:
492492
/* everything off, dac mute, inactive */
493493
snd_soc_write(codec, TLV320AIC23_ACTIVE, 0x0);
494-
snd_soc_write(codec, TLV320AIC23_PWR, 0xffff);
494+
snd_soc_write(codec, TLV320AIC23_PWR, 0x1ff);
495495
break;
496496
}
497497
codec->dapm.bias_level = level;

0 commit comments

Comments
 (0)