Skip to content

Commit be3c215

Browse files
ranj063broonie
authored andcommitted
ASoC: SOF: Separate the tokens for input and output pin index
Using the same token ID for both input and output format pin index results in collisions and incorrect pin index getting parsed from topology. Signed-off-by: Ranjani Sridharan <[email protected] Reviewed-by: Pierre-Louis Bossart <[email protected] Reviewed-by: Bard Liao <[email protected] Reviewed-by: Péter Ujfalusi <[email protected] Reviewed-by: Paul Olaru <[email protected] Signed-off-by: Peter Ujfalusi <[email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]
1 parent aa70f36 commit be3c215

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

include/uapi/sound/sof/tokens.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@
183183
#define SOF_TKN_CAVS_AUDIO_FORMAT_IN_INTERLEAVING_STYLE 1906
184184
#define SOF_TKN_CAVS_AUDIO_FORMAT_IN_FMT_CFG 1907
185185
#define SOF_TKN_CAVS_AUDIO_FORMAT_IN_SAMPLE_TYPE 1908
186-
#define SOF_TKN_CAVS_AUDIO_FORMAT_PIN_INDEX 1909
186+
#define SOF_TKN_CAVS_AUDIO_FORMAT_INPUT_PIN_INDEX 1909
187187
/* intentional token numbering discontinuity, reserved for future use */
188188
#define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_RATE 1930
189189
#define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_BIT_DEPTH 1931
@@ -194,6 +194,7 @@
194194
#define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_INTERLEAVING_STYLE 1936
195195
#define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_FMT_CFG 1937
196196
#define SOF_TKN_CAVS_AUDIO_FORMAT_OUT_SAMPLE_TYPE 1938
197+
#define SOF_TKN_CAVS_AUDIO_FORMAT_OUTPUT_PIN_INDEX 1939
197198
/* intentional token numbering discontinuity, reserved for future use */
198199
#define SOF_TKN_CAVS_AUDIO_FORMAT_IBS 1970
199200
#define SOF_TKN_CAVS_AUDIO_FORMAT_OBS 1971

sound/soc/sof/ipc4-topology.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ static const struct sof_topology_token ipc4_in_audio_format_tokens[] = {
5959
audio_fmt.interleaving_style)},
6060
{SOF_TKN_CAVS_AUDIO_FORMAT_IN_FMT_CFG, SND_SOC_TPLG_TUPLE_TYPE_WORD, get_token_u32,
6161
offsetof(struct sof_ipc4_pin_format, audio_fmt.fmt_cfg)},
62-
{SOF_TKN_CAVS_AUDIO_FORMAT_PIN_INDEX, SND_SOC_TPLG_TUPLE_TYPE_WORD, get_token_u32,
62+
{SOF_TKN_CAVS_AUDIO_FORMAT_INPUT_PIN_INDEX, SND_SOC_TPLG_TUPLE_TYPE_WORD, get_token_u32,
6363
offsetof(struct sof_ipc4_pin_format, pin_index)},
6464
{SOF_TKN_CAVS_AUDIO_FORMAT_IBS, SND_SOC_TPLG_TUPLE_TYPE_WORD, get_token_u32,
6565
offsetof(struct sof_ipc4_pin_format, buffer_size)},
@@ -79,7 +79,7 @@ static const struct sof_topology_token ipc4_out_audio_format_tokens[] = {
7979
audio_fmt.interleaving_style)},
8080
{SOF_TKN_CAVS_AUDIO_FORMAT_OUT_FMT_CFG, SND_SOC_TPLG_TUPLE_TYPE_WORD, get_token_u32,
8181
offsetof(struct sof_ipc4_pin_format, audio_fmt.fmt_cfg)},
82-
{SOF_TKN_CAVS_AUDIO_FORMAT_PIN_INDEX, SND_SOC_TPLG_TUPLE_TYPE_WORD, get_token_u32,
82+
{SOF_TKN_CAVS_AUDIO_FORMAT_OUTPUT_PIN_INDEX, SND_SOC_TPLG_TUPLE_TYPE_WORD, get_token_u32,
8383
offsetof(struct sof_ipc4_pin_format, pin_index)},
8484
{SOF_TKN_CAVS_AUDIO_FORMAT_OBS, SND_SOC_TPLG_TUPLE_TYPE_WORD, get_token_u32,
8585
offsetof(struct sof_ipc4_pin_format, buffer_size)},

0 commit comments

Comments
 (0)