]> git.itanic.dy.fi Git - linux-stable/commit
ASoC: fsl_sai: Fix channel swap issue on i.MX8MP
authorShengjiu Wang <shengjiu.wang@nxp.com>
Tue, 19 Dec 2023 02:30:57 +0000 (10:30 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 1 Jan 2024 12:38:58 +0000 (12:38 +0000)
commit5c11f637999cb95083260e3f84b63db79c03a9cb
treef4ea8723236477d605928a952bb159e298ffedb7
parent264d8c9b7f7faa2ded84c78f766aa6d61797523f
ASoC: fsl_sai: Fix channel swap issue on i.MX8MP

[ Upstream commit 8f0f01647550daf9cd8752c1656dcb0136d79ce1 ]

When flag mclk_with_tere and mclk_direction_output enabled,
The SAI transmitter or receiver will be enabled in very early
stage, that if FSL_SAI_xMR is set by previous case,
for example previous case is one channel, current case is
two channels, then current case started with wrong xMR in
the beginning, then channel swap happen.

The patch is to clear xMR in hw_free() to avoid such
channel swap issue.

Fixes: 3e4a82612998 ("ASoC: fsl_sai: MCLK bind with TX/RX enable bit")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Link: https://msgid.link/r/1702953057-4499-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/fsl/fsl_sai.c