]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: SOF: topology: handle multiple sets of tuple arrays
authorJaska Uimonen <jaska.uimonen@linux.intel.com>
Wed, 15 Apr 2020 20:28:16 +0000 (15:28 -0500)
committerMark Brown <broonie@kernel.org>
Wed, 15 Apr 2020 23:23:19 +0000 (00:23 +0100)
commit36b0a88d4c2cdcc7879ab348797062352919f8e6
tree04ab8e241d0f03bdfb30a6155f14488319ae7368
parentb50b04295b7e5701f123b1fc48226cbbed4001b2
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: Jaska Uimonen <jaska.uimonen@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20200415202816.934-25-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/topology.c