mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 19:29:37 +00:00
ASoC: topology: add more logs when topology load fails.
Add more dev_err() logs to help trace topology load failures, since we have multiple error causes (e.g. invalid header or header that could not be loaded). Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@linux.intel.com> Link: https://lore.kernel.org/r/20200707203749.113883-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
952bd9377e
commit
8bf9475fe4
1 changed files with 10 additions and 3 deletions
|
@ -1263,6 +1263,7 @@ static int soc_tplg_dapm_graph_elems_load(struct soc_tplg *tplg,
|
|||
|
||||
ret = soc_tplg_add_route(tplg, routes[i]);
|
||||
if (ret < 0) {
|
||||
dev_err(tplg->dev, "ASoC: topology: add_route failed: %d\n", ret);
|
||||
/*
|
||||
* this route was added to the list, it will
|
||||
* be freed in remove_route() so increment the
|
||||
|
@ -2743,15 +2744,21 @@ static int soc_tplg_process_headers(struct soc_tplg *tplg)
|
|||
|
||||
/* make sure header is valid before loading */
|
||||
ret = soc_valid_header(tplg, hdr);
|
||||
if (ret < 0)
|
||||
if (ret < 0) {
|
||||
dev_err(tplg->dev,
|
||||
"ASoC: topology: invalid header: %d\n", ret);
|
||||
return ret;
|
||||
else if (ret == 0)
|
||||
} else if (ret == 0) {
|
||||
break;
|
||||
}
|
||||
|
||||
/* load the header object */
|
||||
ret = soc_tplg_load_header(tplg, hdr);
|
||||
if (ret < 0)
|
||||
if (ret < 0) {
|
||||
dev_err(tplg->dev,
|
||||
"ASoC: topology: could not load header: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* goto next header */
|
||||
tplg->hdr_pos += le32_to_cpu(hdr->payload_size) +
|
||||
|
|
Loading…
Reference in a new issue