Difference between revisions of "PulseAudio (Español)"

From ArchWiki
Jump to: navigation, search
(KDE 4 y QT 4)
(update interlanguage links)
(Tag: wiki-scripts)
 
(41 intermediate revisions by 14 users not shown)
Line 1: Line 1:
[[Category:HOWTOs (Español)]]
+
[[Category:Sound (Español)]]
[[Category:Audio/Video (Español)]]
+
[[cs:PulseAudio]]
{{i18n|PulseAudio}}
+
[[en:PulseAudio]]
{{Translateme}}
+
[[fr:PulseAudio]]
 
+
[[it:PulseAudio]]
(Traducción al español en curso)
+
[[ja:PulseAudio]]
 
+
[[pt:PulseAudio]]
 +
[[ru:PulseAudio]]
 +
[[zh-hans:PulseAudio]]
 +
{{Translateme (Español)|traducción está desactualizada}}
 
'''PulseAudio''' es un servidor de sonido para sistemas POSIX y Win32 . Permite tener varios programas reproduciendo sonido en una maquina, entre otras características mas avanzadas.  
 
'''PulseAudio''' es un servidor de sonido para sistemas POSIX y Win32 . Permite tener varios programas reproduciendo sonido en una maquina, entre otras características mas avanzadas.  
  
 
==Instalación==
 
==Instalación==
Todos los paquetes son del repositorio community, asi que debes tenerlo habilitado. Luego, para instalar PulseAudio:
+
Todos los paquetes son del repositorio community, así que debes tenerlo habilitado. Luego, para instalar PulseAudio:
 
  # pacman -S pulseaudio
 
  # pacman -S pulseaudio
  
Opcionalmente puedes instalar algunos front-ends GTK para PulseAudio:
+
Opcionalmente puedes instalar algunos entornos GTK para PulseAudio:
 
  # pacman -S paprefs pavucontrol
 
  # pacman -S paprefs pavucontrol
  
==Ejecutandose==
+
==Ejecución==
 
Si el demonio D-Bus no se está ejecutando, habrá que iniciarlo:
 
Si el demonio D-Bus no se está ejecutando, habrá que iniciarlo:
 
  # /etc/rc.d/dbus start
 
  # /etc/rc.d/dbus start
Line 33: Line 36:
 
Tener en cuenta que en el caso de ciertos entornos X11, PulseAudio sera iniciado en el login. Ver la sección en Entornos de Escritorio para detalles.
 
Tener en cuenta que en el caso de ciertos entornos X11, PulseAudio sera iniciado en el login. Ver la sección en Entornos de Escritorio para detalles.
  
==Backend Configuration==
+
==Configuración del motor==
  
 
===ALSA===
 
===ALSA===
Para las aplicaciones que no soportan PulseAudio y soportan ALSA es '''recomendable''' instalar el plugin PulseAudio para ALSA.  Este plugin está disponible en el paquete pulseaudio-alsa.
+
Para las aplicaciones que no soportan PulseAudio y soportan ALSA es '''recomendable''' instalar el modulo PulseAudio para ALSA.  Este modulo está disponible en el paquete pulseaudio-alsa.
 
  # pacman -S pulseaudio-alsa
 
  # pacman -S pulseaudio-alsa
  
Este paquete contiene el  {{Filename|/etc/asound.conf}} con la configuración necesaria para que ALSA utilizar utilice PulseAudio.
+
Este paquete contiene el  {{ic|/etc/asound.conf}} con la configuración necesaria para que ALSA utilizar utilice PulseAudio.
  
 
Para poder añadir sonido a programas de 32 bit sobre Arch x86_64 (como Wine), tendremos que instalar lib32-libpulse y lib32-alsa-plugins también.
 
Para poder añadir sonido a programas de 32 bit sobre Arch x86_64 (como Wine), tendremos que instalar lib32-libpulse y lib32-alsa-plugins también.
 
  # pacman -S lib32-libpulse lib32-alsa-plugins
 
  # pacman -S lib32-libpulse lib32-alsa-plugins
  
Para prevenir que las aplicaciones utilicen la emulación OSS de ALSA en lugar de PulseAudio (impedirían que otras aplicaciones reprodujeran sonido), debemos remover el módulo {{Codeline|snd-pcm-oss}} ejecutando:
+
Para prevenir que las aplicaciones utilicen la emulación OSS de ALSA en lugar de PulseAudio (impedirían que otras aplicaciones reprodujeran sonido), debemos remover el módulo {{Ic|snd-pcm-oss}} ejecutando:
  # rnmod snd-pcm-oss
+
  # rmmod snd-pcm-oss
  
Para que no tengamos que realizar el paso anterior cada vez que reinicemos, introduciremos el módulo en la blacklist, añadiendo  {{Codeline|!snd-pcm-oss}} a MODULES en {{Filename|/etc/rc.conf}}.
+
Para que no tengamos que realizar el paso anterior cada vez que reiniciemos, introduciremos el módulo en la lista negra, añadiendo  {{Ic|!snd-pcm-oss}} a MODULES en {{ic|/etc/rc.conf}}.
  
 
===OSS===
 
===OSS===
Line 55: Line 58:
 
Éste es el método más simple
 
Éste es el método más simple
  
Instala ossp e inicializalo:
+
Instala '''ossp''' e inicialízalo:
 
  # pacman -S ossp
 
  # pacman -S ossp
 
  # /etc/rc.d/osspd start
 
  # /etc/rc.d/osspd start
Line 68: Line 71:
 
  $ padsp sox foo.wav -t ossdsp /dev/dsp
 
  $ padsp sox foo.wav -t ossdsp /dev/dsp
  
