From ca8d6a75123a7bfddd0560ffb38f1ca0ea47582d Mon Sep 17 00:00:00 2001 From: Matt DeVillier Date: Fri, 5 Sep 2025 17:18:11 -0500 Subject: [PATCH] mb/starlabs/starfighter/rpl: Use macros for HDA verb table Rework the HDA verb table using macros. Explicitly disable all pin widgets not used. Use consistent formatting and verbiage in comments. Update the verb count. TEST=build/boot Win11, Ubuntu 25.04 on Starfighter RPL, verify all audio inputs/outputs working as expected. Verify verbs loaded via cbmem log. Change-Id: I2b96318df4431bc155af5a8f92935900031e0bfa Signed-off-by: Matt DeVillier Reviewed-on: https://review.coreboot.org/c/coreboot/+/89084 Tested-by: build bot (Jenkins) Reviewed-by: Nicholas Sudsgaard Reviewed-by: Elyes Haouas --- .../starfighter/variants/rpl/hda_verb.c | 74 ++++++++++++++----- 1 file changed, 56 insertions(+), 18 deletions(-) diff --git a/src/mainboard/starlabs/starfighter/variants/rpl/hda_verb.c b/src/mainboard/starlabs/starfighter/variants/rpl/hda_verb.c index d67676febc..93b3cbf3ac 100644 --- a/src/mainboard/starlabs/starfighter/variants/rpl/hda_verb.c +++ b/src/mainboard/starlabs/starfighter/variants/rpl/hda_verb.c @@ -1,30 +1,67 @@ /* SPDX-License-Identifier: GPL-2.0-only */ #include +#include const u32 cim_verb_data[] = { /* coreboot specific header */ - 0x10ec0256, /* Codec Vendor / Device ID: Realtek ALC256 */ - 0x10ec1200, /* Subsystem ID */ - 32, /* Number of jacks (NID entries) */ + 0x10ec0256, /* Codec Vendor / Device ID: Realtek ALC256 */ + 0x10ec1200, /* Subsystem ID */ + 30, /* Number of verb entries */ /* Reset Codec First */ AZALIA_RESET(0x1), - /* HDA Codec Subsystem ID: 0x10EC1200 */ + /* HDA Codec Subsystem ID */ AZALIA_SUBVENDOR(0, 0x10ec1200), - AZALIA_PIN_CFG(0, 0x01, 0x00000000), - AZALIA_PIN_CFG(0, 0x12, 0x90a60130), - AZALIA_PIN_CFG(0, 0x13, 0x40000000), - AZALIA_PIN_CFG(0, 0x14, 0x411111f0), - AZALIA_PIN_CFG(0, 0x18, 0x411111f0), - AZALIA_PIN_CFG(0, 0x19, 0x04a19040), - AZALIA_PIN_CFG(0, 0x1a, 0x411111f0), - AZALIA_PIN_CFG(0, 0x1b, 0x90170110), - AZALIA_PIN_CFG(0, 0x1d, 0x40689a6d), - AZALIA_PIN_CFG(0, 0x1e, 0x411111f0), - AZALIA_PIN_CFG(0, 0x21, 0x04214020), + /* Pin Widget Verb-table */ + AZALIA_PIN_CFG(0, ALC256_DMIC12, AZALIA_PIN_DESC( + AZALIA_INTEGRATED, + AZALIA_MOBILE_LID_INSIDE, + AZALIA_MIC_IN, + AZALIA_OTHER_DIGITAL, + AZALIA_COLOR_UNKNOWN, + AZALIA_NO_JACK_PRESENCE_DETECT, + 3, + 0 + )), + AZALIA_PIN_CFG(0, ALC256_MIC2, AZALIA_PIN_DESC( + AZALIA_JACK, + AZALIA_EXTERNAL_PRIMARY_CHASSIS | AZALIA_RIGHT, + AZALIA_MIC_IN, + AZALIA_STEREO_MONO_1_8, + AZALIA_BLACK, + AZALIA_JACK_PRESENCE_DETECT, + 4, + 0 + )), + /* Internal speakers are connected to LINE2 and external amps */ + AZALIA_PIN_CFG(0, ALC256_LINE2, AZALIA_PIN_DESC( + AZALIA_INTEGRATED, + AZALIA_INTERNAL | AZALIA_FRONT, + AZALIA_SPEAKER, + AZALIA_OTHER_ANALOG, + AZALIA_COLOR_UNKNOWN, + AZALIA_NO_JACK_PRESENCE_DETECT, + 1, + 0 + )), + AZALIA_PIN_CFG(0, ALC256_HP_OUT, AZALIA_PIN_DESC( + AZALIA_JACK, + AZALIA_EXTERNAL_PRIMARY_CHASSIS | AZALIA_RIGHT, + AZALIA_HP_OUT, + AZALIA_STEREO_MONO_1_8, + AZALIA_BLACK, + AZALIA_JACK_PRESENCE_DETECT, + 2, + 0 + )), + AZALIA_PIN_CFG(0, ALC256_DMIC34, AZALIA_PIN_CFG_NC(0)), + AZALIA_PIN_CFG(0, ALC256_SPEAKERS, AZALIA_PIN_CFG_NC(0)), + AZALIA_PIN_CFG(0, ALC256_LINE1, AZALIA_PIN_CFG_NC(0)), + AZALIA_PIN_CFG(0, ALC256_PC_BEEP, AZALIA_PIN_CFG_NC(0)), + AZALIA_PIN_CFG(0, ALC256_SPDIF_OUT, AZALIA_PIN_CFG_NC(0)), /* Reset and Set LDO3 output to 1.2V */ 0x0205001a, @@ -162,9 +199,10 @@ const u32 cim_verb_data[] = { 0x02050020, 0x020451FF, - 0x80862815, /* Codec Vendor / Device ID: Intel */ - 0x80860101, /* Subsystem ID */ - 10, /* Number of 4 dword sets */ + /* Intel RPL IGD HDMI */ + 0x80862815, /* Codec Vendor / Device ID: Intel */ + 0x80860101, /* Subsystem ID */ + 10, /* Number of verb entries */ AZALIA_SUBVENDOR(2, 0x80860101),