]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: tegra: Use ADMAIF component for DMA allocations
authorThierry Reding <treding@nvidia.com>
Thu, 8 Jul 2021 10:34:31 +0000 (12:34 +0200)
committerMark Brown <broonie@kernel.org>
Sun, 11 Jul 2021 22:44:30 +0000 (23:44 +0100)
commit2a2cf899365c2ac6acde27cbff9a9b6346ac9b2e
tree86fb9145925023af1ca559c0255a944238cd6d11
parent2b6a2343f67a26e8d538708e607ea6ec22a88e12
ASoC: tegra: Use ADMAIF component for DMA allocations

DMA memory is currently allocated for the soundcard device, which is a
virtual device added for the sole purpose of "stitching" together the
audio device. It is not a real device and therefore doesn't have a DMA
mask or a description of the path to and from memory of accesses.

Memory accesses really originate from the ADMA controller that provides
the DMA channels used by the PCM component. However, since the DMA
memory is allocated up-front and the DMA channels aren't known at that
point, there is no way of knowing the DMA channel provider at allocation
time.

The next best physical device in the memory path is the ADMAIF. Use it
as the device to allocate DMA memory to. iommus and interconnects device
tree properties can thus be added to the ADMAIF device tree node to
describe the memory access path for audio.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20210708103432.1690385-2-thierry.reding@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/tegra/tegra_pcm.c