* [PATCH] ASoC: rsnd: SSI needs to prepare clocks before enabling
@ 2014-03-28 12:27 Ben Dooks
2014-03-29 10:09 ` Mark Brown
0 siblings, 1 reply; 3+ messages in thread
From: Ben Dooks @ 2014-03-28 12:27 UTC (permalink / raw)
To: alsa-devel
Cc: kuninori.morimoto.gx, broonie, lgirdwood, linux-sh, magnus.damm,
linux-kernel, William Towle
From: William Towle <william.towle@codethink.co.uk>
The rsnd_ssi_hw_{stop|start} functions need to call clk_prepare_enable()
and clk_disable_unprepare(), otherwise the following warning occurs on
attempt to play sound:
WARNING: CPU: 2 PID: 1176 at drivers/clk/clk.c:926 __clk_enable+0x30/0x9c()
due to drivers/clk/clk.c:
926 if (WARN_ON(clk->prepare_count = 0))
927 return -ESHUTDOWN;
Signed-off-by: William Towle <william.towle@codethink.co.uk>
[ben.dooks@codethink.co.uk: add more bug info to report]
Tested-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
sound/soc/sh/rcar/ssi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c
index 4b8cf7c..1c07ef7 100644
--- a/sound/soc/sh/rcar/ssi.c
+++ b/sound/soc/sh/rcar/ssi.c
@@ -250,7 +250,7 @@ static void rsnd_ssi_hw_start(struct rsnd_ssi *ssi,
u32 cr;
if (0 = ssi->usrcnt) {
- clk_enable(ssi->clk);
+ clk_prepare_enable(ssi->clk);
if (rsnd_rdai_is_clk_master(rdai)) {
if (rsnd_ssi_clk_from_parent(ssi))
@@ -309,7 +309,7 @@ static void rsnd_ssi_hw_stop(struct rsnd_ssi *ssi,
rsnd_ssi_master_clk_stop(ssi);
}
- clk_disable(ssi->clk);
+ clk_disable_unprepare(ssi->clk);
}
dev_dbg(dev, "ssi%d hw stopped\n", rsnd_mod_id(&ssi->mod));
--
1.9.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: rsnd: SSI needs to prepare clocks before enabling
2014-03-28 12:27 [PATCH] ASoC: rsnd: SSI needs to prepare clocks before enabling Ben Dooks
@ 2014-03-29 10:09 ` Mark Brown
2014-04-04 11:42 ` [alsa-devel] " Ben Dooks
0 siblings, 1 reply; 3+ messages in thread
From: Mark Brown @ 2014-03-29 10:09 UTC (permalink / raw)
To: Ben Dooks
Cc: alsa-devel, kuninori.morimoto.gx, lgirdwood, linux-sh,
magnus.damm, linux-kernel, William Towle
[-- Attachment #1: Type: text/plain, Size: 733 bytes --]
On Fri, Mar 28, 2014 at 12:27:06PM +0000, Ben Dooks wrote:
> From: William Towle <william.towle@codethink.co.uk>
>
> The rsnd_ssi_hw_{stop|start} functions need to call clk_prepare_enable()
> and clk_disable_unprepare(), otherwise the following warning occurs on
> attempt to play sound:
This doesn't apply cleanly against current code, can you please check and
resend - I can't apply this anyway since...
> Signed-off-by: William Towle <william.towle@codethink.co.uk>
> [ben.dooks@codethink.co.uk: add more bug info to report]
> Tested-by: Ben Dooks <ben.dooks@codethink.co.uk>
> ---
...you forgot to sign off. I'm also not seeing the debug info you
mention in the changelog, indeed there's no error checking.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [alsa-devel] [PATCH] ASoC: rsnd: SSI needs to prepare clocks before enabling
2014-03-29 10:09 ` Mark Brown
@ 2014-04-04 11:42 ` Ben Dooks
0 siblings, 0 replies; 3+ messages in thread
From: Ben Dooks @ 2014-04-04 11:42 UTC (permalink / raw)
To: Mark Brown
Cc: linux-kernel, alsa-devel, kuninori.morimoto.gx, linux-sh,
lgirdwood, Ben Dooks, magnus.damm, William Towle
On Sat, Mar 29, 2014 at 10:09:06AM +0000, Mark Brown wrote:
> On Fri, Mar 28, 2014 at 12:27:06PM +0000, Ben Dooks wrote:
> > From: William Towle <william.towle@codethink.co.uk>
> >
> > The rsnd_ssi_hw_{stop|start} functions need to call clk_prepare_enable()
> > and clk_disable_unprepare(), otherwise the following warning occurs on
> > attempt to play sound:
>
> This doesn't apply cleanly against current code, can you please check and
> resend - I can't apply this anyway since...
>
> > Signed-off-by: William Towle <william.towle@codethink.co.uk>
> > [ben.dooks@codethink.co.uk: add more bug info to report]
> > Tested-by: Ben Dooks <ben.dooks@codethink.co.uk>
> > ---
>
> ...you forgot to sign off. I'm also not seeing the debug info you
> mention in the changelog, indeed there's no error checking.
Ooops.
I need to re-do this anyway as we need to prepare the clock separately
from the enable, as the enable code is occasionally being called from
an interrupt context.
I anm not sure what you mean by debug info... there is the log from
the WARN_ON() which is trigger from the clock driver.
--
Ben Dooks, ben@fluff.org, http://www.fluff.org/ben/
Large Hadron Colada: A large Pina Colada that makes the universe disappear.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-04-04 11:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-28 12:27 [PATCH] ASoC: rsnd: SSI needs to prepare clocks before enabling Ben Dooks
2014-03-29 10:09 ` Mark Brown
2014-04-04 11:42 ` [alsa-devel] " Ben Dooks
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).