ASoC: pcm: improve debug output for DPCM BE searching.

Improve the DPCM BE search debug output to make it easier to debug
issues in topologies.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Liam Girdwood 2018-03-14 20:43:51 +00:00 committed by Mark Brown
parent 7928b2cbe5
commit 3c1464658e
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
1 changed files with 11 additions and 0 deletions

View File

@ -1392,12 +1392,18 @@ static struct snd_soc_pcm_runtime *dpcm_get_be(struct snd_soc_card *card,
struct snd_soc_pcm_runtime *be; struct snd_soc_pcm_runtime *be;
int i; int i;
dev_dbg(card->dev, "ASoC: find BE for widget %s\n", widget->name);
if (stream == SNDRV_PCM_STREAM_PLAYBACK) { if (stream == SNDRV_PCM_STREAM_PLAYBACK) {
list_for_each_entry(be, &card->rtd_list, list) { list_for_each_entry(be, &card->rtd_list, list) {
if (!be->dai_link->no_pcm) if (!be->dai_link->no_pcm)
continue; continue;
dev_dbg(card->dev, "ASoC: try BE : %s\n",
be->cpu_dai->playback_widget ?
be->cpu_dai->playback_widget->name : "(not set)");
if (be->cpu_dai->playback_widget == widget) if (be->cpu_dai->playback_widget == widget)
return be; return be;
@ -1414,6 +1420,10 @@ static struct snd_soc_pcm_runtime *dpcm_get_be(struct snd_soc_card *card,
if (!be->dai_link->no_pcm) if (!be->dai_link->no_pcm)
continue; continue;
dev_dbg(card->dev, "ASoC: try BE %s\n",
be->cpu_dai->capture_widget ?
be->cpu_dai->capture_widget->name : "(not set)");
if (be->cpu_dai->capture_widget == widget) if (be->cpu_dai->capture_widget == widget)
return be; return be;
@ -1425,6 +1435,7 @@ static struct snd_soc_pcm_runtime *dpcm_get_be(struct snd_soc_card *card,
} }
} }
/* dai link name and stream name set correctly ? */
dev_err(card->dev, "ASoC: can't get %s BE for %s\n", dev_err(card->dev, "ASoC: can't get %s BE for %s\n",
stream ? "capture" : "playback", widget->name); stream ? "capture" : "playback", widget->name);
return NULL; return NULL;