Commit 9c4f509a authored by Nicolin Chen's avatar Nicolin Chen Committed by Mark Brown

ASoC: fsl_ssi: Use ssi->streams instead of reading register

Since ssi->streams is being updated along with SCR register and
its SSIEN bit, it's simpler to use it instead.
Signed-off-by: default avatarNicolin Chen <nicoleotsuka@gmail.com>
Tested-by: default avatarCaleb Crome <caleb@crome.org>
Tested-by: default avatarMaciej S. Szmigiero <mail@maciej.szmigiero.name>
Reviewed-by: default avatarMaciej S. Szmigiero <mail@maciej.szmigiero.name>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 76f38451
...@@ -803,11 +803,6 @@ static int fsl_ssi_hw_params(struct snd_pcm_substream *substream, ...@@ -803,11 +803,6 @@ static int fsl_ssi_hw_params(struct snd_pcm_substream *substream,
unsigned int sample_size = params_width(hw_params); unsigned int sample_size = params_width(hw_params);
u32 wl = SSI_SxCCR_WL(sample_size); u32 wl = SSI_SxCCR_WL(sample_size);
int ret; int ret;
u32 scr;
int enabled;
regmap_read(regs, REG_SSI_SCR, &scr);
enabled = scr & SSI_SCR_SSIEN;
/* /*
* SSI is properly configured if it is enabled and running in * SSI is properly configured if it is enabled and running in
...@@ -815,7 +810,7 @@ static int fsl_ssi_hw_params(struct snd_pcm_substream *substream, ...@@ -815,7 +810,7 @@ static int fsl_ssi_hw_params(struct snd_pcm_substream *substream,
* that should set separate configurations for STCCR and SRCCR * that should set separate configurations for STCCR and SRCCR
* despite running in the synchronous mode. * despite running in the synchronous mode.
*/ */
if (enabled && ssi->synchronous) if (ssi->streams && ssi->synchronous)
return 0; return 0;
if (fsl_ssi_is_i2s_master(ssi)) { if (fsl_ssi_is_i2s_master(ssi)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment