From: b-ak <anur.bhargav@gmail.com>
To: Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.com>,
alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: [PATCH] ASoC: tlv320aic32x4: Kernel OOPS while entering DAPM standby mode
Date: Wed, 2 Jan 2019 22:36:33 +0530 [thread overview]
Message-ID: <20190102170633.GA9724@Ideapad-330S> (raw)
During the bootup of the kernel, as soon as the DAPM framework kicks in
it pushes the codec into standy mode.
The existing TVL320AIC32x4 codec driver doesn't prepare the clock in
the probe function.
This leads to an OOPS when the DAPM tries to put it into standy by calling
clk_disable_unprepare()
This patch fixes that problem.
Signed-off-by: b-ak <anur.bhargav@gmail.com>
---
sound/soc/codecs/tlv320aic32x4.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/sound/soc/codecs/tlv320aic32x4.c b/sound/soc/codecs/tlv320aic32x4.c
index e2b5a11b16d1..7cf363595abd 100644
--- a/sound/soc/codecs/tlv320aic32x4.c
+++ b/sound/soc/codecs/tlv320aic32x4.c
@@ -1167,6 +1167,12 @@ int aic32x4_probe(struct device *dev, struct regmap *regmap)
if (IS_ERR(aic32x4->mclk)) {
dev_err(dev, "Failed getting the mclk. The current implementation does not support the usage of this codec without mclk\n");
return PTR_ERR(aic32x4->mclk);
+ } else {
+ ret = clk_prepare_enable(aic32x4->mclk);
+ if (ret != 0) {
+ dev_err(dev, "Failed to enable MCLK: %d\n", ret);
+ return ret;
+ }
}
if (gpio_is_valid(aic32x4->rstn_gpio)) {
--
2.19.1
next reply other threads:[~2019-01-02 17:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-02 17:06 b-ak [this message]
2019-01-03 12:45 ` Mark Brown
2019-01-03 19:34 ` b-ak
2019-01-04 16:40 ` b-ak
2019-01-05 4:46 ` b-ak
2019-01-07 12:59 ` Mark Brown
2019-01-07 17:40 ` b-ak
2019-01-07 17:45 ` [PATCH v2] " b-ak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190102170633.GA9724@Ideapad-330S \
--to=anur.bhargav@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®