Skip to content

Commit

Permalink
ASoC: amd: acp: Fix for enabling DMIC on acp platforms via _DSD entry
Browse files Browse the repository at this point in the history
Add condition check to register ACP PDM sound card by reading
_WOV acpi entry.

Fixes: 09068d6 ("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>
  • Loading branch information
Venkata Prasad Potturu authored and Mark Brown committed Mar 11, 2025
1 parent e167e5b commit 02e1cf7
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion sound/soc/amd/acp/acp-legacy-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
*/

#include "amd.h"
#include <linux/acpi.h>
#include <linux/pci.h>
#include <linux/export.h>

Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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");
Expand Down

0 comments on commit 02e1cf7

Please sign in to comment.