[PATCH 02/16] ASoC: SOF: add comp_ext to struct snd_sof_widget

Kai Vehmanen kai.vehmanen at linux.intel.com
Fri Sep 4 15:27:30 CEST 2020


From: Keyon Jie <yang.jie at linux.intel.com>

Add member comp_ext to struct snd_sof_widget, which will be used for
topology extended tokens parsing.

Signed-off-by: Keyon Jie <yang.jie at linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan at linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen at linux.intel.com>
---
 include/sound/sof/topology.h | 8 ++++++++
 sound/soc/sof/sof-audio.h    | 3 +++
 2 files changed, 11 insertions(+)

diff --git a/include/sound/sof/topology.h b/include/sound/sof/topology.h
index f56e80d09b32..796b6c8e851d 100644
--- a/include/sound/sof/topology.h
+++ b/include/sound/sof/topology.h
@@ -87,6 +87,9 @@ struct sof_ipc_comp {
  */
 #define SOF_BUF_UNDERRUN_PERMITTED	BIT(1)
 
+/* the UUID size in bytes, shared between FW and host */
+#define SOF_UUID_SIZE	16
+
 /* create new component buffer - SOF_IPC_TPLG_BUFFER_NEW */
 struct sof_ipc_buffer {
 	struct sof_ipc_comp comp;
@@ -300,4 +303,9 @@ enum sof_event_types {
 	SOF_KEYWORD_DETECT_DAPM_EVENT,
 };
 
+/* extended data struct for UUID components */
+struct sof_ipc_comp_ext {
+	uint8_t uuid[SOF_UUID_SIZE];
+}  __packed;
+
 #endif
diff --git a/sound/soc/sof/sof-audio.h b/sound/soc/sof/sof-audio.h
index 7f8be8817e69..196cbd322893 100644
--- a/sound/soc/sof/sof-audio.h
+++ b/sound/soc/sof/sof-audio.h
@@ -89,6 +89,9 @@ struct snd_sof_widget {
 	struct snd_soc_dapm_widget *widget;
 	struct list_head list;	/* list in sdev widget list */
 
+	/* extended data for UUID components */
+	struct sof_ipc_comp_ext comp_ext;
+
 	void *private;		/* core does not touch this */
 };
 
-- 
2.27.0



More information about the Alsa-devel mailing list