Karthik Ramasubramanian has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/55029 )
Change subject: drivers/amd/i2s_machine_dev: Populate _WOV ACPI method ......................................................................
drivers/amd/i2s_machine_dev: Populate _WOV ACPI method
In order to support Audio Co-processor (ACP) DMIC hardware runtime detection on the platform, ACPI _WOV method is populated on the concerned ACP device. This method returns the ACPI Integer value as 1 if ACP DMIC exists on the platform or else it will return zero. Since DMIC select GPIO is optional, add a flag to indicate the presence of DMIC.
BUG=b:182960979 TEST=Build and boot to OS in guybrush. Ensure that the _WOV ACPI method is populated under the scope of ACP device. Scope (_SB.PCI0.GP41.ACPD) { Device (I2S0) { Name (_HID, "AMDI5682") // _HID: Hardware ID Name (_UID, Zero) // _UID: Unique ID Name (_DDN, "I2S machine driver") // _DDN: DOS Device Name Method (_STA, 0, NotSerialized) // _STA: Status { Return (0x0F) }
Method (_WOV, 0, NotSerialized) { Return (One) } } }
Change-Id: Ide84f45f5ea2ae42d5efe71ac6d1595886157045 Signed-off-by: Karthikeyan Ramasubramanian kramasub@google.com --- M src/drivers/amd/i2s_machine_dev/chip.h M src/drivers/amd/i2s_machine_dev/i2s_machine_dev.c 2 files changed, 14 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/29/55029/1
diff --git a/src/drivers/amd/i2s_machine_dev/chip.h b/src/drivers/amd/i2s_machine_dev/chip.h index 0ca00a8..a8e94ca 100644 --- a/src/drivers/amd/i2s_machine_dev/chip.h +++ b/src/drivers/amd/i2s_machine_dev/chip.h @@ -17,6 +17,12 @@ * all the mics and select the right channel based on the use-case. */ struct acpi_gpio dmic_select_gpio; + + /* + * DMIC present (optional) to support ACP DMIC hardware runtime detection on the + * platform. + */ + bool dmic_present; };
#endif /* ___DRIVERS_AMD_I2S_MACHINE_DEV_H__ */ diff --git a/src/drivers/amd/i2s_machine_dev/i2s_machine_dev.c b/src/drivers/amd/i2s_machine_dev/i2s_machine_dev.c index 7bd256d..06b8c00 100644 --- a/src/drivers/amd/i2s_machine_dev/i2s_machine_dev.c +++ b/src/drivers/amd/i2s_machine_dev/i2s_machine_dev.c @@ -69,6 +69,14 @@ if (dmic_select_gpio->pin_count) i2s_machine_dev_fill_crs_dsd(path, dmic_select_gpio);
+ /* For ACP DMIC hardware runtime detection on the platform, _WOV method is populated. */ + acpigen_write_method("_WOV", 0); + if (dmic_select_gpio->pin_count || cfg->dmic_present) + acpigen_write_return_integer(1); + else + acpigen_write_return_integer(0); + acpigen_pop_len(); /* Method */ + acpigen_pop_len(); /* Device */ acpigen_pop_len(); /* Scope */