summaryrefslogtreecommitdiff
path: root/src/device
diff options
context:
space:
mode:
authorAngel Pons <th3fanbus@gmail.com>2021-02-08 12:47:29 +0100
committerPatrick Georgi <pgeorgi@google.com>2021-02-10 07:21:11 +0000
commitd6d71ce442de2186ec3ea0a8fefcefb054915ded (patch)
tree4826126ba3f0eec5b10f3ef4721ae0f4001063c0 /src/device
parent44c431e16194213e5a1bd26d7a1e0dd09e53deef (diff)
downloadcoreboot-d6d71ce442de2186ec3ea0a8fefcefb054915ded.tar.xz
device/azalia_device: Add mainboard hook to program codecs
On some mainboards, codec configuration depends on settings that are only known at runtime, which is impossible to specify using one verb table. Add an optional `mainboard_azalia_program_runtime_verbs` hook where mainboards can program runtime-dependent codec verbs. Change-Id: I7efeba5c26051aeb5061cce191ace08c304a6c70 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/50388 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Diffstat (limited to 'src/device')
-rw-r--r--src/device/azalia_device.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/device/azalia_device.c b/src/device/azalia_device.c
index 5a3a5ded04..1a57be1181 100644
--- a/src/device/azalia_device.c
+++ b/src/device/azalia_device.c
@@ -210,6 +210,10 @@ int azalia_program_verb_table(u8 *base, const u32 *verbs, u32 verb_size)
return 0;
}
+__weak void mainboard_azalia_program_runtime_verbs(u8 *base, u32 viddid)
+{
+}
+
static void codec_init(struct device *dev, u8 *base, int addr)
{
u32 reg32;
@@ -246,6 +250,8 @@ static void codec_init(struct device *dev, u8 *base, int addr)
/* 3 */
azalia_program_verb_table(base, verb, verb_size);
printk(BIOS_DEBUG, "azalia_audio: verb loaded.\n");
+
+ mainboard_azalia_program_runtime_verbs(base, reg32);
}
static void codecs_init(struct device *dev, u8 *base, u32 codec_mask)