dma: imx-sdma: buf_tail should be initialize in prepare function
authorRichard Zhao <richard.zhao@freescale.com>
Mon, 4 Jun 2012 01:17:24 +0000 (09:17 +0800)
committerVinod Koul <vinod.koul@linux.intel.com>
Thu, 7 Jun 2012 08:18:42 +0000 (13:48 +0530)
commit8e2e27c7444ba7880aa0a4cb07a79de130d0ed93
tree085658546fe857444d2b629d5970e71e669ac2fe
parent30c1dc0ff30b5552e8af555265dbeac5637cbb48
dma: imx-sdma: buf_tail should be initialize in prepare function

This fix audio underrun issue. When SNDRV_PCM_TRIGGER_STOP
and SNDRV_PCM_TRIGGER_START, it calls prepare again. buf_tail
should be reset to zero.
So move buf_tail initialization into prepare function.

Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
drivers/dma/imx-sdma.c