This set of patches proposes a new API for dma_get() that procures a DMAC based on the requested copy capability and flags indicating shared/exclusive access. It also updates the existing user of dma_get() to use the new API based on the specific usage. The platform DMAC definitions have also been updated to include information about copy capabilities supported.
This has only been tested on the BYT platform with a Minnowboard Turbot board and a RT5651 codec where it has passed the sanity check test.
Further testing is required on other platforms to ensure there are no regressions. This patch is still RFC/RFT and needs testing on CNL/HSW.
The corresponding DMAC/DMAC channel definitions from topology/kernel driver need to be removed. This is still work in progress.
v2 changes: 1. dma_get() consolidated for all platforms 2. dmac definitions include copy capability 3. Added some helper api's to retreive platform DMAC info
Ranjani Sridharan (8): platform: dma: move dmac initialization dma: define platform DMAC capabilities dma: ops: introduce num_channels_busy to get number of busy channels in DMAC dma: add API's to retrieve platform DMAC information dma: introduce new API for requesting DMAC dma: use newly defined API for request DMAC dma: remove dmac id argument from dma_copy_context() trace: remove trace dmac id definition
src/arch/xtensa/Makefile.am | 1 + src/audio/dai.c | 3 +- src/audio/host.c | 20 +++-- src/drivers/dw-dma.c | 9 ++ src/drivers/hda-dma.c | 9 ++ src/host/common_test.c | 2 +- src/include/sof/dma.h | 26 +++++- src/ipc/apl-ipc.c | 4 +- src/ipc/byt-ipc.c | 4 +- src/ipc/cnl-ipc.c | 4 +- src/ipc/dma-copy.c | 5 +- src/ipc/hsw-ipc.c | 4 +- src/lib/Makefile.am | 11 +++ src/lib/dma-trace.c | 2 +- src/lib/dma.c | 84 +++++++++++++++++++ src/platform/apollolake/dma.c | 30 +++++-- .../apollolake/include/platform/platform.h | 3 - src/platform/apollolake/platform.c | 21 +---- src/platform/baytrail/dma.c | 23 +++-- .../baytrail/include/platform/platform.h | 3 - src/platform/baytrail/platform.c | 22 +---- src/platform/cannonlake/dma.c | 29 +++++-- .../cannonlake/include/platform/platform.h | 3 - src/platform/cannonlake/platform.c | 21 +---- src/platform/haswell/dma.c | 35 ++++++-- .../haswell/include/platform/platform.h | 3 - src/platform/haswell/platform.c | 20 +---- 27 files changed, 262 insertions(+), 139 deletions(-) create mode 100644 src/lib/dma.c