Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: tlv320adcx140: fix word length

The word length is the physical width of the channel slots. So the
hw_params would misconfigure when format width and physical width
doesn't match. Like S24_LE which has data width of 24 bits but physical
width of 32 bits. So if using asymmetric formats you will get a lot of
noise.

Fixes: 689c7655b50c5 ("ASoC: tlv320adcx140: Add the tlv320adcx140 codec driver family")
Signed-off-by: Emil Svendsen <emas@bang-olufsen.dk>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Link: https://patch.msgid.link/20260113-sound-soc-codecs-tvl320adcx140-v4-4-8f7ecec525c8@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Emil Svendsen and committed by
Mark Brown
46378ab9 d89aad92

+2 -2
+2 -2
sound/soc/codecs/tlv320adcx140.c
··· 725 725 struct adcx140_priv *adcx140 = snd_soc_component_get_drvdata(component); 726 726 u8 data = 0; 727 727 728 - switch (params_width(params)) { 728 + switch (params_physical_width(params)) { 729 729 case 16: 730 730 data = ADCX140_16_BIT_WORD; 731 731 break; ··· 740 740 break; 741 741 default: 742 742 dev_err(component->dev, "%s: Unsupported width %d\n", 743 - __func__, params_width(params)); 743 + __func__, params_physical_width(params)); 744 744 return -EINVAL; 745 745 } 746 746