All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: Mark Brown <broonie@kernel.org>
Cc: Linux-ALSA <alsa-devel@alsa-project.org>
Subject: [PATCH 2/4] ASoC: soc-pcm: indicate DAI name if soc_pcm_params_symmetry() failed
Date: 16 Apr 2021 11:00:11 +0900	[thread overview]
Message-ID: <871rbbyono.wl-kuninori.morimoto.gx@renesas.com> (raw)
In-Reply-To: <874kg7yopb.wl-kuninori.morimoto.gx@renesas.com>

From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

It indicates unmatched symmetry value, but not indicates on which DAI.
This patch indicates it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/soc-pcm.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index e1bca2165668..09d63cbbc602 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -384,6 +384,7 @@ static int soc_pcm_params_symmetry(struct snd_pcm_substream *substream,
 	struct snd_soc_dai *cpu_dai;
 	unsigned int symmetry, i;
 
+	d.name = __func__;
 	soc_pcm_set_dai_params(&d, params);
 
 #define __soc_pcm_params_symmetry(xxx)					\
@@ -394,8 +395,8 @@ static int soc_pcm_params_symmetry(struct snd_pcm_substream *substream,
 	if (symmetry)							\
 		for_each_rtd_cpu_dais(rtd, i, cpu_dai)			\
 			if (cpu_dai->xxx && cpu_dai->xxx != d.xxx) {	\
-				dev_err(rtd->dev, "ASoC: unmatched %s symmetry: %d - %d\n", \
-					#xxx, cpu_dai->xxx, d.xxx);	\
+				dev_err(rtd->dev, "ASoC: unmatched %s symmetry: %s:%d - %s:%d\n", \
+					#xxx, cpu_dai->name, cpu_dai->xxx, d.name, d.xxx); \
 				return -EINVAL;				\
 			}
 
-- 
2.25.1


  parent reply	other threads:[~2021-04-16  2:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-16  1:59 [PATCH 0/4] ASoC: soc-pcm: ignore dummy-DAI at soc_pcm_params_symmetry() Kuninori Morimoto
2021-04-16  1:59 ` [PATCH 1/4] ASoC: soc-pcm: don't use "name" on __soc_pcm_params_symmetry() macro Kuninori Morimoto
2021-04-16  2:00 ` Kuninori Morimoto [this message]
2021-04-16  2:00 ` [PATCH 3/4] ASoC: soc-utils: add snd_soc_component_is_dummy() Kuninori Morimoto
2021-04-16  2:00 ` [PATCH 4/4] ASoC: soc-pcm: ignore dummy-DAI at soc_pcm_params_symmetry() Kuninori Morimoto
2021-04-16 16:01 ` [PATCH 0/4] " Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871rbbyono.wl-kuninori.morimoto.gx@renesas.com \
    --to=kuninori.morimoto.gx@renesas.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.