Akshu Agrawal has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/30724
Change subject: drivers/generic/adau7002: Add wakeup-delay-ms property ......................................................................
drivers/generic/adau7002: Add wakeup-delay-ms property
Passes out wakeup-delay to driver. This delay is applied at the start of capture to make sure dmics are ready before we start recording. This avoids pop noise at begining of capture.
BUG=b:119926436 TEST= With kernel patch https://lore.kernel.org/patchwork/patch/1029806/ No pop sound heard at start of capture
Change-Id: I32b18bf80fad5899ab4093a127dfd52d589bc365 Signed-off-by: Akshu Agrawal akshu.agrawal@amd.com --- M src/drivers/generic/adau7002/adau7002.c M src/drivers/generic/adau7002/chip.h 2 files changed, 14 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/24/30724/1
diff --git a/src/drivers/generic/adau7002/adau7002.c b/src/drivers/generic/adau7002/adau7002.c index 2ea1086..223a19b 100644 --- a/src/drivers/generic/adau7002/adau7002.c +++ b/src/drivers/generic/adau7002/adau7002.c @@ -29,7 +29,11 @@
static void adau7002_fill_ssdt(struct device *dev) { - if (!dev || !dev->enabled) + struct drivers_generic_adau7002_config *config = dev->chip_info; + const char *path; + struct acpi_dp *dp; + + if (!dev || !dev->enabled || !config) return;
const char *scope = acpi_device_scope(dev); @@ -45,6 +49,13 @@ acpigen_write_name_string("_DDN", dev->chip_ops->name); acpigen_write_STA(acpi_device_status(dev));
+ /* _DSD for devicetree properties */ + /* This points to the first pin in the first gpio entry in _CRS */ + path = acpi_device_path(dev); + dp = acpi_dp_new_table("_DSD"); + acpi_dp_add_integer(dp, "wakeup-delay-ms", config->wakeup_delay); + acpi_dp_write(dp); + acpigen_pop_len(); /* Device */ acpigen_pop_len(); /* Scope */
diff --git a/src/drivers/generic/adau7002/chip.h b/src/drivers/generic/adau7002/chip.h index 95b4d1e..cfe3dea 100644 --- a/src/drivers/generic/adau7002/chip.h +++ b/src/drivers/generic/adau7002/chip.h @@ -17,6 +17,8 @@ #define __I2C_GENERIC_ADAU7002_CHIP_H__
struct drivers_generic_adau7002_config { + /* Delay */ + unsigned wakeup_delay; };
#endif /* __I2C_GENERIC_ADAU7002_CHIP_H__ */