From ea7e5ee67fb71d92b0eb0be8467fd34b0e2def6c Mon Sep 17 00:00:00 2001 From: Ranjani Sridharan Date: Mon, 7 Mar 2022 10:11:02 -0800 Subject: [PATCH] ASoC: SOF: topology: expose some get_token ops MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These will be used later on by IPC-specific code. Signed-off-by: Ranjani Sridharan Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220307181111.49392-10-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown --- sound/soc/sof/sof-audio.h | 5 +++++ sound/soc/sof/topology.c | 10 +++++----- 2 files changed, 10 insertions(+), 5 deletions(-) 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);