Re: power state in power save mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: Takashi Iwai <tiwai@xxxxxxx>
> Sent: Tuesday, April 9, 2019 6:15 PM
> To: Kailang <kailang@xxxxxxxxxxx>
> Cc: (alsa-devel@xxxxxxxxxxxxxxxx) <alsa-devel@xxxxxxxxxxxxxxxx>
> Subject: Re: power state in power save mode
> 
> On Tue, 09 Apr 2019 11:54:27 +0200,
> Kailang wrote:
> >
> > Hi Takashi,
> >
> > https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git/commit
> > /?h=for-next&id=98081ca62cbac31fb0f7efaf90b2e7384ce22257
> >
> > Use upper patch to print power state in function alc256_init() and
> alc256_shutup().
> > But when kernel turn on power_save = 1. (echo 1 >
> > /sys/module/snd_hda_intel/parameters/power_save)
> >
> > The print power state value always be 0x0.
> 
> That's expected, it means PM_EVENT_ON.
> The power_state value is changed only during the suspend and resume.
> Once after returning from resume, it's set to PM_EVENT_ON.

I also test suspend and resume. It also show 0x0.
If it turn off power save, power state value will normally.

> 
> > ( If it turn off power save, power state value will normally)
> 
> What does it mean exactly...?
> 
> Actually one missing piece is to set PMSG_ON at the device initialization.  A
> patch like below.

Add this patch, the power state value will show on suspend and resume. Right?
I will test it later.

> 
> 
> thanks,
> 
> Takashi
> 
> --- a/sound/pci/hda/hda_codec.c
> +++ b/sound/pci/hda/hda_codec.c
> @@ -969,6 +969,7 @@ int snd_hda_codec_device_new(struct hda_bus *bus,
> struct snd_card *card,
> 
>  	/* power-up all before initialization */
>  	hda_set_power_state(codec, AC_PWRST_D0);
> +	codec->core.dev.power.power_state = PMSG_ON;
> 
>  	snd_hda_codec_proc_new(codec);
> 
> 
> ------Please consider the environment before printing this e-mail.
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux