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/variants.h>
4
#include <
console/console.h
>
5
#include <nhlt.h>
6
#include <soc/nhlt.h>
7
8
void
__weak
variant_nhlt_init
(
struct
nhlt
*
nhlt
)
9
{
10
/* 1-dmic configuration */
11
if
(
CONFIG
(NHLT_DMIC_1CH_16B) &&
12
!
nhlt_soc_add_dmic_array
(
nhlt
, 1))
13
printk
(
BIOS_ERR
,
"Added 1CH DMIC array.\n"
);
14
/* 2-dmic configuration */
15
if
(
CONFIG
(NHLT_DMIC_2CH_16B) &&
16
!
nhlt_soc_add_dmic_array
(
nhlt
, 2))
17
printk
(
BIOS_ERR
,
"Added 2CH DMIC array.\n"
);
18
/* 4-dmic configuration */
19
if
(
CONFIG
(NHLT_DMIC_4CH_16B) &&
20
!
nhlt_soc_add_dmic_array
(
nhlt
, 4))
21
printk
(
BIOS_ERR
,
"Added 4CH DMIC array.\n"
);
22
23
if
(
CONFIG
(INCLUDE_SND_MAX98357_DA7219_NHLT)) {
24
/* Dialog for Headset codec.
25
* Headset codec is bi-directional but uses the same
26
* configuration settings for render and capture endpoints.
27
*/
28
if
(!
nhlt_soc_add_da7219
(
nhlt
,
AUDIO_LINK_SSP2
))
29
printk
(
BIOS_ERR
,
"Added Dialog_7219 codec.\n"
);
30
31
/* MAXIM Smart Amps for left and right speakers. */
32
if
(!
nhlt_soc_add_max98357
(
nhlt
,
AUDIO_LINK_SSP1
))
33
printk
(
BIOS_ERR
,
"Added Maxim_98357 codec.\n"
);
34
}
35
36
if
(
CONFIG
(INCLUDE_SND_MAX98373_NHLT) &&
37
!
nhlt_soc_add_max98373
(
nhlt
,
AUDIO_LINK_SSP1
))
38
printk
(
BIOS_ERR
,
"Added Maxim_98373 codec.\n"
);
39
}
printk
#define printk(level,...)
Definition:
stdlib.h:16
console.h
CONFIG
@ CONFIG
Definition:
dsi_common.h:201
BIOS_ERR
#define BIOS_ERR
BIOS_ERR - System in incomplete state.
Definition:
loglevel.h:72
variant_nhlt_init
void __weak variant_nhlt_init(struct nhlt *nhlt)
Definition:
nhlt.c:7
__weak
const struct smm_save_state_ops *legacy_ops __weak
Definition:
save_state.c:8
AUDIO_LINK_SSP2
@ AUDIO_LINK_SSP2
Definition:
nhlt.h:17
AUDIO_LINK_SSP1
@ AUDIO_LINK_SSP1
Definition:
nhlt.h:16
nhlt_soc_add_da7219
int nhlt_soc_add_da7219(struct nhlt *nhlt, int hwlink)
Definition:
nhlt.c:232
nhlt_soc_add_dmic_array
int nhlt_soc_add_dmic_array(struct nhlt *nhlt, int num_channels)
Definition:
nhlt.c:168
nhlt_soc_add_max98357
int nhlt_soc_add_max98357(struct nhlt *nhlt, int hwlink)
Definition:
nhlt.c:239
nhlt_soc_add_max98373
int nhlt_soc_add_max98373(struct nhlt *nhlt, int hwlink)
Definition:
nhlt.c:253
nhlt
Definition:
nhlt.h:287
src
mainboard
intel
coffeelake_rvp
variants
baseboard
nhlt.c
Generated by
1.9.1