summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorWallace Wang <r59996@freescale.com>2009-07-14 14:00:21 +0800
committerJustin Waters <justin.waters@timesys.com>2009-10-13 11:04:31 -0400
commit9dd2520fa9b9d966f9601a2e9fab6d3296fb128e (patch)
tree45ad782a8444a8d1e6a1450c2a9ff9869076639e /sound
parentc97aabd7e948805a56c112225ea16824503053cf (diff)
ENGR00114140 SSI: TX fail if RX is enabled before TX
Software workaround for ENGcm06222 If RX and TX are working at same time, and RX is enabled before TX, tx can't run normally and there will be SSI TX underrun. The SW workaround is to clear SYN, RE, SSIEN and then re-enable SYN, RE, TE, SSIEN at the same time. Signed-off-by: Wallace Wang <r59996@freescale.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/imx/imx-ssi.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/sound/soc/imx/imx-ssi.c b/sound/soc/imx/imx-ssi.c
index ddf0661475d1..5845dd41046c 100644
--- a/sound/soc/imx/imx-ssi.c
+++ b/sound/soc/imx/imx-ssi.c
@@ -5,7 +5,7 @@
* Author: Liam Girdwood
* liam.girdwood@wolfsonmicro.com or linux@wolfsonmicro.com
*
- * Based on mxc-alsa-mc13783 (C) 2006-2008 Freescale Semiconductor, Inc.
+ * Based on mxc-alsa-mc13783 (C) 2006-2009 Freescale Semiconductor, Inc.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -576,9 +576,16 @@ static int imx_ssi_trigger(struct snd_pcm_substream *substream, int cmd)
case SNDRV_PCM_TRIGGER_START:
case SNDRV_PCM_TRIGGER_RESUME:
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
+ if (scr & SSI_SCR_RE) {
+ if (cpu_dai->id == IMX_DAI_SSI0
+ || cpu_dai->id == IMX_DAI_SSI1)
+ __raw_writel(0, SSI1_SCR);
+ else
+ __raw_writel(0, SSI2_SCR);
+ }
scr |= SSI_SCR_TE;
- else
+ } else
scr |= SSI_SCR_RE;
break;
case SNDRV_PCM_TRIGGER_SUSPEND: