Skip to contentSkip to conversation

ASoC: core: Support suspend to disk

PATCH In review Mark Brown 2 participants 2 messages Jan 31, 2012

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 ASoC: core: Support suspend to disk

Use the same pm_ops for all system suspend and resume paths. This isn't ideal for suspend to disk with older CODECs as we'll suspend and then resume the CODEC before powering off all of which takes a long time due to VMID ramps but it's very simple to implement and for modern CODECs the overhead should be minimal.

---
 sound/soc/soc-core.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
sound/soc/soc-core.c +1 -2
index e25d69c..53fd9d2 100644
@@ -1663,8 +1663,7 @@ int snd_soc_poweroff(struct device *dev)
 EXPORT_SYMBOL_GPL(snd_soc_poweroff);
 
 const struct dev_pm_ops snd_soc_pm_ops = {
-	.suspend = snd_soc_suspend,
-	.resume = snd_soc_resume,
+	SET_SYSTEM_SLEEP_PM_OPS(snd_soc_suspend, snd_soc_resume)
 	.poweroff = snd_soc_poweroff,
 };
 EXPORT_SYMBOL_GPL(snd_soc_pm_ops);
Signature · 1 line
1.7.9.rc1
Acked-by on v1 1/1
#1 lore raw
Quoted 16 lines · Mark Brown

Use the same pm_ops for all system suspend and resume paths. This isn't ideal for suspend to disk with older CODECs as we'll suspend and then resume the CODEC before powering off all of which takes a long time due to VMID ramps but it's very simple to implement and for modern CODECs the overhead should be minimal.

---
 sound/soc/soc-core.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
sound/soc/soc-core.c +0 -0
index e25d69c..53fd9d2 100644

sound/soc/soc-core.c int snd_soc_poweroff(struct device *dev) · line 1669

Quoted 9 lines
sound/soc/soc-core.c +1 -2
@@ -1663,8 +1663,7 @@ int snd_soc_poweroff(struct device *dev)
 EXPORT_SYMBOL_GPL(snd_soc_poweroff);
 
 const struct dev_pm_ops snd_soc_pm_ops = {
-	.suspend = snd_soc_suspend,
-	.resume = snd_soc_resume,
+	SET_SYSTEM_SLEEP_PM_OPS(snd_soc_suspend, snd_soc_resume)
 	.poweroff = snd_soc_poweroff,
 };
 EXPORT_SYMBOL_GPL(snd_soc_pm_ops);