Patch "ASoC: meson: aiu: fifo: Add missing dma_coerce_mask_and_coherent()" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    ASoC: meson: aiu: fifo: Add missing dma_coerce_mask_and_coherent()

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     asoc-meson-aiu-fifo-add-missing-dma_coerce_mask_and_.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 679cfe6e44cbf6bb3d4a91eb124e40e4318c54ea
Author: Martin Blumenstingl <martin.blumenstingl@xxxxxxxxxxxxxx>
Date:   Mon Dec 6 22:08:03 2021 +0100

    ASoC: meson: aiu: fifo: Add missing dma_coerce_mask_and_coherent()
    
    [ Upstream commit 1bcd326631dc4faa3322d60b4fc45e8b3747993e ]
    
    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@xxxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20211206210804.2512999-2-martin.blumenstingl@xxxxxxxxxxxxxx
    Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/sound/soc/meson/aiu-fifo.c b/sound/soc/meson/aiu-fifo.c
index 4ad23267cace5..d67ff4cdabd5a 100644
--- a/sound/soc/meson/aiu-fifo.c
+++ b/sound/soc/meson/aiu-fifo.c
@@ -5,6 +5,7 @@
 
 #include <linux/bitfield.h>
 #include <linux/clk.h>
+#include <linux/dma-mapping.h>
 #include <sound/pcm_params.h>
 #include <sound/soc.h>
 #include <sound/soc-dai.h>
@@ -179,6 +180,11 @@ int aiu_fifo_pcm_new(struct snd_soc_pcm_runtime *rtd,
 	struct snd_card *card = rtd->card->snd_card;
 	struct aiu_fifo *fifo = dai->playback_dma_data;
 	size_t size = fifo->pcm->buffer_bytes_max;
+	int ret;
+
+	ret = dma_coerce_mask_and_coherent(card->dev, DMA_BIT_MASK(32));
+	if (ret)
+		return ret;
 
 	snd_pcm_set_managed_buffer_all(rtd->pcm, SNDRV_DMA_TYPE_DEV,
 				       card->dev, size, size);



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux