aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolin Chen <Guangyu.Chen@freescale.com>2014-04-08 23:24:51 -0400
committerNitin Garg <nitin.garg@freescale.com>2014-04-16 09:58:16 -0400
commitc68c1874c07c30a3483eed70fb2abe82e19d1d20 (patch)
tree5ef6bae7a5c043dcac2fcd5cf16a0892a85993b3
parent7f28e4df4bc091583ec5e4d29aaca92d2db53c96 (diff)
ENGR00307592 ASoC: fsl_asrc: Add delay after enabling ASRC p2p
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>
-rw-r--r--sound/soc/fsl/fsl_asrc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/soc/fsl/fsl_asrc.c b/sound/soc/fsl/fsl_asrc.c
index 1e9b9c35442e..d06dc3803b42 100644
--- a/sound/soc/fsl/fsl_asrc.c
+++ b/sound/soc/fsl/fsl_asrc.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2010-2013 Freescale Semiconductor, Inc. All Rights Reserved. 2 * Copyright (C) 2010-2014 Freescale Semiconductor, Inc. All Rights Reserved.
3 * 3 *
4 * The code contained herein is licensed under the GNU General Public 4 * The code contained herein is licensed under the GNU General Public
5 * License. You may obtain a copy of the GNU General Public License 5 * 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,
301 return ret; 301 return ret;
302 dma_async_issue_pending(asrc_p2p->asrc_p2p_dma_chan); 302 dma_async_issue_pending(asrc_p2p->asrc_p2p_dma_chan);
303 asrc_p2p->asrc_ops.asrc_p2p_start_conv(asrc_p2p->asrc_index); 303 asrc_p2p->asrc_ops.asrc_p2p_start_conv(asrc_p2p->asrc_index);
304
305 /* Output enough data to content the DMA burstsize of BE */
306 mdelay(1);
304 break; 307 break;
305 case SNDRV_PCM_TRIGGER_SUSPEND: 308 case SNDRV_PCM_TRIGGER_SUSPEND:
306 case SNDRV_PCM_TRIGGER_PAUSE_PUSH: 309 case SNDRV_PCM_TRIGGER_PAUSE_PUSH: