Commit b2acc24c authored by Ranjani Sridharan's avatar Ranjani Sridharan Committed by Mark Brown

ASoC: soc-core: Add dynamic debug logs in soc_dai_link_sanity_check()

When a platform device is created successfully but the machine driver
probe fails due to errors with missing components during the card bind
stage, no error is propagated or logged. To help flag such problems,
add a dynamic debug log.
Signed-off-by: default avatarRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: default avatarGuennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: default avatarDaniel Baluta <daniel.baluta@gmail.com>
Reviewed-by: default avatarKai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20200409184416.15591-5-pierre-louis.bossart@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 642646cc
...@@ -865,9 +865,13 @@ static int soc_dai_link_sanity_check(struct snd_soc_card *card, ...@@ -865,9 +865,13 @@ static int soc_dai_link_sanity_check(struct snd_soc_card *card,
* Defer card registration if codec component is not added to * Defer card registration if codec component is not added to
* component list. * component list.
*/ */
if (!soc_find_component(codec)) if (!soc_find_component(codec)) {
dev_dbg(card->dev,
"ASoC: codec component %s not found for link %s\n",
codec->name, link->name);
return -EPROBE_DEFER; return -EPROBE_DEFER;
} }
}
for_each_link_platforms(link, i, platform) { for_each_link_platforms(link, i, platform) {
/* /*
...@@ -886,9 +890,13 @@ static int soc_dai_link_sanity_check(struct snd_soc_card *card, ...@@ -886,9 +890,13 @@ static int soc_dai_link_sanity_check(struct snd_soc_card *card,
* Defer card registration if platform component is not added to * Defer card registration if platform component is not added to
* component list. * component list.
*/ */
if (!soc_find_component(platform)) if (!soc_find_component(platform)) {
dev_dbg(card->dev,
"ASoC: platform component %s not found for link %s\n",
platform->name, link->name);
return -EPROBE_DEFER; return -EPROBE_DEFER;
} }
}
for_each_link_cpus(link, i, cpu) { for_each_link_cpus(link, i, cpu) {
/* /*
...@@ -908,8 +916,12 @@ static int soc_dai_link_sanity_check(struct snd_soc_card *card, ...@@ -908,8 +916,12 @@ static int soc_dai_link_sanity_check(struct snd_soc_card *card,
* component list. * component list.
*/ */
if ((cpu->of_node || cpu->name) && if ((cpu->of_node || cpu->name) &&
!soc_find_component(cpu)) !soc_find_component(cpu)) {
dev_dbg(card->dev,
"ASoC: cpu component %s not found for link %s\n",
cpu->name, link->name);
return -EPROBE_DEFER; return -EPROBE_DEFER;
}
/* /*
* At least one of CPU DAI name or CPU device name/node must be * At least one of CPU DAI name or CPU device name/node must be
......
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