diff options
author | 2025-03-11 00:02:01 +0530 | |
---|---|---|
committer | 2025-03-11 17:18:35 +0000 | |
commit | 02e1cf7a352a3ba5f768849f2b4fcaaaa19f89e3 (patch) | |
tree | 7e600e8c3f296342802bd674638b0906b3b45e52 /sound/soc/amd/acp/acp-legacy-common.c | |
parent | ASoC: amd: acp: Refactor renoir platform resource structure (diff) | |
download | wireguard-linux-02e1cf7a352a3ba5f768849f2b4fcaaaa19f89e3.tar.xz wireguard-linux-02e1cf7a352a3ba5f768849f2b4fcaaaa19f89e3.zip |
ASoC: amd: acp: Fix for enabling DMIC on acp platforms via _DSD entry
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>
Link: https://patch.msgid.link/20250310183201.11979-15-venkataprasad.potturu@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to '')
-rw-r--r-- | sound/soc/amd/acp/acp-legacy-common.c | 10 |
1 files changed, 9 insertions, 1 deletions
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"); |