Skip to content

Commit 1bcd326

Browse files
xdarklightbroonie
authored andcommitted
ASoC: meson: aiu: fifo: Add missing dma_coerce_mask_and_coherent()
The FIFO registers which take an DMA-able address are only 32-bit wide on AIU. Add dma_coerce_mask_and_coherent() to make the DMA core aware of this limitation. Fixes: 6ae9ca9 ("ASoC: meson: aiu: add i2s and spdif support") Signed-off-by: Martin Blumenstingl <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 80d5be1 commit 1bcd326

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

sound/soc/meson/aiu-fifo.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
#include <linux/bitfield.h>
77
#include <linux/clk.h>
8+
#include <linux/dma-mapping.h>
89
#include <sound/pcm_params.h>
910
#include <sound/soc.h>
1011
#include <sound/soc-dai.h>
@@ -179,6 +180,11 @@ int aiu_fifo_pcm_new(struct snd_soc_pcm_runtime *rtd,
179180
struct snd_card *card = rtd->card->snd_card;
180181
struct aiu_fifo *fifo = dai->playback_dma_data;
181182
size_t size = fifo->pcm->buffer_bytes_max;
183+
int ret;
184+
185+
ret = dma_coerce_mask_and_coherent(card->dev, DMA_BIT_MASK(32));
186+
if (ret)
187+
return ret;
182188

183189
snd_pcm_set_managed_buffer_all(rtd->pcm, SNDRV_DMA_TYPE_DEV,
184190
card->dev, size, size);

0 commit comments

Comments
 (0)