Skip to content

Commit 9a9ce04

Browse files
ASoC: SOF: amd: add ACP I2S format field and topology token
Add format field to sof_ipc_dai_acp_params for ACP I2S format selection. Add SOF_TKN_AMD_ACPI2S_FORMAT token (1703) and wire it into the acpi2s_tokens[] IPC3 topology parsing array. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
1 parent bf0898d commit 9a9ce04

3 files changed

Lines changed: 8 additions & 1 deletion

File tree

include/sound/sof/dai-amd.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ struct sof_ipc_dai_acp_params {
1818
uint32_t fsync_rate; /* FSYNC frequency in Hz */
1919
uint32_t tdm_slots;
2020
uint32_t tdm_mode;
21+
uint32_t format;
2122
} __packed;
2223

2324
/* ACPDMIC Configuration Request - SOF_IPC_DAI_AMD_CONFIG */

include/uapi/sound/sof/tokens.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@
223223
#define SOF_TKN_AMD_ACPI2S_RATE 1700
224224
#define SOF_TKN_AMD_ACPI2S_CH 1701
225225
#define SOF_TKN_AMD_ACPI2S_TDM_MODE 1702
226+
#define SOF_TKN_AMD_ACPI2S_FORMAT 1703
226227

227228
/* MICFIL PDM */
228229
#define SOF_TKN_IMX_MICFIL_RATE 2000

sound/soc/sof/ipc3-topology.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,14 +281,19 @@ static const struct sof_topology_token acpdmic_tokens[] = {
281281
offsetof(struct sof_ipc_dai_acpdmic_params, pdm_ch)},
282282
};
283283

284-
/* ACPI2S */
284+
/*
285+
* ACPI2S tokens fill struct sof_ipc_dai_acp_params; SOF_DAI_AMD_I2S (ACPTDM
286+
* on ACP7.B/7.F) reuses this tuple group rather than defining a parallel set.
287+
*/
285288
static const struct sof_topology_token acpi2s_tokens[] = {
286289
{SOF_TKN_AMD_ACPI2S_RATE, SND_SOC_TPLG_TUPLE_TYPE_WORD, get_token_u32,
287290
offsetof(struct sof_ipc_dai_acp_params, fsync_rate)},
288291
{SOF_TKN_AMD_ACPI2S_CH, SND_SOC_TPLG_TUPLE_TYPE_WORD, get_token_u32,
289292
offsetof(struct sof_ipc_dai_acp_params, tdm_slots)},
290293
{SOF_TKN_AMD_ACPI2S_TDM_MODE, SND_SOC_TPLG_TUPLE_TYPE_WORD, get_token_u32,
291294
offsetof(struct sof_ipc_dai_acp_params, tdm_mode)},
295+
{SOF_TKN_AMD_ACPI2S_FORMAT, SND_SOC_TPLG_TUPLE_TYPE_WORD, get_token_u32,
296+
offsetof(struct sof_ipc_dai_acp_params, format)},
292297
};
293298

294299
/* MICFIL PDM */

0 commit comments

Comments
 (0)