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

Commit 3745fe66 authored by yang liu's avatar yang liu Committed by Gerrit - the friendly Code Review server
Browse files

ASoC: codec: add wait modem state for APQ8009



On msm platform, internal codecs wait for adsp loaded. On apq8009,
internal codecs need wait for modem up. Current logic only works
for msm device, not apq devices. Update analog and digital codec
probe functions to fit for both msm and apq platforms.

Change-Id: Ib2c848b7aaddef18cee3f658fe895d436762b5f0
Signed-off-by: default avataryang liu <yangliu@codeaurora.org>
parent 1eaaa37d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4577,7 +4577,7 @@ static int msm_anlg_cdc_probe(struct platform_device *pdev)
	int adsp_state;

	adsp_state = apr_get_subsys_state();
	if (adsp_state != APR_SUBSYS_LOADED ||
	if (adsp_state == APR_SUBSYS_DOWN ||
		!q6core_is_adsp_ready()) {
		dev_err(&pdev->dev, "Adsp is not loaded yet %d\n",
			adsp_state);
+8 −0
Original line number Diff line number Diff line
@@ -1977,6 +1977,14 @@ static int msm_dig_cdc_probe(struct platform_device *pdev)
	u32 dig_cdc_addr;
	struct msm_dig_priv *msm_dig_cdc;
	struct dig_ctrl_platform_data *pdata;
	int adsp_state = 0;

	adsp_state = apr_get_subsys_state();
	if (adsp_state == APR_SUBSYS_DOWN) {
		dev_err(&pdev->dev, "Adsp is not loaded yet %d\n",
			adsp_state);
		return -EPROBE_DEFER;
	}

	msm_dig_cdc = devm_kzalloc(&pdev->dev, sizeof(struct msm_dig_priv),
			      GFP_KERNEL);