Re: [alsa-devel] [PATCH 0/4 V7] Power-well API implementation for Haswell

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

 



Hi Takashi,

In order to let audio power-save work even with charger connected, two parameters need be modified in userspace pm-utils scripts.
I tested the changes under Ubuntu 13.10 on Harris Beach, no matter charger connected or not, runtime power-saving works and power-well will 
Be released as expected.

Here's my test under Ubuntu 13.04, the changes are:
1) 
/usr/lib/pm-utils/power.d/intel-audio-powersave
case $1 in
    true) audio_powersave 1 ;;
+    false) audio_powersave 10 ;;
-    false) audio_powersave 0 ;;
    help) help;;
    *) exit $NA
esac

Audio will enter power-save mode after 10s inactive period.
2) /usr/lib/pm-utils/power.d/pci_devices

     0x040300) # audio
        echo "Setting Audio device $id to $1"
+       echo "auto" > $dev/power/control
-        echo $1 > $dev/power/control

This keep audio subsystem always on.

This way the user may not let audio subsystem always active, may bring some delay from codec/controllers, or harm some chips.
Do you think we should add an exception for Haswell only or just make it as a common solution for audio subsystem?

Thanks
--xingchao
> -----Original Message-----
> From: Wang, Xingchao
> Sent: Wednesday, July 24, 2013 10:00 PM
> To: Takashi Iwai
> Cc: Wysocki, Rafael J; David Henningsson; Paulo Zanoni; Daniel Vetter;
> daniel.vetter@xxxxxxxx; alsa-devel@xxxxxxxxxxxxxxxx;
> intel-gfx@xxxxxxxxxxxxxxxxxxxxx; Girdwood, Liam R; Jin, Gordon
> Subject: RE: [alsa-devel]  [PATCH 0/4 V7] Power-well API
> implementation for Haswell
> 
> 
> 
> > -----Original Message-----
> > From: Takashi Iwai [mailto:tiwai@xxxxxxx]
> > Sent: Wednesday, July 24, 2013 9:43 PM
> > To: Wang, Xingchao
> > Cc: Wysocki, Rafael J; David Henningsson; Paulo Zanoni; Daniel Vetter;
> > daniel.vetter@xxxxxxxx; alsa-devel@xxxxxxxxxxxxxxxx;
> > intel-gfx@xxxxxxxxxxxxxxxxxxxxx; Girdwood, Liam R; Jin, Gordon
> > Subject: Re: [alsa-devel]  [PATCH 0/4 V7] Power-well API
> > implementation for Haswell
> >
> > At Wed, 24 Jul 2013 13:30:16 +0000,
> > Wang, Xingchao wrote:
> > >
> > >
> > >
> > > > -----Original Message-----
> > > > From: Wysocki, Rafael J
> > > > Sent: Wednesday, July 24, 2013 9:15 PM
> > > > To: David Henningsson
> > > > Cc: Wang, Xingchao; Takashi Iwai; Paulo Zanoni; Daniel Vetter;
> > > > daniel.vetter@xxxxxxxx; alsa-devel@xxxxxxxxxxxxxxxx;
> > > > intel-gfx@xxxxxxxxxxxxxxxxxxxxx; Girdwood, Liam R; Jin, Gordon
> > > > Subject: Re: [alsa-devel]  [PATCH 0/4 V7] Power-well
> > > > API implementation for Haswell
> > > >
> > > > On 7/24/2013 1:57 PM, David Henningsson wrote:
> > > > > On 07/24/2013 01:33 PM, Wang, Xingchao wrote:
> > > > >> Yes, I agree. I'm debugging this issue on Ubuntu, not sure it
> > > > >> happens on other distribution too.
> > > > >> If it's related to Ubuntu, maybe need check Ubuntu power policy.
> > > > >> Does anyone know the Ubuntu power-policy on laptop?
> > > > >> i.e. when charger connected, will Ubuntu make decision to
> > > > >> disable power-save feature for audio subsystem?
> > > > >
> > > > > I'm not a power management expert, but I got a pointer from my
> > > > > team mate to pm-utils:
> > > > >
> > > > > http://cgit.freedesktop.org/pm-utils/tree/pm/power.d/intel-audio
> > > > > -p
> > > > > ower
> > > > > save
> > > > >
> > > > >
> > > > > If I understand correctly, The scripts in power.d are executed
> > > > > when battery / AC-power is changed.
> > > > >
> > > >
> > > > To me, this sounds like a user space issue.  It requested power on
> > > > and the kernel delivered.
> > >
> > > Do you know which user-space application will touch below two flags?
> > > - /sys/devices/pci0000\:00/0000\:00\:03.0/power/control
> > > - /sys/module/snd_hda_intel/parameters/power_save
> >
> > The latter is touched most likely by pm-utils, one of the hooks, as David
> pointed.
> 
> Oh yes I found the hook:
> ./pm/power.d/intel-audio-powersave
> 
> --xingchao
> > The former is unknown, but better to check pm-utils hooks and udev rules.
> >
> >
> > Takashi
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux