[alsa-devel] [PATCH v2] ASoC: cs4349: Add support for Cirrus Logic CS4349

Mark Brown broonie at kernel.org
Wed Jul 15 13:49:22 CEST 2015


On Tue, Jul 14, 2015 at 08:23:39PM -0500, timothyc.howe at gmail.com wrote:

> +static int cs4349_codec_set_sysclk(struct snd_soc_codec *codec, int clk_id,
> +				   int source, unsigned int freq, int dir)
> +{
> +	struct cs4349_private *cs4349 = snd_soc_codec_get_drvdata(codec);
> +
> +	cs4349->mclk = freq;
> +
> +	return 0;
> +}

On a more detailed look I'm not seeing anywhere where mclk is
referenced, it appears to be write only.  Better to remove this function
and the private data for it if it's not needed.

> +#ifdef CONFIG_PM
> +static int cs4349_runtime_suspend(struct device *dev)
> +{
> +	struct cs4349_private *cs4349 = dev_get_drvdata(dev);
> +	struct snd_soc_pcm_runtime *rtd = dev_get_drvdata(dev);
> +	int ret;
> +
> +	ret = snd_soc_update_bits(rtd->codec, CS4349_MISC, PWR_DWN, 1);
> +	if (ret < 0)
> +		return ret;
> +
> +	regcache_cache_only(cs4349->regmap, true);
> +	regcache_sync(cs4349->regmap);

This doesn't make sense to me - we're syncing the register map right
after we put the device into cache only mode.  I think it's just a
cut'n'paste thing?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20150715/8e26ab2f/attachment.sig>


More information about the Alsa-devel mailing list