From ce61c0191374595af40d5b17377462d124dfadb5 Mon Sep 17 00:00:00 2001 From: "Yoon (Seungyoon) Lee" Date: Tue, 30 Apr 2019 15:28:54 -0500 Subject: [PATCH] ASoC: cs47l35: use dsp running flag for dsp status instead of checking DSP memory address for DSP core status, check the flag from wm_adsp to determine algorithm status. Change-Id: I846afc671e708dedd9af52000a7eb76cc39adc3b Signed-off-by: Yoon (Seungyoon) Lee Reviewed-on: https://gerrit.mot.com/1346616 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Zhengming Yao Reviewed-by: Xiangpo Zhao Submit-Approved: Jira Key --- sound/soc/codecs/cs47l35.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sound/soc/codecs/cs47l35.c b/sound/soc/codecs/cs47l35.c index ca54b48a7a03..f4700e96e876 100755 --- a/sound/soc/codecs/cs47l35.c +++ b/sound/soc/codecs/cs47l35.c @@ -238,10 +238,8 @@ static int cs47l35_get_dsp_state(struct snd_kcontrol *kcontrol, struct soc_mixer_control *mc = (struct soc_mixer_control *) kcontrol->private_value; struct wm_adsp *dsp = &dsps[mc->shift]; - unsigned int val; - regmap_read(dsp->regmap, dsp->base + ADSP2_CONTROL, &val); - if (val & ADSP2_CORE_ENA) + if (dsp != NULL && dsp->running) ucontrol->value.integer.value[0] = 1; else ucontrol->value.integer.value[0] = 0; -- 2.20.1