mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
To: <broonie@kernel.org>
Cc: <alsa-devel@alsa-project.org>, <lgirdwood@gmail.com>,
	<perex@perex.cz>, <tiwai@suse.com>,
	<yung-chuan.liao@linux.intel.com>, <Basavaraj.Hiregoudar@amd.com>,
	<Sunil-kumar.Dommati@amd.com>, <venkataprasad.potturu@amd.com>,
	<Syed.SabaKareem@amd.com>, <Mario.Limonciello@amd.com>,
	<Richard.Gong@amd.com>, <Vijendar.Mukunda@amd.com>,
	<Poojitha.N@amd.com>, <linux-sound@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	<sound-open-firmware@alsa-project.org>
Subject: [PATCH 06/13] ASoC: amd: acp: move ignore_internal_dmic gate to DMIC enable condition
Date: Wed, 14 Oct 2026 15:46:25 +0530	[thread overview]
Message-ID: <20261014101817.1240200-7-Vijendar.Mukunda@amd.com> (raw)
In-Reply-To: <20261014101817.1240200-1-Vijendar.Mukunda@amd.com>

Move the ignore_internal_dmic check from inside the dmic_num > 0 block
to the DMIC enable condition itself. This eliminates the dead if/else
inside the dmic_num > 0 block - when dmic_num is set,
create_dmic_dailinks() is always called. Demote the suppression message
from dev_warn to dev_dbg since ignoring the ACP DMIC in favour of a
SoundWire DMIC codec is expected behaviour, not a warning condition.

No functional change for platforms without a SoundWire DMIC codec.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
---
 sound/soc/amd/acp/acp-sdw-sof-mach.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/sound/soc/amd/acp/acp-sdw-sof-mach.c b/sound/soc/amd/acp/acp-sdw-sof-mach.c
index ac4c9e852f671..1207e35ffb581 100644
--- a/sound/soc/amd/acp/acp-sdw-sof-mach.c
+++ b/sound/soc/amd/acp/acp-sdw-sof-mach.c
@@ -351,9 +351,13 @@ static int sof_card_dai_links_create(struct snd_soc_card *card)
 	sdw_be_num = ret;
 
 	/* enable dmic */
-	if (sof_sdw_quirk & ASOC_SDW_ACP_DMIC || mach_params->dmic_num ||
-	    amd_ctx->pdm_sel)
+	if ((sof_sdw_quirk & ASOC_SDW_ACP_DMIC || mach_params->dmic_num ||
+	     amd_ctx->pdm_sel) && !ctx->ignore_internal_dmic)
 		dmic_num = 1;
+	else if (ctx->ignore_internal_dmic &&
+		 (sof_sdw_quirk & ASOC_SDW_ACP_DMIC ||
+		  mach_params->dmic_num || amd_ctx->pdm_sel))
+		dev_dbg(dev, "ACP DMIC suppressed by SoundWire DMIC\n");
 
 	dev_dbg(dev, "sdw %d, dmic %d", sdw_be_num, dmic_num);
 
@@ -384,13 +388,9 @@ static int sof_card_dai_links_create(struct snd_soc_card *card)
 
 	/* dmic */
 	if (dmic_num > 0) {
-		if (ctx->ignore_internal_dmic) {
-			dev_warn(dev, "Ignoring ACP DMIC\n");
-		} else {
-			ret = create_dmic_dailinks(card, &dai_links, &be_id, 1);
-			if (ret)
-				return ret;
-		}
+		ret = create_dmic_dailinks(card, &dai_links, &be_id, 1);
+		if (ret)
+			return ret;
 	}
 
 	WARN_ON(codec_conf != card->codec_conf + card->num_configs);
-- 
2.48.1


  parent reply	other threads:[~2026-10-14 10:20 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-14 10:16 [PATCH 00/13] ASoC: amd: acp: ACP7.B/7.F SoundWire machine driver support Vijendar Mukunda
2026-10-14 10:16 ` [PATCH 01/13] ASoC: amd: acp: add ACP7.B/7.F SoundWire link count for machine driver Vijendar Mukunda
2026-10-14 10:16 ` [PATCH 02/13] ASoC: amd: acp: add ACP7.B/7.F SoundWire DAI link support Vijendar Mukunda
2026-10-14 10:16 ` [PATCH 03/13] ASoC: amd: acp: fix PDM1 quirk and PDM controller selection for ACP7.B/7.F Vijendar Mukunda
2026-10-14 10:16 ` [PATCH 04/13] ASoC: amd: acp: log ASOC_SDW_ACP_DMIC1 quirk in SOF SoundWire machine driver Vijendar Mukunda
2026-10-14 10:16 ` [PATCH 05/13] ASoC: amd: acp7x: enable DMIC DAI link based on PDM controller selection Vijendar Mukunda
2026-10-14 10:16 ` Vijendar Mukunda [this message]
2026-10-18 16:59   ` [PATCH 06/13] ASoC: amd: acp: move ignore_internal_dmic gate to DMIC enable condition Pierre-Louis Bossart
2026-10-19  2:53     ` Mukunda,Vijendar
2026-10-14 10:16 ` [PATCH 07/13] ASoC: amd: acp: add DMIC components string for SOF SoundWire machine driver Vijendar Mukunda
2026-10-14 10:16 ` [PATCH 08/13] ASoC: amd: acp: set PCI subsystem ID " Vijendar Mukunda
2026-10-14 10:16 ` [PATCH 09/13] ASoC: amd: acp: fix MODULE_AUTHOR missing closing angle bracket Vijendar Mukunda
2026-10-14 10:16 ` [PATCH 10/13] ASoC: amd: acp: add ACPI machine tables for ACP7.F SoundWire Vijendar Mukunda
2026-10-14 10:16 ` [PATCH 11/13] ASoC: SOF: amd: add alt_machines for ACP7.F SOF SoundWire Vijendar Mukunda
2026-10-14 10:16 ` [PATCH 12/13] ASoC: amd: acp: add SoundWire machine table for ACP7.B platform Vijendar Mukunda
2026-10-14 10:16 ` [PATCH 13/13] ASoC: SOF: amd: register SoundWire alt_machines for ACP7.B Vijendar Mukunda

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=20261014101817.1240200-7-Vijendar.Mukunda@amd.com \
    --to=vijendar.mukunda@amd.com \
    --cc=Basavaraj.Hiregoudar@amd.com \
    --cc=Mario.Limonciello@amd.com \
    --cc=Poojitha.N@amd.com \
    --cc=Richard.Gong@amd.com \
    --cc=Sunil-kumar.Dommati@amd.com \
    --cc=Syed.SabaKareem@amd.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=sound-open-firmware@alsa-project.org \
    --cc=tiwai@suse.com \
    --cc=venkataprasad.potturu@amd.com \
    --cc=yung-chuan.liao@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®