[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190109124902.672EB1127528@debutante.sirena.org.uk>
Date: Wed, 9 Jan 2019 12:49:02 +0000 (GMT)
From: Mark Brown <broonie@...nel.org>
To: Ajit Pandey <ajitp@...eaurora.org>
Cc: Rohit kumar <rohitkr@...eaurora.org>,
Mark Brown <broonie@...nel.org>, plai@...eaurora.org,
bgoswami@...eaurora.org, asishb@...eaurora.org,
lgirdwood@...il.com, broonie@...nel.org, perex@...ex.cz,
tiwai@...e.com, alsa-devel@...a-project.org,
linux-kernel@...r.kernel.org, rohkumar@....qualcomm.com,
srinivas.kandagatla@...aro.org, vinod.koul@...aro.org,
Rohit kumar <rohitkr@...eaurora.org>,
alsa-devel@...a-project.org
Subject: Applied "ASoC: soc-core: defer card probe until all component is added to list" to the asoc tree
The patch
ASoC: soc-core: defer card probe until all component is added to list
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
>From 8780cf1142a59568a3aa77959cbd76b2edb6fd81 Mon Sep 17 00:00:00 2001
From: Ajit Pandey <ajitp@...eaurora.org>
Date: Wed, 9 Jan 2019 14:17:07 +0530
Subject: [PATCH] ASoC: soc-core: defer card probe until all component is added
to list
DAI component probe is not called if it is not present
in component list during sound card registration.
Check if component is available in component list for
platform and cpu dai before soundcard registration.
Signed-off-by: Ajit Pandey <ajitp@...eaurora.org>
Signed-off-by: Rohit kumar <rohitkr@...eaurora.org>
Signed-off-by: Mark Brown <broonie@...nel.org>
---
sound/soc/soc-core.c | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 0462b3ec977a..eec92f17dd15 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1027,7 +1027,6 @@ static int snd_soc_init_platform(struct snd_soc_card *card,
struct snd_soc_dai_link *dai_link)
{
struct snd_soc_dai_link_component *platform = dai_link->platform;
-
/*
* FIXME
*
@@ -1129,6 +1128,14 @@ static int soc_init_dai_link(struct snd_soc_card *card,
link->name);
return -EINVAL;
}
+
+ /*
+ * Defer card registartion if platform dai component is not added to
+ * component list.
+ */
+ if (!soc_find_component(link->platform->of_node, link->platform->name))
+ return -EPROBE_DEFER;
+
/*
* CPU device may be specified by either name or OF node, but
* can be left unspecified, and will be matched based on DAI
@@ -1140,6 +1147,14 @@ static int soc_init_dai_link(struct snd_soc_card *card,
link->name);
return -EINVAL;
}
+
+ /*
+ * Defer card registartion if cpu dai component is not added to
+ * component list.
+ */
+ if (!soc_find_component(link->cpu_of_node, link->cpu_name))
+ return -EPROBE_DEFER;
+
/*
* At least one of CPU DAI name or CPU device name/node must be
* specified
--
2.20.1
Powered by blists - more mailing lists