diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2017-04-12 16:10:16 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-04-12 16:10:16 -0700 |
| commit | d11deab41bb4f23f043c4eecc89487c145cb44d6 (patch) | |
| tree | b2081f8d6d4c061c94cc254195af2e725ec5ac18 | |
| parent | 7cd2991c8e3ebeb48f6a7f15aacb3e48802eda5d (diff) | |
| parent | 69173e41aa5f70ea2462130a05d42df2435ed9b2 (diff) | |
Merge "ASoC: msm: defer the machine driver probing if ADSP is down"
| -rw-r--r-- | sound/soc/msm/apq8096-auto.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sound/soc/msm/apq8096-auto.c b/sound/soc/msm/apq8096-auto.c index d5dd3b0219a5..e1baca358d5f 100644 --- a/sound/soc/msm/apq8096-auto.c +++ b/sound/soc/msm/apq8096-auto.c @@ -22,6 +22,7 @@ #include <linux/module.h> #include <linux/switch.h> #include <linux/input.h> +#include <linux/qdsp6v2/apr.h> #include <sound/core.h> #include <sound/soc.h> #include <sound/soc-dapm.h> @@ -4684,12 +4685,21 @@ static int apq8096_asoc_machine_probe(struct platform_device *pdev) struct snd_soc_card *card; const struct of_device_id *match; int ret; + enum apr_subsys_state q6_state; if (!pdev->dev.of_node) { dev_err(&pdev->dev, "No platform supplied from device tree\n"); return -EINVAL; } + q6_state = apr_get_q6_state(); + if (q6_state == APR_SUBSYS_DOWN) { + dev_dbg(&pdev->dev, "deferring %s, adsp_state %d\n", + __func__, q6_state); + ret = -EPROBE_DEFER; + goto err; + } + card = populate_snd_card_dailinks(&pdev->dev); if (!card) { dev_err(&pdev->dev, "%s: Card uninitialized\n", __func__); |
