aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sound/soc/sof/topology.c
diff options
context:
space:
mode:
authorRanjani Sridharan <ranjani.sridharan@linux.intel.com>2023-03-13 14:48:52 +0200
committerMark Brown <broonie@kernel.org>2023-03-13 14:08:26 +0000
commit7ab6b1e8302cf7a9bc8808c43b3e751e4148a351 (patch)
tree68c29d376caae64f32720e39c73eaab297f78c78 /sound/soc/sof/topology.c
parentASoC: SOF: ipc4-topology: Always parse the output formats in topology (diff)
downloadwireguard-linux-7ab6b1e8302cf7a9bc8808c43b3e751e4148a351.tar.xz
wireguard-linux-7ab6b1e8302cf7a9bc8808c43b3e751e4148a351.zip
ASoC: SOF: ipc4-topology: Modify the type of available input/output formats
Introduce a new struct sof_ipc4_pin_format which contains the pin index and the buffer size. Replace the type of available input/output audio formats in struct sof_ipc4_available_audio_format with this new struct type and rename them to input_pin_fmts and output_pin_fmts. Also, add a new token, SOF_TKN_CAVS_AUDIO_FORMAT_PIN_INDEX that will be used to parse the pin index for the audio format from topology. Currently we only set the audio format for Pin 0 in topology, so the default value will be 0 for all audio formats. Finally, parse the pin_index and the input/output buffer sizes along with audio formats into the pin_format arrays in struct sof_ipc4_available_audio_format. This makes the base_config array in struct sof_ipc4_available_audio_format redundant. So remove it. This change will allow the addition of audio formats for the non-zero pins in topology transparent to the topology parser in the kernel. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20230313124856.8140-8-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/topology.c')
-rw-r--r--sound/soc/sof/topology.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/sound/soc/sof/topology.c b/sound/soc/sof/topology.c
index 2d76ab13b3d1..3a091f18731f 100644
--- a/sound/soc/sof/topology.c
+++ b/sound/soc/sof/topology.c
@@ -1232,7 +1232,6 @@ static int sof_widget_parse_tokens(struct snd_soc_component *scomp, struct snd_s
continue;
case SOF_IN_AUDIO_FORMAT_TOKENS:
case SOF_OUT_AUDIO_FORMAT_TOKENS:
- case SOF_AUDIO_FORMAT_BUFFER_SIZE_TOKENS:
num_sets = sof_get_token_value(SOF_TKN_COMP_NUM_AUDIO_FORMATS,
swidget->tuples, swidget->num_tuples);