diff options
author | Shengjiu Wang <shengjiu.wang@freescale.com> | 2014-10-31 13:51:20 +0800 |
---|---|---|
committer | Shengjiu Wang <shengjiu.wang@freescale.com> | 2014-11-03 15:05:02 +0800 |
commit | 9e66132d9c96305b65aa5fa3ba8a35271a04ded9 (patch) | |
tree | 0ebd40d89ebd16541984ac3feafab3b8d63906ee /sound | |
parent | abb85b11523c59f3e0c9372ca7deedfbddbd6d0f (diff) |
MLK-9731 ASoC: imx-hdmi-dma: audio output is noisy in long time playback
In the frame_to_bytes(), when hw_ptr*frame_bits exceed the maxmum of unsigned
long, the return value is saturated, so the appl_bytes is wrong.
This patch is to correct the usage of frame_to_bytes().
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
Diffstat (limited to 'sound')
-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 d8d071507c11..40637e64fa4c 100644 --- a/sound/soc/fsl/imx-hdmi-dma.c +++ b/sound/soc/fsl/imx-hdmi-dma.c @@ -456,7 +456,7 @@ static void hdmi_dma_data_copy(struct snd_pcm_substream *substream, if (runtime->access != SNDRV_PCM_ACCESS_MMAP_INTERLEAVED) return; - appl_bytes = frames_to_bytes(runtime, runtime->status->hw_ptr); + appl_bytes = runtime->status->hw_ptr * (runtime->frame_bits / 8); if (type == 'p') appl_bytes += 2 * priv->period_bytes; offset = appl_bytes % priv->buffer_bytes; |