drivers: dma: sdma: Fix noise issue with pause/resume

Each time we configure an SDMA channel we also compute the total
allocated DMA buffer length but we assume is initialized with zero.

This is true each time a channel is requested. But if there are
multiple calls to configure without releasing the channel the buffer
length is not correctly computed.

So, we need to initialize it with zero each time we reconfigure the dma
channel.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
This commit is contained in:
Daniel Baluta 2025-05-22 14:19:41 +03:00 committed by Benjamin Cabé
commit 312ff1c904

View file

@ -237,6 +237,8 @@ static void dma_nxp_sdma_setup_bd(const struct device *dev, uint32_t channel,
chan_data = &dev_data->chan[channel];
chan_data->capacity = 0;
/* initialize bd pool */
chan_data->bd_pool = &dev_data->bd_pool[channel][0];
chan_data->bd_count = config->block_count;