summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorNicolin Chen <Guangyu.Chen@freescale.com>2014-03-25 11:46:35 +0800
committerNicolin Chen <Guangyu.Chen@freescale.com>2014-03-27 19:20:00 +0800
commit5d0d4e1558fa0c235691436e1c5d26d9c8950775 (patch)
tree90c4a0f7d56109e53ff4dcff68ee5ad394b31093 /sound
parentaca6d0c4c96d658021bda4b5a4e454076e27e9f2 (diff)
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>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/fsl/imx-hdmi-dma.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/fsl/imx-hdmi-dma.c b/sound/soc/fsl/imx-hdmi-dma.c
index 8f3e79845fa6..d0e907a07790 100644
--- a/sound/soc/fsl/imx-hdmi-dma.c
+++ b/sound/soc/fsl/imx-hdmi-dma.c
@@ -447,7 +447,7 @@ static void hdmi_dma_data_copy(struct snd_pcm_substream *substream,
appl_bytes = frames_to_bytes(runtime, runtime->status->hw_ptr);
if (type == 'p')
- appl_bytes += 2 * priv->period_bytes;
+ appl_bytes += 8 * priv->period_bytes;
offset = appl_bytes % priv->buffer_bytes;
switch (type) {