ASoC: SOF: topology: Skip parsing DAI link tokens if not needed
Do not parse these tokens if they are not defined in the IPC version specific token list. In the case of IPC4 with HDA topologies for example, no DAI link specific tokens need to be added in topology. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20220426171743.171061-10-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
f18ad9caa0
commit
a5ba725e9d
|
@ -1721,6 +1721,7 @@ static int sof_link_load(struct snd_soc_component *scomp, int index, struct snd_
|
|||
return -ENOMEM;
|
||||
}
|
||||
|
||||
if (token_list[SOF_DAI_LINK_TOKENS].tokens) {
|
||||
/* parse one set of DAI link tokens */
|
||||
ret = sof_copy_tuples(sdev, private->array, le32_to_cpu(private->size),
|
||||
SOF_DAI_LINK_TOKENS, 1, slink->tuples,
|
||||
|
@ -1730,6 +1731,7 @@ static int sof_link_load(struct snd_soc_component *scomp, int index, struct snd_
|
|||
token_list[SOF_DAI_LINK_TOKENS].name, link->name);
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
|
||||
/* nothing more to do if there are no DAI type-specific tokens defined */
|
||||
if (!token_id || !token_list[token_id].tokens)
|
||||
|
|
Loading…
Reference in New Issue