coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
ssm4567.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #include <soc/nhlt.h>
4 
5 static const struct nhlt_format_config ssm4567_render_formats[] = {
6  /* 48 KHz 24-bits per sample. */
7  {
8  .num_channels = 2,
9  .sample_freq_khz = 48,
10  .container_bits_per_sample = 32,
11  .valid_bits_per_sample = 24,
12  .speaker_mask = SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT,
13  .settings_file = "ssm4567-render-2ch-48khz-24b.bin",
14  },
15 };
16 
17 /* Capture Blob used for IV feedback for Speaker Protection Algorithm */
18 static const struct nhlt_format_config ssm4567_capture_formats[] = {
19  /* 48 KHz 32-bits per sample. */
20  {
21  .num_channels = 4,
22  .sample_freq_khz = 48,
23  .container_bits_per_sample = 32,
24  .valid_bits_per_sample = 32,
25  .settings_file = "ssm4567-capture-4ch-48khz-32b.bin",
26  },
27 };
28 
29 static const struct nhlt_endp_descriptor ssm4567_descriptors[] = {
30  /* Render Endpoint */
31  {
33  .device = NHLT_SSP_DEV_I2S,
34  .direction = NHLT_DIR_RENDER,
35  .vid = NHLT_VID,
36  .did = NHLT_DID_SSP,
37  .formats = ssm4567_render_formats,
38  .num_formats = ARRAY_SIZE(ssm4567_render_formats),
39  },
40  /* Capture Endpoint */
41  {
42  .link = NHLT_LINK_SSP,
43  .device = NHLT_SSP_DEV_I2S,
44  .direction = NHLT_DIR_CAPTURE,
45  .vid = NHLT_VID,
46  .did = NHLT_DID_SSP,
47  .formats = ssm4567_capture_formats,
48  .num_formats = ARRAY_SIZE(ssm4567_capture_formats),
49  },
50 };
51 
52 int nhlt_soc_add_ssm4567(struct nhlt *nhlt, int hwlink)
53 {
54  /* Virtual bus id of SSP links are the hardware port ids proper. */
57 }
#define ARRAY_SIZE(a)
Definition: helpers.h:12
@ NHLT_LINK_SSP
Definition: nhlt.h:176
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
#define NHLT_DID_SSP
Definition: nhlt.h:11
#define NHLT_VID
Definition: nhlt.h:8
int nhlt_soc_add_ssm4567(struct nhlt *nhlt, int hwlink)
Definition: ssm4567.c:52
static const struct nhlt_format_config ssm4567_capture_formats[]
Definition: ssm4567.c:18
static const struct nhlt_format_config ssm4567_render_formats[]
Definition: ssm4567.c:5
static const struct nhlt_endp_descriptor ssm4567_descriptors[]
Definition: ssm4567.c:29
int num_channels
Definition: nhlt.h:260
Definition: nhlt.h:287