[PATCH 3/4] ASoC: xlnx: formatter: set a 64-bit DMA mask

Dhanunjanrao Katta katta.dhanunjanrao at amd.com
Wed Nov 25 03:48:38 PST 2026


hw_params splits the ring buffer address over the LSB and MSB buffer
address registers, but the device is left on the default 32-bit mask.
The coherent buffer therefore always comes from below 4G and the MSB
register is only ever written as zero.

Set a 64-bit mask so the buffer can sit in high memory as well.

Signed-off-by: Dhanunjanrao Katta <katta.dhanunjanrao at amd.com>
---
 sound/soc/xilinx/xlnx_formatter_pcm.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/sound/soc/xilinx/xlnx_formatter_pcm.c b/sound/soc/xilinx/xlnx_formatter_pcm.c
index fa7419439ec7..57901c9466a0 100644
--- a/sound/soc/xilinx/xlnx_formatter_pcm.c
+++ b/sound/soc/xilinx/xlnx_formatter_pcm.c
@@ -8,6 +8,7 @@
 
 #include <linux/bitfield.h>
 #include <linux/clk.h>
+#include <linux/dma-mapping.h>
 #include <linux/io.h>
 #include <linux/module.h>
 #include <linux/sizes.h>
@@ -598,6 +599,11 @@ static int xlnx_formatter_pcm_probe(struct platform_device *pdev)
 	struct device *dev = &pdev->dev;
 	struct clk *axi_clk, *aud_mclk, *axis_clk;
 
+	ret = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(64));
+	if (ret)
+		return dev_err_probe(dev, ret,
+				     "failed to set the 64-bit DMA mask\n");
+
 	axi_clk = devm_clk_get_enabled(dev, "s_axi_lite_aclk");
 	if (IS_ERR(axi_clk))
 		return dev_err_probe(dev, PTR_ERR(axi_clk), "failed to get s_axi_lite_aclk");
-- 
2.34.1




More information about the linux-arm-kernel mailing list