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

Takashi Iwai tiwai at suse.de
Thu Jun 7 11:29:19 CEST 2012


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...


Takashi


More information about the Alsa-devel mailing list