From: Takashi Iwai Subject: Re: [PATCH - juli.c 1/1] ALSA: juli - Patch for suspend/resume for ESI Juli@ Date: Sat, 14 Nov 2009 14:40:42 +0100 Message-ID: References: <1258204734-23288-1-git-send-email-alexey.kv@gmail.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx1.suse.de (cantor.suse.de [195.135.220.2]) by alsa0.perex.cz (Postfix) with ESMTP id 45AD7243AD for ; Sat, 14 Nov 2009 14:40:43 +0100 (CET) In-Reply-To: <1258204734-23288-1-git-send-email-alexey.kv@gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: alexey.kv@gmail.com Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Sat, 14 Nov 2009 15:18:54 +0200, alexey.kv@gmail.com wrote: > > From: Aleksey Kunitskiy > > 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 Applied now. Thanks. Takashi > --- > pci/ice1712/juli.c | 32 ++++++++++++++++++++++++++++++++ > 1 files changed, 32 insertions(+), 0 deletions(-) > > diff --git a/pci/ice1712/juli.c b/pci/ice1712/juli.c > index 4bed963..0c9413d 100644 > --- a/pci/ice1712/juli.c > +++ b/pci/ice1712/juli.c > @@ -483,6 +483,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 > */ > > @@ -626,6 +651,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; > } > > -- > 1.6.4.4 >