ASOC: dwc: Fix 16-bit audio handling
authorPhil Elwell <phil@raspberrypi.com>
Fri, 21 Jul 2023 11:07:16 +0000 (12:07 +0100)
committerDom Cobley <popcornmix@gmail.com>
Mon, 19 Feb 2024 11:34:49 +0000 (11:34 +0000)
commit0154c507ac7b0e50b5659da95a566ebbdb1940de
tree9e307ee5af117c235816338b81a237f7e19771b0
parent3c4de6a91eb6014b37b88ba85cb8b7f476cbdbdd
ASOC: dwc: Fix 16-bit audio handling

IMO the Synopsys datasheet could be clearer in this area, but it seems
that the DMA data ports (DMATX and DMARX) expect left and right samples
in alternate writes; if a stereo pair is pushed in a single 32-bit
write, the upper half is ignored, leading to double speed audio with a
confused stereo image. Make sure the necessary changes happen by
updating the DMA configuration data in the hw_params method.

The set_bclk_ratio change was made at a time when it looked like it
could be causing an error, but I think the division of responsibilities
is clearer this way (and the kernel log clearer without the info-level
message).

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
sound/soc/dwc/dwc-i2s.c