summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>2020-07-07 23:37:49 +0300
committerMark Brown <broonie@kernel.org>2020-07-08 16:25:22 +0300
commit8bf9475fe49fa96eea57724bb04e0931d101bc5a (patch)
tree5a680ff31b21bca05251ed975d2c7ec012744b39 /sound
parent952bd9377ef61c843236fd3e7cf65076025e26a4 (diff)
downloadlinux-8bf9475fe49fa96eea57724bb04e0931d101bc5a.tar.xz
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>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/soc-topology.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c
index 4004fc882912..cee998671318 100644
--- a/sound/soc/soc-topology.c
+++ b/sound/soc/soc-topology.c
@@ -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) +