Skip to content

Commit

Permalink
mb/prodrive/hermes: Rename "internal audio" setting
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/58904
Tested-by: build bot (Jenkins) <[email protected]>
Reviewed-by: Justin van Son <[email protected]>
Reviewed-by: Arthur Heymans <[email protected]>
  • Loading branch information
Th3Fanbus committed Nov 22, 2021
1 parent 667471b commit 63c0fd2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/mainboard/prodrive/hermes/mainboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
8 changes: 4 additions & 4 deletions src/mainboard/prodrive/hermes/variants/r04/hda_verb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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),
};
Expand Down

0 comments on commit 63c0fd2

Please sign in to comment.