summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorb-ak2019-01-07 18:00:22 +0100
committerGreg Kroah-Hartman2019-01-31 08:14:34 +0100
commit0af64fda917df00a8d199f7635e20a06acd2a3b7 (patch)
treeee6d29a3e387aa06615dee46c1ed35fa29a687f3 /sound
parentASoC: rt5514-spi: Fix potential NULL pointer dereference (diff)
downloadkernel-qcow2-linux-0af64fda917df00a8d199f7635e20a06acd2a3b7.tar.gz
kernel-qcow2-linux-0af64fda917df00a8d199f7635e20a06acd2a3b7.tar.xz
kernel-qcow2-linux-0af64fda917df00a8d199f7635e20a06acd2a3b7.zip
ASoC: tlv320aic32x4: Kernel OOPS while entering DAPM standby mode
commit 667e9334fa64da2273e36ce131b05ac9e47c5769 upstream. During the bootup of the kernel, the DAPM bias level is in the OFF state. As soon as the DAPM framework kicks in it pushes the codec into STANDBY state. The probe function doesn't prepare the clock, and STANDBY state does a clk_disable_unprepare() without checking the previous state. This leads to an OOPS. Not transitioning from an OFF state to the STANDBY state fixes the problem. Signed-off-by: b-ak <anur.bhargav@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/tlv320aic32x4.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/soc/codecs/tlv320aic32x4.c b/sound/soc/codecs/tlv320aic32x4.c
index e2b5a11b16d1..f03195d2ab2e 100644
--- a/sound/soc/codecs/tlv320aic32x4.c
+++ b/sound/soc/codecs/tlv320aic32x4.c
@@ -822,6 +822,10 @@ static int aic32x4_set_bias_level(struct snd_soc_component *component,
case SND_SOC_BIAS_PREPARE:
break;
case SND_SOC_BIAS_STANDBY:
+ /* Initial cold start */
+ if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_OFF)
+ break;
+
/* Switch off BCLK_N Divider */
snd_soc_component_update_bits(component, AIC32X4_BCLKN,
AIC32X4_BCLKEN, 0);