]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
ASoC: fsl_sai: Refine enable/disable TE/RE sequence in trigger()
authorShengjiu Wang <shengjiu.wang@nxp.com>
Wed, 5 Aug 2020 06:34:11 +0000 (14:34 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 17 Aug 2020 13:56:49 +0000 (14:56 +0100)
commit94741eba63c23b0f1527b0ae0125e6b553bde10e
tree70e5e3aed0944f29e3bfec9747602198a4876635
parent549ade5721fe197b78165fc3476af1fe0c65f089
ASoC: fsl_sai: Refine enable/disable TE/RE sequence in trigger()

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: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/20200805063413.4610-2-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/fsl/fsl_sai.c