Commit 5ef969e2 authored by Ranjani Sridharan's avatar Ranjani Sridharan Committed by Mark Brown

ASoC: SOF: topology: Modify the get_token op for string tokens

Modify the get_token op for string type tokens to pass the string as the
argument instead of a pointer to struct snd_soc_tplg_vendor_string_elem.
Signed-off-by: default avatarRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: default avatarBard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: default avatarPéter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220307181111.49392-9-ranjani.sridharan@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 6a6b5727
......@@ -507,28 +507,25 @@ static int get_token_uuid(void *elem, void *object, u32 offset)
static int get_token_comp_format(void *elem, void *object, u32 offset)
{
struct snd_soc_tplg_vendor_string_elem *velem = elem;
u32 *val = (u32 *)((u8 *)object + offset);
*val = find_format(velem->string);
*val = find_format((const char *)elem);
return 0;
}
static int get_token_dai_type(void *elem, void *object, u32 offset)
{
struct snd_soc_tplg_vendor_string_elem *velem = elem;
u32 *val = (u32 *)((u8 *)object + offset);
*val = find_dai(velem->string);
*val = find_dai((const char *)elem);
return 0;
}
static int get_token_process_type(void *elem, void *object, u32 offset)
{
struct snd_soc_tplg_vendor_string_elem *velem = elem;
u32 *val = (u32 *)((u8 *)object + offset);
*val = find_process(velem->string);
*val = find_process((const char *)elem);
return 0;
}
......@@ -872,8 +869,7 @@ static int sof_parse_string_tokens(struct snd_soc_component *scomp,
continue;
/* matched - now load token */
tokens[j].get_token(elem, object,
offset + tokens[j].offset);
tokens[j].get_token(elem->string, object, offset + tokens[j].offset);
found++;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment