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
/* 2 Channel DMIC array. */
11
if
(
nhlt_soc_add_dmic_array
(
nhlt
, 2))
12
printk
(
BIOS_ERR
,
"Couldn't add 2CH DMIC array.\n"
);
13
14
/* 4 Channel DMIC array. */
15
if
(
nhlt_soc_add_dmic_array
(
nhlt
, 4))
16
printk
(
BIOS_ERR
,
"Couldn't add 4CH DMIC arrays.\n"
);
17
18
/* Maxim MAX98927 Smart Amps for left and right channel */
19
if
(
nhlt_soc_add_max98927
(
nhlt
,
AUDIO_LINK_SSP0
))
20
printk
(
BIOS_ERR
,
"Couldn't add Maxim MAX98927\n"
);
21
22
/* Realtek RT5663 Headset codec. */
23
if
(
nhlt_soc_add_rt5663
(
nhlt
,
AUDIO_LINK_SSP1
))
24
printk
(
BIOS_ERR
,
"Couldn't add Realtek RT5663.\n"
);
25
}
26
27
void
__weak
variant_nhlt_oem_overrides
(
const
char
**oem_id,
28
const
char
**oem_table_id,
29
uint32_t
*oem_revision)
30
{
31
*oem_id =
"GOOGLE"
;
32
*oem_table_id =
"POPPYMAX"
;
33
*oem_revision = 0;
34
}
printk
#define printk(level,...)
Definition:
stdlib.h:16
console.h
BIOS_ERR
#define BIOS_ERR
BIOS_ERR - System in incomplete state.
Definition:
loglevel.h:72
variant_nhlt_oem_overrides
void __weak variant_nhlt_oem_overrides(const char **oem_id, const char **oem_table_id, uint32_t *oem_revision)
Definition:
nhlt.c:16
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_SSP0
@ AUDIO_LINK_SSP0
Definition:
nhlt.h:15
AUDIO_LINK_SSP1
@ AUDIO_LINK_SSP1
Definition:
nhlt.h:16
nhlt_soc_add_dmic_array
int nhlt_soc_add_dmic_array(struct nhlt *nhlt, int num_channels)
Definition:
nhlt.c:168
nhlt_soc_add_max98927
int nhlt_soc_add_max98927(struct nhlt *nhlt, int hwlink)
Definition:
max98927.c:59
nhlt_soc_add_rt5663
int nhlt_soc_add_rt5663(struct nhlt *nhlt, int hwlink)
Definition:
rt5663.c:57
uint32_t
unsigned int uint32_t
Definition:
stdint.h:14
nhlt
Definition:
nhlt.h:287
src
mainboard
google
poppy
variants
baseboard
nhlt.c
Generated by
1.9.1