summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorShengjiu Wang <shengjiu.wang@freescale.com>2017-03-15 14:17:24 +0800
committerAnson Huang <Anson.Huang@nxp.com>2017-06-09 22:19:16 +0800
commitbf78034fda408d01f45803d3ec6c77c209d1138c (patch)
tree8e3d50ae6268ef4c5705ffc63573a2f91eccf396 /sound
parenteabe3d3790c6faa08265e41f31dc38e5e29bb891 (diff)
MLK-14448: ASoC: fsl_ssi: Fix capture and playback with master mode
Capture and Playback work in parallel in master mode, stop one substream, the other substream will be conflicted, for clock is disabled. The reason is that the clock counter is not increased in second substream, the hw_param() function returned in the beginning for first substream is enabled. This patch is to move the clock enablement before the device enablement checking in hw_param(). Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/fsl/fsl_ssi.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index 39bc4ec300c7..74931132fb2c 100644
--- a/sound/soc/fsl/fsl_ssi.c
+++ b/sound/soc/fsl/fsl_ssi.c
@@ -848,16 +848,6 @@ static int fsl_ssi_hw_params(struct snd_pcm_substream *substream,
int enabled;
u8 i2smode = ssi_private->i2s_mode;
- regmap_read(regs, CCSR_SSI_SCR, &scr_val);
- enabled = scr_val & CCSR_SSI_SCR_SSIEN;
-
- /*
- * If we're in synchronous mode, and the SSI is already enabled,
- * then STCCR is already set properly.
- */
- if (enabled && ssi_private->cpu_dai_drv.symmetric_rates)
- return 0;
-
if (fsl_ssi_is_i2s_master(ssi_private)) {
ret = fsl_ssi_set_bclk(substream, cpu_dai, hw_params);
if (ret)
@@ -873,6 +863,16 @@ static int fsl_ssi_hw_params(struct snd_pcm_substream *substream,
}
}
+ regmap_read(regs, CCSR_SSI_SCR, &scr_val);
+ enabled = scr_val & CCSR_SSI_SCR_SSIEN;
+
+ /*
+ * If we're in synchronous mode, and the SSI is already enabled,
+ * then STCCR is already set properly.
+ */
+ if (enabled && ssi_private->cpu_dai_drv.symmetric_rates)
+ return 0;
+
if (!fsl_ssi_is_ac97(ssi_private)) {
/*
* Switch to normal net mode in order to have a frame sync