[alsa-devel] [PATCH] ALSA: hda - modem function group wake on ring support

Wang Xingchao wangxingchao2011 at gmail.com
Thu Jun 7 12:09:28 CEST 2012


2012/6/7 Takashi Iwai <tiwai at suse.de>:
> 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 <xingchao.wang at intel.com>
>> ---
>>  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...
>
Hi Takashi,

I have not see codec indicates "Modem function group" yet, do you know
which codec on HDA as Modem type and i could search whether it need
such "wake on ring" feature.

This patch should bring codec out of D2 states in less than 2ms. It
should help modem save power with "wake-on-ring" feature.

thanks
--xingchao


More information about the Alsa-devel mailing list