Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f01c0978 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ASoC: msm: defer the machine driver probing if ADSP is down"

parents a8c3dd34 e7637cdd
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -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>
@@ -4320,12 +4321,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__);