Re: [PATCH] sound: soc: fsl: Do not set DAI sysclk when it is equal to system freq
From: Fabio Estevam
Date: Sun Sep 03 2017 - 11:30:02 EST
On Sun, Sep 3, 2017 at 11:40 AM, Åukasz Majewski <lukma@xxxxxxx> wrote:
> This is the part of fsl_ssi_set_bclk() function which is called after
> fsl_ssi_set_dai_sysclk() (which sets ssi_private->bitclk_freq = freq;).
>
> Before the aforementioned check we do have:
>
> if (ssi_private->bitclk_freq)
> freq = ssi_private->bitclk_freq;
> else
> freq = params_channels(hw_params) * 32 *
> params_rate(hw_params);
>
>
> Which assigns freq = bitclk_freq (66 MHz)
>
> And then we break on this particular check:
>
> 66MHz * 5 > 66 MHz.
>
>
>
> The culprit IMHO is the ssi_private->bitclk_freq = freq; in the
> fsl_ssi_set_dai_sysclk(), since we _should_ set SSI's IP block clock
> (ssi_private->clk), not the bit clock (BCLK).
>
>
> This patch just quits early if it detects change, which don't need to be
> done.
Thanks for the clarification.
Reviewed-by: Fabio Estevam <fabio.estevam@xxxxxxx>