drivers: i2s: mcux_sai: fixed RX not completing end of stream

RX FIFO watermark setting causing issue where last 16 words received
were stuck in FIFO, and not requesting DMA to move to buffer.  Fixed by
setting watermark to 0.

Signed-off-by: Derek Snell <derek.snell@nxp.com>
This commit is contained in:
Derek Snell 2022-02-25 12:35:56 -05:00 committed by Carles Cufí
commit 4ff7df43a2

View file

@ -604,6 +604,9 @@ static int i2s_mcux_config(const struct device *dev, enum i2s_dir dir,
dev_data->tx.dma_cfg.user_data = (void *)dev;
dev_data->tx.state = I2S_STATE_READY;
} else {
/* For RX, DMA reads from FIFO whenever data present */
config.fifo.fifoWatermark = 0;
memcpy(&dev_data->rx.cfg, i2s_cfg, sizeof(struct i2s_config));
LOG_DBG("rx slab free_list = 0x%x",
(uint32_t)i2s_cfg->mem_slab->free_list);