All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: fsl_esai: Clear the xPM bit when using xFP
@ 2018-04-07 13:02 Marek Vasut
  2018-04-07 15:18 ` Fabio Estevam
  2018-04-08  1:14 ` Nicolin Chen
  0 siblings, 2 replies; 10+ messages in thread
From: Marek Vasut @ 2018-04-07 13:02 UTC (permalink / raw)
  To: alsa-devel; +Cc: Marek Vasut, Fabio Estevam, Mark Brown, Gustavo A . R . Silva

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@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Gustavo A. R. Silva <garsilva@embeddedor.com>
Cc: Mark Brown <broonie@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

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-04-09 23:46 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-07 13:02 [PATCH] ASoC: fsl_esai: Clear the xPM bit when using xFP Marek Vasut
2018-04-07 15:18 ` Fabio Estevam
2018-04-08  1:14 ` Nicolin Chen
2018-04-08  2:16   ` Marek Vasut
2018-04-08  4:01     ` Nicolin Chen
2018-04-08 11:00       ` Marek Vasut
2018-04-08 19:27         ` Nicolin Chen
2018-04-08 19:33           ` Marek Vasut
2018-04-09  0:07             ` Nicolin Chen
2018-04-09 21:43               ` Marek Vasut

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.