Re: [RFC PATCH] dmaengine: xilinx_dma: Fix per-channel direction reporting via device_caps

From: Folker Schwesinger

Date: Fri Mar 06 2026 - 05:40:56 EST


On Thu Mar 5, 2026 at 12:27 PM CET, Rahul Navale wrote:
> From: Rahul Navale <rahul.navale@xxxxxxx>
>
>>Could you confirm that the DMA IP core in your PL design operates in
>>scatter Gather mode?
>
> Yes, We confirmed that our DMA IP core in the PL design are configured
> for Scatter-Gather mode.

Thanks for confirming, this disproves the last theory. Please undo the
latest Xilinx DMA patch I sent.
To get some more data, could you apply the following patch (keep RFC
patch and debug stuff) and rerun with 7e01511443c3 a) applied and b)
reverted and post logs for both cases:

dmesg|grep ptr_res

<--8<-->
diff --git i/sound/soc/soc-generic-dmaengine-pcm.c w/sound/soc/soc-generic-dmaengine-pcm.c
index a63e942fdc0b..4635b199d020 100644
--- i/sound/soc/soc-generic-dmaengine-pcm.c
+++ w/sound/soc/soc-generic-dmaengine-pcm.c
@@ -280,11 +280,16 @@ static snd_pcm_uframes_t dmaengine_pcm_pointer(
struct snd_pcm_substream *substream)
{
struct dmaengine_pcm *pcm = soc_component_to_pcm(component);
+ snd_pcm_uframes_t ptr = 0;

- if (pcm->flags & SND_DMAENGINE_PCM_FLAG_NO_RESIDUE)
- return snd_dmaengine_pcm_pointer_no_residue(substream);
- else
- return snd_dmaengine_pcm_pointer(substream);
+ if (pcm->flags & SND_DMAENGINE_PCM_FLAG_NO_RESIDUE) {
+ ptr = snd_dmaengine_pcm_pointer_no_residue(substream);
+ printk("ptr_res_no: ptr = 0x%08lx\n", ptr);
+ } else {
+ ptr = snd_dmaengine_pcm_pointer(substream);
+ printk("ptr_res: ptr = 0x%08lx\n", ptr);
+ }
+ return ptr;
}

static int dmaengine_copy(struct snd_soc_component *component,
<-->8-->