diff options
author | Shengjiu Wang <shengjiu.wang@nxp.com> | 2017-11-17 16:41:32 +0800 |
---|---|---|
committer | Shengjiu Wang <shengjiu.wang@nxp.com> | 2017-11-17 17:21:20 +0800 |
commit | 918d56f32a78e807c96ff875a9bd71498dcbeef6 (patch) | |
tree | 2e5516d8ccf69b71c122c059c56373a52b5b041b | |
parent | 80ac7ab6dd4d46efaf0d551b1713a8b4cc8b715c (diff) |
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 <shengjiu.wang@nxp.com>
(cherry picked from commit 36d27fb19333d0b5e69286f3e85529ef4ee03ab7)
-rw-r--r-- | sound/soc/fsl/fsl_esai.c | 5 |
1 files changed, 4 insertions, 1 deletions
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); } |