[alsa-devel] [PATCH] ASoC: ak4642: Enable cache usage to fix crashes on resume

Mark Brown broonie at kernel.org
Thu May 19 12:10:01 CEST 2016


On Thu, May 19, 2016 at 09:33:15AM +0300, Peter Ujfalusi wrote:

> Should the ak4642 implement the suspend callback and:

> static int ak4642_suspend(struct snd_soc_codec *codec)
> {
> 	struct regmap *regmap = dev_get_regmap(codec->dev, NULL);
> 
> 	regcache_cache_only(regmap, true);

> I know it is highly unlikely that anything is going to be written to the chip
> while the board is suspended. Probably the suspend and changing the cache only
> is not needed, but in this way things look a bit more complete?

Yes, that's more idiomatic - it also allows better sharing with runtime
PM.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20160519/02a4b973/attachment.sig>


More information about the Alsa-devel mailing list