ENGR00307592 ASoC: fsl_asrc: Add delay after enabling ASRC p2p
authorNicolin Chen <Guangyu.Chen@freescale.com>
Wed, 9 Apr 2014 03:24:51 +0000 (11:24 +0800)
committerNitin Garg <nitin.garg@freescale.com>
Wed, 16 Apr 2014 13:58:16 +0000 (08:58 -0500)
When using ASRC p2p as a for-end with other back-end modules like ESAI,
it'd be safer to add 1ms delay, less might be futile for extreme cases,
after enabling ASRC so as to keep ASRC output FIFO with enough data to
content the DMA burstsize of back-ends and accordingly prevent underrun
that might happen to them.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
sound/soc/fsl/fsl_asrc.c

index 1e9b9c35442e39ed3e5638a451cb4924201d645d..d06dc3803b4273e29d8d58cef355441c1abb905d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010-2013 Freescale Semiconductor, Inc. All Rights Reserved.
+ * Copyright (C) 2010-2014 Freescale Semiconductor, Inc. All Rights Reserved.
  *
  * The code contained herein is licensed under the GNU General Public
  * License. You may obtain a copy of the GNU General Public License
@@ -301,6 +301,9 @@ static int fsl_asrc_p2p_trigger(struct snd_pcm_substream *substream, int cmd,
                        return ret;
                dma_async_issue_pending(asrc_p2p->asrc_p2p_dma_chan);
                asrc_p2p->asrc_ops.asrc_p2p_start_conv(asrc_p2p->asrc_index);
+
+               /* Output enough data to content the DMA burstsize of BE */
+               mdelay(1);
                break;
        case SNDRV_PCM_TRIGGER_SUSPEND:
        case SNDRV_PCM_TRIGGER_PAUSE_PUSH: