diff options
| -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__); |
