ASoC: Tegra: Suspend/resume support
Subsystems (3)
PATCH 1/1 ASoC: Tegra: Suspend/resume support
ASoC machine drivers that are their own platform_driver (as opposed to those using the soc-audio platform_driver) need to explicitly set up power-management operation callbacks.
---
Note: This has been tested in the ChromeOS-2.6.37 kernel, with a backport of ASoC for-2.6.39, on Seaboard. I have not tested it in mainline (I'm not sure whether mainline has PM support for the Tegra platform yet), although I did at least compile-test it.
sound/soc/tegra/harmony.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)
sound/soc/tegra/harmony.c +7 -0
@@ -366,10 +366,17 @@ static int __devexit tegra_snd_harmony_remove(struct platform_device *pdev)return 0 ; } +const struct dev_pm_ops harmony_pm_ops = { + .suspend = snd_soc_suspend, + .resume = snd_soc_resume, + .poweroff = snd_soc_poweroff, +}; +static struct platform_driver tegra_snd_harmony_driver = { .driver = { .name =DRV_NAME , .owner =THIS_MODULE , + .pm = &harmony_pm_ops, }, .probe = tegra_snd_harmony_probe, .remove =__devexit_p (tegra_snd_harmony_remove),
Signature · 1 line
1.7.1
A message that is not in the archive (sent off-list or not yet received): 1302035256-26301-1-git-send-email-swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org
sound/soc/tegra/harmony.c static int __devexit tegra_snd_harmony_remove(struct platform_device *pdev) · line 373
Quoted 5 lines · Stephen Warren
sound/soc/tegra/harmony.c +5
-0+const struct dev_pm_ops harmony_pm_ops = { + .suspend = snd_soc_suspend, + .resume = snd_soc_resume, + .poweroff = snd_soc_poweroff, +};
We should add an export for snd_soc_pm_ops too so that drivers like this that can just use the default behaviour don't need to cut'n'paste the code like this.