Differences between revisions 2 and 20 (spanning 18 versions)
Revision 2 as of 2013-06-22 20:20:04
Size: 4492
Editor: koanhead
Comment: copypasta from google translate of PulseAudio page (in russian) with some markup
Revision 20 as of 2013-12-31 15:29:39
Size: 6587
Editor: ?BernatArlandis
Comment: Remove duplicated text
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:

Line 11: Line 9:
Translation (s) : Russian - English
Line 18: Line 16:
PulseAudio , previously known as Polypaudio, - sound server for POSIX and WIN32. This is a replacement ESD sound server with much less latency, the best quality mixing and sampling and overall architecture. PulseAudio, previously known as Polypaudio, is a sound server for POSIX and WIN32. It is a replacement for ESoundDaemon.
Line 20: Line 18:
Here are some possibilities PulseAudio: Here are some features of PulseAudio:
Line 22: Line 20:
High quality software mixing of multiple audio streams with
support more than one entrance and exit. Can be used forcombine multiple sound cards into one (with frequency rate).
The set of supported client libraries. Applications that use
ESD, ALSA, oss, libao and GStreamer, are supported without the need to any changes to them. Modules for
PulseAudio is available for xmms and mplayer.
Adding sufficiently small time delay, and a very accurate measurement
delay time for recording and playback. Ability to fullysynchronize multiple playback streams.
Network transparency: the application can play
or record audio on a computer other than the one on which they run.
Extensible architecture with modules for jackd, multicast-rtp,
lirc and avahi, among others.
 * High quality software mixing of multiple audio streams with support for more than one entrance(source) and exit(sink).
 * Can be used to combine multiple sound cards into one (with frequency rate).
 * Large set of supported client libraries. Applications that use ESD, ALSA, oss, libao and GStreamer, are supported without the need to any changes to them. Modules for PulseAudio is available for xmms and mplayer.
 * Low latency, and a very accurate measurement delay time for recording and playback. Ability to fully synchronize multiple playback streams.
 * Network transparency: the application can play or record audio on a computer other than the one on which they run.
 * Extensible architecture with modules for jackd, multicast-rtp, lirc and avahi, among others.
Line 35: Line 29:
Set the sound server, use the command {{{
# aptitude install pulseaudio
}}}
Line 37: Line 33:
Since at least squeeze, installing pulseaudio through apt in this way should result in a pulseaudio system that "just works". Pulseaudio becomes the default when the package is installed. Everything (including flash) will use it.
Line 38: Line 35:
  # Aptitude install pulseaudio
== Setting for applications using ALSA ==
This can be checked by with pavucontrol (in the pavucontrol package). If the sound is registering in the vu vumetre of that program, then it is being routed through the pulse system.
Line 41: Line 37:
To make the application dependent ALSA could use PulseAudio to create the configuration file / etc / asound.conf (system-wide) (recommended) or ~ / asoundrc (for each user). = Surround sound system =
Line 43: Line 39:
This will allow the program to specify in the settings of the device for sound output pulse.

 pcm.pulse {
     type pulse
 }
 
 ctl.pulse {
     type pulse
 }
If you want to PulseAudio has become the default device for ALSA-applications, use these settings:


 pcm.! default {
    type pulse
 }
 
 ctl.! default {
     type pulse
 }
If you miss the last two groups, Pulseaudio will not be used by default. To work correctly, you need to change "alsa device" on "pulse" of each program you are using.

== Alternative configurations ==

Surround sound system
Line 69: Line 41:
{{{
Line 76: Line 48:
}}}
Line 83: Line 57:
{{{
# Killall -9 pulseaudio
}}}
Line 84: Line 61:
# Killall -9 pulseaudio
Line 87: Line 63:
{{{
$ Pulseaudio - start
}}}
Line 88: Line 67:
$ Pulseaudio - start
Line 91: Line 69:
==Wheezing and audio interruptions== == Front Panel Jacks not working ==
As of wheezy, for some reason, pulseaudio does not see the toggle feature of some cards (i.e. CMI8788 [Oxygen HD Audio]) exposed by ALSA and playing with the pulseaudio interface (pavucontrol) won't bring happiness. The trick, (for now?), is to bring up the alsamixer ( or alsamixergui) and the audio output can be switched from the read of the card to the front-panel as well as the mic input.


== Wheezing and audio interruptions ==
Line 94: Line 77:
{{{
Line 102: Line 85:
Interrupting play in Amarok when running Skype }}}

