All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolin Chen <nicoleotsuka@gmail.com>
To: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>,
	alsa-devel@alsa-project.org, Mark Brown <broonie@kernel.org>,
	"Gustavo A . R . Silva" <garsilva@embeddedor.com>
Subject: Re: [PATCH] ASoC: fsl_esai: Clear the xPM bit when using xFP
Date: Sat, 7 Apr 2018 18:14:55 -0700	[thread overview]
Message-ID: <20180408011454.GA2997@Asurada-CZ80> (raw)
In-Reply-To: <20180407130221.24770-1-marex@denx.de>

On Sat, Apr 07, 2018 at 03:02:21PM +0200, Marek Vasut wrote:
> 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.

This doesn't sound right to me. Could you please provide a failed
instance? It's been a while since I wrote the code. But I can tell
that PM is supposed to be called by set_sysclk() only, while FP is
used for bclk. If you clear PM when setting FP, the output of HCK
could be messed.

Thanks
Nicolin

> 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
> 
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

  parent reply	other threads:[~2018-04-08  1:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180408011454.GA2997@Asurada-CZ80 \
    --to=nicoleotsuka@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=fabio.estevam@nxp.com \
    --cc=garsilva@embeddedor.com \
    --cc=marex@denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.