diff options
author | Manuel Lauss <mano@roarinelk.homelinux.net> | 2008-07-03 09:33:10 +0200 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2008-07-10 09:32:20 +0200 |
commit | 3f775987030cf7ff922765c18ddd0d311b4b46ef (patch) | |
tree | d845ab07bc9e0599ee9147a0ac30db6eb062fe8d /sound/soc | |
parent | 15e4c72f520d1db9adc38ba157547a7c1fca45b2 (diff) | |
download | blackbird-op-linux-3f775987030cf7ff922765c18ddd0d311b4b46ef.tar.gz blackbird-op-linux-3f775987030cf7ff922765c18ddd0d311b4b46ef.zip |
ALSA: ASoC: AC97 codec PM
Simple suspend/resume for AC97 ASoC codec.
Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Acked-by: Liam Girdwood <lg@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/codecs/ac97.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/sound/soc/codecs/ac97.c b/sound/soc/codecs/ac97.c index 300d007f2339..e4516f3ce64c 100644 --- a/sound/soc/codecs/ac97.c +++ b/sound/soc/codecs/ac97.c @@ -144,9 +144,34 @@ static int ac97_soc_remove(struct platform_device *pdev) return 0; } +#ifdef CONFIG_PM +static int ac97_soc_suspend(struct platform_device *pdev, pm_message_t msg) +{ + struct snd_soc_device *socdev = platform_get_drvdata(pdev); + + snd_ac97_suspend(socdev->codec->ac97); + + return 0; +} + +static int ac97_soc_resume(struct platform_device *pdev) +{ + struct snd_soc_device *socdev = platform_get_drvdata(pdev); + + snd_ac97_resume(socdev->codec->ac97); + + return 0; +} +#else +#define ac97_soc_suspend NULL +#define ac97_soc_resume NULL +#endif + struct snd_soc_codec_device soc_codec_dev_ac97 = { .probe = ac97_soc_probe, .remove = ac97_soc_remove, + .suspend = ac97_soc_suspend, + .resume = ac97_soc_resume, }; EXPORT_SYMBOL_GPL(soc_codec_dev_ac97); |