On 16. 05. 24 16:50, Jaroslav Kysela wrote:
On 15. 05. 24 22:33, Nicolas Dufresne wrote:
In GFX, they solve this issue with fences. That allow setting up the next
operation in the chain before the data has been produced.
The fences look really nicely and seem more modern. It should be possible with
dma-buf/sync_file.c interface to handle multiple jobs simultaneously and share
the state between user space and kernel driver.
In this case, I think that two non-blocking ioctls should be enough - add a
new job with source/target dma buffers guarded by one fence and abort (flush)
all active jobs.
I'll try to propose an API extension for the ALSA's compress API in the
linux-sound mailing list soon.
I found using sync_file during the implementation to be overkill for resource
management, so I proposed a simple queue with the standard poll mechanism.
https://lore.kernel.org/linux-sound/20240527071133.223066-1-perex@xxxxxxxx/
Jaroslav
--
Jaroslav Kysela <perex@xxxxxxxx>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.