]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.20.6/asoc-tlv320aic32x4-kernel-oops-while-entering-dapm-standby-mode.patch
4.14-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.20.6 / asoc-tlv320aic32x4-kernel-oops-while-entering-dapm-standby-mode.patch
1 From 667e9334fa64da2273e36ce131b05ac9e47c5769 Mon Sep 17 00:00:00 2001
2 From: b-ak <anur.bhargav@gmail.com>
3 Date: Mon, 7 Jan 2019 22:30:22 +0530
4 Subject: ASoC: tlv320aic32x4: Kernel OOPS while entering DAPM standby mode
5
6 From: b-ak <anur.bhargav@gmail.com>
7
8 commit 667e9334fa64da2273e36ce131b05ac9e47c5769 upstream.
9
10 During the bootup of the kernel, the DAPM bias level is in the OFF
11 state. As soon as the DAPM framework kicks in it pushes the codec
12 into STANDBY state.
13
14 The probe function doesn't prepare the clock, and STANDBY state
15 does a clk_disable_unprepare() without checking the previous state.
16 This leads to an OOPS.
17
18 Not transitioning from an OFF state to the STANDBY state fixes the
19 problem.
20
21 Signed-off-by: b-ak <anur.bhargav@gmail.com>
22 Signed-off-by: Mark Brown <broonie@kernel.org>
23 Cc: stable@vger.kernel.org
24 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
25
26 ---
27 sound/soc/codecs/tlv320aic32x4.c | 4 ++++
28 1 file changed, 4 insertions(+)
29
30 --- a/sound/soc/codecs/tlv320aic32x4.c
31 +++ b/sound/soc/codecs/tlv320aic32x4.c
32 @@ -822,6 +822,10 @@ static int aic32x4_set_bias_level(struct
33 case SND_SOC_BIAS_PREPARE:
34 break;
35 case SND_SOC_BIAS_STANDBY:
36 + /* Initial cold start */
37 + if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_OFF)
38 + break;
39 +
40 /* Switch off BCLK_N Divider */
41 snd_soc_component_update_bits(component, AIC32X4_BCLKN,
42 AIC32X4_BCLKEN, 0);