@@ -20,9 +20,10 @@ static inline int _soc_dai_ret(struct snd_soc_dai *dai,
case 0:
break;
default:
- dev_err(dai->dev,
- "ASoC: error at %s on %s: %d\n",
- func, dai->name, ret);
+ if (ret < 0)
+ dev_err(dai->dev,
+ "ASoC: error at %s on %s: %d\n",
+ func, dai->name, ret);
}
return ret;
@@ -18,9 +18,10 @@ static inline int _soc_link_ret(struct snd_soc_pcm_runtime *rtd,
case 0:
break;
default:
- dev_err(rtd->dev,
- "ASoC: error at %s on %s: %d\n",
- func, rtd->dai_link->name, ret);
+ if (ret < 0)
+ dev_err(rtd->dev,
+ "ASoC: error at %s on %s: %d\n",
+ func, rtd->dai_link->name, ret);
}
return ret;
Recent changes result in multiple dmesg traces such as: [ 14.410435] Audio Port: ASoC: error at snd_soc_link_startup on Audio Port: 1 [ 14.410446] sst-mfld-platform sst-mfld-platform: ASoC: error at snd_soc_dai_startup on media-cpu-dai: 1 These messages are not really errors, when dai and dai-link callbacks return the value of e.g. snd_pcm_hw_constraint_single() the result is "Positive if the value is changed, zero if it's not changed, or a negative error code" Add a simple test to only log errors when the result is negative. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> --- sound/soc/soc-dai.c | 7 ++++--- sound/soc/soc-link.c | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) base-commit: 4a0434502191347ba8f99468f2fb2cdddc20d381