sof
sof copied to clipboard
dai: use ibs/obs for dma buffer size calculation
Use ibs/obs size from ipc4_base_module_cfg to properly calculate period_count. It is especially important when FW aggregation mode is enabled and there are multiple DMAs allocated under one copier instance. That way period count for every DMA will be correctly evaluated and used for DMA buffer size calculation.
E.g. if dma_buffer_size
received in Copier gtw config is 7680 bytes and FW should aggregate two streams 1ch/24_32bit/48kHz and 3ch/24_32bit/48kHz into one 4ch/24_32bit/48kHz stream, then FW will have to allocate two DMA's with sizes
1920 and 5760 bytes respectively and same 10 ms period for both to avoid glitches.