==
Interrupting play in Amarok when running Skype ==
Line 105: Line 90:
{{{
load-module module-cork-music-on-phone
}}}
Line 106: Line 94:
load-module module-cork-music-on-phone
Excessive CPU usage and distortion
== Excessive CPU usage and distortion ==
Line 110: Line 97:
{{{
load-module module-udev-detect tsched = 0
}}}
Line 111: Line 101:
load-module module-udev-detect tsched = 0
Sound level is low or low sound
== Sound level is low or low sound ==
Line 115: Line 104:
{{{
flat-volumes = no
}}}
Line 116: Line 108:
flat-volumes = no
Various problems with Skype and Wine
== Various problems with Skype and Wine ==
Line 120: Line 111:
{{{
Line 123: Line 114:
References
Tweaking PulseAudio (in English) .
CategorySound CategorySound
}}}
Line 127: Line 116:
 1. PulseAudio
 1. Installation
   1.
   1. Alternative Configurations
     1. As The Only Sound System
   1. Troubleshooting
     1. Missing Sound Device (Recording or Reproduction)
     1. Noise Or Glitches
     1. Glitches In Sound Reproduction With Amarok Or Skype
     1. Unreasonable CPU Usage And Distortion
     1. Poor Sound Level Or No Sound
     1. Various Problems With Skype
     1. Reference
= Advanced =

== Dynamically enable/disable ==
As mentioned above, all sound will automatically be routed thorugh pulseaudio when the pulseaudio package is installed. These instructions describe how to disable it with the pulseaudio package still installed. Individual users can then reenable it themselves as needed.

The "just works" magic is achieved through configuration files placed in
/usr/share/alsa/alsa.conf.d/. Without these files in place, the regular alsa defaults will be used. Therefore, to achieve the default alsa behavior with the pulseaudio package installed, divert these files


mkdir /usr/share/alsa/alsa.conf.pulse/

dpkg-divert --divert /usr/share/alsa/alsa.conf.pulse/pulse.conf --rename /usr/share/alsa/alsa.conf.d/pulse.conf

dpkg-divert --divert /usr/share/alsa/alsa.conf.pulse/99-pulseaudio-default.conf.example --rename /usr/share/alsa/alsa.conf.d/99-pulseaudio-default.conf.example

dpkg-divert --divert /usr/share/alsa/alsa.conf.pulse/50-pulseaudio.conf --rename /usr/share/alsa/alsa.conf.d/50-pulseaudio.conf


Now if a user wishes to use pulseaudio, they can create an ~/.asoundrc file that looks something like


 @hooks [
         {
                 func load
                 files [
                         {
                                 @func concat
                                 strings [
                                         { @func datadir }
                                         "/alsa.conf.pulse/"
                                 ]
                         }
                 ]
                 errors false
         }
 ]


If a user wishes to switch between pulse and non-pulse on a quasi-regular basis, put the above into the ~/.asoundrc.pulse instead and symlink it to ~/.asoundrc when pulse is desired

ln -s ~/.asoundrc.pulse ~/.asoundrc

and remove it when not

rm ~/.asoundrc

be sure also when disabling pulse to kill the server so that other things can directly access the soundcard again

killall pulseaudio



== Install from source ==
Seems as though there ought to be some general instructions for building things from source in Debian, but I couldn't find them when editing this.

=== Download ===
from here:

http://www.freedesktop.org/wiki/Software/PulseAudio/Download/

=== Configure ===

???

=== Build ===

make

=== Install ===

Put it somewhere. Make some links so programs can find it.



 Reference:

http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/PerfectSetup/

PulseAudio

Hardware - Sound

Introduction

PulseAudio, previously known as Polypaudio, is a sound server for POSIX and WIN32. It is a replacement for ESoundDaemon.

Here are some features of PulseAudio:

  • High quality software mixing of multiple audio streams with support for more than one entrance(source) and exit(sink).
  • Can be used to combine multiple sound cards into one (with frequency rate).
  • Large set of supported client libraries. Applications that use ESD, ALSA, oss, libao and GStreamer, are supported without the need to any changes to them. Modules for PulseAudio is available for xmms and mplayer.

  • Low latency, and a very accurate measurement delay time for recording and playback. Ability to fully synchronize multiple playback streams.
  • Network transparency: the application can play or record audio on a computer other than the one on which they run.
  • Extensible architecture with modules for jackd, multicast-rtp, lirc and avahi, among others.

Installing PulseAudio

# aptitude install pulseaudio

Since at least squeeze, installing pulseaudio through apt in this way should result in a pulseaudio system that "just works". Pulseaudio becomes the default when the package is installed. Everything (including flash) will use it.

