Skip to content

Commit

Permalink
ASoC: qcom: common: Avoid printing errors for -EPROBE_DEFER
Browse files Browse the repository at this point in the history
qcom_snd_parse_of() tends to produce lots of error messages during bootup:

	MultiMedia1: error getting cpu dai name

This happens because the DAIs are not probed until the ADSP remoteproc
has booted, which takes a while. Until it is ready, snd_soc_of_get_dai_name()
returns -EDEFER_PROBE to retry probing later. This is perfectly normal,
so cleanup the kernel log a bit by not printing in case of -EPROBE_DEFER.

Signed-off-by: Stephan Gerhold <[email protected]>
Tested-by: Srinivas Kandagatla <[email protected]>
Reviewed-by: Srinivas Kandagatla <[email protected]>
Cc: Srinivas Kandagatla <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
stephan-gh authored and broonie committed Jul 24, 2020
1 parent 118205d commit a63419b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions sound/soc/qcom/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ int qcom_snd_parse_of(struct snd_soc_card *card)

ret = snd_soc_of_get_dai_name(cpu, &link->cpus->dai_name);
if (ret) {
dev_err(card->dev, "%s: error getting cpu dai name\n", link->name);
if (ret != -EPROBE_DEFER)
dev_err(card->dev, "%s: error getting cpu dai name: %d\n",
link->name, ret);
goto err;
}

Expand All @@ -108,7 +110,9 @@ int qcom_snd_parse_of(struct snd_soc_card *card)
if (codec) {
ret = snd_soc_of_get_dai_link_codecs(dev, codec, link);
if (ret < 0) {
dev_err(card->dev, "%s: codec dai not found\n", link->name);
if (ret != -EPROBE_DEFER)
dev_err(card->dev, "%s: codec dai not found: %d\n",
link->name, ret);
goto err;
}

Expand Down

0 comments on commit a63419b

Please sign in to comment.