]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00300188-2 ASoC: imx-hdmi-dma: Clear offset in the trigger init
authorNicolin Chen <Guangyu.Chen@freescale.com>
Thu, 6 Mar 2014 11:14:29 +0000 (19:14 +0800)
committerNicolin Chen <Guangyu.Chen@freescale.com>
Tue, 11 Mar 2014 02:42:25 +0000 (10:42 +0800)
The offset reflects the current position of DMA access in the ALSA ring buffer.
So we should clear it before re-start DMA engine becasue the DMA access should
re-start its job from the 0 position. If we don't do this, the driver might get
a wrong idea about current position of DMA access. Thus fix it.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
(cherry picked from commit 8f265543ffda0a19e3f469967a7d61d8b344f080)

sound/soc/fsl/imx-hdmi-dma.c

index f3a7a9be05a27bab39a7aec15d2c125a1bed4bbf..88558b6b934395543fc5be43b1f8ef7734e706f0 100644 (file)
@@ -786,6 +786,7 @@ static void hdmi_dma_trigger_init(struct snd_pcm_substream *substream,
 {
        unsigned long status;
 
+       priv->offset = 0;
        priv->frame_idx = 0;
 
        /* Copy data by buffer_bytes */