Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: 6ae9ca9ce986bf ("ASoC: meson: aiu: add i2s and spdif support")
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://lore.kernel.org/r/20211206210804.2512999-2-martin.blumenstingl@googlemail.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Martin Blumenstingl and committed by
Mark Brown
1bcd3266 80d5be1a

+6
+6
sound/soc/meson/aiu-fifo.c
··· 5 5 6 6 #include <linux/bitfield.h> 7 7 #include <linux/clk.h> 8 + #include <linux/dma-mapping.h> 8 9 #include <sound/pcm_params.h> 9 10 #include <sound/soc.h> 10 11 #include <sound/soc-dai.h> ··· 180 179 struct snd_card *card = rtd->card->snd_card; 181 180 struct aiu_fifo *fifo = dai->playback_dma_data; 182 181 size_t size = fifo->pcm->buffer_bytes_max; 182 + int ret; 183 + 184 + ret = dma_coerce_mask_and_coherent(card->dev, DMA_BIT_MASK(32)); 185 + if (ret) 186 + return ret; 183 187 184 188 snd_pcm_set_managed_buffer_all(rtd->pcm, SNDRV_DMA_TYPE_DEV, 185 189 card->dev, size, size);