ASoC: kirkwood-i2s: fix DMA underruns
authorRussell King <rmk+kernel@arm.linux.org.uk>
Tue, 20 Nov 2012 12:18:52 +0000 (12:18 +0000)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 21 Nov 2012 01:38:39 +0000 (10:38 +0900)
commit982b604bc56a3da874e489051fc7adb49b1eba65
tree4ca2ef9766708a6c5ae58d24f14d14a2b50c0737
parent2424d458108e275ca736dabc792ee9b6733994c5
ASoC: kirkwood-i2s: fix DMA underruns

Stress testing the driver with multiple start/stop events causes
kirkwood-dma to report underrun errors (which used to cause the kernel
to lock up solidly).  This is because kirkwood-i2s is not respecting
the restrictions imposed on clearing the 'pause' bit.  Follow what the
spec says; the busy bit must be read as being clear twice before the
pause bit can be released.  This solves the underruns.

However, it has been noticed that the busy bit occasionally does not
clear itself, hence the waiting is bounded to 5ms maximum to avoid a
new reason for the kernel to lockup.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/kirkwood/kirkwood-i2s.c