All of lore.kernel.org
 help / color / mirror / Atom feed
From: phucduc.bui@gmail.com
To: Lars-Peter Clausen <lars@metafoo.de>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>
Cc: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	Sebastian Reichel <sebastian.reichel@collabora.com>,
	linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
	bui duc phuc <phucduc.bui@gmail.com>
Subject: [PATCH] ASoC: soc-generic-dmaengine: Fix DMA channel request warning
Date: Tue, 25 Aug 2026 15:19:49 +0700	[thread overview]
Message-ID: <20260825081949.55537-1-phucduc.bui@gmail.com> (raw)

From: bui duc phuc <phucduc.bui@gmail.com>

The DMA channel request code currently warns about legacy DMA failures
when the channel name is not present in dma-names. This can report a
firmware lookup failure as a legacy DMA failure.

Furthermore, failures from the legacy DMA path are already reported by
find_candidate(), making these warnings redundant.

Only warn when the channel name is present in dma-names but the request
fails, avoiding misleading and duplicate error messages.

Fixes: 9167f260477b ("ASoC: soc-generic-dmaengine: Handle DMA channel request failures correctly")
Reported-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://lore.kernel.org/all/aoyBuho270dTWYBL@jupiter.universe/
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
 sound/soc/soc-generic-dmaengine-pcm.c | 20 ++------------------
 1 file changed, 2 insertions(+), 18 deletions(-)

diff --git a/sound/soc/soc-generic-dmaengine-pcm.c b/sound/soc/soc-generic-dmaengine-pcm.c
index 3b18d90e81c3..65b7ec52a054 100644
--- a/sound/soc/soc-generic-dmaengine-pcm.c
+++ b/sound/soc/soc-generic-dmaengine-pcm.c
@@ -397,24 +397,8 @@ static int dmaengine_pcm_request_chan_of(struct dmaengine_pcm *pcm,
 			if (PTR_ERR(chan) == -EPROBE_DEFER)
 				return -EPROBE_DEFER;
 
-			bool has_fw_node = dev->of_node || is_acpi_device_node(dev->fwnode);
-			bool name_exists_in_fw = false;
-
-			if (has_fw_node)
-				name_exists_in_fw = device_property_match_string(dev,
-										 "dma-names",
-										 name) >= 0;
-
-			if (has_fw_node && name_exists_in_fw)
-				dev_warn(dev, "DTS/ACPI DMA channel '%s' request failed (%ld)\n",
-					 name, PTR_ERR(chan));
-
-			if (has_fw_node && !name_exists_in_fw)
-				dev_warn(dev, "DTS/ACPI name '%s' not found, legacy failed (%ld)\n",
-					 name, PTR_ERR(chan));
-
-			if (!has_fw_node)
-				dev_warn(dev, "Legacy DMA channel '%s' request failed (%ld)\n",
+			if (device_property_match_string(dev, "dma-names", name) >= 0)
+				dev_warn(dev, "dma-names has '%s' but request failed (%ld)\n",
 					 name, PTR_ERR(chan));
 
 			pcm->chan[i] = NULL;
-- 
2.43.0


             reply	other threads:[~2026-08-25  8:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-25  8:19 phucduc.bui [this message]
2026-08-26 13:15 ` [PATCH] ASoC: soc-generic-dmaengine: Fix DMA channel request warning Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260825081949.55537-1-phucduc.bui@gmail.com \
    --to=phucduc.bui@gmail.com \
    --cc=broonie@kernel.org \
    --cc=lars@metafoo.de \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=sebastian.reichel@collabora.com \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.