intel: ssp: drain RX fifo when starting

If DMA transaction is ongoing when RX is enabled, this can lead
to stuck communication between DMA and SSP (DMA service request
not seen by the DMA).

To avoid this, flush the RX fifo before enabling SSP RX.

Link: https://github.com/thesofproject/sof/issues/7548
Suggested-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
This commit is contained in:
Kai Vehmanen 2023-05-05 15:37:22 +03:00 committed by Kai Vehmanen
parent e94071fb82
commit 4a4d8d2619
1 changed files with 4 additions and 0 deletions

View File

@ -975,6 +975,10 @@ static void ssp_early_start(struct dai *dai, int direction)
key = k_spin_lock(&dai->lock);
/* RX fifo must be cleared before start */
if (direction == DAI_DIR_CAPTURE)
ssp_empty_rx_fifo(dai);
/* request mclk/bclk */
ssp_pre_start(dai);