From 6654e987c17bc1026944248cfb01876311807bd7 Mon Sep 17 00:00:00 2001
From: Lennart Poettering How does Polypaudio compare with ESOUND/aRts/NAS? How does PulseAudio compare with ESOUND/aRts/NAS? Polypaudio is sound daemon similar to ESOUND and NAS, but much more
+ PulseAudio is sound daemon similar to ESOUND and NAS, but much more
powerful. aRts is a realtime-synthesizer-cum-sound-server, i.e. it
- does much more than Polypaudio. However, I believe that Polypaudio
+ does much more than PulseAudio. However, I believe that PulseAudio
does what it does much better than any other free sound server. What about ESOUND compatibility? Polypaudio is a drop in replacement for ESOUND. That means: you can
+ PulseAudio is a drop in replacement for ESOUND. That means: you can
load a esound compatibility module which implements an ESOUND
compatible protocol which allows you to use most of the classic ESOUND
compatible programs (including the command line programs like
esdcat). Is Polypaudio a GNOME program? No, Polypaudio has no dependency on GNOME/GTK/GLIB. All it requires
+ Is PulseAudio a GNOME program? No, PulseAudio has no dependency on GNOME/GTK/GLIB. All it requires
is a UNIX-like operating system and very few dependency
- libraries. However, the accompanying GUI tools are writen with
+ libraries. However, the accompanying GUI tools are written with
gtkmm, i.e. require both GLIB and GTK. Can I integrate Polypaudio in my GLIB/GTK/GNOME application? Yes! Polypaudio comes with a GLIB main loop adapter. You can embed
+ Can I integrate PulseAudio in my GLIB/GTK/GNOME application? Yes! PulseAudio comes with a GLIB main loop adapter. You can embed
both the client library and the daemon (!) into your GLIB based
application. Can I integrate Polypaudio in my Qt/KDE application? Yes! Polypaudio uses a main loop abstraction layer that allows you
- to integrate Polypaudio in any program that supports main
+ Can I integrate PulseAudio in my Qt/KDE application? Yes! PulseAudio uses a main loop abstraction layer that allows you
+ to integrate PulseAudio in any program that supports main
loops. Unfortunately there is no adapter for Qt publicly available yet. I want to write a new driver for Polypaudio, are there any docs? I want to write a new driver for PulseAudio, are there any docs? Currently, only the client API is documented with doxygen. Read
the source and base your work on a simple module like
module-pipe-sink. What about compatibility with aRts? Is not available. Since aRts is as synthesizer application you'd have to
- reimplement very much code for Polypaudio. It should be easy to
+ reimplement very much code for PulseAudio. It should be easy to
implement limited support for libartsc based
applications. Noone has done this yet. It is probably a better idea to
- run arts on top of Polypaudio (through a pulseaudio driver
+ run arts on top of PulseAudio (through a PulseAudio driver
for aRts, which nobody has written yet). Another solution would be to
- embed Polypaudio in the aRts process.Frequently Asked Questions
-
I often hear noises when playing back with Polypaudio, what can I do?
-There are to possible solutions: run pulseaudio with argument +
I often hear noises when playing back with PulseAudio, what can I do?
+There are to possible solutions: run PulseAudio with argument --high-priority=1 and make yourself member of the group realtime, or increase the fragment sizes of the audio - drivers. The former will allow Polypaudio to activate + drivers. The former will allow PulseAudio to activate SCHED_FIFO high priority scheduling (root rights are dropped immediately after this). Keep in mind that this is a potential security hole!
The pulseaudio executable is installed SUID root by default. Why this? Isn't this a potential security hole?
-Polypaudio activates SCHED_FIFO scheduling if the user +
PulseAudio activates SCHED_FIFO scheduling if the user passes --high-priority=1. This will only succeed when executed as root, therefore the binary is marked SUID root by -default. Yes, this is a potential security hole. However, pulseaudio +default. Yes, this is a potential security hole. However, PulseAudio tries its best to minimize the security threat: immediately after -startup pulseaudio drops all capabilities except +startup PulseAudio drops all capabilities except CAP_SYS_NICE (At least on systems that support it, like Linux; see man 7 capabilities for more information). If the calling user is not a member of the group realtime (which is required to have a GID < 1000), root rights are dropped immediately. This means, you can -install pulseaudio SUID root, but only a subset of your users (the +install pulseaudio SUID root, but only a subset of your users (the members of the group realtime) may make use of realtime scheduling. Keep in mind that these users might load their own binary -modules into the pulseaudio daemon which may freeze the machine. The +modules into the PulseAudio daemon which may freeze the machine. The daemon has a minimal protection against CPU hogging (the daemon is killed after hogging more than 70% CPU for 5 seconds), but this may be circumvented easily by evildoers.
I want to run pulseaudio only when it is needed, how do I do this?
+I want to run PulseAudio only when it is needed, how do I do this?
Set autospawn = yes in client.conf. That -configuration file may be found either in /etc/pulseaudio/ or -in ~/.pulseaudio/.
How do I list all pulseaudio modules installed?
+How do I list all PulseAudio modules installed?
pulseaudio --dump-modules
Add -v for terse usage instructions.
-How do I use pulseaudio over the network?
+How do I use PulseAudio over the network?
-Just set $POLYP_SERVER to the host name of the pulseaudio +
Just set $POLYP_SERVER to the host name of the PulseAudio server. For authentication you need the same auth cookies on all sides. For -that copy ~./pulseaudio-cookie to all clients that shall +that copy ~./pulse-cookie to all clients that shall be allowed to connect.
Alternatively the authorization cookies can be stored in the X11 server.
Is pulseaudio capable of providing synchronized audio playback over the network for movie players like mplayer?
+Is PulseAudio capable of providing synchronized audio playback over the network for movie players like mplayer?
Yes! Unless your network is congested in some way (i.e. transfer latencies vary strongly) it works perfectly. Drop me an email for experimental patches for MPlayer.
-What environment variables does pulseaudio care about?
+What environment variables does PulseAudio care about?
The client honors: POLYP_SINK (default sink to connect to), POLYP_SOURCE (default source to connect to), POLYP_SERVER (default server to connect to, like ESPEAKER), POLYP_BINARY (the binary to start when autospawning a daemon), POLYP_CLIENTCONFIG (path to the client configuration file).
@@ -126,36 +126,36 @@ be allowed to connect.A brilliant guy named Lennart Poettering once wrote a nifty tool for that purpose: bidilink. To -connect to a running pulseaudio daemon try using the following commands:
+connect to a running PulseAudio daemon try using the following commands:killall -USR2 pulseaudio -bidilink unix-client:/tmp/pulseaudio/cli+bidilink unix-client:/tmp/pulse-$USER/cli
BTW: Someone should package this great tool for Debian!
New: There's now a tool pacmd that automates sending SIGUSR2 to the daemon and running a bidilink like tool for you.
How do the pulseaudio libraries decide where to connect to?
+How do the PulseAudio libraries decide where to connect to?
The following rule applies:
Why the heck does libpulse link against libX11?
-The Polypaudio client libraries look for some X11 root window -properties for the credentials of the Polypaudio server to access. You -may compile Polypaudio without X11 for disabling this feature.
The PulseAudio client libraries look for some X11 root window +properties for the credentials of the PulseAudio server to access. You +may compile PulseAudio without X11 for disabling this feature.
-How can I use Polypaudio as an RTP based N:N multicast
+ How can I use PulseAudio as an RTP based N:N multicast
conferencing solution for the LAN? After loading all the
necessary audio drivers for recording and playback, just load the RTP
reciever and sender modules with default parameters: As long as the Polypaudio daemon runs, the microphone data will be
+ As long as the PulseAudio daemon runs, the microphone data will be
streamed to the network and the data from other hosts is played back
locally. Please note that this may cause quite a lot of traffic. Hence
consider passing rate=8000 format=ulaw channels=1 to the
@@ -182,11 +182,11 @@ announce RTP sessions that are described with SDP. (Modern SIP based VoIP phones
All three protocols are defined in IETF RFCs (RFC3550, RFC3551,
RFC2327, RFC2327). They can be used in both multicast and unicast
-fashions. Polypaudio exclusively uses multicast RTP/SDP/SAP containing audio data.
For more information about using these technologies with Polypaudio have a look on the respective module's documentation. +
For more information about using these technologies with PulseAudio have a look on the respective module's documentation. -
How can I use Polypaudio to stream music from my main PC to my LAN with multiple PCs with speakers?
+How can I use PulseAudio to stream music from my main PC to my LAN with multiple PCs with speakers?
On the sender side create an RTP sink:
@@ -208,7 +208,7 @@ load-module module-rtp-recvBTW: You can have more than one sender machine set up like this. The audio data will be mixed on the client side.
How can I use Polypaudio to share a single LINE-IN/MIC jack on the entire LAN?
+How can I use PulseAudio to share a single LINE-IN/MIC jack on the entire LAN?
On the sender side simply load the RTP sender module:
@@ -238,7 +238,7 @@ modules to select them. Choose your group addresses from the range 225.0.0.x to make sure the audio data never leaves the LAN.Can I use Polypaudio to playback music on two sound cards simultaneously?
+Can I use PulseAudio to playback music on two sound cards simultaneously?
Yes! Use module-combine for that.
@@ -251,13 +251,13 @@ set-sink-default combinedThis will combine the two sinks output0 and output1 into a new sink combined. Every sample -written to the latter will be forwarded to the former two. Polypaudio +written to the latter will be forwarded to the former two. PulseAudio will make sure to adjust the sample rate of the slave device in case it deviates from the master device. You can have more than one slave sink attached to the combined sink, and hence combine even three and more sound cards.
Can I use Polypaudio to combine two stereo soundcards into a virtual surround sound card?
+Can I use PulseAudio to combine two stereo soundcards into a virtual surround sound card?
Yes! You can use use module-combine for that.
@@ -271,7 +271,7 @@ load-module module-combine sink_name=combined master=output0 slaves=output1 chan time we manually specify the channel mappings for the sinks to make sure everything is routed correctly. -Please keep in mind that Polypaudio will constantly adjust the +
Please keep in mind that PulseAudio will constantly adjust the sample rate to compensate for the deviating quartzes of the sound devices. This is not perfect, however. Deviations in a range of 1/44100s (or 1/48000s depending on the sampling frequency) can not be @@ -281,7 +281,11 @@ you hear.
Why did you rename Polypaudio to PulseAudio?
+Please read this blog story for an explanation.
+ +