summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorAleksey Kunitskiy <alexey.kv@gmail.com>2009-11-14 15:18:54 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2010-01-28 15:01:08 -0800
commiteb9dbd9c1ffe8fa93e385c186e25ffa7bad53b67 (patch)
treeb1a973c32f5fa9d67a1a057a31d263971f3bb366 /sound
parente96610c64809b253558c3706b02fe173b0b829d8 (diff)
ALSA: ice1724 - Patch for suspend/resume for ESI Juli@
commit 50d40f187f9182ee8caa1b83f80a0e11e2226baa upstream. Add proper suspend/resume code for Juli@ cards. Based on ice1724 suspend/resume work of Igor Chernyshev. Fixes bug https://bugtrack.alsa-project.org/alsa-bug/view.php?id=4413 Tested on linux-2.6.31.6 Signed-off-by: Aleksey Kunitskiy <alexey.kv@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'sound')
-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;
}