[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200617062457.GA6411@Asurada-Nvidia>
Date: Tue, 16 Jun 2020 23:24:58 -0700
From: Nicolin Chen <nicoleotsuka@...il.com>
To: Shengjiu Wang <shengjiu.wang@....com>
Cc: timur@...nel.org, Xiubo.Lee@...il.com, festevam@...il.com,
broonie@...nel.org, perex@...ex.cz, tiwai@...e.com,
alsa-devel@...a-project.org, lgirdwood@...il.com,
robh+dt@...nel.org, devicetree@...r.kernel.org,
linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/2] ASoC: fsl_spdif: Add support for imx6sx platform
On Wed, Jun 17, 2020 at 12:30:17PM +0800, Shengjiu Wang wrote:
> The one difference on imx6sx platform is that the root clock
> is shared with ASRC module, so we add a new flags
> "shared_root_clock" which means the root clock is independent,
"shared" means "not independent", against "independent" ;)
> then we will not do the clk_set_rate and clk_round_rate to avoid
> impact ASRC module usage.
>
> As add a new flags, we include the soc specific data struct.
>
> Signed-off-by: Shengjiu Wang <shengjiu.wang@....com>
Can add this once fixing the remaining comments:
Reviewed-by: Nicolin Chen <nicoleotsuka@...il.com>
> +static inline bool fsl_spdif_can_set_clk_rate(struct fsl_spdif_priv *spdif,
> + int clk)
Can actually merge into single line as kernel has 100-character
limit now, though 80-char is still preferable for a good coding
style. But I think this one wouldn't be too bad at all.
> @@ -421,7 +456,7 @@ static int spdif_set_sample_rate(struct snd_pcm_substream *substream,
> sysclk_df = spdif_priv->sysclk_df[rate];
>
> /* Don't mess up the clocks from other modules */
We can drop this comments now as it's out-of-date and the name of
the new helper function is straightforward enough.
> - if (clk != STC_TXCLK_SPDIF_ROOT)
> + if (!fsl_spdif_can_set_clk_rate(spdif_priv, clk))
> goto clk_set_bypass;
>
> /* The S/PDIF block needs a clock of 64 * fs * txclk_df */
Powered by blists - more mailing lists