MLK-10183 ASoC: wm8962: separate ALC Coefficients to four reigsters
authorZidan Wang <zidan.wang@freescale.com>
Thu, 29 Oct 2015 09:26:14 +0000 (17:26 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 19:49:09 +0000 (14:49 -0500)
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 <zidan.wang@freescale.com>
(cherry picked from commit 5ec8878be12530517b4c8ae307441a0ac16071a3)

sound/soc/codecs/wm8962.c

index fd2731d..79a78d8 100644 (file)
@@ -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[] = {