The offset reflects the current position of DMA access in the ALSA ring buffer.
So we should clear it before re-start DMA engine becasue the DMA access should
re-start its job from the 0 position. If we don't do this, the driver might get
a wrong idea about current position of DMA access. Thus fix it.
Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
(cherry picked from commit
8f265543ffda0a19e3f469967a7d61d8b344f080)
{
unsigned long status;
+ priv->offset = 0;
priv->frame_idx = 0;
/* Copy data by buffer_bytes */