summaryrefslogtreecommitdiff
path: root/sound/soc
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-03-02 18:36:34 (GMT)
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-03-03 11:15:35 (GMT)
commit28e9ad921d3b7defd8940a3e30e8241c8ed734db (patch)
treef37a1eaf18ed48fcf51c1f30410f7d3d82a9dbff /sound/soc
parentb8ad29debd7401d257da923480d32838172c431a (diff)
downloadlinux-fsl-qoriq-28e9ad921d3b7defd8940a3e30e8241c8ed734db.tar.xz
ASoC: Add a late_probe() callback to cards
This is run after the DAPM widgets and routes are added, allowing setup of things like jacks using the routes. The main card probe() is run before anything else so can't be used for this purpose. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/soc-core.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 6a2839c..8926d38 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1892,6 +1892,15 @@ static void snd_soc_instantiate_card(struct snd_soc_card *card)
snprintf(card->snd_card->longname, sizeof(card->snd_card->longname),
"%s", card->name);
+ if (card->late_probe) {
+ ret = card->late_probe(card);
+ if (ret < 0) {
+ dev_err(card->dev, "%s late_probe() failed: %d\n",
+ card->name, ret);
+ goto probe_aux_dev_err;
+ }
+ }
+
ret = snd_card_register(card->snd_card);
if (ret < 0) {
printk(KERN_ERR "asoc: failed to register soundcard for %s\n", card->name);