[alsa-devel] [PATCH] ASoC: core: Mark regmap CODEC register maps as dirty when suspending

Mark Brown broonie at opensource.wolfsonmicro.com
Wed Sep 12 06:23:14 CEST 2012

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 at opensource.wolfsonmicro.com>
 sound/soc/soc-core.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 0c7e477..b94ce32 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -635,6 +635,8 @@ int snd_soc_suspend(struct device *dev)
 				codec->suspended = 1;
 				codec->cache_sync = 1;
+				if (codec->using_regmap)
+					regcache_mark_dirty(codec->control_data);
 				dev_dbg(codec->dev, "CODEC is on over suspend\n");

More information about the Alsa-devel mailing list