From: Wang Xingchao Subject: [PATCH] ALSA: hda - modem function group wake on ring support Date: Thu, 7 Jun 2012 16:52:33 +0800 Message-ID: <1339059153-4166-1-git-send-email-xingchao.wang@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga03.intel.com (mga03.intel.com [143.182.124.21]) by alsa0.perex.cz (Postfix) with ESMTP id D7053104547 for ; Thu, 7 Jun 2012 10:57:05 +0200 (CEST) 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: tiwai@suse.de, alsa-devel@alsa-project.org, fengguang.wu@intel.com Cc: wangxingchao2011@gmail.com, Wang Xingchao List-Id: alsa-devel@alsa-project.org 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) -- 1.7.9.5