Browse Source

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>
imx_3.10.53_1.1.0_ga
Shengjiu Wang 6 years ago
parent
commit
9e66132d9c
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      sound/soc/fsl/imx-hdmi-dma.c

+ 1
- 1
sound/soc/fsl/imx-hdmi-dma.c View File

@ -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;


Loading…
Cancel
Save