Skip to contentSkip to conversation

ASoC: tlv320aci3x: Fix custom snd_soc_dapm_put_volsw_aic3x() function

PATCH Applied Peter Ujfalusi 2 participants 2 messages May 30, 2014 – Jun 1, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: tlv320aci3x: Fix custom snd_soc_dapm_put_volsw_aic3x() function

For some unknown reason the parameters for snd_soc_test_bits() were in wrong order:
It was:
snd_soc_test_bits(codec, val, mask, reg); /* WRONG!!! */
while it should be:
snd_soc_test_bits(codec, reg, mask, val);

---
Hi,

so the failures I was seeing was indeed caused by something one never expects:
wrong parameter order for snd_soc_test_bits() in the tlv320aic3x driver, so regmap failed time to time when we asked it to read a register out of the valid range, since the value was sent as register number :o

Regards,
Peter

 sound/soc/codecs/tlv320aic3x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/tlv320aic3x.c +1 -1
index d7349bc89ad3..e12fafbb1e09 100644
@@ -169,7 +169,7 @@ static int snd_soc_dapm_put_volsw_aic3x(struct snd_kcontrol *kcontrol,
 	mask <<= shift;
 	val <<= shift;
 
-	change = snd_soc_test_bits(codec, val, mask, reg);
+	change = snd_soc_test_bits(codec, reg, mask, val);
 	if (change) {
 		update.kcontrol = kcontrol;
 		update.reg = reg;
Signature · 1 line
1.9.3
maintainer Applied
#1 lore raw
Quoted 2 lines · Peter Ujfalusi

For some unknown reason the parameters for snd_soc_test_bits() were in wrong order:

Applied, thanks.