ASoC: core: Mark regmap CODEC register maps as dirty when suspending
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 12 Sep 2012 04:21:52 +0000 (12:21 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 13 Sep 2012 03:14:59 +0000 (11:14 +0800)
The core has for a long time had support for marking the register maps of
devices dirty when suspending so that they are resynced on resume. Also
implement this feature for CODECs using regmap.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
sound/soc/soc-core.c

index ad65459da28e0a1f77e38e30c376939f26f55aa8..2b418398ec18c7346253da15978dbd7b9ccd291c 100644 (file)
@@ -635,6 +635,8 @@ int snd_soc_suspend(struct device *dev)
                                codec->driver->suspend(codec);
                                codec->suspended = 1;
                                codec->cache_sync = 1;
+                               if (codec->using_regmap)
+                                       regcache_mark_dirty(codec->control_data);
                                break;
                        default:
                                dev_dbg(codec->dev, "CODEC is on over suspend\n");