1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <commonlib/bsd/helpers.h>
6 /* The same DSP firmware settings are used for both the capture and
8 static const struct nhlt_format_config nau88l25_formats
[] = {
9 /* 48 KHz 24-bits per sample. */
12 .sample_freq_khz
= 48,
13 .container_bits_per_sample
= 32,
14 .valid_bits_per_sample
= 24,
15 .speaker_mask
= SPEAKER_FRONT_LEFT
| SPEAKER_FRONT_RIGHT
,
16 .settings_file
= "nau88l25-2ch-48khz-24b.bin",
20 /* The nau88l25 just has headphones and a mic. Both the capture and render
21 * endpoints occupy the same virtual slot. */
22 static const struct nhlt_tdm_config tdm_config
= {
24 .config_type
= NHLT_TDM_BASIC
,
27 static const struct nhlt_endp_descriptor nau88l25_descriptors
[] = {
30 .link
= NHLT_LINK_SSP
,
31 .device
= NHLT_SSP_DEV_I2S
,
32 .direction
= NHLT_DIR_RENDER
,
36 .cfg_size
= sizeof(tdm_config
),
37 .formats
= nau88l25_formats
,
38 .num_formats
= ARRAY_SIZE(nau88l25_formats
),
40 /* Capture Endpoint */
42 .link
= NHLT_LINK_SSP
,
43 .device
= NHLT_SSP_DEV_I2S
,
44 .direction
= NHLT_DIR_CAPTURE
,
48 .cfg_size
= sizeof(tdm_config
),
49 .formats
= nau88l25_formats
,
50 .num_formats
= ARRAY_SIZE(nau88l25_formats
),
54 int nhlt_soc_add_nau88l25(struct nhlt
*nhlt
, int hwlink
)
56 /* Virtual bus id of SSP links are the hardware port ids proper. */
57 return nhlt_add_ssp_endpoints(nhlt
, hwlink
, nau88l25_descriptors
,
58 ARRAY_SIZE(nau88l25_descriptors
));