diff mbox series

[09/18] ASoC: SOF: topology: expose some get_token ops

Message ID 20220307181111.49392-10-ranjani.sridharan@linux.intel.com
State Accepted
Commit ea7e5ee67fb71d92b0eb0be8467fd34b0e2def6c
Headers show
Series Clean ups and preparation for IPC abstraction in the SOF driver | expand

Commit Message

Ranjani Sridharan March 7, 2022, 6:11 p.m. UTC
These will be used later on by IPC-specific code.

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>
---
 sound/soc/sof/sof-audio.h |  5 +++++
 sound/soc/sof/topology.c  | 10 +++++-----
 2 files changed, 10 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/sound/soc/sof/sof-audio.h b/sound/soc/sof/sof-audio.h
index f2f32f2065d3..feda5793b589 100644
--- a/sound/soc/sof/sof-audio.h
+++ b/sound/soc/sof/sof-audio.h
@@ -260,4 +260,9 @@  int sof_pcm_dsp_pcm_free(struct snd_pcm_substream *substream, struct snd_sof_dev
 			 struct snd_sof_pcm *spcm);
 int sof_pcm_stream_free(struct snd_sof_dev *sdev, struct snd_pcm_substream *substream,
 			struct snd_sof_pcm *spcm, int dir, bool free_widget_list);
+int get_token_u32(void *elem, void *object, u32 offset);
+int get_token_u16(void *elem, void *object, u32 offset);
+int get_token_comp_format(void *elem, void *object, u32 offset);
+int get_token_dai_type(void *elem, void *object, u32 offset);
+int get_token_uuid(void *elem, void *object, u32 offset);
 #endif
diff --git a/sound/soc/sof/topology.c b/sound/soc/sof/topology.c
index 4ba46ea73c8a..dd1cc6e26686 100644
--- a/sound/soc/sof/topology.c
+++ b/sound/soc/sof/topology.c
@@ -477,7 +477,7 @@  struct sof_topology_token {
 	u32 offset;
 };
 
-static int get_token_u32(void *elem, void *object, u32 offset)
+int get_token_u32(void *elem, void *object, u32 offset)
 {
 	struct snd_soc_tplg_vendor_value_elem *velem = elem;
 	u32 *val = (u32 *)((u8 *)object + offset);
@@ -486,7 +486,7 @@  static int get_token_u32(void *elem, void *object, u32 offset)
 	return 0;
 }
 
-static int get_token_u16(void *elem, void *object, u32 offset)
+int get_token_u16(void *elem, void *object, u32 offset)
 {
 	struct snd_soc_tplg_vendor_value_elem *velem = elem;
 	u16 *val = (u16 *)((u8 *)object + offset);
@@ -495,7 +495,7 @@  static int get_token_u16(void *elem, void *object, u32 offset)
 	return 0;
 }
 
-static int get_token_uuid(void *elem, void *object, u32 offset)
+int get_token_uuid(void *elem, void *object, u32 offset)
 {
 	struct snd_soc_tplg_vendor_uuid_elem *velem = elem;
 	u8 *dst = (u8 *)object + offset;
@@ -505,7 +505,7 @@  static int get_token_uuid(void *elem, void *object, u32 offset)
 	return 0;
 }
 
-static int get_token_comp_format(void *elem, void *object, u32 offset)
+int get_token_comp_format(void *elem, void *object, u32 offset)
 {
 	u32 *val = (u32 *)((u8 *)object + offset);
 
@@ -513,7 +513,7 @@  static int get_token_comp_format(void *elem, void *object, u32 offset)
 	return 0;
 }
 
-static int get_token_dai_type(void *elem, void *object, u32 offset)
+int get_token_dai_type(void *elem, void *object, u32 offset)
 {
 	u32 *val = (u32 *)((u8 *)object + offset);