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

2011-10-07 Thread Baek Chang
"module-suspend-on-idle" should suspend the alsa devices when no clients are
idle or not connected for 5 seconds by default.
try loading that module and see if it actually closes the handle to the alsa
devices.

On Fri, Oct 7, 2011 at 10:21 AM, Paul Menzel <
paulepan...@users.sourceforge.net> wrote:

> 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
>
> ___
> pulseaudio-discuss mailing list
> pulseaudio-discuss@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
>
>


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


Re: [pulseaudio-discuss] Google ChromeOS reinventing the wheel, ignoring PulseAudio

2011-10-03 Thread Baek Chang
On Mon, Oct 3, 2011 at 5:04 AM, Mark Brown  wrote:

> On Fri, Sep 30, 2011 at 08:23:46PM +0200, David Henningsson wrote:
>
> > First, look at the "What's next" section of the 1.0 notes [1]. That
> > points out what we think are the most important shortcomings of
> > PulseAudio currently, one of them is "Routing infrastructure": while
> > it is possible to write your own policy modules today, we're still
> > lacking a really good solution for handling device priority in
> > combination with hotplugging in combination with user configurable
> > overrides.
>
>
Yeah, this is why the embedded users I'm aware of chose to do their own
> thing here (often completely outside of Pulse).


This is what WebOS is doing.  Separate daemon from pulseaudio that controls
routing via ALSA UCM, listens to events for hardware changes (jack
insertion, bluetooth, etc ...)

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


[pulseaudio-discuss] (no subject)

2011-08-02 Thread Baek Chang
Hi,

Are there any steps to debug enabling tsched for alsa playback?  I am
noticing that if I enable tsched, then occasionally the audio playback
sounds like it is stuttering, like there are discontinuities in the samples
and it is playing the wrong buffer in time.
As soon as I disable tsched, the problem is no longer there.

I'm pretty sure this is a alsa driver problem, but is there a way be certain
that this is so?
I did a recording of the output monitor stream and that looks fine.  I could
also try writing out the data to a file write before it is written to the
alsa buffer.

Thanks!

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


[pulseaudio-discuss] trigger and drain after underrun occurs

2011-06-30 Thread Baek Chang
Hi everyone,

I'm running into some trouble with buffer attributes in gstreamer pulsesink
and pulseaudio.
It seems that if prebuf is non-zero, then I can get much better cpu usage
from pulseaudio and gstreamer.  One problem I am seeing is on EOS when the
file being played is finished.
I always seem to get a buffer underrun callback from pulseaudio at the end
of the stream.  The problem is that when prebuf is non-zero, when the
underrun occurs, timer updates from pulseaudio no longer update the time.
This is probably due to underruns causing a wait until prebuf amount is
filled.

So my question is, pa_stream_trigger() should start the stream playback
immediately without waiting for prebuf to be filled, but I am not seeing any
timer updates occurring after i call trigger.
I also call drain when the EOS event occurs, but this doesn't seem to update
timer either.

Also, why is it that I always get a underrun message when the file is done
playing?  Happens with gstreamer, aplay, paplay.

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