ENGR00305624-2 ASoC: imx-hdmi-dma: Correct the appl pointer
authorNicolin Chen <Guangyu.Chen@freescale.com>
Tue, 25 Mar 2014 03:46:35 +0000 (11:46 +0800)
committerNitin Garg <nitin.garg@freescale.com>
Wed, 16 Apr 2014 13:58:11 +0000 (08:58 -0500)
commit0c8dc6b67e6e06f5c24d460f1b14a9b6ad2bc137
tree4504fbfb33f51465344db5af05a415292cad0bf3
parent17796339bd03a82441069099793cc5e54d5187eb
ENGR00305624-2 ASoC: imx-hdmi-dma: Correct the appl pointer

We might not be able to get appl_ptr, so we estimated it by using hw_ptr,
while the distance between then should not be 2 * priv->period_bytes
initially but 8 * priv->period_bytes as we pri-filled one entire buffer
size at the beginning. The driver's memory access might be overlapped
with ALSA's buffer updating. So this patch fixes this inaccurate distance.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
(cherry picked from commit 5d0d4e1558fa0c235691436e1c5d26d9c8950775)
sound/soc/fsl/imx-hdmi-dma.c