[alsa-devel] [PATCH 1/2] ASoC: fsl_spdif: Fix clock source for rxclk rate measurement

Nicolin Chen Guangyu.Chen at freescale.com
Mon Apr 28 04:54:13 CEST 2014


On Fri, Apr 25, 2014 at 05:10:15PM +0100, Mark Brown wrote:
> On Fri, Apr 25, 2014 at 07:58:19PM +0800, Nicolin Chen wrote:
> 
> > +	/* Get system clock for rx clock rate calculation */
> > +	sprintf(tmp, "rxtx%d", SPDIF_CLK_SRC_SYSCLK);
> > +	spdif_priv->sysclk = devm_clk_get(&pdev->dev, tmp);
> > +	if (IS_ERR(spdif_priv->sysclk)) {
> > +		dev_err(&pdev->dev, "no sys clock (%s) in devicetree\n", tmp);
> > +		return PTR_ERR(spdif_priv->sysclk);
> > +	}
> > +
> 
> Why is this not just a fixed string - it seems like the clock name is a
> constant anyway?

For current version, yes, it always ties system clock to rxtx5. I was just
considering if further version changes the sysclk route to another source,
the driver will simply diversify this id here for different versions.

I'll later send a v2 for it to fix the name. And you can decide which one
would be better based on what I've just explained.

Thank you,
Nicolin


More information about the Alsa-devel mailing list