Linux Sound subsystem development
 help / color / mirror / Atom feed
From: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
To: <broonie@kernel.org>, <alsa-devel@alsa-project.org>
Cc: <Vijendar.Mukunda@amd.com>, <mario.limonciello@amd.com>,
	<Basavaraj.Hiregoudar@amd.com>, <Sunil-kumar.Dommati@amd.com>,
	<syed.sabakareem@amd.com>,
	Venkata Prasad Potturu <venkataprasad.potturu@amd.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	Jeff Johnson <quic_jjohnson@quicinc.com>,
	Greg KH <gregkh@linuxfoundation.org>,
	"Peter Zijlstra" <peterz@infradead.org>,
	"open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..."
	<linux-sound@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>
Subject: [PATCH 14/14] ASoC: amd: acp: Fix for enabling DMIC on acp platforms via _DSD entry
Date: Mon, 10 Mar 2025 16:16:01 +0530	[thread overview]
Message-ID: <20250310104601.7325-15-venkataprasad.potturu@amd.com> (raw)
In-Reply-To: <20250310104601.7325-1-venkataprasad.potturu@amd.com>

Add condition check to register ACP PDM sound card by reading
_WOV acpi entry.

Fixes: 09068d624c49 ("ASoC: amd: acp: fix for acp platform device creation failure")

Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
---
 sound/soc/amd/acp/acp-legacy-common.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/sound/soc/amd/acp/acp-legacy-common.c b/sound/soc/amd/acp/acp-legacy-common.c
index 988b7a17b2f4..255f90ca956a 100644
--- a/sound/soc/amd/acp/acp-legacy-common.c
+++ b/sound/soc/amd/acp/acp-legacy-common.c
@@ -13,6 +13,7 @@
  */
 
 #include "amd.h"
+#include <linux/acpi.h>
 #include <linux/pci.h>
 #include <linux/export.h>
 
@@ -511,7 +512,9 @@ void check_acp_config(struct pci_dev *pci, struct acp_chip_info *chip)
 {
 	struct acpi_device *pdm_dev;
 	const union acpi_object *obj;
-	u32 pdm_addr;
+	acpi_handle handle;
+	acpi_integer dmic_status;
+	u32 pdm_addr, ret;
 
 	switch (chip->acp_rev) {
 	case ACP_RN_PCI_ID:
@@ -543,6 +546,11 @@ void check_acp_config(struct pci_dev *pci, struct acp_chip_info *chip)
 						   obj->integer.value == pdm_addr)
 				chip->is_pdm_dev = true;
 		}
+
+		handle = ACPI_HANDLE(&pci->dev);
+		ret = acpi_evaluate_integer(handle, "_WOV", NULL, &dmic_status);
+		if (!ACPI_FAILURE(ret))
+			chip->is_pdm_dev = dmic_status;
 	}
 }
 EXPORT_SYMBOL_NS_GPL(check_acp_config, "SND_SOC_ACP_COMMON");
-- 
2.39.2


      parent reply	other threads:[~2025-03-10 10:47 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20250310104601.7325-1-venkataprasad.potturu@amd.com>
2025-03-10 10:45 ` [PATCH 01/14] ASoC: amd: acp: Remove redundant acp70 chip->name Venkata Prasad Potturu
2025-03-10 10:45 ` [PATCH 02/14] ASoC: amd: acp: Implement acp_common_hw_ops support for acp platforms Venkata Prasad Potturu
2025-03-10 11:25   ` Amadeusz Sławiński
2025-03-10 12:06     ` potturu venkata prasad
2025-03-10 10:45 ` [PATCH 03/14] ASoC: amd: acp: Refactor dmic-codec platform device creation Venkata Prasad Potturu
2025-03-10 11:30   ` Amadeusz Sławiński
2025-03-10 12:09     ` potturu venkata prasad
2025-03-10 10:45 ` [PATCH 04/14] ASoC: amd: acp: Refactor acp " Venkata Prasad Potturu
2025-03-10 10:45 ` [PATCH 05/14] ASoC: amd: acp: Refactor acp machine select Venkata Prasad Potturu
2025-03-10 10:45 ` [PATCH 06/14] ASoC: amd: acp: Add new interrupt handle callbacks in acp_common_hw_ops Venkata Prasad Potturu
2025-03-10 10:45 ` [PATCH 07/14] ASoC: amd: acp: Remove redundant acp_dev_data structure Venkata Prasad Potturu
2025-03-10 10:45 ` [PATCH 08/14] ASoC: amd: acp: Move spin_lock and list initialization to acp-pci driver Venkata Prasad Potturu
2025-03-10 10:45 ` [PATCH 09/14] ASoC: amd: acp: Remove white line Venkata Prasad Potturu
2025-03-10 10:45 ` [PATCH 10/14] ASoC: amd: acp: Refactor acp70 platform resource structure Venkata Prasad Potturu
2025-03-10 10:45 ` [PATCH 11/14] ASoC: amd: acp: Refactor acp63 " Venkata Prasad Potturu
2025-03-10 10:45 ` [PATCH 12/14] ASoC: amd: acp: Refactor rembrant " Venkata Prasad Potturu
2025-03-10 10:46 ` [PATCH 13/14] ASoC: amd: acp: Refactor renoir " Venkata Prasad Potturu
2025-03-10 10:46 ` Venkata Prasad Potturu [this message]

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=20250310104601.7325-15-venkataprasad.potturu@amd.com \
    --to=venkataprasad.potturu@amd.com \
    --cc=Basavaraj.Hiregoudar@amd.com \
    --cc=Sunil-kumar.Dommati@amd.com \
    --cc=Vijendar.Mukunda@amd.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=mario.limonciello@amd.com \
    --cc=perex@perex.cz \
    --cc=peterz@infradead.org \
    --cc=quic_jjohnson@quicinc.com \
    --cc=syed.sabakareem@amd.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox