浏览代码

ASoC: Mark cache as dirty when suspending

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>
Cc: stable@kernel.org
Mark Brown 14 年之前
父节点
当前提交
7be4ba24a3
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      sound/soc/soc-core.c

+ 1 - 0
sound/soc/soc-core.c

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