coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
nhlt.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #include <baseboard/cbi_ssfc.h>
4 #include <baseboard/variants.h>
5 #include <console/console.h>
6 #include <nhlt.h>
7 #include <soc/nhlt.h>
8 
10 {
12 
13  /* 2 Channel DMIC array. */
15  printk(BIOS_ERR, "Added 2CH DMIC array.\n");
16 
17  /* 4 Channel DMIC array. */
19  printk(BIOS_ERR, "Added 4CH DMIC arrays.\n");
20 
21  /*
22  * Headset codec is bi-directional but uses the same configuration
23  * settings for render and capture endpoints.
24  */
25  if (CONFIG(NHLT_DA7219) && codec == SSFC_AUDIO_CODEC_DA7219) {
26  /* Dialog for Headset codec */
28  printk(BIOS_ERR, "Added Dialog_7219 codec.\n");
29  }
30 
31  if (CONFIG(NHLT_RT5682) &&
32  (codec == SSFC_AUDIO_CODEC_RT5682 ||
33  codec == SSFC_AUDIO_CODEC_RT5682_VS)) {
34  /* Realtek for Headset codec */
36  printk(BIOS_ERR, "Added ALC5682 codec.\n");
37  }
38 
39  /* MAXIM Smart Amps for left and right speakers. */
41  printk(BIOS_ERR, "Added Maxim_98357 codec.\n");
42 }
enum ssfc_audio_codec ssfc_get_audio_codec(void)
Definition: cbi_ssfc.c:61
ssfc_audio_codec
Definition: cbi_ssfc.h:28
@ SSFC_AUDIO_CODEC_RT5682_VS
Definition: cbi_ssfc.h:33
@ SSFC_AUDIO_CODEC_DA7219
Definition: cbi_ssfc.h:30
@ SSFC_AUDIO_CODEC_RT5682
Definition: cbi_ssfc.h:31
#define printk(level,...)
Definition: stdlib.h:16
@ CONFIG
Definition: dsi_common.h:201
#define BIOS_ERR
BIOS_ERR - System in incomplete state.
Definition: loglevel.h:72
void __weak variant_nhlt_init(struct nhlt *nhlt)
Definition: nhlt.c:7
const struct smm_save_state_ops *legacy_ops __weak
Definition: save_state.c:8
@ AUDIO_LINK_SSP2
Definition: nhlt.h:17
@ AUDIO_LINK_SSP1
Definition: nhlt.h:16
int nhlt_soc_add_da7219(struct nhlt *nhlt, int hwlink)
Definition: nhlt.c:232
int nhlt_soc_add_dmic_array(struct nhlt *nhlt, int num_channels)
Definition: nhlt.c:168
int nhlt_soc_add_rt5682(struct nhlt *nhlt, int hwlink)
Definition: nhlt.c:246
int nhlt_soc_add_max98357(struct nhlt *nhlt, int hwlink)
Definition: nhlt.c:239
Definition: nhlt.h:287