summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorb02247 <b02247@freescale.com>2013-06-24 15:00:51 +0800
committerNicolin Chen <b42378@freescale.com>2013-06-24 19:26:28 +0800
commitf966c6799855b0ae3d366837a4b62fa594970615 (patch)
tree51add9317cf5eaa5bcea7d0b8957981cf3fffbcb
parent21018d677b26ef269f4d0d0d25b8963755bdf667 (diff)
ENGR00268339 asoc: fsl: ssi: channel swap when arecord & aplay
Disable the SSI in the trigger function instead of in the shutdown Signed-off-by: Shengjiu Wang <b02247@freescale.com> (cherry picked from commit 75ff0c342df325269f5f671212c84d71dc56fef6)
-rw-r--r--sound/soc/fsl/fsl_ssi.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index 9d3b663c5761..98631e588430 100644
--- a/sound/soc/fsl/fsl_ssi.c
+++ b/sound/soc/fsl/fsl_ssi.c
@@ -573,6 +573,8 @@ static int fsl_ssi_trigger(struct snd_pcm_substream *substream, int cmd,
write_ssi_mask(&ssi->scr, CCSR_SSI_SCR_RE, 0);
write_ssi_mask(&ssi->sier, CCSR_SSI_SIER_RDMAE, 0);
}
+ if ((read_ssi(&ssi->scr) & (CCSR_SSI_SCR_TE | CCSR_SSI_SCR_RE)) == 0)
+ write_ssi_mask(&ssi->scr, CCSR_SSI_SCR_SSIEN, 0);
break;
default:
@@ -856,15 +858,6 @@ static void fsl_ssi_shutdown(struct snd_pcm_substream *substream,
ssi_private->second_stream = NULL;
- /*
- * If this is the last active substream, disable the SSI.
- */
- if (!ssi_private->first_stream) {
- struct ccsr_ssi __iomem *ssi = ssi_private->ssi;
-
- write_ssi_mask(&ssi->scr, CCSR_SSI_SCR_SSIEN, 0);
- }
-
clk_disable(ssi_private->clk);
pm_runtime_put_sync(dai->dev);