summaryrefslogtreecommitdiffstats
path: root/sound/pci/ice1712
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-12-04 16:22:37 +0100
committerTakashi Iwai <tiwai@suse.de>2009-12-04 16:22:37 +0100
commit57648cd52b1848c6885bdbd948d113d52f3ddd43 (patch)
tree218c74fde12577ea22f51eabcf4e8b65273edb54 /sound/pci/ice1712
parent79598324838a25cc378ecbb8c29dd1e3d3951d35 (diff)
parentfb716c0b7bed36064cd41d800c8f339f41adf084 (diff)
downloadlinux-57648cd52b1848c6885bdbd948d113d52f3ddd43.tar.gz
linux-57648cd52b1848c6885bdbd948d113d52f3ddd43.tar.bz2
linux-57648cd52b1848c6885bdbd948d113d52f3ddd43.zip
Merge branch 'topic/misc' into for-linus
Diffstat (limited to 'sound/pci/ice1712')
-rw-r--r--sound/pci/ice1712/juli.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/sound/pci/ice1712/juli.c b/sound/pci/ice1712/juli.c
index fd948bfd9aef..f5020ad99a10 100644
--- a/sound/pci/ice1712/juli.c
+++ b/sound/pci/ice1712/juli.c
@@ -504,6 +504,31 @@ static int __devinit juli_add_controls(struct snd_ice1712 *ice)
}
/*
+ * suspend/resume
+ * */
+
+#ifdef CONFIG_PM
+static int juli_resume(struct snd_ice1712 *ice)
+{
+ struct snd_akm4xxx *ak = ice->akm;
+ struct juli_spec *spec = ice->spec;
+ /* akm4358 un-reset, un-mute */
+ snd_akm4xxx_reset(ak, 0);
+ /* reinit ak4114 */
+ snd_ak4114_reinit(spec->ak4114);
+ return 0;
+}
+
+static int juli_suspend(struct snd_ice1712 *ice)
+{
+ struct snd_akm4xxx *ak = ice->akm;
+ /* akm4358 reset and soft-mute */
+ snd_akm4xxx_reset(ak, 1);
+ return 0;
+}
+#endif
+
+/*
* initialize the chip
*/
@@ -646,6 +671,13 @@ static int __devinit juli_init(struct snd_ice1712 *ice)
ice->set_spdif_clock = juli_set_spdif_clock;
ice->spdif.ops.open = juli_spdif_in_open;
+
+#ifdef CONFIG_PM
+ ice->pm_resume = juli_resume;
+ ice->pm_suspend = juli_suspend;
+ ice->pm_suspend_enabled = 1;
+#endif
+
return 0;
}