From 24c1ae53cd02c5be1a8cb27eb431a367a8f545d9 Mon Sep 17 00:00:00 2001 From: Zidan Wang Date: Thu, 29 Oct 2015 17:26:14 +0800 Subject: [PATCH] MLK-10183 ASoC: wm8962: separate ALC Coefficients to four reigsters Attempt to read volatile register when cache_only is set will return EBUSY. After playback/record, wm8962_runtime_suspend function will set cache_only flag, so the volitale register ALC2 can't be read from cache. Separate ALC Coefficients to four reigsters, the volatile register ALC2 will be read from hardware instead of cache. Signed-off-by: Zidan Wang (cherry picked from commit 5ec8878be12530517b4c8ae307441a0ac16071a3) --- sound/soc/codecs/wm8962.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c index fd2731d171dd..79a78d8ea515 100644 --- a/sound/soc/codecs/wm8962.c +++ b/sound/soc/codecs/wm8962.c @@ -1781,8 +1781,11 @@ SND_SOC_BYTES("HD Bass Coefficients", WM8962_HDBASS_AI_1, 30), SOC_DOUBLE("ALC Switch", WM8962_ALC1, WM8962_ALCL_ENA_SHIFT, WM8962_ALCR_ENA_SHIFT, 1, 0), -SND_SOC_BYTES_MASK("ALC Coefficients", WM8962_ALC1, 4, +SND_SOC_BYTES_MASK("ALC1", WM8962_ALC1, 1, WM8962_ALCL_ENA_MASK | WM8962_ALCR_ENA_MASK), +SND_SOC_BYTES("ALC2", WM8962_ALC2, 1), +SND_SOC_BYTES("ALC3", WM8962_ALC3, 1), +SND_SOC_BYTES("Noise Gate", WM8962_NOISE_GATE, 1), }; static const struct snd_kcontrol_new wm8962_spk_mono_controls[] = { -- 2.17.1