OSDN Git Service

ASoC: omap-mcbsp: Do not attempt to change DAI sysclk if stream is active
authorJarkko Nikula <jarkko.nikula@bitmer.com>
Fri, 23 Sep 2011 08:19:13 +0000 (11:19 +0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 3 Oct 2011 18:41:07 +0000 (11:41 -0700)
commit60984600ff1c9da76b17e153dacb4c641671af18
treee196d99a4afd91b8ac259a7ad75fddcfb5ea4873
parent9d651c45adad4ed6e915e0f65706c71a0bf87ab2
ASoC: omap-mcbsp: Do not attempt to change DAI sysclk if stream is active

commit 34c869855a28af3c6031d29e2267b5a3cce0d67d upstream.

Attempt to change McBSP CLKS source while another stream is active is not
safe after commit d135865 ("OMAP: McBSP: implement functional clock
switching via clock framework") in 2.6.37.

CLKS parent clock switching using clock framework have to idle the McBSP
before switching and then activate it again. This short break can cause a
DMA transaction error to already running stream which halts and recovers
only by closing and restarting the stream.

This goes more fatal after commit e2fa61d ("OMAP3: l3: Introduce
l3-interconnect error handling driver") in 2.6.39 where l3 driver detects a
severe timeout error and does BUG_ON().

Fix this by not changing any configuration in omap_mcbsp_dai_set_dai_sysclk
if the McBSP is already active. This test should have been here just from
the beginning anyway.

Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
sound/soc/omap/omap-mcbsp.c