diff options
author | Nicolin Chen <Guangyu.Chen@freescale.com> | 2014-03-25 11:46:35 +0800 |
---|---|---|
committer | Nitin Garg <nitin.garg@freescale.com> | 2014-04-16 08:58:11 -0500 |
commit | 0c8dc6b67e6e06f5c24d460f1b14a9b6ad2bc137 (patch) | |
tree | 4504fbfb33f51465344db5af05a415292cad0bf3 /sound/soc | |
parent | 17796339bd03a82441069099793cc5e54d5187eb (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>
(cherry picked from commit 5d0d4e1558fa0c235691436e1c5d26d9c8950775)
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/fsl/imx-hdmi-dma.c | 2 |
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) { |