diff options
author | Nicolin Chen <Guangyu.Chen@freescale.com> | 2014-03-06 19:14:29 +0800 |
---|---|---|
committer | Nicolin Chen <Guangyu.Chen@freescale.com> | 2014-03-11 10:42:25 +0800 |
commit | 601a78e51afe13ea8509ceccc80e3bc63af27156 (patch) | |
tree | 1af242b0f9ec4ad57658da697b529067cc935f94 | |
parent | a510c49de7bfda5462c6df3c24e6454ca8efe6a6 (diff) |
ENGR00300188-2 ASoC: imx-hdmi-dma: Clear offset in the trigger init
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)
-rw-r--r-- | sound/soc/fsl/imx-hdmi-dma.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/soc/fsl/imx-hdmi-dma.c b/sound/soc/fsl/imx-hdmi-dma.c index f3a7a9be05a2..88558b6b9343 100644 --- a/sound/soc/fsl/imx-hdmi-dma.c +++ b/sound/soc/fsl/imx-hdmi-dma.c @@ -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 */ |