]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ASoC: Mark cache as dirty when suspending
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 18 Jul 2011 04:17:13 +0000 (13:17 +0900)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 5 Aug 2011 04:58:33 +0000 (21:58 -0700)
commit 7be4ba24a3ea53bc8ade841635e4d4a59e98ceb5 upstream.

Since quite a few drivers are not managing to flag the cache as needing
to be resynced after suspend and it's a reasonable thing to do flag the
cache as needing sync automatically when suspending.

The expectation is that systems will mainly only keep the CODEC powered
when doing audio through the CODEC so we won't actually suspend the
device anyway; drivers which want to can override this behaviour when
they resume.

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

index b194be09e74d623220e06e3addb5bb4bfcf9fb70..59abd842c2c2104cd9aef2d95b8f8e96dce2cef6 100644 (file)
@@ -1124,6 +1124,7 @@ int snd_soc_suspend(struct device *dev)
                        case SND_SOC_BIAS_OFF:
                                codec->driver->suspend(codec, PMSG_SUSPEND);
                                codec->suspended = 1;
+                               codec->cache_sync = 1;
                                break;
                        default:
                                dev_dbg(codec->dev, "CODEC is on over suspend\n");