From 463a7bc777a958f469e6b5a92bb4702b89401432 Mon Sep 17 00:00:00 2001 From: Nicholas Chin Date: Mon, 15 Jan 2024 10:26:11 -0700 Subject: [PATCH] include/device/azalia_device.h: Add enum for misc field The HDA specification defines bits 11:8 of the Configuration Default register as a miscellaneous field for other jack information. Only bit 8 has a standard meaning, and indicates that the jack does not have presence detect capability. Add an enum for use in the AZALIA_PIN_DESC macro to indicate this field. Note that many vendor firmwares set bits 11:9 to non zero values despite them being reserved in the specification, and their meaning in these cases is not well known. Change-Id: I70cbfca8541828a1e0c7280887060c04e4c71721 Signed-off-by: Nicholas Chin Reviewed-on: https://review.coreboot.org/c/coreboot/+/80452 Tested-by: build bot (Jenkins) Reviewed-by: Felix Singer --- src/include/device/azalia_device.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/include/device/azalia_device.h b/src/include/device/azalia_device.h index 1562e25c48..f7c1448863 100644 --- a/src/include/device/azalia_device.h +++ b/src/include/device/azalia_device.h @@ -112,7 +112,12 @@ enum azalia_pin_location_2 { LOCATION_OTHER }; -#define AZALIA_PIN_DESC(conn, location2, location1, dev, type, color, no_presence_detect, \ +enum azalia_pin_misc { + JACK_PRESENCE_DETECT = 0, + NO_JACK_PRESENCE_DETECT, +}; + +#define AZALIA_PIN_DESC(conn, location2, location1, dev, type, color, misc, \ association, sequence) \ (((conn) << 30) | \ ((location2) << 27) | \ @@ -120,7 +125,7 @@ enum azalia_pin_location_2 { ((dev) << 20) | \ ((type) << 16) | \ ((color) << 12) | \ - ((no_presence_detect) << 8) | \ + ((misc) << 8) | \ ((association) << 4) | \ ((sequence) << 0))