Si quiere, puede renombrar el OSSprogama por OSSprograma-real y crear un scritp como éste:
+
Si quiere, puede renombrar el OSSprogama por OSSprograma-real y crear un macro como éste:
{{File|name=/usr/bin/OSSProgram|content=
+
{{hc|/usr/bin/OSSProgram|
 
#!/bin/sh
 
#!/bin/sh
 
if test -x /usr/bin/padsp; then
 
if test -x /usr/bin/padsp; then
     exec /usr/bin/padsp /usr/bin/OSSprogram-real "$@"
+
     exec /usr/bin/padsp /usr/bin/OSSprogram-bin "$@"
 
else
 
else
 
     exec /usr/bin/OSSprogram "$@"
 
     exec /usr/bin/OSSprogram "$@"
Line 79: Line 82:
  
 
===GStreamer===
 
===GStreamer===
To make [[GStreamer]] use PulseAudio, you will need to install the gstreamer0.10-pulse package:
+
Para hacer que [[GStreamer]] use PulseAudio, ejecute {{ic|gstreamer-properties}} (parte del paquete ''gnome-media'') y seleccione ''PulseAudio Sound Server'', en el cuadro Entrada y Salida de Audio.  
# pacman -S gstreamer0.10-pulse
 
 
 
Then, execute {{Filename|gstreamer-properties}} (part of ''gnome-media'' package) and select ''PulseAudio Sound Server'' in both Audio Input and Output. Alternatively, this can be done by setting the gconf variables {{Codeline|/system/gstreamer/0.10/default/audiosink}} to ''pulsesink'' and {{Codeline|/system/gstreamer/0.10/default/audiosrc}} to ''pulsesrc'':
 
 
   $ gconftool-2 -t string --set /system/gstreamer/0.10/default/audiosink pulsesink
 
   $ gconftool-2 -t string --set /system/gstreamer/0.10/default/audiosink pulsesink
 
   $ gconftool-2 -t string --set /system/gstreamer/0.10/default/audiosrc pulsesrc
 
   $ gconftool-2 -t string --set /system/gstreamer/0.10/default/audiosrc pulsesrc
  
Some applications (like Rhythmbox) ignore the ''audiosink'' property, but rely instead on ''musicaudiosink'', which can't be configured using {{Filename|gstreamer-properties}} but needs to be manually set using {{Filename|gconf-editor}} or the {{Filename|gconftool-2}}:
+
Algunas aplicaciones (como Rhythmbox) ignoran la propiedad ''audiosink'', pero utilizan el valor de ''musicaudiosink'', aunque no se puede configurar esto usando {{ic|gstreamer-properties}}. Necesita establecerlo manualmente usando {{ic|gconf-editor}} o {{ic|gconftool-2}}:
 
   $ gconftool-2 -t string --set /system/gstreamer/0.10/default/musicaudiosink pulsesink
 
   $ gconftool-2 -t string --set /system/gstreamer/0.10/default/musicaudiosink pulsesink
 
===SDL===
 
SDL in the extra repository does not provide Pulseaudio support. You will need to rebuild it from the [[ABS]]. No change to the PKGBUILD is neccessary.
 
  
 
===OpenAL===
 
===OpenAL===
OpenAl debería utilizar PulseAudio por defecto, pero puede ser explicitamente configurado editando {{File|name=/etc/openal/alsoft.conf|content=drivers=pulse,alsa}}
+
OpenAl debería utilizar PulseAudio por defecto, pero puede ser explícitamente configurado editando {{hc|/etc/openal/alsoft.conf|2=drivers=pulse,alsa}}
  
 
===libao===
 
===libao===
 
Editar el fichero de configuración de libao:
 
Editar el fichero de configuración de libao:
 
+
{{hc|/etc/libao.conf|2=default_driver=pulse}}
{{File|name=/etc/libao.conf|content=default_driver=pulse}}
 
  
 
===PortAudio===
 
===PortAudio===
Line 106: Line 102:
 
PulseAudio es un reemplazo para el demonio enlightened sound (ESD). Si PulseAudio está en ejecución, los clientes ESD deberían tener disponible la salida sin modificar su configuración.
 
PulseAudio es un reemplazo para el demonio enlightened sound (ESD). Si PulseAudio está en ejecución, los clientes ESD deberían tener disponible la salida sin modificar su configuración.
  
==Desktop Environments==
+
==Entornos de escritorio==
  
 
===General X11===
 
===General X11===
Line 112: Line 108:
 
  $ start-pulseaudio-x11
 
  $ start-pulseaudio-x11
  
Ésto iniciará PulseAudio y cargará los pulgins X11.
+
Esto iniciará PulseAudio y cargará los modulos X11.
  
 
Si usamos GNOME o KDE, PulseAudio será lanzado automáticamente en el login.
 
Si usamos GNOME o KDE, PulseAudio será lanzado automáticamente en el login.
Line 118: Line 114:
 
====X11 bell====
 
====X11 bell====
 
Para hacer que PulseAudio reproduzca un sonido cuando se produce un evento de campana de sistema en X11 (ejemplo: hacer que el terminal haga 'Ping!' en vez del 'Beep!'), añadimos al final de  
 
Para hacer que PulseAudio reproduzca un sonido cuando se produce un evento de campana de sistema en X11 (ejemplo: hacer que el terminal haga 'Ping!' en vez del 'Beep!'), añadimos al final de  
{{Filename|/etc/pulse/default.pa}}:
+
{{ic|/etc/pulse/default.pa}}:
 +
# Prevent pulseaudio --start from failing when following commands fail (eg. when X is not active)
 +
.nofail
 
  load-sample-lazy x11-bell /usr/share/sounds/freedesktop/stereo/dialog-error.oga
 
  load-sample-lazy x11-bell /usr/share/sounds/freedesktop/stereo/dialog-error.oga
 
  load-module module-x11-bell sample=x11-bell  
 
  load-module module-x11-bell sample=x11-bell  
 +
.fail
  
Puedes usar cualquier otro sonido. {{Filename|dialog-error.oga}} está en el paquete  ''sound-theme-freedesktop''.
+
Puedes usar cualquier otro sonido. {{ic|dialog-error.oga}} está en el paquete  ''sound-theme-freedesktop''.
  
 
===GNOME===
 
===GNOME===
Proper integration of PulseAudio into GNOME requires some special packages:
+
La integración adecuada de PulseAudio con GNOME requiere algunos paquetes especiales:
 
* libcanberra-pulse
 
* libcanberra-pulse
 
* gnome-media-pulse
 
* gnome-media-pulse
 
* gnome-settings-daemon-pulse
 
* gnome-settings-daemon-pulse
  
They are part of the ''pulseaudio-gnome'' group.
+
Son parte del grupo ''pulseaudio-gnome''.
  
 
===KDE 3===
 
===KDE 3===
Notar que Pulseaudio ''NO'' es un reemplazo para aRts. Si usas KDE 3, no es posible usar PulseAudio.
+
Note que Pulseaudio ''NO'' es un reemplazo para aRts. Si usas KDE 3, no es posible usar PulseAudio.
 
 
===KDE 4 y QT 4===
 
 
 
Phonon está en Arch compilado con solporte para PulseAudio por defecto, con lo que, una vez instalado, al iniciar sesión, deberemos tener en "Preferencias de sistema->Multimedia->Phonon" como dispositivo de salida ''Audio Interno Estéreo Analógico'' o ''Audio Interno Estéreo Digital''.  
 
  
En el caso de tener únicamente una entrada ''Sevidor de sonido PulseAudio'', implica que PulseAudio no se está ejecutando. Podemos lanzarlo con:
+
===KDE 4 y Qt 4===
$ start-pulseaudio-kde
 
  
 
En principio, al iniciar la sesión, debería ser lanzado por defecto. Para más información, visitar [http://www.pulseaudio.org/wiki/KDE la wiki de PulseAudio en las páginas KDE]
 
En principio, al iniciar la sesión, debería ser lanzado por defecto. Para más información, visitar [http://www.pulseaudio.org/wiki/KDE la wiki de PulseAudio en las páginas KDE]
  
Adicionalmete, alternativa en KDE a pavucontrol, es [https://aur.archlinux.org/packages.php?ID=43848 veromix plasmoid] disponible en el AUR.
+
Adicionalmete, una alternativa en KDE a pavucontrol, es [https://aur.archlinux.org/packages.php?ID=43848 veromix plasmoid] disponible en el AUR.
 
 
==Applications==
 
===VLC===
 
If you are having audio problems with the audio playback of DVDs in VLC, uninstall VLC and install the vlc-nightly package from the AUR, and set the audio output method to ''Pulseaudio''.
 
  
Alternative: [http://aur.archlinux.org/packages.php?ID=25257 vlc-pulse] from AUR.
+
==Aplicaciones==
 +
===Audacious===
 +
Audacious soporta PulseAudio de forma nativa. Para utilizarlo, debemos ir en Audacious a Preferencias->Audio->Salida->plugin para "PulseAudio".
  
 
===mpd===
 
===mpd===
There is a pulseaudio enabled version of mpd called [http://aur.archlinux.org/packages.php?ID=18722 mpd-pulse] in the AUR.Or you can rebuild the original updated package from ABS modifying the PKGBUILD. You can use yaourt either way.
+
You will need to [http://mpd.wikia.com/wiki/PulseAudio configure] mpd to use PulseAudio.
  
# from AUR
+
On a headless box, run PulseAudio as the ''mpd'' user.
yaourt -S mpd-pulse
+
On a desktop, running mpd as yourself and not using the ''mpd'' user is preferred.
# also change to --disable-pulse --enable-pulse in the PKGBUILD from ABS
 
yaourt -Sb mpd  
 
  
You will need to [http://mpd.wikia.com/wiki/PulseAudio configure] mpd to use Pulseaudio.
+
===MPlayer===
 +
MPlayer soporta la salida PulseAudio de forma nativa, con la opción "{{Ic|-ao pulse}}".
 +
También puede configurar la salida PulseAudio por defecto en {{ic|~/.mplayer/config}} por usuario, o en {{ic|/etc/mplayer/mplayer.conf}} para todo el sistema:
 +
{{hc|/etc/mplayer/mplayer.conf|2=ao=pulse}}
  
 +
===Flashplugin (solo x86_64)===
 +
Si está usando flashplugin desde el repositorio multilib, necesitará instalar lib32-alsa-plugins y lib32-libcanberra-pulse para poder usar el mezclador de sonido, en otro caso, no podrá tener sonido simultáneo en una aplicación y flashplugin.
 +
{{bc|
 +
# pacman -S lib32-alsa-plugins lib32-libcanberra-pulse
 +
}}
  
If you run a system-wide daemon, you will need to add the ''mpd'' user to the ''pulse-access'' group in order for mpd to connect to the daemon.
+
===Skype (x86_64 only)===
 +
Tiene que instalar lib32-libpulse desde multilib, sino obtendrá el error "Problema con la reproducción de audio" cuando inicie una llamada.
  
On a desktop, running mpd as yourself and not using the ''mpd'' user is preferred.
+
===Control de Volumen===
 +
Adapte la variable 'device' a su sink-device listado en {{bc|pactl list}}
  
===mplayer===
+
Puede cambiar el volumen usando este macro.
The PulseAudio enabled version of mplayer is called [http://aur.archlinux.org/packages.php?ID=24344 mplayer-pulse] and is located in AUR. Alternatively, use SDL output: {{Codeline|1=ao=sdl:pulse}} or make use of abs and rebuild the package with "--enable-pulse".
+
{{bc|<nowiki>
 +
#!/bin/bash
 +
device="alsa_output.pci-0000_00_14.2.analog-stereo"
 +
case "$1" in
 +
"up")    # incrementar volumen en 1000
 +
pacmd dump | awk --non-decimal-data '$1~/set-sink-volume/{if ($2~/'${device}'/) {if ($3+1000 > 65535) {system ("pactl "$1" '${device}' "65535)} else {system ("pactl "$1" '${device}' "$3+1000)}}}'
 +
;;
 +
"down")  # decrementar volumen en 1000
 +
pacmd dump | awk --non-decimal-data '$1~/set-sink-volume/{if ($2~/'${device}'/) {if ($3-1000 < 0) {system ("pactl "$1" '${device}' "0)} else {system ("pactl "$1" '${device}' "$3-1000)}}}'
 +
;;
 +
"mute")  # encender mute
 +
pacmd dump|awk --non-decimal-data '$1~/set-sink-mute/{if ($2~/'${device}'/) {system ("pactl "$1" '${device}' "($3=="yes"?"no":"yes"))}}'
 +
;;
 +
esac
 +
</nowiki>}}
  
==Alternative configurations==
+
==Configuraciones alternativas==
===Surround sound systems===
+
===Systemas de sonido envolvente===
Many people have a surround card, but have speakers for just two channels, so PulseAudio cannot really default to a surround setup. To enable all the channels, edit {{Filename|/etc/pulse/daemon.conf}}: uncomment the default-sample-channels line (i.e. remove the semicolon  from the beginning of the line) and set the value to '''6''' if you have a ''5.1'' setup, or '''8''' if you have ''7.1'' setup etc.
+
Muchas personas poseen una placa compatible con sonido envolvente, pero tienen altavoces para solo dos canales, entonces PulseAudio no puede usar una configuración envolvente por defecto. Para habilitar todos los canales, edite {{ic|/etc/pulse/daemon.conf}}: descomentando la linea default-sample-channels (i.e. remueva el punto y coma del principio de la linea) y configure el valor a '''6''' si tiene un sistema ''5.1'', o '''8''' si tiene un sistema ''7.1'' etc.
 
  # Default
 
  # Default
 
  default-sample-channels=2
 
  default-sample-channels=2
  # For 5.1
+
  # Para 5.1
 
  default-sample-channels=6
 
  default-sample-channels=6
  # For 7.1
+
  # Para 7.1
 
  default-sample-channels=8
 
  default-sample-channels=8
  
After doing the edit, you will need to restart Pulseaudio.
+
Luego de realizar la edición, sera necesario reiniciar el servidor de PulseAudio
 +
 
 +
===Configuracion avanzada de ALSA===
 +
Para que ALSA pueda usar PulseAudio se necesita una configuración especial{{ic|/etc/asound.conf}} (system wide settings) (recomendado) o {{ic|~/.asoundrc}} (configuración en una base por usuario):
 +
{{hc|/etc/asound.conf|
 +
pcm.pulse {
 +
    type pulse
 +
}
 +
ctl.pulse {
 +
    type pulse
 +
}
 +
pcm.!default {
 +
    type pulse
 +
}
 +
ctl.!default {
 +
    type pulse
 +
}
 +
}}
 +
 
 +
Si omite los dos últimos grupos, PulseAudio no se utilizará de forma predeterminada. A continuación, tendrá que cambiar el dispositivo ALSA "pulse " en las aplicaciones que se utilizan para hacer que funcione.
  
===ALSA Monitor source===
+
====Monitor de fuentes ALSA====
To be able to record from a monitor source (a.k.a. "What-U-Hear", "Stereo Mix"), use {{Codeline|pactl list}} to find out the name of the source in Pulseaudio (e.g. {{Codeline|alsa_output.pci-0000_00_1b.0.analog-stereo.monitor}}). Then add lines like the following to {{Filename|/etc/asound.conf}} or {{Filename|~/.asoundrc}}:
+
To be able to record from a monitor source (a.k.a. "What-U-Hear", "Stereo Mix"), use {{Ic|pactl list}} to find out the name of the source in Pulseaudio (e.g. {{Ic|alsa_output.pci-0000_00_1b.0.analog-stereo.monitor}}). Then add lines like the following to {{ic|/etc/asound.conf}} or {{ic|~/.asoundrc}}:
 
  pcm.pulse_monitor {
 
  pcm.pulse_monitor {
 
   type pulse
 
   type pulse
Line 194: Line 227:
 
  }
 
  }
  
Now you can select {{Codeline|pulse_monitor}} as a recording source.
+
Now you can select {{Ic|pulse_monitor}} as a recording source.
 +
 
 +
{{Note|You can also simply install the package 'pulseaudio-alsa'}}
  
 
===PulseAudio over network===
 
===PulseAudio over network===
Line 201: Line 236:
 
To accomplish this, one needs to enable module-native-protocol-tcp, and copy the pulse-cookie to the clients.  
 
To accomplish this, one needs to enable module-native-protocol-tcp, and copy the pulse-cookie to the clients.  
  
====System-wide daemon====
+
====TCP support (networked sound)====
 
+
{{out of date}}
{{Warning|System-wide mode is a '''bad idea''' on a desktop. By default, PulseAudio is run per-user and will be started automatically when it is needed; this is simpler, more efficient and more secure. Read [http://pulseaudio.org/wiki/WhatIsWrongWithSystemMode What Is Wrong With System Mode] for more details.}}
+
To enable the TCP module, add this to (or uncomment, if already there) {{ic|/etc/pulse/default.pa}}:
 
 
First you need to add the "pulseaudio" daemon to {{Filename|/etc/[[rc.conf]]}}. Example:
 
DAEMONS=(syslog-ng network netfs crond '''pulseaudio''')
 
 
 
Then you need to add each user (even root) that should be capable of using PulseAudio to the {{Codeline|pulse-access}} group:
 
# gpasswd -a <user> pulse-access
 
 
 
Edit {{Filename|/etc/pulse/system.pa}}, and change the following region:
 
.ifexists module-hal-detect.so
 
load-module module-hal-detect
 
.else
 
 
 
to the following:
 
.ifexists module-udev-detect.so
 
load-module module-udev-detect
 
.else
 
 
 
To enable the TCP module, add (or uncomment, if already there) this to {{Filename|/etc/pulse/system.pa}}:
 
 
  load-module module-native-protocol-tcp
 
  load-module module-native-protocol-tcp
  
To allow remote connections to the TCP module, you also have to remember to unblock the service in {{Filename|/etc/hosts.allow}} with for example the following line:
+
To allow remote connections to the TCP module, you also have to remember to unblock the service in {{ic|/etc/hosts.allow}} with the following line:
 
  pulseaudio-native: ALL
 
  pulseaudio-native: ALL
  
If you are running a system-wide PulseAudio instance, the cookie is located in {{Filename|/var/run/pulse/.pulse-cookie}}. This cookie needs to be sent to the client and placed somewhere the pulse-access group can read (and with permissions so only they can read it). Alternatively, you may add {{Codeline|1=auth-anonymous=1}} to the end of the {{Codeline|load-module module-native-protocol-tcp}} line to disable authentication.
+
Note: If you are having trouble connecting, use (on server)
  # scp /var/run/pulse/.pulse-cookie client:/etc/pulse-cookie
+
  pacmd>> list-modules
 +
(you can even load modules from here!)
  
# chown pulse:pulse-access /etc/pulse-cookie
+
====Zeroconf (Avahi) publishing====
# chmod 640 /etc/pulse-cookie
+
For the remote Pulseaudio server to appear in the PulseAudio Device Chooser ({{ic|padevchooser}}), you will also need to add the {{ic|avahi-daemon}} to the DAEMONS in rc.conf on both server and clients.
 
 
The pulse client needs to know where to look for the cookie.
 
{{Filename|/etc/pulse/client.conf}}:
 
### Cookie file
 
cookie-file=/etc/pulse-cookie
 
 
 
Then the client needs to be configured to connect to the specified server.
 
{{Filename|/etc/pulse/client.conf}}:
 
## The default server to connect to
 
default-server=192.168.0.5
 
 
 
To switch between servers on the client from within X, the {{Codeline|pax11publish}} command can be used.  For example, to switch from the default server to the local server:
 
  
  $ pax11publish -e -S localhost
+
====Switching the PulseAudio server used by local X clients====
 +
To switch between servers on the client from within X, the {{Ic|pax11publish}} command can be used.  For example, to switch from the default server to the server at hostname foo:
 +
  $ pax11publish -e -S foo
  
 
Or to switch back to the default:
 
Or to switch back to the default:
 
 
  $ pax11publish -e -r
 
  $ pax11publish -e -r
  
 
Note that for the switch to become apparent, the programs using Pulse must be restarted.
 
Note that for the switch to become apparent, the programs using Pulse must be restarted.
 
To use the ESounD wrapper while using a system-wide daemon, you also need to enable auth-anonymous for the esound-unix module, or copy {{Filename|/var/run/pulse/.esd_auth}} into each home directory.
 
 
====Zeroconf (Avahi) publishing====
 
For the remote Pulseaudio server to appear in the PulseAudio Device Chooser ({{Filename|padevchooser}}), you will also need to add the {{Filename|avahi-daemon}} to the DAEMONS in rc.conf on both server and clients.
 
  
 
===Pulseaudio through JACK===
 
===Pulseaudio through JACK===
Line 266: Line 268:
 
  pulseaudio -L module-jack-sink -L module-jack-source
 
  pulseaudio -L module-jack-sink -L module-jack-source
  
To use pulseaudio with JACK, JACK must be started up before Pulseaudio, using whichever method you prefer. Pulseaudio then needs to be started loading the 2 relevant modules. Edit {{Filename|/etc/pulse/default.pa}}, and change the following region:
+
To use pulseaudio with JACK, JACK must be started up before Pulseaudio, using whichever method you prefer. Pulseaudio then needs to be started loading the 2 relevant modules. Edit {{ic|/etc/pulse/default.pa}}, and change the following region:
 
  ### Load audio drivers statically (it is probably better to not load
 
  ### Load audio drivers statically (it is probably better to not load
 
  ### these drivers manually, but instead use module-hal-detect --
 
  ### these drivers manually, but instead use module-hal-detect --
Line 313: Line 315:
 
Using the settings listed above you can use QjackCtl to execute a script upon startup and shutdown to load/unload PulseAudio. Part of the reason you may wish to do this is that the above changes disable PulseAudio's automatic hardware detection modules. This particular setup is for using PulseAudio in an exclusive fashion with JACK, though the scripts could be modified to unload and load an alternate non-JACK setup, but killing and starting PulseAudio while programs might be using it would become problematic.
 
Using the settings listed above you can use QjackCtl to execute a script upon startup and shutdown to load/unload PulseAudio. Part of the reason you may wish to do this is that the above changes disable PulseAudio's automatic hardware detection modules. This particular setup is for using PulseAudio in an exclusive fashion with JACK, though the scripts could be modified to unload and load an alternate non-JACK setup, but killing and starting PulseAudio while programs might be using it would become problematic.
  
The following example could be used and modified as necessary as a startup script that daemonizes PulseAudio and loads the ''padevchooser'' program (optional, needs to be built from AUR) called {{Filename|jack_startup}}:
+
The following example could be used and modified as necessary as a startup script that daemonizes PulseAudio and loads the ''padevchooser'' program (optional, needs to be built from AUR) called {{ic|jack_startup}}:
 
  #!/bin/bash
 
  #!/bin/bash
 
  #Load PulseAudio and PulseAudio Device Chooser
 
  #Load PulseAudio and PulseAudio Device Chooser
Line 320: Line 322:
 
  padevchooser&
 
  padevchooser&
  
as well as a shutdown script to kill PulseAudio and the Pulse Audio Device Chooser, as another example called {{Filename|jack_shutdown}} also in the home directory:
+
as well as a shutdown script to kill PulseAudio and the Pulse Audio Device Chooser, as another example called {{ic|jack_shutdown}} also in the home directory:
 
  #!/bin/bash
 
  #!/bin/bash
 
  #Kill PulseAudio and PulseAudio Device Chooser
 
  #Kill PulseAudio and PulseAudio Device Chooser
Line 330: Line 332:
 
  chmod +x jack_startup jack_shutdown
 
  chmod +x jack_startup jack_shutdown
  
then with QjackCtl loaded, click on the ''Setup'' button and then the ''Options'' tab and tick both "Execute Script after Startup:" And "Execute Script on Shutdown:" and put either use the ... button or type the path to the scripts (assuming the scripts are in the home directory) {{Filename|~/jack_startup}} and {{Filename|~/jack_shutdown}} making sure to save the changes you have made.
+
then with QjackCtl loaded, click on the ''Setup'' button and then the ''Options'' tab and tick both "Execute Script after Startup:" And "Execute Script on Shutdown:" and put either use the ... button or type the path to the scripts (assuming the scripts are in the home directory) {{ic|~/jack_startup}} and {{ic|~/jack_shutdown}} making sure to save the changes you have made.
  
===Pulseaudio through OSS===
+
===Pulseaudio a través OSS===
Add the following to {{Filename|/etc/pulse/default.pa}}:
+
Agregue lo siguiente a {{ic|/etc/pulse/default.pa}}:
 
   load-module module-oss
 
   load-module module-oss
  
Then start Pulseaudio as usual. You should have sinks and sources for your OSS devices.
+
Inicie normalmente PulseAudio. Debería tener las entradas y salidas de sus dispositivos OSS.
  
 
===Pulseaudio from within a chroot (ex. 32-bit chroot in 64-bit install)===
 
===Pulseaudio from within a chroot (ex. 32-bit chroot in 64-bit install)===
Since a chroot sets up an alternative root for the running/jailing of applications, pulseaudio must be installed within the chroot itself ({{Codeline|pacman -S pulseaudio}} within the chroot environment).
+
Since a chroot sets up an alternative root for the running/jailing of applications, pulseaudio must be installed within the chroot itself ({{Ic|pacman -S pulseaudio}} within the chroot environment).
  
Pulseaudio, if not set up to connect to any specific server (this can be done in {{Filename|/etc/pulse/client.conf}}, through the PULSE_SERVER environment variable, or through publishing to the local X11 properties using module-x11-publish), will attempt to connect to the local pulse server, failing which it will spawn a new pulse server. Each pulse server has a unique ID based on the machine-id value in {{Filename|/var/lib/dbus}}. To allow for chrooted apps to access the pulse server, the following directories must be mounted within the chroot:-
+
Pulseaudio, if not set up to connect to any specific server (this can be done in {{ic|/etc/pulse/client.conf}}, through the PULSE_SERVER environment variable, or through publishing to the local X11 properties using module-x11-publish), will attempt to connect to the local pulse server, failing which it will spawn a new pulse server. Each pulse server has a unique ID based on the machine-id value in {{ic|/var/lib/dbus}}. To allow for chrooted apps to access the pulse server, the following directories must be mounted within the chroot:-
 
  /var/run
 
  /var/run
 
  /var/lib/dbus
 
  /var/lib/dbus
Line 347: Line 349:
 
  ~/.pulse
 
  ~/.pulse
  
{{Filename|/dev/shm}} should also be mounted for efficiency and good performance. Note that mounting /home would normally also allow sharing of the {{Filename|~/.pulse}} folder.
+
{{ic|/dev/shm}} should also be mounted for efficiency and good performance. Note that mounting /home would normally also allow sharing of the {{ic|~/.pulse}} folder.
  
For specific direction on accomplishing the appropriate mounts, please refer to the wiki on installing a bundled 32-bit system, especially the [http://wiki.archlinux.org/index.php?title=Arch64_Install_bundled_32bit_system#Additional_mount_option_to_allow_32-bit_apps_to_access_the_64-bit_Pulseaudio_server additional section] specific to Pulseaudio.
+
For specific direction on accomplishing the appropriate mounts, please refer to the wiki on installing a bundled 32-bit system, especially the [https://wiki.archlinux.org/index.php?title=Arch64_Install_bundled_32bit_system#Additional_mount_option_to_allow_32-bit_apps_to_access_the_64-bit_Pulseaudio_server additional section] specific to Pulseaudio.
 +
 
 +
===Simultaneous Digital and Analog Output===
 +
As an example situation: you want to listen to music at your desktop, using the regular 3.5mm analog outputs into your desktop PC speakers. You also want to feed the same music to your hi-fi system in another room via your sound card's digital output. You would think this would be a simple matter, but for many sound chipsets, it requires some editing to get it set up since the default Pulseaudio profiles allow you to use either analog or digital, but not both simultaneously.
 +
 
 +
The solution is as follows (with thanks for some useful pointers from: http://superuser.com/questions/267442/how-to-get-simultaneous-sound-from-pulseadio-on-two-outputs-analog-and-digital). Amarok is used in this example.
 +
 
 +
* Install "pavucontrol" (pacman -S pavucontrol). You ''won't'' be needing the other useful pulse configuration utility "paprefs" for this task.
 +
* In a terminal, launch "pacmd" - a command line utility for loading pulse modules
 +
* Enter the following commands in pacmd in this order (where your numbers for "hw:0,0" are determined by entering "aplay -l" in terminal. One number is the hardware ID for the analog device, the other for the digital):
 +
  load-module module-alsa-sink device="hw:0,0" sink_name=analog_output
 +
  load-module module-alsa-sink device="hw:0,1" sink_name=digital_output
 +
  load-module module-combine sink_name=analog_digital slaves=digital_output,analog_output
 +
 
 +
* Open "pavucontrol" from a terminal
 +
* Under pavucontrol's "Playback Tab", for the running app Amarok, select "Simultaneous output to Internal Audio, Internal Audio" (you will need to have Amarok playing something to test this)
 +
* Under the "Configuration Tab" Select "Digital Stereo Duplex (IEC958)" for "Internal Audio" (your exact names may vary here, according to how ALSA has named your hardware). You should now be able to hear Amarok playing on both your analog and digital outputs!
 +
 
 +
The above solution only holds to long as you have pacmd running, and is specific for the running app (in the above example, Amarok).
 +
 
 +
To set the the sinks up every reboot and for all audio apps, add the above load-module commands to your '''/etc/pulse/default.pa''' file. You may need to add them at the start of the file, just above line "### Automatically restore the volume of streams and devices", or it may not work as expected.
 +
 
 +
Finally, use the Gnome 3 sound preferences to set your system's default "Output" to "Simultaneous output to Internal Audio, Internal Audio".
  
 
==Troubleshooting==
 
==Troubleshooting==
===No sound after install===
+
===No hay sonido después de instalar===
====No cards====
+
 
If PulseAudio starts, run {{Codeline|pacmd list}}. If no cards are reported, make sure that your ALSA devices are not in use:
+
===Contenido Flash===
 +
Si después de instalar PulseAudio no tiene sonido desde un contenido flash, puede instalar {{AUR|libflashsupport-pulse}}{{Broken package link|{{aur-mirror|libflashsupport-pulse}}}} desde el AUR.
 +
 
 +
====Sin Tarjetas====
 +
Si PulseAudio está iniciado, ejecute {{Ic|pacmd list}}. Si no devuelve ninguna tarjeta, aseguraté de que los dispositivos de ALSA no están en uso:
 
  $ fuser -v /dev/snd/*
 
  $ fuser -v /dev/snd/*
 
  $ fuser -v /dev/dsp
 
  $ fuser -v /dev/dsp
  
Make sure any applications using the pcm or dsp files are shut down before restarting PulseAudio.
+
Asegúrese de que ninguna aplicación que use pcm o dst está iniciada antes de inicializar PulseAudio.
  
====Muted audio device====
+
====KDE4====
If you experience no audio output via any means while using ALSA as your default device, you may have to unmute your sound card. To do this, you will want to launch alsamixer and make sure each column has a green 00 under it (this can be toggled by pressing 'm')
+
Puede ser que haya otro dispositivo de salida marcado como preferio en phonon. Asegúrese de que en cada catergoría tiene su dispositivo de salida en la parte superior.
 +
 
 +
{{Note|Pulseaudio doesn't work by default with the Gstreamer phonon-backend. It does, however, with the phonon-vlc backend (available in [extra]).}}
 +
 
 +
====Dispositivo de audio silenciado====
 +
Si no hay salida de audio a través de cualquier medio durante el uso de ALSA como dispositivo por defecto, puede que tenga la tarjeta de sonido desactivada. Para activarla, tendrá que lanzar  alsamixer y asegurarse de que cada columna, el valor 00, está de color verde. Si no es así, estará apagado el sonido, para activarlo pulse 'm.
 
  $ alsamixer -c 0
 
  $ alsamixer -c 0
  
Sometimes the snd_pcsp driver conflicts with the snd_hda_intel driver (for those of you
+
===Fallo al iniciar el Demonio===
using Intel cards) and no sound output is experienced. To fix this, you can blacklist the
+
Prueba a resetear PulseAudio. Hazlo así:
snd_pcsp driver in the MODULES array of {{Filename|/etc/rc.conf}} (by appending {{Codeline|!snd_pcsp}}).
 
 
 
===Daemon startup failed===
 
Try resetting PulseAudio. To do that:
 
 
  $ pulseaudio --kill
 
  $ pulseaudio --kill
 
  $ killall pulseaudio
 
  $ killall pulseaudio
Line 376: Line 405:
 
  $ rm -rf /tmp/pulse*
 
  $ rm -rf /tmp/pulse*
  
Afterwards, start PulseAudio again.
+
Después, inicia PulseAudio.
  
 
===padevchooser===
 
===padevchooser===
If you cannot launch the PulseAudio Device Chooser, first (re)start the Avahi daemon as follows:
+
Si no puede lanzar el PulseAudio Device Chooser, (re)inicie el Daemon Avahi así:
 
  $ /etc/rc.d/avahi-daemon restart
 
  $ /etc/rc.d/avahi-daemon restart
  
===Glitches and high CPU usage since 0.9.14===
+
===Problemas técnicos y uso intensivo de la CPU desde 0.9.14===
The PulseAudio sound server has been rewritten to use timer-based audio scheduling instead of the traditional interrupt-driven approach. Timer-based scheduling may expose issues in some Alsa drivers. To turn timer-based scheduling off, replace the line:
+
El servidor de sonido PulseAudio ha sido reescrito para utilizar la programación de audio basado en temporizadores en lugar del enfoque tradicional por interrupciones. Eso puede provocar problemas con algunos drivers de ALSA. Para desactivarlo, reemplace la línea:
 
  load-module module-udev-detect  
 
  load-module module-udev-detect  
in {{Filename|/etc/pulse/default.pa}} by:
+
en {{ic|/etc/pulse/default.pa}} por:
 
  load-module module-udev-detect tsched=0
 
  load-module module-udev-detect tsched=0
 +
Then restart the PulseAudio server.
  
===Choppy sound===
+
===Sonido entrecortado===
Choppy sound in pulsaudio can result from wrong settings for the sample rate in /etc/pulse/deamon.conf. Try changing the line
+
El sonido entrecortado en pulseaudio puede venir por una configuración errónea de la frecuencia de muestreo en /etc/pulse/daemon.conf. Pruebe cambiando la línea:
 
  ; default-sample-rate = 44100
 
  ; default-sample-rate = 44100
to
+
por
 
  default-sample-rate = 48000
 
  default-sample-rate = 48000
and restart the pulsaudio server by executing
+
y reinicie el servidor pulseaudio.
pulseaudio --kill && pulseaudio --start
 
  
===Realtime scheduling===
+
===Volume adjustment doesn't work properly===
Es una buena idea permitir a PulseAudio correr con programación en tiempo real, lo que puede mejorar el rendimiento. Para realizar esto agrega las siguientes lineas en {{Filename|/etc/security/limits.conf}}:
+
You might wan't to check
@pulse-rt - rtprio 9
+
/usr/share/pulseaudio/alsa-mixer/paths/analog-output.conf.common
@pulse-rt - nice -11
 
  
Después necesitas agregar tu usuario al grupo {{Codeline|pulse-rt}}:
+
If the volume does not appear to increment/decrement properly using {{Ic|alsamixer}} or {{Ic|amixer}}, it may be due to pulseaudio having a larger number of increments (65537 to be exact). Try using larger values when changing volume (e.g. {{Ic|amixer set Master 655+}}).
# gpasswd -a <user> pulse-rt
 
  
==See also==
+
===Volume gets louder every time a new application is started===
*[[Allow multiple programs to play sound at once]]
+
If you encounter this issue, you can fix it by uncommenting
 +
flat-volumes = no
 +
in
 +
/etc/pulse/daemon.conf
  
 
==External links==
 
==External links==

Latest revision as of 22:15, 13 December 2017

Tango-preferences-desktop-locale.pngEste artículo o sección necesita ser traducido.Tango-preferences-desktop-locale.png

Notas: traducción está desactualizada (Discusión)

PulseAudio es un servidor de sonido para sistemas POSIX y Win32 . Permite tener varios programas reproduciendo sonido en una maquina, entre otras características mas avanzadas.

Instalación

Todos los paquetes son del repositorio community, así que debes tenerlo habilitado. Luego, para instalar PulseAudio:

# pacman -S pulseaudio

Opcionalmente puedes instalar algunos entornos GTK para PulseAudio:

# pacman -S paprefs pavucontrol

Ejecución

Si el demonio D-Bus no se está ejecutando, habrá que iniciarlo:

# /etc/rc.d/dbus start

PulseAudio puede ser iniciado con:

$ pulseaudio --start

O si usas X11:

$ start-pulseaudio-x11

Para kde:

$ start-pulseaudio-kde

PulseAudio puede ser detenido con:

$ pulseaudio --kill

Tener en cuenta que en el caso de ciertos entornos X11, PulseAudio sera iniciado en el login. Ver la sección en Entornos de Escritorio para detalles.

Configuración del motor

ALSA

Para las aplicaciones que no soportan PulseAudio y soportan ALSA es recomendable instalar el modulo PulseAudio para ALSA. Este modulo está disponible en el paquete pulseaudio-alsa.

# pacman -S pulseaudio-alsa

Este paquete contiene el /etc/asound.conf con la configuración necesaria para que ALSA utilizar utilice PulseAudio.

Para poder añadir sonido a programas de 32 bit sobre Arch x86_64 (como Wine), tendremos que instalar lib32-libpulse y lib32-alsa-plugins también.

# pacman -S lib32-libpulse lib32-alsa-plugins

Para prevenir que las aplicaciones utilicen la emulación OSS de ALSA en lugar de PulseAudio (impedirían que otras aplicaciones reprodujeran sonido), debemos remover el módulo snd-pcm-oss ejecutando:

# rmmod snd-pcm-oss

Para que no tengamos que realizar el paso anterior cada vez que reiniciemos, introduciremos el módulo en la lista negra, añadiendo !snd-pcm-oss a MODULES en /etc/rc.conf.

OSS

Tenemos varias alternativas para hacer que reproduzcan con PulseAudio programas que sólo utilizan OSS:

osspd

Éste es el método más simple

Instala ossp e inicialízalo:

# pacman -S ossp
# /etc/rc.d/osspd start

Después, incluye osspd a DAEMONS en rc.conf.

padsp wrapper

Si tiene un programa que utiliza OSS puedes hacer que trabaje con PulseAudio ejecutándolo con padsp:

$ padsp OSSprogram

Ejemplos:

$ padsp aumix
$ padsp sox foo.wav -t ossdsp /dev/dsp

Si quiere, puede renombrar el OSSprogama por OSSprograma-real y crear un macro como éste:

/usr/bin/OSSProgram
#!/bin/sh
if test -x /usr/bin/padsp; then
    exec /usr/bin/padsp /usr/bin/OSSprogram-bin "$@"
else
    exec /usr/bin/OSSprogram "$@"
fi

GStreamer

Para hacer que GStreamer use PulseAudio, ejecute gstreamer-properties (parte del paquete gnome-media) y seleccione PulseAudio Sound Server, en el cuadro Entrada y Salida de Audio.

 $ gconftool-2 -t string --set /system/gstreamer/0.10/default/audiosink pulsesink
 $ gconftool-2 -t string --set /system/gstreamer/0.10/default/audiosrc pulsesrc

Algunas aplicaciones (como Rhythmbox) ignoran la propiedad audiosink, pero utilizan el valor de musicaudiosink, aunque no se puede configurar esto usando gstreamer-properties. Necesita establecerlo manualmente usando gconf-editor o gconftool-2:

 $ gconftool-2 -t string --set /system/gstreamer/0.10/default/musicaudiosink pulsesink

OpenAL

OpenAl debería utilizar PulseAudio por defecto, pero puede ser explícitamente configurado editando
/etc/openal/alsoft.conf
drivers=pulse,alsa

libao

Editar el fichero de configuración de libao:

/etc/libao.conf
default_driver=pulse

PortAudio

El actual binario de PortAudio que se encuentra en el repositorio de community no soporta PulseAudio y no mapea dispositivos de audio. Puede solucionarlo compilando PortAudio desde ABS y aplicando este parche a los fuentes.

ESD

PulseAudio es un reemplazo para el demonio enlightened sound (ESD). Si PulseAudio está en ejecución, los clientes ESD deberían tener disponible la salida sin modificar su configuración.

Entornos de escritorio

General X11

Se puede iniciar PulseAudio después de ejecutar X usando:

$ start-pulseaudio-x11

Esto iniciará PulseAudio y cargará los modulos X11.

Si usamos GNOME o KDE, PulseAudio será lanzado automáticamente en el login.

X11 bell

Para hacer que PulseAudio reproduzca un sonido cuando se produce un evento de campana de sistema en X11 (ejemplo: hacer que el terminal haga 'Ping!' en vez del 'Beep!'), añadimos al final de /etc/pulse/default.pa:

# Prevent pulseaudio --start from failing when following commands fail (eg. when X is not active)
.nofail
load-sample-lazy x11-bell /usr/share/sounds/freedesktop/stereo/dialog-error.oga
load-module module-x11-bell sample=x11-bell 
.fail

Puedes usar cualquier otro sonido. dialog-error.oga está en el paquete sound-theme-freedesktop.

GNOME

La integración adecuada de PulseAudio con GNOME requiere algunos paquetes especiales:

  • libcanberra-pulse
  • gnome-media-pulse
  • gnome-settings-daemon-pulse

Son parte del grupo pulseaudio-gnome.

KDE 3

Note que Pulseaudio NO es un reemplazo para aRts. Si usas KDE 3, no es posible usar PulseAudio.

KDE 4 y Qt 4

En principio, al iniciar la sesión, debería ser lanzado por defecto. Para más información, visitar la wiki de PulseAudio en las páginas KDE

Adicionalmete, una alternativa en KDE a pavucontrol, es veromix plasmoid disponible en el AUR.

Aplicaciones

Audacious

Audacious soporta PulseAudio de forma nativa. Para utilizarlo, debemos ir en Audacious a Preferencias->Audio->Salida->plugin para "PulseAudio".

mpd

You will need to configure mpd to use PulseAudio.

On a headless box, run PulseAudio as the mpd user. On a desktop, running mpd as yourself and not using the mpd user is preferred.

MPlayer

MPlayer soporta la salida PulseAudio de forma nativa, con la opción "-ao pulse". También puede configurar la salida PulseAudio por defecto en ~/.mplayer/config por usuario, o en /etc/mplayer/mplayer.conf para todo el sistema:

/etc/mplayer/mplayer.conf
ao=pulse

Flashplugin (solo x86_64)

Si está usando flashplugin desde el repositorio multilib, necesitará instalar lib32-alsa-plugins y lib32-libcanberra-pulse para poder usar el mezclador de sonido, en otro caso, no podrá tener sonido simultáneo en una aplicación y flashplugin.

# pacman -S lib32-alsa-plugins lib32-libcanberra-pulse

Skype (x86_64 only)

Tiene que instalar lib32-libpulse desde multilib, sino obtendrá el error "Problema con la reproducción de audio" cuando inicie una llamada.

Control de Volumen

Adapte la variable 'device' a su sink-device listado en
pactl list

Puede cambiar el volumen usando este macro.

#!/bin/bash
device="alsa_output.pci-0000_00_14.2.analog-stereo"
case "$1" in
	"up")    # incrementar volumen en 1000
		pacmd dump | awk --non-decimal-data '$1~/set-sink-volume/{if ($2~/'${device}'/) {if ($3+1000 > 65535) {system ("pactl "$1" '${device}' "65535)} else {system ("pactl "$1" '${device}' "$3+1000)}}}'
		;;
	"down")  # decrementar volumen en 1000
		pacmd dump | awk --non-decimal-data '$1~/set-sink-volume/{if ($2~/'${device}'/) {if ($3-1000 < 0) {system ("pactl "$1" '${device}' "0)} else {system ("pactl "$1" '${device}' "$3-1000)}}}'
		;;
	"mute")  # encender mute
		pacmd dump|awk --non-decimal-data '$1~/set-sink-mute/{if ($2~/'${device}'/) {system ("pactl "$1" '${device}' "($3=="yes"?"no":"yes"))}}'
		;;
esac

Configuraciones alternativas

Systemas de sonido envolvente

Muchas personas poseen una placa compatible con sonido envolvente, pero tienen altavoces para solo dos canales, entonces PulseAudio no puede usar una configuración envolvente por defecto. Para habilitar todos los canales, edite /etc/pulse/daemon.conf: descomentando la linea default-sample-channels (i.e. remueva el punto y coma del principio de la linea) y configure el valor a 6 si tiene un sistema 5.1, o 8 si tiene un sistema 7.1 etc.

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

Luego de realizar la edición, sera necesario reiniciar el servidor de PulseAudio

Configuracion avanzada de ALSA

Para que ALSA pueda usar PulseAudio se necesita una configuración especial/etc/asound.conf (system wide settings) (recomendado) o ~/.asoundrc (configuración en una base por usuario):

/etc/asound.conf
pcm.pulse {
    type pulse
}
ctl.pulse {
    type pulse
}
pcm.!default {
    type pulse
}
ctl.!default {
    type pulse
}

Si omite los dos últimos grupos, PulseAudio no se utilizará de forma predeterminada. A continuación, tendrá que cambiar el dispositivo ALSA "pulse " en las aplicaciones que se utilizan para hacer que funcione.

Monitor de fuentes ALSA

To be able to record from a monitor source (a.k.a. "What-U-Hear", "Stereo Mix"), use pactl list to find out the name of the source in Pulseaudio (e.g. alsa_output.pci-0000_00_1b.0.analog-stereo.monitor). Then add lines like the following to /etc/asound.conf or ~/.asoundrc:

pcm.pulse_monitor {
  type pulse
  device alsa_output.pci-0000_00_1b.0.analog-stereo.monitor
}

ctl.pulse_monitor {
  type pulse
  device alsa_output.pci-0000_00_1b.0.analog-stereo.monitor
}

Now you can select pulse_monitor as a recording source.

Note: You can also simply install the package 'pulseaudio-alsa'

PulseAudio over network

One of PulseAudio's magnificent features is the possibility to stream audio from clients over TCP to the server running the PulseAudio daemon, allowing sound to be streamed through your LAN.

To accomplish this, one needs to enable module-native-protocol-tcp, and copy the pulse-cookie to the clients.

TCP support (networked sound)

Tango-view-refresh-red.pngThis article or section is out of date.Tango-view-refresh-red.png

Reason: please use the first argument of the template to provide a brief explanation. (Discuss in Talk:PulseAudio (Español)#)

To enable the TCP module, add this to (or uncomment, if already there) /etc/pulse/default.pa:

load-module module-native-protocol-tcp

To allow remote connections to the TCP module, you also have to remember to unblock the service in /etc/hosts.allow with the following line:

pulseaudio-native: ALL

Note: If you are having trouble connecting, use (on server)

pacmd>> list-modules

(you can even load modules from here!)

Zeroconf (Avahi) publishing

For the remote Pulseaudio server to appear in the PulseAudio Device Chooser (padevchooser), you will also need to add the avahi-daemon to the DAEMONS in rc.conf on both server and clients.

Switching the PulseAudio server used by local X clients

To switch between servers on the client from within X, the pax11publish command can be used. For example, to switch from the default server to the server at hostname foo:

$ pax11publish -e -S foo

Or to switch back to the default:

$ pax11publish -e -r

Note that for the switch to become apparent, the programs using Pulse must be restarted.

Pulseaudio through JACK

The JACK-Audio-Connection-Kit is popular for audio work, and is widely supported by Linux audio applications. It fills a similar niche as Pulseaudio, but with more of an emphasis on professional audio work. In particular, audio applications such as Ardour and Audacity (recently) work well with Jack.

Pulseaudio provides module-jack-source and module-jack-sink which allow Pulseaudio to be run as a sound server above the JACK daemon. This allows the usage of per-volume adjustments and the like for the apps which need it, play-back apps for movies and audio, while allowing low-latency and inter-app connectivity for sound-processing apps which connect to JACK. However, this will prevent Pulseaudio from directly writing to the sound card buffers, which will increase overall CPU usage.

To just try PA on top of jack you can have PA load the necessary modules on start:

pulseaudio -L module-jack-sink -L module-jack-source

To use pulseaudio with JACK, JACK must be started up before Pulseaudio, using whichever method you prefer. Pulseaudio then needs to be started loading the 2 relevant modules. Edit /etc/pulse/default.pa, and change the following region:

### Load audio drivers statically (it is probably better to not load
### these drivers manually, but instead use module-hal-detect --
### see below -- for doing this automatically)
#load-module module-alsa-sink
#load-module module-alsa-source device=hw:1,0
#load-module module-oss device="/dev/dsp" sink_name=output source_name=input
#load-module module-oss-mmap device="/dev/dsp" sink_name=output source_name=input
#load-module module-null-sink
#load-module module-pipe-sink

### Automatically load driver modules depending on the hardware available
.ifexists module-udev-detect.so
load-module module-udev-detect
.else
### Alternatively use the static hardware detection module (for systems that
### lack udev support)
load-module module-detect
.endif

to the following:

### Load audio drivers statically (it is probably better to not load
### these drivers manually, but instead use module-hal-detect --
### see below -- for doing this automatically)
#load-module module-alsa-sink
#load-module module-alsa-source device=hw:1,0
#load-module module-oss device="/dev/dsp" sink_name=output source_name=input
#load-module module-oss-mmap device="/dev/dsp" sink_name=output source_name=input
#load-module module-null-sink
#load-module module-pipe-sink
load-module module-jack-source
load-module module-jack-sink

### Automatically load driver modules depending on the hardware available
#.ifexists module-udev-detect.so
#load-module module-udev-detect
#.else
### Alternatively use the static hardware detection module (for systems that
### lack udev support)
#load-module module-detect
#.endif

Basically, this prevents module-udev-detect from loading. module-udev-detect will always try to grab your sound-card (JACK has already done that, so this will cause an error). Also, the jack source and sink must be explicitly loaded.

QjackCtl with Startup/Shutdown Scripts

Using the settings listed above you can use QjackCtl to execute a script upon startup and shutdown to load/unload PulseAudio. Part of the reason you may wish to do this is that the above changes disable PulseAudio's automatic hardware detection modules. This particular setup is for using PulseAudio in an exclusive fashion with JACK, though the scripts could be modified to unload and load an alternate non-JACK setup, but killing and starting PulseAudio while programs might be using it would become problematic.

The following example could be used and modified as necessary as a startup script that daemonizes PulseAudio and loads the padevchooser program (optional, needs to be built from AUR) called jack_startup:

#!/bin/bash
#Load PulseAudio and PulseAudio Device Chooser

pulseaudio -D
padevchooser&

as well as a shutdown script to kill PulseAudio and the Pulse Audio Device Chooser, as another example called jack_shutdown also in the home directory:

#!/bin/bash
#Kill PulseAudio and PulseAudio Device Chooser

pulseaudio --kill
killall padevchooser

Both scripts need to be made executable:

chmod +x jack_startup jack_shutdown

then with QjackCtl loaded, click on the Setup button and then the Options tab and tick both "Execute Script after Startup:" And "Execute Script on Shutdown:" and put either use the ... button or type the path to the scripts (assuming the scripts are in the home directory) ~/jack_startup and ~/jack_shutdown making sure to save the changes you have made.

Pulseaudio a través OSS

Agregue lo siguiente a /etc/pulse/default.pa:

 load-module module-oss

Inicie normalmente PulseAudio. Debería tener las entradas y salidas de sus dispositivos OSS.

Pulseaudio from within a chroot (ex. 32-bit chroot in 64-bit install)

Since a chroot sets up an alternative root for the running/jailing of applications, pulseaudio must be installed within the chroot itself (pacman -S pulseaudio within the chroot environment).

Pulseaudio, if not set up to connect to any specific server (this can be done in /etc/pulse/client.conf, through the PULSE_SERVER environment variable, or through publishing to the local X11 properties using module-x11-publish), will attempt to connect to the local pulse server, failing which it will spawn a new pulse server. Each pulse server has a unique ID based on the machine-id value in /var/lib/dbus. To allow for chrooted apps to access the pulse server, the following directories must be mounted within the chroot:-

/var/run
/var/lib/dbus
/tmp
~/.pulse

/dev/shm should also be mounted for efficiency and good performance. Note that mounting /home would normally also allow sharing of the ~/.pulse folder.

For specific direction on accomplishing the appropriate mounts, please refer to the wiki on installing a bundled 32-bit system, especially the additional section specific to Pulseaudio.

Simultaneous Digital and Analog Output

As an example situation: you want to listen to music at your desktop, using the regular 3.5mm analog outputs into your desktop PC speakers. You also want to feed the same music to your hi-fi system in another room via your sound card's digital output. You would think this would be a simple matter, but for many sound chipsets, it requires some editing to get it set up since the default Pulseaudio profiles allow you to use either analog or digital, but not both simultaneously.

The solution is as follows (with thanks for some useful pointers from: http://superuser.com/questions/267442/how-to-get-simultaneous-sound-from-pulseadio-on-two-outputs-analog-and-digital). Amarok is used in this example.

  • Install "pavucontrol" (pacman -S pavucontrol). You won't be needing the other useful pulse configuration utility "paprefs" for this task.
  • In a terminal, launch "pacmd" - a command line utility for loading pulse modules
  • Enter the following commands in pacmd in this order (where your numbers for "hw:0,0" are determined by entering "aplay -l" in terminal. One number is the hardware ID for the analog device, the other for the digital):
 load-module module-alsa-sink device="hw:0,0" sink_name=analog_output
 load-module module-alsa-sink device="hw:0,1" sink_name=digital_output
 load-module module-combine sink_name=analog_digital slaves=digital_output,analog_output
  • Open "pavucontrol" from a terminal
  • Under pavucontrol's "Playback Tab", for the running app Amarok, select "Simultaneous output to Internal Audio, Internal Audio" (you will need to have Amarok playing something to test this)
  • Under the "Configuration Tab" Select "Digital Stereo Duplex (IEC958)" for "Internal Audio" (your exact names may vary here, according to how ALSA has named your hardware). You should now be able to hear Amarok playing on both your analog and digital outputs!

The above solution only holds to long as you have pacmd running, and is specific for the running app (in the above example, Amarok).

To set the the sinks up every reboot and for all audio apps, add the above load-module commands to your /etc/pulse/default.pa file. You may need to add them at the start of the file, just above line "### Automatically restore the volume of streams and devices", or it may not work as expected.

Finally, use the Gnome 3 sound preferences to set your system's default "Output" to "Simultaneous output to Internal Audio, Internal Audio".

Troubleshooting

No hay sonido después de instalar

Contenido Flash

Si después de instalar PulseAudio no tiene sonido desde un contenido flash, puede instalar libflashsupport-pulseAUR[broken link: archived in aur-mirror] desde el AUR.

Sin Tarjetas

Si PulseAudio está iniciado, ejecute pacmd list. Si no devuelve ninguna tarjeta, aseguraté de que los dispositivos de ALSA no están en uso:

$ fuser -v /dev/snd/*
$ fuser -v /dev/dsp

Asegúrese de que ninguna aplicación que use pcm o dst está iniciada antes de inicializar PulseAudio.

KDE4

Puede ser que haya otro dispositivo de salida marcado como preferio en phonon. Asegúrese de que en cada catergoría tiene su dispositivo de salida en la parte superior.

Note: Pulseaudio doesn't work by default with the Gstreamer phonon-backend. It does, however, with the phonon-vlc backend (available in [extra]).

Dispositivo de audio silenciado

Si no hay salida de audio a través de cualquier medio durante el uso de ALSA como dispositivo por defecto, puede que tenga la tarjeta de sonido desactivada. Para activarla, tendrá que lanzar alsamixer y asegurarse de que cada columna, el valor 00, está de color verde. Si no es así, estará apagado el sonido, para activarlo pulse 'm.

$ alsamixer -c 0

Fallo al iniciar el Demonio

Prueba a resetear PulseAudio. Hazlo así:

$ pulseaudio --kill
$ killall pulseaudio
$ killall -9 pulseaudio
$ rm -rf ~/.pulse*
$ rm -rf /tmp/pulse*

Después, inicia PulseAudio.

padevchooser

Si no puede lanzar el PulseAudio Device Chooser, (re)inicie el Daemon Avahi así:

$ /etc/rc.d/avahi-daemon restart

Problemas técnicos y uso intensivo de la CPU desde 0.9.14

El servidor de sonido PulseAudio ha sido reescrito para utilizar la programación de audio basado en temporizadores en lugar del enfoque tradicional por interrupciones. Eso puede provocar problemas con algunos drivers de ALSA. Para desactivarlo, reemplace la línea:

load-module module-udev-detect 

en /etc/pulse/default.pa por:

load-module module-udev-detect tsched=0

Then restart the PulseAudio server.

Sonido entrecortado

El sonido entrecortado en pulseaudio puede venir por una configuración errónea de la frecuencia de muestreo en /etc/pulse/daemon.conf. Pruebe cambiando la línea:

; default-sample-rate = 44100

por

default-sample-rate = 48000

y reinicie el servidor pulseaudio.

Volume adjustment doesn't work properly

You might wan't to check

/usr/share/pulseaudio/alsa-mixer/paths/analog-output.conf.common

If the volume does not appear to increment/decrement properly using alsamixer or amixer, it may be due to pulseaudio having a larger number of increments (65537 to be exact). Try using larger values when changing volume (e.g. amixer set Master 655+).

Volume gets louder every time a new application is started

If you encounter this issue, you can fix it by uncommenting

flat-volumes = no

in

/etc/pulse/daemon.conf

External links