diff options
author | Nicolin Chen <Guangyu.Chen@freescale.com> | 2014-03-06 06:14:29 -0500 |
---|---|---|
committer | Nitin Garg <nitin.garg@freescale.com> | 2014-04-16 09:57:53 -0400 |
commit | 01e536e51e7c8ddb7d568bce2402966dbb3797ec (patch) | |
tree | c90c65a632636c723635d8169ee3e29c56b0b11f /sound/soc | |
parent | a7f1d47078a8b61b1cf13b9f6cd07246268acc0b (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>
Diffstat (limited to 'sound/soc')
-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, | |||
786 | { | 786 | { |
787 | unsigned long status; | 787 | unsigned long status; |
788 | 788 | ||
789 | priv->offset = 0; | ||
789 | priv->frame_idx = 0; | 790 | priv->frame_idx = 0; |
790 | 791 | ||
791 | /* Copy data by buffer_bytes */ | 792 | /* Copy data by buffer_bytes */ |