From: Takashi Iwai Subject: Re: [PATCH] ALSA: hda - modem function group wake on ring support Date: Thu, 07 Jun 2012 11:29:19 +0200 Message-ID: References: <1339059153-4166-1-git-send-email-xingchao.wang@intel.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 mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id AF20E24567 for ; Thu, 7 Jun 2012 11:29:20 +0200 (CEST) In-Reply-To: <1339059153-4166-1-git-send-email-xingchao.wang@intel.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: Wang Xingchao Cc: alsa-devel@alsa-project.org, fengguang.wu@intel.com, wangxingchao2011@gmail.com List-Id: alsa-devel@alsa-project.org At Thu, 7 Jun 2012 16:52:33 +0800, Wang Xingchao wrote: > > D2 allows for the lowest possible power consuming > state from which it can return to "fully on" state D0 within 2ms. > For modems, it's the "wake on ring" power state. > > Signed-off-by: Wang Xingchao > --- > sound/pci/hda/hda_codec.c | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c > index 2737fe7..d0ca370 100644 > --- a/sound/pci/hda/hda_codec.c > +++ b/sound/pci/hda/hda_codec.c > @@ -3542,6 +3542,18 @@ static void hda_set_power_state(struct hda_codec *codec, hda_nid_t fg, > snd_hda_codec_set_power_to_all(codec, fg, power_state, true); > } > > +/* modem wake on ring: transition from D2 to D0 in less than 2ms. For modems, > + * this is the wake-on-ring power state */ > +static void hda_modem_wake_on_ring(struct hda_codec *codec, bool enter) > +{ > + if (codec->mfg) { > + if (enter) > + hda_set_power_state(codec, codec->mfg, AC_PWRST_D2); > + else > + hda_set_power_state(codec, codec->mfg, AC_PWRST_D0); > + } > +} > + > #ifdef CONFIG_SND_HDA_HWDEP > /* execute additional init verbs */ > static void hda_exec_init_verbs(struct hda_codec *codec) No caller of the new function? Otherwise it's useless... Takashi