All of lore.kernel.org
 help / color / mirror / Atom feed
* ASoC: AC97 codec PM
@ 2008-07-03  7:33 Manuel Lauss
  2008-07-03  9:29 ` Liam Girdwood
  0 siblings, 1 reply; 20+ messages in thread
From: Manuel Lauss @ 2008-07-03  7:33 UTC (permalink / raw)
  To: lg; +Cc: alsa-devel

Hi Liam,

This simple patch adds suspend/resume support to the ASoC AC97 codec.
Tested on Au1200, works fine for me(TM).

Thanks!
	Manuel Lauss

---
From: Manuel Lauss <mano@roarinelk.homelinux.net>

Simple suspend/resume for AC97 ASoC codec.

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
---
 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 2a1ffe3..fb9ac9f 100644
--- a/sound/soc/codecs/ac97.c
+++ b/sound/soc/codecs/ac97.c
@@ -146,9 +146,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);
 
-- 
1.5.6.1

^ permalink raw reply related	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2008-07-09 15:27 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-03  7:33 ASoC: AC97 codec PM Manuel Lauss
2008-07-03  9:29 ` Liam Girdwood
2008-07-03  9:53   ` Manuel Lauss
2008-07-03  9:55     ` Liam Girdwood
2008-07-03 10:09       ` ASoC: Au12x0/Au1550 PSC Audio support Manuel Lauss
2008-07-04 15:13         ` Takashi Iwai
2008-07-04 16:24           ` Manuel Lauss
2008-07-04 17:36             ` Liam Girdwood
2008-07-07 16:05               ` Takashi Iwai
2008-07-07 16:09                 ` Liam Girdwood
2008-07-07 16:11                   ` Takashi Iwai
2008-07-07 17:15                   ` Manuel Lauss
2008-07-07 17:38                   ` Manuel Lauss
2008-07-08 15:13                     ` Liam Girdwood
2008-07-08 16:36                       ` Manuel Lauss
2008-07-09  5:34                         ` Manuel Lauss
2008-07-09 17:48                         ` Takashi Iwai
2008-07-09 14:27                           ` Manuel Lauss
2008-07-09 14:55                             ` Liam Girdwood
2008-07-09 19:27                             ` Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.