From b4e843341816395ef8a9d48793322617f9a50f9f Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Tue, 7 Jul 2020 21:32:08 -0600 Subject: dm: acpi: Add support for the NHLT table The Intel Non-High-Definition-Audio Link Table (NHLT) table describes the audio codecs and connections in a system. Various devices can contribute information to produce the table. Add core support for this, based on a structure which is built up through calls to the driver. Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner --- drivers/core/acpi.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'drivers/core') diff --git a/drivers/core/acpi.c b/drivers/core/acpi.c index ae69258562..cdbc2c5cf5 100644 --- a/drivers/core/acpi.c +++ b/drivers/core/acpi.c @@ -31,6 +31,7 @@ enum method_t { METHOD_WRITE_TABLES, METHOD_FILL_SSDT, METHOD_INJECT_DSDT, + METHOD_SETUP_NHLT, }; /* Prototype for all methods */ @@ -248,6 +249,8 @@ acpi_method acpi_get_method(struct udevice *dev, enum method_t method) return aops->fill_ssdt; case METHOD_INJECT_DSDT: return aops->inject_dsdt; + case METHOD_SETUP_NHLT: + return aops->setup_nhlt; } } @@ -334,3 +337,15 @@ int acpi_write_dev_tables(struct acpi_ctx *ctx) return ret; } + +int acpi_setup_nhlt(struct acpi_ctx *ctx, struct nhlt *nhlt) +{ + int ret; + + log_debug("Setup NHLT\n"); + ctx->nhlt = nhlt; + ret = acpi_recurse_method(ctx, dm_root(), METHOD_SETUP_NHLT, TYPE_NONE); + log_debug("Setup finished, err=%d\n", ret); + + return ret; +} -- cgit v1.2.1