From fc168e02649d2338bf6369ea3382b160024d56a7 Mon Sep 17 00:00:00 2001 From: Aleksey Kunitskiy Date: Sat, 14 Nov 2009 15:18:54 +0200 Subject: [PATCH] --- yaml --- r: 170095 b: refs/heads/master c: 50d40f187f9182ee8caa1b83f80a0e11e2226baa h: refs/heads/master i: 170093: 5a6396e9f568a43eecf2cb6dc23f6fc26d6b95fa 170091: 100b055f89ffec0aebb5b9960526eab8a942823b 170087: b86f8d95e5922312a72182b06aa838593db8adef 170079: a5c22544d57f6df9b1d607a98b01ccb7843b4a2f v: v3 --- [refs] | 2 +- trunk/sound/pci/ice1712/juli.c | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index e05bc9ccec7f..8b841fbdfaa8 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 401de8184a4d94688962b9258fe10ab309ffda9c +refs/heads/master: 50d40f187f9182ee8caa1b83f80a0e11e2226baa diff --git a/trunk/sound/pci/ice1712/juli.c b/trunk/sound/pci/ice1712/juli.c index fd948bfd9aef..f5020ad99a10 100644 --- a/trunk/sound/pci/ice1712/juli.c +++ b/trunk/sound/pci/ice1712/juli.c @@ -503,6 +503,31 @@ static int __devinit juli_add_controls(struct snd_ice1712 *ice) return 0; } +/* + * 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; }