* [PATCH v2] ASoC: tlv320aic32x4: Kernel OOPS while entering DAPM standby mode
@ 2019-01-07 17:00 b-ak
0 siblings, 0 replies; 2+ messages in thread
From: b-ak @ 2019-01-07 17:00 UTC (permalink / raw)
To: Mark Brown, linux-kernel
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>
---
sound/soc/codecs/tlv320aic32x4.c | 4 ++++
1 file changed, 4 insertions(+)
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);
--
2.19.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ASoC: tlv320aic32x4: Kernel OOPS while entering DAPM standby mode
@ 2019-01-07 12:59 Mark Brown
2019-01-07 17:45 ` [PATCH v2] " b-ak
0 siblings, 1 reply; 2+ messages in thread
From: Mark Brown @ 2019-01-07 12:59 UTC (permalink / raw)
To: b-ak; +Cc: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 345 bytes --]
On Sat, Jan 05, 2019 at 10:16:22AM +0530, b-ak wrote:
>
> Hi Mark,
>
> Fixed the build error.
>
> Thanks,
> Bhargav
>
Please submit patches following the process covered in
submitting-patches.rst, don't send them as attachments to replies in the
middle of threads. Doing that confuses all the tooling for handling
patches.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH v2] ASoC: tlv320aic32x4: Kernel OOPS while entering DAPM standby mode
2019-01-07 12:59 [PATCH] " Mark Brown
@ 2019-01-07 17:45 ` b-ak
0 siblings, 0 replies; 2+ messages in thread
From: b-ak @ 2019-01-07 17:45 UTC (permalink / raw)
To: Mark Brown, linux-kernel; +Cc: b-ak
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>
---
sound/soc/codecs/tlv320aic32x4.c | 4 ++++
1 file changed, 4 insertions(+)
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);
--
2.19.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-01-07 17:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-07 17:00 [PATCH v2] ASoC: tlv320aic32x4: Kernel OOPS while entering DAPM standby mode b-ak
-- strict thread matches above, loose matches on Subject: below --
2019-01-07 12:59 [PATCH] " Mark Brown
2019-01-07 17:45 ` [PATCH v2] " b-ak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®