azalia_device: Report if codec verb loading failed

Handle the return value of `azalia_program_verb_table()` and print
different messages accordingly.

Change-Id: I99e9e1416217c5e67c529944736affb31f9c7d2f
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/59115
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Angel Pons 2021-11-10 17:47:22 +01:00 committed by Paul Fagerburg
parent b7a6a1e4ac
commit 1297b9c74d
1 changed files with 5 additions and 2 deletions

View File

@ -261,8 +261,11 @@ static void codec_init(struct device *dev, u8 *base, int addr)
printk(BIOS_DEBUG, "azalia_audio: verb_size: %u\n", verb_size);
/* 3 */
azalia_program_verb_table(base, verb, verb_size);
printk(BIOS_DEBUG, "azalia_audio: verb loaded.\n");
const int rc = azalia_program_verb_table(base, verb, verb_size);
if (rc < 0)
printk(BIOS_DEBUG, "azalia_audio: verb not loaded.\n");
else
printk(BIOS_DEBUG, "azalia_audio: verb loaded.\n");
mainboard_azalia_program_runtime_verbs(base, reg32);
}