Skip to content

Commit 8843844

Browse files
Venkata-Prasad-Potturubroonie
authored andcommitted
ASoC: amd: ps: Fix for enabling DMIC on acp63 platform via _DSD entry
Add condition check to register ACP PDM sound card by reading _WOV acpi entry. Fixes: 0386d76 ("ASoC: amd: ps: refactor acp device configuration read logic") Signed-off-by: Venkata Prasad Potturu <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 78d4f34 commit 8843844

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

sound/soc/amd/ps/pci-ps.c

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,11 +375,18 @@ static int get_acp63_device_config(struct pci_dev *pci, struct acp63_dev_data *a
375375
{
376376
struct acpi_device *pdm_dev;
377377
const union acpi_object *obj;
378+
acpi_handle handle;
379+
acpi_integer dmic_status;
378380
u32 config;
379381
bool is_dmic_dev = false;
380382
bool is_sdw_dev = false;
383+
bool wov_en, dmic_en;
381384
int ret;
382385

386+
/* IF WOV entry not found, enable dmic based on acp-audio-device-type entry*/
387+
wov_en = true;
388+
dmic_en = false;
389+
383390
config = readl(acp_data->acp63_base + ACP_PIN_CONFIG);
384391
switch (config) {
385392
case ACP_CONFIG_4:
@@ -412,10 +419,18 @@ static int get_acp63_device_config(struct pci_dev *pci, struct acp63_dev_data *a
412419
if (!acpi_dev_get_property(pdm_dev, "acp-audio-device-type",
413420
ACPI_TYPE_INTEGER, &obj) &&
414421
obj->integer.value == ACP_DMIC_DEV)
415-
is_dmic_dev = true;
422+
dmic_en = true;
416423
}
424+
425+
handle = ACPI_HANDLE(&pci->dev);
426+
ret = acpi_evaluate_integer(handle, "_WOV", NULL, &dmic_status);
427+
if (!ACPI_FAILURE(ret))
428+
wov_en = dmic_status;
417429
}
418430

431+
if (dmic_en && wov_en)
432+
is_dmic_dev = true;
433+
419434
if (acp_data->is_sdw_config) {
420435
ret = acp_scan_sdw_devices(&pci->dev, ACP63_SDW_ADDR);
421436
if (!ret && acp_data->info.link_mask)

0 commit comments

Comments
 (0)