[alsa-devel] [PATCH] ASoC: fsl_esai: Clear the xPM bit when using xFP

Marek Vasut marex at denx.de
Sat Apr 7 15:02:21 CEST 2018


When setting xFP directly, set the xPM predivider to 1, otherwise
it could remain set to previously set incorrect value and interfere
with the correct clocking.

Signed-off-by: Marek Vasut <marex at denx.de>
Cc: Fabio Estevam <fabio.estevam at nxp.com>
Cc: Gustavo A. R. Silva <garsilva at embeddedor.com>
Cc: Mark Brown <broonie at kernel.org>
---
 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 40a700493f4c..9f69823b50d7 100644
--- a/sound/soc/fsl/fsl_esai.c
+++ b/sound/soc/fsl/fsl_esai.c
@@ -128,8 +128,11 @@ static int fsl_esai_divisor_cal(struct snd_soc_dai *dai, bool tx, u32 ratio,
 
 	maxfp = usefp ? 16 : 1;
 
-	if (usefp && fp)
+	if (usefp && fp) {
+		regmap_update_bits(esai_priv->regmap, REG_ESAI_xCCR(tx),
+				   ESAI_xCCR_xPM_MASK, 0);
 		goto out_fp;
+	}
 
 	if (ratio > 2 * 8 * 256 * maxfp || ratio < 2) {
 		dev_err(dai->dev, "the ratio is out of range (2 ~ %d)\n",
-- 
2.16.2



More information about the Alsa-devel mailing list