mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2026-03-13 05:33:42 -04:00
topology: fix usage of SND_TPLG_INDEX_ALL when checking routes
Make sure SND_TPLG_INDEX_ALL is used correctly when checking routes so that connecting routes of different indexes does not emit any warnings. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
5efdabc1ab
commit
8d61695145
2 changed files with 3 additions and 3 deletions
|
|
@ -279,7 +279,7 @@ int tplg_build_routes(snd_tplg_t *tplg)
|
||||||
|
|
||||||
}
|
}
|
||||||
if (!tplg_elem_lookup(&tplg->widget_list, route->sink,
|
if (!tplg_elem_lookup(&tplg->widget_list, route->sink,
|
||||||
SND_TPLG_TYPE_DAPM_WIDGET, elem->index)) {
|
SND_TPLG_TYPE_DAPM_WIDGET, SND_TPLG_INDEX_ALL)) {
|
||||||
SNDERR("warning: undefined sink widget/stream '%s'\n",
|
SNDERR("warning: undefined sink widget/stream '%s'\n",
|
||||||
route->sink);
|
route->sink);
|
||||||
}
|
}
|
||||||
|
|
@ -302,7 +302,7 @@ int tplg_build_routes(snd_tplg_t *tplg)
|
||||||
|
|
||||||
}
|
}
|
||||||
if (!tplg_elem_lookup(&tplg->widget_list, route->source,
|
if (!tplg_elem_lookup(&tplg->widget_list, route->source,
|
||||||
SND_TPLG_TYPE_DAPM_WIDGET, elem->index)) {
|
SND_TPLG_TYPE_DAPM_WIDGET, SND_TPLG_INDEX_ALL)) {
|
||||||
SNDERR("warning: Undefined source widget/stream '%s'\n",
|
SNDERR("warning: Undefined source widget/stream '%s'\n",
|
||||||
route->source);
|
route->source);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -123,7 +123,7 @@ struct tplg_elem *tplg_elem_lookup(struct list_head *base, const char* id,
|
||||||
return elem;
|
return elem;
|
||||||
/* SND_TPLG_INDEX_ALL is the default value "0" and applicable
|
/* SND_TPLG_INDEX_ALL is the default value "0" and applicable
|
||||||
for all use cases */
|
for all use cases */
|
||||||
if ((elem->index != SND_TPLG_INDEX_ALL)
|
if ((index != SND_TPLG_INDEX_ALL)
|
||||||
&& (elem->index > index))
|
&& (elem->index > index))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue