Re: [pulseaudio-discuss] Optimize PA for mobile usage

2011-10-10 Thread Mark Brown
On Fri, Oct 07, 2011 at 07:21:44PM +0200, Paul Menzel wrote:

 I am not sure. 4 W power consumption of a sound chip sounds quite a lot
 to me. Additionally as written above please try a newer version.

That's many orders of magnitude more than is sane unless there's very
loud sound coming out of the speakers.  Something beyond the audio
specific hardware must be impacting the numbers.
___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] Optimize PA for mobile usage

2011-10-10 Thread Andreas Bauer
In Reply to: Mark Brown broo...@sirena.org.uk

 On Fri, Oct 07, 2011 at 07:21:44PM +0200, Paul Menzel wrote:
 
  I am not sure. 4 W power consumption of a sound chip sounds quite a lot
  to me. Additionally as written above please try a newer version.
 
 That's many orders of magnitude more than is sane unless there's very
 loud sound coming out of the speakers.  Something beyond the audio
 specific hardware must be impacting the numbers.

The numbers are read from the battery chip (/sys/class/power/BAT0/power_now) 
and are rougly matching with the runtime observed. Maybe they are a little 
optimistic.

But I think the numbers have to be seen in context. 6-9W in idle is not bad for 
a performance oriented notebook, but I also have used all stable power saving 
tweaks that I am aware of.

So if playing audio will wake up the sound chip, power the speakers, wake up 
the bus from power saving mode, ..., that might seam realisitc. I don't know 
enough about modern harware in that regard.

regards,

Andreas
___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] Optimize PA for mobile usage

2011-10-07 Thread Paul Menzel
Dear Andreas,


Am Freitag, den 07.10.2011, 17:03 +0200 schrieb Andreas Bauer:

 First a big thank you for a quality piece of software. I am a first
 time user and am amazed at the flexiblity that PA provides. I
 installed PA because I wanted to have better integration of my
 Bluetooth headset and works perfectly.

thank you for such positive feed back. I guess developers (not me)
should get that more often.

 Running Debian Squeeze (stable) with Kernel 3.0.1

Is the PA version 0.9.21-3+squeeze1 [1]? I guess the ALSA version is
quite old then too. PA 1.0 was released recently.

Could you somehow test a more recent version. I am not sure if there is
a live CD for that purpose or if you have a spare storage medium where
you can try Debian Sid/unstable.

 Now I have three issues which I hope someone can point me to a
 possible solution.
 
 On my Lenovo X201 laptop with Intel HDA I do see a heavy increase in
 power consumption when I activate pulseaudio. The system is already
 optimised so without pulseaudio it will idle at 6-9W with wifi on,
 with pulseaudio started it will jump to 13W. No pulseaudio client
 connected (no sound played)
 
 Averaged battery reading every 5s 
 
 1267000
 1311000
 133
 1347000 - here pa-suspender is started
 1192000
 1091000
 986000
 952000
 943000
 988000
 97
 943000
 
 I have already optimised the PA setup for my needs (e.g. low quality
 resampling-method), so I investigated further:
 
 From top:
 
 8816 ab 9 -11  211m 3832 2832 S0  0.1   0:00.06 pulseaudio
 
 From powertop:
 
695,7 µs/s  13,6
 Process/usr/bin/pulseaudio --start --log-target=syslog
 
 So it is not about CPU consumption, pulseaudio is economical with CPU
 as is.
 
 The same thing (also drawing about the same amount of extra juice)
 happens with this:
 
 root@charly:~# mv /etc/asound.conf /etc/asound.pulse
 root@charly:~# aplay -d front /boot/vmlinuz-*
 Wiedergabe: Rohdaten '/boot/vmlinuz-3.0.1' : Unsigned 8 bit, Rate:
 8000 Hz, mono
 
 So clearly, it is the power consumption of the sound chip. I suspect
 that pulseaudio activates the sound chip even when no sound is being
 played. Is there any way to have it only access the hardware when at
 minimum one client is connected (e.g. audio playing)?

I am not sure. 4 W power consumption of a sound chip sounds quite a lot
to me. Additionally as written above please try a newer version.

 I was not successful with this shot (old syntax?):
 
 add-autoload-sink alsa_sink module-alsa-sink device=hw:0
 add-autoload-source alsa_source module-alsa-source device=hw:0

You can also take a look at the ALSA Wiki [2] and provide the output of
`alsa-info.sh` which should give a lot of useful information to the
developers.

 Second issue: I have one application (Zoiper) which can only access
 ALSA at the moment (because it will not allow me to input non-hardware
 ALSA device names like pcm.pulse). Is there some hack/workaround to
 get such applications to talk to pulseaudio?

Please open a new thread by sending a new message with an appropriate
subject line for this topic.


Thanks,

Paul


[1] http://packages.debian.org/squeeze/pulseaudio
[2] http://alsa-project.org/main/index.php/Help_To_Debug


signature.asc
Description: This is a digitally signed message part
___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] Optimize PA for mobile usage

2011-10-07 Thread Pierre-Louis Bossart

 So it is not about CPU consumption, pulseaudio is economical with CPU as is.

Have you loaded the module module-suspend-on-idle? If nothing is playing
(and your volume UI isn't showing), the output device should be burn any
power.

 I was not successful with this shot (old syntax?):
 
 add-autoload-sink alsa_sink module-alsa-sink device=hw:0
 add-autoload-source alsa_source module-alsa-source device=hw:0

Never seen this syntax, use module-detect...

 Second issue: I have one application (Zoiper) which can only access ALSA at 
 the moment (because it will not allow me to input non-hardware ALSA device 
 names like pcm.pulse). Is there some hack/workaround to get such applications 
 to talk to pulseaudio?

use the pulse plugin from alsa-plugins. Works fine.

___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] Optimize PA for mobile usage

2011-10-07 Thread Tanu Kaskinen
On Fri, 2011-10-07 at 17:03 +0200, Andreas Bauer wrote:
 Second issue: I have one application (Zoiper) which can only access
 ALSA at the moment (because it will not allow me to input non-hardware
 ALSA device names like pcm.pulse). Is there some hack/workaround to
 get such applications to talk to pulseaudio?

Do you know what device strings Zoiper uses? Does it provide any
configurability? If it uses the device called default, then things
work fine if you configure the default device to be the pulse plugin.
If it insists on using the hardware directly, for example hw:0, then
you're out of luck - Zoiper is buggy and I don't think there's a
workaround for that.

-- 
Tanu

___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss