mb/prodrive/hermes: Rename "internal audio" setting

The "internal audio connection" setting is actually about the front
panel audio. Rename functions and variables to reflect this.

Change-Id: I1be8f68ac3e8b91bc4983dc06daa37afb7bdf926
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/58904
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Justin van Son <justin.van.son@prodrive-technologies.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
This commit is contained in:
Angel Pons 2021-11-03 12:47:56 +01:00
parent 667471b8d8
commit 63c0fd2dbe
3 changed files with 6 additions and 6 deletions

View File

@ -138,7 +138,7 @@ static void mainboard_init(void *chip_info)
return;
/* Enable internal speaker amplifier */
if (board_cfg->internal_audio_connection == 2)
if (board_cfg->front_panel_audio == 2)
mb_hda_amp_enable(1);
else
mb_hda_amp_enable(0);

View File

@ -47,7 +47,7 @@ struct __packed eeprom_board_settings {
uint8_t usb_powered_in_s5;
uint8_t power_state_after_g3;
uint8_t blue_rear_vref;
uint8_t internal_audio_connection;
uint8_t front_panel_audio;
uint8_t pxe_boot_capability;
};
uint8_t raw_settings[9];

View File

@ -30,9 +30,9 @@ static u32 get_port_c_vref_cfg(uint8_t blue_rear_vref)
}
}
static u32 get_internal_audio_cfg(uint8_t internal_audio_connection)
static u32 get_front_panel_cfg(uint8_t front_panel_audio)
{
switch (internal_audio_connection) {
switch (front_panel_audio) {
default:
case 0:
return AZALIA_PIN_CFG_NC(0);
@ -62,10 +62,10 @@ void mainboard_r0x_configure_alc888(u8 *base, u32 viddid)
if (!board_cfg)
return;
const u32 config = get_internal_audio_cfg(board_cfg->internal_audio_connection);
const u32 front_panel_cfg = get_front_panel_cfg(board_cfg->front_panel_audio);
const u32 verbs[] = {
AZALIA_PIN_CFG(0, 0x1b, config),
AZALIA_PIN_CFG(0, 0x1b, front_panel_cfg),
0x0205000d, /* Pin 37 vrefo hidden register - used as port C vref */
get_port_c_vref_cfg(board_cfg->blue_rear_vref),
};