ACP DMA Driver is responsible for DMA transactions between system memory
and I2S controller.It uses two step DMA mechanism to copy data between
system memory <-> ACP SRAM and ACP SRAM <-> I2S FIFO for
playback/capture use cases.
ACP driver program two DMA channels for DMA transfers between System
memory & I2S FIFO.
ACP DMA driver isn't general purpose DMA controller driver where we can
implement terminate_all() API.
I2S controller DMA transactions are tightly coupled with ACP DMA
controller.
while DMA transfer ongoing between ACP SRAM and I2S FIFO, Stopping I2S
DMA prior to ACP DMA stop resulting DMA Channel stop failure.
Its not related to I2S FIFO flushing related handling.
Once the DMA channel failure observed during the closure of the stream,
when again new stream opened, DMA won't progress at all.
Thanks for the explanation.
This is not upstream, right?
What is still not clear to me is which channel fails?
A) the DMA between ACP FIFO and the I2S
B) the DMA between ACP FIFO and system memory
in acp-pcm-dma.c on stop you have a busy loop (10000 iterations) to
check if the channel is in fact stopped in response to the cleared run,
IOCEn bits and the set Rst bit.
Channel closer to the destination is stopped first which sounds
reasonable, but on playback you ignore timeout from A, on capture you
ignore the timeout from B.
Still the issue sounds like exactly what I have described. One of the
DMA is failing to drain because the IP is stopped?
This design is being used only in stoneyridge and Carrizo platforms.
Need find a right place to implement a work around only for AMD
stoneyridge platform.
Is this really only affecting stoneyridge platform? Are there other
platforms using drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c ?