[pulseaudio-discuss] Pulseaudio on the XO

keith preston keithpre at gmail.com
Mon Jul 23 18:40:07 PDT 2007


If you want gstreamer to be efficent in an embedded device you really have
to crank up the buffers.   This can be done by changing the "buffer-time"
and "latency-time" on the pulsesink.   I use this instead of an alsasink.
I generally use times like 180ms for buffer and 60ms for latency.   The
properties come from the base class audio ring buffer that the pulse sink
derives from.   I believe the alsasink is the same way.

I have tried another hack that made the alsa-pulse plugin refuse to set
small buffers.   This was by changing the capabilites function of the alsa
plugin to say that there was a minimum frag size of like 16kb or something.
This helped for native alsa applications.

The biggest problem you will find with running it on the XO, (i've said this
before on the list)  is resampling, mixing, and software volume.
Resampling has a little hope as there is a decent fixed point library from
speex that is close to being done and released.   It's not hard to
integrate.

As for mixing and software volume, there need to be a lot of change.   I am
currently using a library by my processor vendor for all three of these
areas.

A few hints for lowering CPU usage  Use autoload for the alsasink with a
quick timeout.  Pulse will use 0% when no audio is playing.   Use large
fragment sizes, my alsasink works in 6kb increments right now.

Keith Preston




On 7/23/07, Simon Schamijer <simon at schampijer.de> wrote:
>
> Hi,
>
> I have put up a site where I posted my tests on using pulseaudio within
> the OLPC environment.
>
> http://wiki.laptop.org/go/Pulseaudio
>
> Please feel free to add and comment.
>
> What I am a bit puzzled about is the gstreamer section. When using alsa
>   or native clients I can run pulseaudio with sr=44100Hz on the XO.
> When it comes to use csound, gstreamer or the sdl-mixer I have to go
> down to 22kHz and you have to use large buffers in both csound and
> sdl-mixer to avoid clicking. This seams not to help with gstreamer. When
> gstreamer is connected you have mostly a click at the beginning of the
> playback.
>
> I changed the fragment settings of the ALSA module of pulseaudio and
> tried to change the buffer settings in gstreamer as well.
>
> gst-launch-0.10 filesrc location=/home/olpc/guitcello.ogg ! oggdemux !
> vorbisdec ! audioconvert ! 'buffer-size=2048'
>
> add-autoload-sink output module-alsa-sink device=plughw:0,0 rate=22050
> sink_name=output fragments=12 fragment_size=1024
>
> No luck so far. More details on the tests can be found on the wiki side.
> Maybe someone here has an idea what else I could try.
>
> Best,
>     Simon
> _______________________________________________
> pulseaudio-discuss mailing list
> pulseaudio-discuss at mail.0pointer.de
> https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20070723/6743e243/attachment.htm>


More information about the pulseaudio-discuss mailing list