From 4a62b8a5997873229f5342bffdee3e6b21772b06 Mon Sep 17 00:00:00 2001 From: Nicholas Sudsgaard Date: Thu, 22 Feb 2024 13:33:15 +0900 Subject: include/device: Merge enums from azalia_device.h and azalia.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We were keeping 2 copies of the same thing (albeit there were some slight differences). As azalia_device.h is used much more in the codebase this was kept as the base and then some of the nice features of azalia.h were incorporated. The significant changes are: - All enum names now use the `AZALIA_` prefix. This also drops the AzaliaPinConfiguration enum as it was never used since added in 2013. Change-Id: Ie874b083a18963679981a9cd2b25d123890d628e Signed-off-by: Nicholas Sudsgaard Reviewed-on: https://review.coreboot.org/c/coreboot/+/80695 Reviewed-by: Nico Huber Tested-by: build bot (Jenkins) Reviewed-by: Felix Singer Reviewed-by: Michael Niewöhner --- .../siemens/chili/variants/chili/hda_verb.c | 73 ++++++++++++---------- 1 file changed, 40 insertions(+), 33 deletions(-) (limited to 'src/mainboard/siemens/chili/variants') diff --git a/src/mainboard/siemens/chili/variants/chili/hda_verb.c b/src/mainboard/siemens/chili/variants/chili/hda_verb.c index f0e403acd0..7fdb884465 100644 --- a/src/mainboard/siemens/chili/variants/chili/hda_verb.c +++ b/src/mainboard/siemens/chili/variants/chili/hda_verb.c @@ -1,7 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ #include -#include const u32 cim_verb_data[] = { /* coreboot specific header */ @@ -15,31 +14,36 @@ const u32 cim_verb_data[] = { AZALIA_SUBVENDOR(0, 0x110a4097), /* Pin Widget Verb Table */ - AZALIA_PIN_CFG(0, 0x14, /* 0x14 Speaker OUT */ - (AZALIA_PINCFG_PORT_FIXED << 30) | - (AZALIA_PINCFG_LOCATION_INTERNAL << 24) | - (AZALIA_PINCFG_DEVICE_SPEAKER << 20) | - (AZALIA_PINCFG_CONN_OTHER_ANALOG << 16) | - (AZALIA_PINCFG_MISC_IGNORE_PRESENCE << 8) | - (1 << 4) | 0 - ), - AZALIA_PIN_CFG(0, 0x21, /* 0x21 Headphone OUT */ - (AZALIA_PINCFG_PORT_JACK << 30) | - (AZALIA_PINCFG_LOCATION_FRONT << 24) | - (AZALIA_PINCFG_DEVICE_HP_OUT << 20) | - (AZALIA_PINCFG_CONN_COMBINATION << 16) | - (AZALIA_PINCFG_COLOR_BLACK << 12) | - (2 << 4) | 0 - ), - AZALIA_PIN_CFG(0, 0x19, /* 0x19 MIC2 */ - (AZALIA_PINCFG_PORT_JACK << 30) | - (AZALIA_PINCFG_LOCATION_FRONT << 24) | - (AZALIA_PINCFG_DEVICE_MICROPHONE << 20) | - (AZALIA_PINCFG_CONN_COMBINATION << 16) | - (AZALIA_PINCFG_COLOR_BLACK << 12) | - (AZALIA_PINCFG_MISC_IGNORE_PRESENCE << 8) | - (3 << 4) | 0 - ), + AZALIA_PIN_CFG(0, 0x14, AZALIA_PIN_DESC( /* 0x14 Speaker OUT */ + AZALIA_INTEGRATED, + AZALIA_INTERNAL, + AZALIA_GEOLOCATION_NA, + AZALIA_SPEAKER, + AZALIA_OTHER_ANALOG, + AZALIA_COLOR_UNKNOWN, + AZALIA_NO_JACK_PRESENCE_DETECT, + 1, 0 + )), + AZALIA_PIN_CFG(0, 0x21, AZALIA_PIN_DESC( /* 0x21 Headphone OUT */ + AZALIA_JACK, + AZALIA_EXTERNAL_PRIMARY_CHASSIS, + AZALIA_FRONT, + AZALIA_HP_OUT, + AZALIA_COMBINATION, + AZALIA_BLACK, + AZALIA_JACK_PRESENCE_DETECT, + 2, 0 + )), + AZALIA_PIN_CFG(0, 0x19, AZALIA_PIN_DESC( /* 0x19 MIC2 */ + AZALIA_JACK, + AZALIA_EXTERNAL_PRIMARY_CHASSIS, + AZALIA_FRONT, + AZALIA_MIC_IN, + AZALIA_COMBINATION, + AZALIA_BLACK, + AZALIA_NO_JACK_PRESENCE_DETECT, + 3, 0 + )), AZALIA_PIN_CFG(0, 0x12, AZALIA_PIN_CFG_NC(0)), /* 0x12 Digital MIC */ AZALIA_PIN_CFG(0, 0x17, AZALIA_PIN_CFG_NC(1)), /* 0x17 Mono OUT */ @@ -61,13 +65,16 @@ const u32 cim_verb_data[] = { 0x20878101, AZALIA_PIN_CFG(2, 0x05, AZALIA_PIN_CFG_NC(0)), AZALIA_PIN_CFG(2, 0x06, AZALIA_PIN_CFG_NC(1)), - AZALIA_PIN_CFG(2, 0x07, - (AZALIA_PINCFG_PORT_JACK << 30) | - (AZALIA_PINCFG_LOCATION_REAR_PANEL << 24) | - (AZALIA_PINCFG_DEVICE_DIGITAL_OUT << 20) | - (AZALIA_PINCFG_CONN_OTHER_DIGITAL << 16) | - (1 << 4) | 0 - ), + AZALIA_PIN_CFG(2, 0x07, AZALIA_PIN_DESC( + AZALIA_JACK, + AZALIA_EXTERNAL_PRIMARY_CHASSIS, + AZALIA_SPECIAL7, + AZALIA_DIGITAL_OTHER_OUT, + AZALIA_OTHER_DIGITAL, + AZALIA_COLOR_UNKNOWN, + AZALIA_JACK_PRESENCE_DETECT, + 1, 0 + )), /* Disable 2nd & 3rd pin widgets again */ 0x20878100, 0x20878100, -- cgit v1.2.3