Commit ee39d77e authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

ASoC: soc-pcm: indicate DAI name if soc_pcm_params_symmetry() failed

It indicates unmatched symmetry value, but not indicates on which DAI.
This patch indicates it.
Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/871rbbyono.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 1cacbac4
...@@ -384,6 +384,7 @@ static int soc_pcm_params_symmetry(struct snd_pcm_substream *substream, ...@@ -384,6 +384,7 @@ static int soc_pcm_params_symmetry(struct snd_pcm_substream *substream,
struct snd_soc_dai *cpu_dai; struct snd_soc_dai *cpu_dai;
unsigned int symmetry, i; unsigned int symmetry, i;
d.name = __func__;
soc_pcm_set_dai_params(&d, params); soc_pcm_set_dai_params(&d, params);
#define __soc_pcm_params_symmetry(xxx) \ #define __soc_pcm_params_symmetry(xxx) \
...@@ -394,8 +395,8 @@ static int soc_pcm_params_symmetry(struct snd_pcm_substream *substream, ...@@ -394,8 +395,8 @@ static int soc_pcm_params_symmetry(struct snd_pcm_substream *substream,
if (symmetry) \ if (symmetry) \
for_each_rtd_cpu_dais(rtd, i, cpu_dai) \ for_each_rtd_cpu_dais(rtd, i, cpu_dai) \
if (cpu_dai->xxx && cpu_dai->xxx != d.xxx) { \ if (cpu_dai->xxx && cpu_dai->xxx != d.xxx) { \
dev_err(rtd->dev, "ASoC: unmatched %s symmetry: %d - %d\n", \ dev_err(rtd->dev, "ASoC: unmatched %s symmetry: %s:%d - %s:%d\n", \
#xxx, cpu_dai->xxx, d.xxx); \ #xxx, cpu_dai->name, cpu_dai->xxx, d.name, d.xxx); \
return -EINVAL; \ return -EINVAL; \
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment