From nobody Thu Apr 2 17:31:03 2026 Received: from mail-pg1-f172.google.com (mail-pg1-f172.google.com [209.85.215.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9EB5128640B for ; Wed, 11 Feb 2026 14:02:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770818566; cv=none; b=m1yIe7Ax/rVaifIKu5WXH6m3oSHg5dSO6RpgxkW164yFP4RT1kaAn3uAce7neo8Kn1+j7rvQbFnd6dTo/JAVd4AqVRpixTH1MBQ1LzOqNscWPeOnlHJssVWjy2qd8v88F/egXzU3J2Z1XLTCMKhm3f3szXqxeKg84xJRKus+Bc8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770818566; c=relaxed/simple; bh=BWgzr1X+mxTiEyNLlQnKUkCirXWnvGZN54MRv5woVDk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=di7ttzFeaToWQG01zvBM4pEwyuaMx0Z3cL9v5wMa61VARpC96DID+dbE26fhIqg7ITI/lTq7EPTJA6rGRxHbK7d2mblVjTd2QSNaT4MOKOITGSffgkkD9/bEZnCemimMoVljOFSZ6XdaMRLdQ3MKpOuCv64shBYTrSxW7+i6MdM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=WxpHi7N0; arc=none smtp.client-ip=209.85.215.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="WxpHi7N0" Received: by mail-pg1-f172.google.com with SMTP id 41be03b00d2f7-c6de13d9ebbso1099678a12.3 for ; Wed, 11 Feb 2026 06:02:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770818565; x=1771423365; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Hkv6yEZIu6AjpO4/Olv6t/LeNmIBj39aOisBe+pVOfI=; b=WxpHi7N0KY9oGsMx/M0FuGh9NRSG4MgUjUTWJ6+hLCwuckwWrjpS4xhW7XzaKOe8FL gWRTXrtV/o2mBzTSk5OkMN8cWaBqOXOwHAfBhNNN7t/joVfcxSORI2kE6oR/QL/G/p28 GWPxtHJ1ZpktI+JM3wxhtzznB8NUbmVlGRiQ7iaR4EtAdMt4hI7j+ypVZuXSFu9H2pX9 BDgDlyJsf546wfL09tWdtP1EKrv4li3oT0kk1AIzduYFsMVJlF484dfIDx+QMj4aExtP ghEWxR19N7PrdSqsPaB0YR0c2UulZYnDk2L72LDTtfj8C+q+LuhsISmD9eStOtIlJJTc vrTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770818565; x=1771423365; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Hkv6yEZIu6AjpO4/Olv6t/LeNmIBj39aOisBe+pVOfI=; b=K67CzYVFEGKP+NgabV0Ya5LqMf2m0oXAnkGQkSnbCyi/HsL6TzJDQXLkxcel7EvSZf IFOrFtihnE7KVKPQ0FI84hUM14sz33mEalgcVgizZ5EGYtE8tOjTA9DCsq3uk0hREQUX 0XiUrYSNgwnpYwtQBufQtMuLzUoMCZQRyWE4KUqt7r0zdKu/+DKVanOkwTyl6dDRq0Y6 oLCZeupuWIdS0Zw6h+voapwAz7FAMjrbsH364RXVLN6JMXRBmuXRg4IDuiU6cX5daaqp hrPHW+1C9Ji51YZ0p4XCqbwjeeynibvqslxKKnr12FrlNSCPs4L1wJh/Tcpi0KPzTf4V woyQ== X-Forwarded-Encrypted: i=1; AJvYcCXYk1q0XScDGbYxTnBTVqEBheeQNGvmJ+45r+6R2UpvbETh9THi7bB5mJyvjresP2RPDU7nnHl7fouE6xI=@vger.kernel.org X-Gm-Message-State: AOJu0Yyyih0f1Pu2veor+4KmgAjRHba3uHgbHv43cn7Lw42CD85CUvaV jon1hjz0mrKq4MMEQdDNLALXWtB1Ap55z/J/j0+eFqyCupDtqO8TOkwO X-Gm-Gg: AZuq6aLQ7Hztp4NXyfBavU3ePGPTrvMSTTNzkQKGlhIVohmmm032CwsXDFpxZzDWUPh Y+IwYCPCTj4WqEkTMqrCCRp8+JE/B0bdC0XNUL5AQu8pdpciov4M1W0kPqxI9e1EIyJl7EwXPZj xzc+zo82u9VV7iuhxFC0x8C850ATPxaWjDIs3Nh8CXzYEKAtojA7rfNLsZ556NbJ9jTX1/cmwKi MrtnJGtazt1FVY6yTAwahHSDQDpiYbYgiYfOXlBNUjKHhhoRlvxHOaBClwtuDFJftKrboD1RzCn ywDhmAcj+rGrpeuD91kWlhttOdzngFRaEKUpMQzXcrtwkpn75OJR1qwmdvIZ5JMcryQpFj1x8H2 qUv0IIA77MW+dQEjCDnFnByedDOfK46L/HRPBHbvMhZ8k1x8/SJpL/ixpgbamqRMvVyfkkAOvPJ LCy0t8DfwjeB2CLDh5KgUJXeTZgqP7T8Q= X-Received: by 2002:a17:90b:558d:b0:356:1edc:b64 with SMTP id 98e67ed59e1d1-3567af6f668mr2508787a91.8.1770818564538; Wed, 11 Feb 2026 06:02:44 -0800 (PST) Received: from bsp.intra.ifm ([123.252.218.194]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3567af23fb7sm1874714a91.2.2026.02.11.06.02.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Feb 2026 06:02:43 -0800 (PST) From: Rahul Navale To: dmaengine@vger.kernel.org Cc: vkoul@kernel.org, michal.simek@amd.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, thomas.gessler@brueckmann-gmbh.de, radhey.shyam.pandey@amd.com, Suraj.Gupta2@amd.com, marex@denx.de, manivannan.sadhasivam@linaro.org, harini.katakam@amd.com, marex@nabladev.com, Rahul Navale Subject: [RFC PATCH] dmaengine: xilinx_dma: device-wide directions cause ASoC cyclic DMA regression Date: Wed, 11 Feb 2026 19:30:51 +0530 Message-ID: <20260211140051.8177-1-rahulnavale04@gmail.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Rahul Navale On ZynqMP platforms using AXI DMA for ASoC PCM playback, upstream commit 7e01511443c3 ("dmaengine: xilinx_dma: Set dma_device directions") causes cyclic playback to fail after the first buffer period. Background: The upstream patch adds the following line in xilinx_dma_chan_probe(): xdev->common.directions |=3D chan->direction; Its purpose is to coalesce the directions of all enabled TX/RX channels into the device-wide dma_device.directions mask so that dma_get_slave_caps() works correctly. This is required by users such as IIO DMAEngine buffers that rely on device-wide capability reporting. Problem on ZynqMP ASoC audio (PCM): On ZynqMP, Xilinx DMA provides fixed-direction channels: MM2S channels -> DMA_MEM_TO_DEV S2MM channels -> DMA_DEV_TO_MEM ASoC dmaengine PCM relies on these fixed directions to select proper DMA channels for cyclic playback and capture. Aggregating directions device-wide can cause inconsistent capability reporting depending on channel probe order or device tree layout. This leads to the following behavior: - The first DMA buffer plays correctly. - Subsequent DMA periods repeat the first period indefinitely, breaking cyclic playback. A temporary local patch that removes: xdev->common.directions |=3D chan->direction; restores audio playback on ZynqMP platforms. This RFC patch is a workaround to demonstrate a ZynqMP ASoC cyclic PCM regression that appears in v6.12.36+ (backport of 7e01511443c3). The workaround restores PCM playback but may regress users relying on dma_get_slave_caps() (e.g. IIO DMAEngine buffers). The goal is to start discussion on the correct upstream fix that supports both ASoC PCM and IIO. Fixes: 7e01511443c3 ("dmaengine: xilinx_dma: Set dma_device directions") Signed-off-by: Rahul Navale --- drivers/dma/xilinx/xilinx_dma.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dm= a.c index aff046b03ef7..8da86e322c7a 100644 --- a/drivers/dma/xilinx/xilinx_dma.c +++ b/drivers/dma/xilinx/xilinx_dma.c @@ -2938,8 +2938,6 @@ static int xilinx_dma_chan_probe(struct xilinx_dma_de= vice *xdev, return -EINVAL; } =20 - xdev->common.directions |=3D chan->direction; - /* Request the interrupt */ chan->irq =3D of_irq_get(node, chan->tdest); if (chan->irq < 0) --=20 2.34.1