diff options
author | Keyon Jie <yang.jie@linux.intel.com> | 2020-09-04 16:27:32 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-09-07 15:16:36 +0100 |
commit | 929e427a9c4e59d744fb5d3771b87a741ea3078a (patch) | |
tree | 64a7efdbfe04bfb51a5740d9e0af1c810d4a9031 /sound/soc/sof/topology.c | |
parent | 92f500cfc329ee3082f20b2f1364788b759ab588 (diff) | |
download | lwn-929e427a9c4e59d744fb5d3771b87a741ea3078a.tar.gz lwn-929e427a9c4e59d744fb5d3771b87a741ea3078a.zip |
ASoC: SOF: topology: parse comp_ext_tokens for all widgets
Parse comp_ext_tokens in the common sof_widget_ready(), and the
swidget->comp_ext will be used to construct the COMP_NEW ipc in the
subsequent commits.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20200904132744.1699575-5-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/topology.c')
-rw-r--r-- | sound/soc/sof/topology.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sound/soc/sof/topology.c b/sound/soc/sof/topology.c index 0ba0c3921cf0..7d1013e315fc 100644 --- a/sound/soc/sof/topology.c +++ b/sound/soc/sof/topology.c @@ -2401,6 +2401,16 @@ static int sof_widget_ready(struct snd_soc_component *scomp, int index, return ret; } + ret = sof_parse_tokens(scomp, &swidget->comp_ext, comp_ext_tokens, + ARRAY_SIZE(comp_ext_tokens), tw->priv.array, + le32_to_cpu(tw->priv.size)); + if (ret != 0) { + dev_err(scomp->dev, "error: parsing comp_ext_tokens failed %d\n", + ret); + kfree(swidget); + return ret; + } + /* handle any special case widgets */ switch (w->id) { case snd_soc_dapm_dai_in: |