* [PATCH] ASoC: omap: n810: Convert to clk_prepare_enable/clk_disable_unprepare
@ 2013-11-30 16:05 Jarkko Nikula
2013-12-02 11:14 ` Mark Brown
2013-12-02 11:16 ` Mark Brown
0 siblings, 2 replies; 5+ messages in thread
From: Jarkko Nikula @ 2013-11-30 16:05 UTC (permalink / raw)
To: alsa-devel; +Cc: Peter Ujfalusi, Mark Brown, Liam Girdwood, Jarkko Nikula
N810 audio driver has stopped working at some point. Probably when
OMAP2 was converted to common clock framework since now call to clk_enable
dumps the stack trace in drivers/clk/clk.c: __clk_enable() due
clk->prepare_count is zero.
Fix this by converting clk_enable/_disable calls to those that take care
of clock prepare/unprepare.
I'm not queueing this to linux-stable since OMAP2 common clock framework
conversion in commit ed1ebc4948fd ("ARM: OMAP2: clock: Convert to common clk")
happened before N810 was really usable in mainline and user base for N810 is
anyway small. Potential linux-stable candidates are only those after
commit 3d3a6d18abc6 ("watchdog: introduce retu_wdt driver").
Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
---
sound/soc/omap/n810.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/omap/n810.c b/sound/soc/omap/n810.c
index 6d216cb6c19b..3fde9e402710 100644
--- a/sound/soc/omap/n810.c
+++ b/sound/soc/omap/n810.c
@@ -100,12 +100,12 @@ static int n810_startup(struct snd_pcm_substream *substream)
SNDRV_PCM_HW_PARAM_CHANNELS, 2, 2);
n810_ext_control(&codec->dapm);
- return clk_enable(sys_clkout2);
+ return clk_prepare_enable(sys_clkout2);
}
static void n810_shutdown(struct snd_pcm_substream *substream)
{
- clk_disable(sys_clkout2);
+ clk_disable_unprepare(sys_clkout2);
}
static int n810_hw_params(struct snd_pcm_substream *substream,
--
1.8.4.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] ASoC: omap: n810: Convert to clk_prepare_enable/clk_disable_unprepare
2013-11-30 16:05 [PATCH] ASoC: omap: n810: Convert to clk_prepare_enable/clk_disable_unprepare Jarkko Nikula
@ 2013-12-02 11:14 ` Mark Brown
2013-12-02 11:16 ` Mark Brown
1 sibling, 0 replies; 5+ messages in thread
From: Mark Brown @ 2013-12-02 11:14 UTC (permalink / raw)
To: Jarkko Nikula; +Cc: Peter Ujfalusi, alsa-devel, Liam Girdwood
[-- Attachment #1.1: Type: text/plain, Size: 322 bytes --]
On Sat, Nov 30, 2013 at 06:05:28PM +0200, Jarkko Nikula wrote:
> N810 audio driver has stopped working at some point. Probably when
> OMAP2 was converted to common clock framework since now call to clk_enable
> dumps the stack trace in drivers/clk/clk.c: __clk_enable() due
> clk->prepare_count is zero.
Applied, thanks.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ASoC: omap: n810: Convert to clk_prepare_enable/clk_disable_unprepare
2013-11-30 16:05 [PATCH] ASoC: omap: n810: Convert to clk_prepare_enable/clk_disable_unprepare Jarkko Nikula
2013-12-02 11:14 ` Mark Brown
@ 2013-12-02 11:16 ` Mark Brown
2013-12-02 20:12 ` Jarkko Nikula
1 sibling, 1 reply; 5+ messages in thread
From: Mark Brown @ 2013-12-02 11:16 UTC (permalink / raw)
To: Jarkko Nikula; +Cc: Peter Ujfalusi, alsa-devel, Liam Girdwood
[-- Attachment #1.1: Type: text/plain, Size: 755 bytes --]
On Sat, Nov 30, 2013 at 06:05:28PM +0200, Jarkko Nikula wrote:
> N810 audio driver has stopped working at some point. Probably when
> OMAP2 was converted to common clock framework since now call to clk_enable
> dumps the stack trace in drivers/clk/clk.c: __clk_enable() due
> clk->prepare_count is zero.
Applied, thanks
> I'm not queueing this to linux-stable since OMAP2 common clock framework
> conversion in commit ed1ebc4948fd ("ARM: OMAP2: clock: Convert to common clk")
> happened before N810 was really usable in mainline and user base for N810 is
> anyway small. Potential linux-stable candidates are only those after
> commit 3d3a6d18abc6 ("watchdog: introduce retu_wdt driver").
That looks like it still means v3.10 and up could use the fix?
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ASoC: omap: n810: Convert to clk_prepare_enable/clk_disable_unprepare
2013-12-02 20:12 ` Jarkko Nikula
@ 2013-12-02 18:25 ` Mark Brown
0 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2013-12-02 18:25 UTC (permalink / raw)
To: Jarkko Nikula; +Cc: Peter Ujfalusi, alsa-devel, Liam Girdwood
[-- Attachment #1.1: Type: text/plain, Size: 464 bytes --]
On Mon, Dec 02, 2013 at 08:12:49PM +0000, Jarkko Nikula wrote:
> On 12/02/2013 11:16 AM, Mark Brown wrote:
> > That looks like it still means v3.10 and up could use the fix?
> Well I kind of fear linux-stable user base for N810 is next to zero. I'd
> even insist this forward if just one shows up :-)
I think you're right but on the other hand the cost of sending fixes to
stable is also very low and it seems more friendly to help people out if
they do exist.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ASoC: omap: n810: Convert to clk_prepare_enable/clk_disable_unprepare
2013-12-02 11:16 ` Mark Brown
@ 2013-12-02 20:12 ` Jarkko Nikula
2013-12-02 18:25 ` Mark Brown
0 siblings, 1 reply; 5+ messages in thread
From: Jarkko Nikula @ 2013-12-02 20:12 UTC (permalink / raw)
To: Mark Brown; +Cc: Peter Ujfalusi, alsa-devel, Liam Girdwood
On 12/02/2013 11:16 AM, Mark Brown wrote:
>> I'm not queueing this to linux-stable since OMAP2 common clock framework
>> conversion in commit ed1ebc4948fd ("ARM: OMAP2: clock: Convert to common clk")
>> happened before N810 was really usable in mainline and user base for N810 is
>> anyway small. Potential linux-stable candidates are only those after
>> commit 3d3a6d18abc6 ("watchdog: introduce retu_wdt driver").
>
> That looks like it still means v3.10 and up could use the fix?
>
Well I kind of fear linux-stable user base for N810 is next to zero. I'd
even insist this forward if just one shows up :-)
--
Jarkko
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-12-02 18:25 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-30 16:05 [PATCH] ASoC: omap: n810: Convert to clk_prepare_enable/clk_disable_unprepare Jarkko Nikula
2013-12-02 11:14 ` Mark Brown
2013-12-02 11:16 ` Mark Brown
2013-12-02 20:12 ` Jarkko Nikula
2013-12-02 18:25 ` Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.