[alsa-devel] [PATCH v3] alsa: ASoC: Add JZ4740 codec driver

Mark Brown broonie at opensource.wolfsonmicro.com
Sun Jun 20 15:11:53 CEST 2010

On Sat, Jun 19, 2010 at 04:49:53PM +0200, Lars-Peter Clausen wrote:

This looks good, just one thing:

> +
> +static int jz4740_codec_suspend(struct device *dev)
> +{
> +	struct jz4740_codec *jz4740_codec = dev_get_drvdata(dev);
> +	return jz4740_codec_set_bias_level(&jz4740_codec->codec,
> +}

You've got these set up on the CODEC platform device rather than the
ASoC CODEC.  This means that the suspend and resume will happen out of
sequence with the rest of the ASoC suspend and resume which could result
in poor performance or bugs if the device is suspended while the core
still thinks it's active.  For example, ASoC will use DAPM to shut down
the CODEC and it's possible that the CODEC could be suspended (and
generate an audible noise) while an external amplifier is still powered,
worsening the problem.

More information about the Alsa-devel mailing list