This can be checked by with pavucontrol (in the pavucontrol package). If the sound is registering in the vu vumetre of that program, then it is being routed through the pulse system.

Surround sound system

Many people have a multi-channel sound cards, but use the speakers for the two channels. PulseAudio has no default settings for surround sound support. To enable all channels, edit the file / etc / pulse / daemon.conf: uncomment default-sample-channels (ie remove the semicolon at the beginning of the line) and set it to 6 if you System 5.1 or 8, if your system is 7.1.

# Default
default-sample-channels = 2
# To 5.1
default-sample-channels = 6
# To 7.1
default-sample-channels = 8

After making the changes, restart Pulseaudio.

Solving Problems

The lack of playback devices or audio capture

If we update or some time later Pulseaudio stopped correctly determine the input / output devices and sources, try to clear the configuration files pulseaudio. To do this, delete the folder: ~ /. Pulse, ~ /. Pulse-cookie and / tmp/.esd- *. Forcibly end the process pulseaudio command:

# Killall -9 pulseaudio

Then run:

$ Pulseaudio - start

If that does not work well and remove the / etc / pulse and reinstall PulseAudio.

Front Panel Jacks not working

As of wheezy, for some reason, pulseaudio does not see the toggle feature of some cards (i.e. CMI8788 [Oxygen HD Audio]) exposed by ALSA and playing with the pulseaudio interface (pavucontrol) won't bring happiness. The trick, (for now?), is to bring up the alsamixer ( or alsamixergui) and the audio output can be switched from the read of the card to the front-panel as well as the mic input.

Wheezing and audio interruptions

If a low-power machine having wheezing, in / etc / pulse / daemon.conf list the following:

high-priority = no
nice-level = -1
realtime-scheduling = yes
realtime-priority = 5
flat-volumes = no
resample-method = speex-float-1
default-sample-rate = 48000

Interrupting play in Amarok when running Skype

Comment out or remove the line in the / etc / pulse / default.pa

load-module module-cork-music-on-phone

Excessive CPU usage and distortion

Add a line to / etc / pulse / default.pa

load-module module-udev-detect tsched = 0

Sound level is low or low sound

Add a line to / etc / pulse / daemon.conf:

flat-volumes = no

Various problems with Skype and Wine

Add or uncomment the line in / etc / pulse / daemon.conf

default-fragments = 25
default-fragment-size-msec = 25

Advanced

Dynamically enable/disable

As mentioned above, all sound will automatically be routed thorugh pulseaudio when the pulseaudio package is installed. These instructions describe how to disable it with the pulseaudio package still installed. Individual users can then reenable it themselves as needed.

The "just works" magic is achieved through configuration files placed in /usr/share/alsa/alsa.conf.d/. Without these files in place, the regular alsa defaults will be used. Therefore, to achieve the default alsa behavior with the pulseaudio package installed, divert these files

mkdir /usr/share/alsa/alsa.conf.pulse/

dpkg-divert --divert /usr/share/alsa/alsa.conf.pulse/pulse.conf --rename /usr/share/alsa/alsa.conf.d/pulse.conf

dpkg-divert --divert /usr/share/alsa/alsa.conf.pulse/99-pulseaudio-default.conf.example --rename /usr/share/alsa/alsa.conf.d/99-pulseaudio-default.conf.example

dpkg-divert --divert /usr/share/alsa/alsa.conf.pulse/50-pulseaudio.conf --rename /usr/share/alsa/alsa.conf.d/50-pulseaudio.conf

Now if a user wishes to use pulseaudio, they can create an ~/.asoundrc file that looks something like

  • @hooks [
    • {
      • func load files [
        • {
          • @func concat strings [
            • { @func datadir } "/alsa.conf.pulse/"
            ]
          }
        ] errors false
      }
    ]

If a user wishes to switch between pulse and non-pulse on a quasi-regular basis, put the above into the ~/.asoundrc.pulse instead and symlink it to ~/.asoundrc when pulse is desired

ln -s ~/.asoundrc.pulse ~/.asoundrc

and remove it when not

rm ~/.asoundrc

be sure also when disabling pulse to kill the server so that other things can directly access the soundcard again

killall pulseaudio

Install from source

Seems as though there ought to be some general instructions for building things from source in Debian, but I couldn't find them when editing this.

Download

from here:

http://www.freedesktop.org/wiki/Software/PulseAudio/Download/

Configure

???

Build

make

Install

Put it somewhere. Make some links so programs can find it.

  • Reference:

http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/PerfectSetup/


CategoryHardware