Skip to content

Commit

Permalink
topology: Add support for buffer flags
Browse files Browse the repository at this point in the history
Flags have been a part of IPC3 for ages, add support for them in the topology.

Signed-off-by: Curtis Malainey <[email protected]>
  • Loading branch information
cujomalainey authored and kv2019i committed Nov 30, 2023
1 parent 5cf1c9c commit 285c090
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/include/kernel/tokens.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
/* buffers */
#define SOF_TKN_BUF_SIZE 100
#define SOF_TKN_BUF_CAPS 101
#define SOF_TKN_BUF_FLAGS 102

/* DAI */
/* Token retired with ABI 3.2, do not use for new capabilities
Expand Down
5 changes: 4 additions & 1 deletion tools/topology/topology1/m4/buffer.m4
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@ dnl Define the macro for buffer widget
dnl N_BUFFER(name)
define(`N_BUFFER', `BUF'PIPELINE_ID`.'$1)

dnl W_BUFFER(name, size, capabilities)
dnl W_BUFFER(name, size, capabilities, [core], [flags])
define(`W_BUFFER',
`SectionVendorTuples."'N_BUFFER($1)`_tuples" {'
` tokens "sof_buffer_tokens"'
` tuples."word" {'
` SOF_TKN_BUF_SIZE' STR($2)
` SOF_TKN_BUF_CAPS' STR($3)
`ifelse(`$#', `5',
` SOF_TKN_BUF_FLAGS' STR($5)
,` ')'
` }'
`}'
`SectionData."'N_BUFFER($1)`_data" {'
Expand Down
2 changes: 2 additions & 0 deletions tools/tplg_parser/buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ static const struct sof_topology_token buffer_tokens[] = {
offsetof(struct sof_ipc_buffer, size), 0},
{SOF_TKN_BUF_CAPS, SND_SOC_TPLG_TUPLE_TYPE_WORD, tplg_token_get_uint32_t,
offsetof(struct sof_ipc_buffer, caps), 0},
{SOF_TKN_BUF_FLAGS, SND_SOC_TPLG_TUPLE_TYPE_WORD, tplg_token_get_uint32_t,
offsetof(struct sof_ipc_buffer, flags), 0},
};

static const struct sof_topology_token buffer_comp_tokens[] = {
Expand Down

0 comments on commit 285c090

Please sign in to comment.