coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
nau88l25.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #include <soc/nhlt.h>
4 
5 /* The same DSP firmware settings are used for both the capture and
6  * render endpoints. */
7 static const struct nhlt_format_config nau88l25_formats[] = {
8  /* 48 KHz 24-bits per sample. */
9  {
10  .num_channels = 2,
11  .sample_freq_khz = 48,
12  .container_bits_per_sample = 32,
13  .valid_bits_per_sample = 24,
14  .speaker_mask = SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT,
15  .settings_file = "nau88l25-2ch-48khz-24b.bin",
16  },
17 };
18 
19 /* The nau88l25 just has headphones and a mic. Both the capture and render
20  * endpoints occupy the same virtual slot. */
21 static const struct nhlt_tdm_config tdm_config = {
22  .virtual_slot = 0,
23  .config_type = NHLT_TDM_BASIC,
24 };
25 
26 static const struct nhlt_endp_descriptor nau88l25_descriptors[] = {
27  /* Render Endpoint */
28  {
30  .device = NHLT_SSP_DEV_I2S,
31  .direction = NHLT_DIR_RENDER,
32  .vid = NHLT_VID,
33  .did = NHLT_DID_SSP,
34  .cfg = &tdm_config,
35  .cfg_size = sizeof(tdm_config),
38  },
39  /* Capture Endpoint */
40  {
41  .link = NHLT_LINK_SSP,
42  .device = NHLT_SSP_DEV_I2S,
43  .direction = NHLT_DIR_CAPTURE,
44  .vid = NHLT_VID,
45  .did = NHLT_DID_SSP,
46  .cfg = &tdm_config,
47  .cfg_size = sizeof(tdm_config),
50  },
51 };
52 
53 int nhlt_soc_add_nau88l25(struct nhlt *nhlt, int hwlink)
54 {
55  /* Virtual bus id of SSP links are the hardware port ids proper. */
58 }
#define ARRAY_SIZE(a)
Definition: helpers.h:12
@ NHLT_LINK_SSP
Definition: nhlt.h:176
@ NHLT_TDM_BASIC
Definition: nhlt.h:300
int nhlt_add_ssp_endpoints(struct nhlt *nhlt, int virtual_bus_id, const struct nhlt_endp_descriptor *epds, size_t num_epds)
Definition: nhlt.c:468
@ NHLT_SSP_DEV_I2S
Definition: nhlt.h:185
@ SPEAKER_FRONT_LEFT
Definition: nhlt.h:203
@ SPEAKER_FRONT_RIGHT
Definition: nhlt.h:204
@ NHLT_DIR_RENDER
Definition: nhlt.h:195
@ NHLT_DIR_CAPTURE
Definition: nhlt.h:196
static const struct nhlt_endp_descriptor nau88l25_descriptors[]
Definition: nau88l25.c:26
int nhlt_soc_add_nau88l25(struct nhlt *nhlt, int hwlink)
Definition: nau88l25.c:53
static const struct nhlt_format_config nau88l25_formats[]
Definition: nau88l25.c:7
static const struct nhlt_tdm_config tdm_config
Definition: nau88l25.c:21
#define NHLT_DID_SSP
Definition: nhlt.h:11
#define NHLT_VID
Definition: nhlt.h:8
const struct nhlt_format_config * formats
Definition: nhlt.h:63
size_t num_formats
Definition: nhlt.h:64
int num_channels
Definition: nhlt.h:260
uint8_t virtual_slot
Definition: nhlt.h:295
Definition: nhlt.h:287