Skip to content
Commit 1b3d7510 authored by Shengjiu Wang's avatar Shengjiu Wang Committed by Greg Kroah-Hartman
Browse files

ASoC: fsl_sai: Refine enable/disable TE/RE sequence in trigger()

[ Upstream commit 94741eba

 ]

Current code enables TCSR.TE and RCSR.RE together, and disable
TCSR.TE and RCSR.RE together in trigger(), which only supports
one operation mode:
1. Rx synchronous with Tx: TE is last enabled and first disabled

Other operation mode need to be considered also:
2. Tx synchronous with Rx: RE is last enabled and first disabled.
3. Asynchronous mode: Tx and Rx are independent.

So the enable TCSR.TE and RCSR.RE sequence and the disable
sequence need to be refined accordingly for #2 and #3.

There is slightly against what RM recommennds with this change.
For example in Rx synchronous with Tx mode, case "aplay 1.wav;
arecord 2.wav" enable TE before RE. But it should be safe to
do so, judging by years of testing results.

Signed-off-by: default avatarShengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: default avatarNicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/20200805063413.4610-2-shengjiu.wang@nxp.com
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Stable-dep-of: 269f399d

 ("ASoC: fsl_sai: Disable bit clock with transmitter")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent f9afb326
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment