Skip to contentSkip to conversation

ASoC: omap: n810: Convert to clk_prepare_enable/clk_disable_unprepare

PATCH Applied Jarkko Nikula 2 participants 5 messages Nov 30, 2013 – Dec 2, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: omap: n810: Convert to clk_prepare_enable/clk_disable_unprepare

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").

---
 sound/soc/omap/n810.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/omap/n810.c +2 -2
index 6d216cb6c19b..3fde9e402710 100644
@@ -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,
Signature · 1 line
1.8.4.3
maintainer Applied
#1 lore raw
Quoted 4 lines · 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.

Applied, thanks.

maintainer Applied
#2 lore raw
In reply to Jarkko Nikula
Quoted 4 lines · 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.

Applied, thanks

Quoted 5 lines

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?

#3 lore raw
Quoted 8 lines · Mark Brown
Quoted 5 lines

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 :-)

Signature · 1 line
Jarkko
maintainer
#4 lore raw
Quoted 6 lines · Jarkko Nikula
Quoted 1 line · Mark Brown

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.