drivers: i2s: i2s_ll_stm32: tx_stream_disable: Add busy wait

Add a k_busy_wait to the function tx_stream_disable
to be able to complete the drain of the TX queue before disabling.

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
This commit is contained in:
IBEN EL HADJ MESSAOUD Marwa 2024-05-27 15:59:12 +02:00 committed by Alberto Escolar
parent c27ed31eb3
commit fdd6627df9

View file

@ -932,6 +932,8 @@ static void tx_stream_disable(struct stream *stream, const struct device *dev)
stream->mem_block = NULL;
}
/* Wait for TX queue to drain before disabling */
k_busy_wait(100);
LL_I2S_Disable(cfg->i2s);
active_dma_tx_channel[stream->dma_channel] = NULL;