diff options
author | Angel Pons <th3fanbus@gmail.com> | 2020-12-05 18:28:33 +0100 |
---|---|---|
committer | Hung-Te Lin <hungte@chromium.org> | 2020-12-17 13:54:43 +0000 |
commit | d3f7028993de959d7592acd564ffacf601709e89 (patch) | |
tree | 3a5b57f9b81403717b5015cf073358e0702e77c6 /src/device | |
parent | d425ddd10518b38fa107d3278cc483c036445a40 (diff) | |
download | coreboot-d3f7028993de959d7592acd564ffacf601709e89.tar.xz |
azalia: Replace `hda_find_verb` uses
This function is equivalent to `azalia_find_verb` in its current form,
so replace them. Also, adapt and move the function description comment.
Change-Id: I40d1e634c31b00bd7808a651990d9bd6f0d054e9
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48351
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.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/device/azalia_device.c b/src/device/azalia_device.c index 283d2f0fa0..e46c27f7b0 100644 --- a/src/device/azalia_device.c +++ b/src/device/azalia_device.c @@ -85,6 +85,31 @@ no_codec: return 0; } +/* + * Find a specific entry within a verb table + * + * @param verb_table: verb table data + * @param verb_table_bytes: verb table size in bytes + * @param viddid: vendor/device to search for + * @param verb: pointer to entry within table + * + * Returns size of the entry within the verb table, + * Returns 0 if the entry is not found + * + * The HDA verb table is composed of dwords. A set of 4 dwords is + * grouped together to form a "jack" descriptor. + * Bits 31:28 - Codec Address + * Bits 27:20 - NID + * Bits 19:8 - Verb ID + * Bits 7:0 - Payload + * + * coreboot groups different codec verb tables into a single table + * and prefixes each with a specific header consisting of 3 + * dword entries: + * 1 - Codec Vendor/Device ID + * 2 - Subsystem ID + * 3 - Number of jacks (groups of 4 dwords) for this codec + */ u32 azalia_find_verb(const u32 *verb_table, u32 verb_table_bytes, u32 viddid, const u32 **verb) { int idx = 0; |