]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ASoC: fsl_sai: Force a software reset when starting in consumer mode
authorArun Raghavan <arun@asymptotic.io>
Thu, 26 Jun 2025 13:08:25 +0000 (09:08 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 24 Jul 2025 06:53:21 +0000 (08:53 +0200)
commitb9e50a5169b086dd5915ae117c8a53cd75403574
treea615523de0cca4a0ed2993ab90629346732a2963
parent8f2852c1d7aab936a60a4c9257dcf7ab9ad46336
ASoC: fsl_sai: Force a software reset when starting in consumer mode

commit dc78f7e59169d3f0e6c3c95d23dc8e55e95741e2 upstream.

On an imx8mm platform with an external clock provider, when running the
receiver (arecord) and triggering an xrun with xrun_injection, we see a
channel swap/offset. This happens sometimes when running only the
receiver, but occurs reliably if a transmitter (aplay) is also
concurrently running.

It seems that the SAI loses track of frame sync during the trigger stop
-> trigger start cycle that occurs during an xrun. Doing just a FIFO
reset in this case does not suffice, and only a software reset seems to
get it back on track.

This looks like the same h/w bug that is already handled for the
producer case, so we now do the reset unconditionally on config disable.

Signed-off-by: Arun Raghavan <arun@asymptotic.io>
Reported-by: Pieterjan Camerlynck <p.camerlynck@televic.com>
Fixes: 3e3f8bd56955 ("ASoC: fsl_sai: fix no frame clk in master mode")
Cc: stable@vger.kernel.org
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Link: https://patch.msgid.link/20250626130858.163825-1-arun@arunraghavan.net
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/soc/fsl/fsl_sai.c