Skip to content
Unverified Commit a1687c68 authored by Jaska Uimonen's avatar Jaska Uimonen Committed by Mark Brown
Browse files

ASoC: SOF: topology: handle multiple sets of tuple arrays



Widget's parameters are set in topology and they usually consist of
several different types of tuple arrays like strings, words and bytes.
Here this kind of combination is called a "set".

Lately we've seen more complex widget definitions with multiple
identical sets of tuple arrays. One example is the dmic pdm
configuration, which is currently handled as a special case in token
parsing. This is not scalable for other components with multiple sets.

So add a new function sof_parse_token_sets, which can be used to parse
multiple sets. This function defines the number of sets and an offset to
copy the tokens to correct positions in the destination ipc struct. Old
sof_parse_token function will be a special case of calling
sof_parse_token_sets to parse 1 set with offset 0.

Finally modify the dmic dai link loading to use the new
sof_parse_array_sets to load multiple pdm configs.

Signed-off-by: default avatarJaska Uimonen <jaska.uimonen@linux.intel.com>
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: default avatarRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: default avatarGuennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: default avatarKai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20200415202816.934-25-pierre-louis.bossart@linux.intel.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent f228a5b1
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