summaryrefslogtreecommitdiffstats
path: root/sound/soc/sof
diff options
context:
space:
mode:
authorRanjani Sridharan <ranjani.sridharan@linux.intel.com>2022-03-08 08:43:39 -0800
committerMark Brown <broonie@kernel.org>2022-03-09 13:30:05 +0000
commitc7b655ade96a282a4304d68dcb120fcb61f19db2 (patch)
tree2413623e464751352e8da059bf6229d0695855f3 /sound/soc/sof
parent2b4b383f85baa493039a1fd80ca3f428f9504a54 (diff)
downloadlinux-c7b655ade96a282a4304d68dcb120fcb61f19db2.tar.bz2
ASoC: SOF: Add a tuples array to struct snd_sof_widget
Add 2 new fields to snd_sof_widget to store an array of tuples defined by struct snd_sof_tuple and the number of tuples. When the topology gets parsed, the tuples associated with a widget will be stored in this array and will be used to construct the IPC structure depending on the IPC version. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.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> Link: https://lore.kernel.org/r/20220308164344.577647-14-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof')
-rw-r--r--sound/soc/sof/sof-audio.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/sound/soc/sof/sof-audio.h b/sound/soc/sof/sof-audio.h
index 10330d826d40..2a1da9e13279 100644
--- a/sound/soc/sof/sof-audio.h
+++ b/sound/soc/sof/sof-audio.h
@@ -30,6 +30,18 @@
#define WIDGET_IS_DAI(id) ((id) == snd_soc_dapm_dai_in || (id) == snd_soc_dapm_dai_out)
+/** struct snd_sof_tuple - Tuple info
+ * @token: Token ID
+ * @value: union of a string or a u32 values
+ */
+struct snd_sof_tuple {
+ u32 token;
+ union {
+ u32 v;
+ const char *s;
+ } value;
+};
+
/* PCM stream, mapped to FW component */
struct snd_sof_pcm_stream {
u32 comp_id;
@@ -112,6 +124,9 @@ struct snd_sof_widget {
const guid_t uuid;
+ int num_tuples;
+ struct snd_sof_tuple *tuples;
+
void *private; /* core does not touch this */
};