From 918d56f32a78e807c96ff875a9bd71498dcbeef6 Mon Sep 17 00:00:00 2001 From: Shengjiu Wang Date: Fri, 17 Nov 2017 16:41:32 +0800 Subject: MLK-16839-3: ASoC: fsl_esai: remove rate constrain for FE-BE case In FE-BE case, the constraint in BE cpu dai will propagate to FE. and the rate constaint is set by .be_hw_params_fixup in dai_link for BE. So rate constraint in BE cpu dai is not needed in FE-BE case. Signed-off-by: Shengjiu Wang (cherry picked from commit 36d27fb19333d0b5e69286f3e85529ef4ee03ab7) --- sound/soc/fsl/fsl_esai.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sound/soc/fsl/fsl_esai.c b/sound/soc/fsl/fsl_esai.c index c3bb35ad05fe..bcc8f8836e0a 100644 --- a/sound/soc/fsl/fsl_esai.c +++ b/sound/soc/fsl/fsl_esai.c @@ -530,6 +530,7 @@ static int fsl_esai_startup(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) { struct fsl_esai *esai_priv = snd_soc_dai_get_drvdata(dai); + struct snd_soc_pcm_runtime *rtd = substream->private_data; bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK; int ret; @@ -585,7 +586,9 @@ static int fsl_esai_startup(struct snd_pcm_substream *substream, if (esai_priv->soc->dma_workaround) { snd_pcm_hw_constraint_minmax(substream->runtime, SNDRV_PCM_HW_PARAM_CHANNELS, 1, 2); - snd_pcm_hw_constraint_minmax(substream->runtime, + + if (!rtd->dai_link->be_hw_params_fixup) + snd_pcm_hw_constraint_minmax(substream->runtime, SNDRV_PCM_HW_PARAM_RATE, 48000, 48000); } -- cgit v1.2.3