]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ASoC: fsl_sai: Fix spurious BCLK on resume by clearing BYP
authorChancel Liu <chancel.liu@nxp.com>
Fri, 10 Jul 2026 07:08:35 +0000 (16:08 +0900)
committerMark Brown <broonie@kernel.org>
Mon, 13 Jul 2026 12:41:11 +0000 (13:41 +0100)
commitd091132889c1378dd0944a72f86eae3e4da1e4fa
treeb097afadc551723e09aec0588034abd6df810553
parent3238c634725afbb2a137fdda762208510828f71d
ASoC: fsl_sai: Fix spurious BCLK on resume by clearing BYP

When the BCLK divider ratio is 1:1, fsl_sai_set_bclk() enables bypass
mode by setting BYP, but never clears the bit. The BYP=1 value remains
in the regcache, and is restored by regcache_sync() on the next runtime
resume.

Since BYP=1 combined with BCD=1 immediately outputs the ungated MCLK
as BCLK without waiting for BCE/TE/RE to be enabled, the clock is
driven prematurely before the stream is fully configured, causing
noise on some codecs.

Fix this by clearing BYP and BCI in fsl_sai_hw_free() taking into
account sync mode and the opposite stream's state, so that the regcache
holds BYP=0 before runtime suspend and regcache_sync() on resume will
not restore bypass mode prematurely.

Fixes: a50b7926d015 ("ASoC: fsl_sai: implement 1:1 bclk:mclk ratio support")
Cc: stable@vger.kernel.org
Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@gmail.com>
Link: https://patch.msgid.link/20260710070835.3749817-1-chancel.liu@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/fsl/fsl_sai.c