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

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

Merge "ASoC: wcd9320: Fix DAPM timeout when accesing MAD calibration"

parents ac1e9f69 b5bb8d32
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -35,6 +35,8 @@
#include <linux/pm_runtime.h>
#include <linux/kernel.h>
#include <linux/gpio.h>
#include <linux/pm_qos.h>
#include <soc/qcom/pm.h>
#include "wcd9320.h"
#include "wcd9xxx-resmgr.h"
#include "wcd9xxx-common.h"
@@ -450,6 +452,7 @@ struct taiko_priv {
	 * end of impedance measurement
	 */
	struct list_head reg_save_restore;
	struct pm_qos_request pm_qos_req;
};

static const u32 comp_shift[] = {
@@ -2785,8 +2788,12 @@ static int taiko_codec_config_mad(struct snd_soc_codec *codec)
	const struct firmware *fw;
	struct mad_audio_cal *mad_cal;
	const char *filename = TAIKO_MAD_AUDIO_FIRMWARE_PATH;
	struct taiko_priv *taiko = snd_soc_codec_get_drvdata(codec);

	pr_debug("%s: enter\n", __func__);
	/* wakeup for codec calibration access */
	pm_qos_update_request(&taiko->pm_qos_req,
			      msm_cpuidle_get_deep_idle_latency());
	ret = request_firmware(&fw, filename, codec->dev);
	if (ret != 0) {
		pr_err("Failed to acquire MAD firwmare data %s: %d\n", filename,
@@ -2856,7 +2863,8 @@ static int taiko_codec_config_mad(struct snd_soc_codec *codec)

	release_firmware(fw);
	pr_debug("%s: leave ret %d\n", __func__, ret);

	pm_qos_update_request(&taiko->pm_qos_req,
			      PM_QOS_DEFAULT_VALUE);
	return ret;
}