[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.
no way to compare when less than two revisions
Diferencias
Muestra las diferencias entre dos versiones de la página.
— | es:howtos:multimedia:pulseaudio_non-default [2019/02/28 02:04 (UTC)] (actual) – creado slackwarespanol | ||
---|---|---|---|
Línea 1: | Línea 1: | ||
+ | < | ||
+ | ====== PulseAudio Rationale ====== | ||
+ | With the release of the first beta of what will be version 14.2, PulseAudio has been introduced as default audio server in Slackware Linux. | ||
+ | |||
+ | This historical change comes out mostly from necessity, as the bluetooth stack [[wp> | ||
+ | |||
+ | From Slackware' | ||
+ | < | ||
+ | but then it was pointed out that Bluetooth audio was no longer working. | ||
+ | The reason was that the newer BlueZ branch had dropped ALSA support and now | ||
+ | required PulseAudio. So with some trepidation, | ||
+ | PulseAudio to Slackware. Going back to BlueZ 4 wasn't an option with various | ||
+ | dependent projects either having dropped support for it, or considering doing | ||
+ | so. After several iterations here refining the foundation packages and | ||
+ | recompiling and tweaking other packages to use PulseAudio, it's working well | ||
+ | and you'll likely not notice much of a change. But if you're using Bluetooth | ||
+ | audio, or needing to direct audio through HDMI, you'll probably find it a lot | ||
+ | easier to accomplish that. | ||
+ | Best of all, we're finally a modern, relevant Linux distro! ; | ||
+ | |||
+ | Before this moment, there was no technical need for introducing PulseAudio as a basic component of the distribution, | ||
+ | |||
+ | ====== Removing PulseAudio Completely ====== | ||
+ | |||
+ | It should be noted that, as PulseAudio is now a basic system component, with many applications directly linked to it, the following procedure for removing PulseAudio is unsupported. It did work for me, though. | ||
+ | |||
+ | In order to remove PulseAudio from your system completely, follow these steps: | ||
+ | |||
+ | < | ||
+ | su | ||
+ | mv / | ||
+ | removepkg pulseaudio | ||
+ | </ | ||
+ | |||
+ | However, after you do this, you will find many applications (mplayer etc) no longer work, because they are linked to libpulse.so.0. | ||
+ | |||
+ | < | ||
+ | git clone https:// | ||
+ | cd apulse | ||
+ | mkdir build | ||
+ | cd build | ||
+ | cmake -DCMAKE_INSTALL_PREFIX=/ | ||
+ | make | ||
+ | su | ||
+ | mv libpulse* /usr/lib64 #or /usr/lib if you are on a 32-bit machine | ||
+ | </ | ||
+ | |||
+ | Now your pulseaudio-linked programs will find a fake libpulse.so.0 that nevertheless provides all the symbols they expect and everything that can use ALSA will use ALSA just like it used to. Additionally, | ||
+ | |||
+ | ====== | ||
+ | |||
+ | PulseAudio has become the default audio manager in the distribution, | ||
+ | |||
+ | For this reason, multiple software packages have already been recompiled to enable dependency on PulseAudio, and others will probably follow before the release cycle of 14.2 is complete. This equates Slackware to all other Linux distributions that had previously adopted PulseAudio. | ||
+ | |||
+ | The goal of this guide is giving instructions on how to configure PulseAudio in Slackware-current and upcoming 14.2 as an additional audio system while keeping direct access to ALSA devices as the default. | ||
+ | |||
+ | It is possible to configure PulseAudio as a [[https:// | ||
+ | |||
+ | I will also try to keep track of the changes in compilation parameters of various packages that must be reverted in order to have them use ALSA as their default output. | ||
+ | |||
+ | The final result should be having ''/ | ||
+ | ====== Basic Pulseaudio configuration ====== | ||
+ | Steps to revert ALSA configuration to playing directly to audio hardware instead of using Pulseaudio are: | ||
+ | |||
+ | * Remove ''/ | ||
+ | < | ||
+ | * Remove **'' | ||
+ | This provides a plugin to redirect ALSA output to PulseAudio.</ | ||
+ | * Edit ''/ | ||
+ | load-module module-alsa-source device=dsnoop | ||
+ | # load-module module-udev-detect | ||
+ | # load-module module-detect</ | ||
+ | * Edit ''/ | ||
+ | * Add configuration for having Pulseaudio daemon immediately exit as soon as the audio source triggering it has ended:\\ < | ||
+ | * Optional: add configuration for keeping Pulseaudio from altering volume levels that ALSA is handling\\ < | ||
+ | ====== Changes related to X11 ====== | ||
+ | The **'' | ||
+ | This file contains configuration responsible for registering Pulseaudio with the current X11 session and making it available to all programs running in X11 environment. | ||
+ | |||
+ | An XSMP connection between Pulseaudio daemon and the X11 session will be created, and this will make the daemon stay started during all the session, even if no Pulseaudio clients are actually in use. | ||
+ | < | ||
+ | |||
+ | Client #0 | ||
+ | Driver: module-x11-xsmp.c | ||
+ | Owner Module: 4 | ||
+ | Properties: | ||
+ | application.name = "XSMP Session on KDE as 10d7cad6d0000145322327400000022300109" | ||
+ | xsmp.vendor = " | ||
+ | xsmp.client.id = " | ||
+ | |||
+ | But without this connection no audio software running in the graphical session will be able to connect to Pulseaudio daemon even if it correctly starts on demand. | ||
+ | |||
+ | If you are fine with having ''/ | ||
+ | |||
+ | If you want it to start and stay running only for the time it's actually needed and exit right after closing any related client then you can take this solution into consideration: | ||
+ | |||
+ | remove or rename the file ''/ | ||
+ | |||
+ | Create a script ''/ | ||
+ | <code bash># | ||
+ | if [ " | ||
+ | then | ||
+ | / | ||
+ | fi</ | ||
+ | |||
+ | Install the following line in user's personal crontab:\\ < | ||
+ | # Unregister Pulseaudio XSMP module | ||
+ | */10 * * * * / | ||
+ | |||
+ | This command running every 10 minutes will unregister any Pulseaudio daemon currently running from the XSMP session. When Pulseaudio daemon starts it will initially register itself and the client triggering it will be able to connect. Then within the following 10 minutes the registration will be removed, but currently established client connections will stay active until when necessary. When clients will exit, the daemon will exit as well because no kind of session is still alive. | ||
+ | < | ||
+ | ====== Changes related to Desktop Environments ====== | ||
+ | ===== KDE 4===== | ||
+ | As of the current date (January 2016), Slackware-current and upcoming release 14.2 include KDE 4.14.3. This version is known as being the last official release of KDE 4. No further releases are planned, and no further packages should arrive in the distribution, | ||
+ | |||
+ | With the arrival of Pulseaudio, some packages related to KDE have been recompiled to enable PA support by linking them to its libraries. | ||
+ | |||
+ | Notably these packages are: | ||
+ | * **'' | ||
+ | * **'' | ||
+ | * **'' | ||
+ | |||
+ | This means that as soon as the user logs into a KDE session the ''/ | ||
+ | |||
+ | ==== Phonon ==== | ||
+ | It handles all audio streams coming from KDE programs (including Amarok, for example). Now it is linked to Pulseaudio libraries and sends all them through it. Reverting it to the previous condition will make all KDE multimedia applications go through ALSA again, without any individual change. | ||
+ | |||
+ | There is no runtime option for making it use ALSA output when it's compiled for Pulseaudio, so you will need to recompile it with explicit exclusion of Pulseaudio support, and then replace the official Slackware package with your own. | ||
+ | |||
+ | You will need this addition to CMake configuration parameters: | ||
+ | <code cmake> | ||
+ | [...] | ||
+ | -DWITH_PulseAudio=FALSE \ | ||
+ | -DPHONON_PULSESUPPORT=OFF \ | ||
+ | [...]</ | ||
+ | |||
+ | You can replace the PA-dependant package with this other one with the command:\\ < | ||
+ | ==== KMix ==== | ||
+ | The audio mixer has been recompiled for controlling volume levels provided by Pulseaudio devices, but in this case it is possible to configure it at runtime for hooking to ALSA devices like it did in the past. | ||
+ | |||
+ | The required configuration is: | ||
+ | <code bash>$ echo export KMIX_PULSEAUDIO_DISABLE=1 > ~/ | ||
+ | $ chmod +x ~/ | ||
+ | The executable script '' | ||
+ | |||
+ | ===== KDE 5===== | ||
+ | KDE 5.x is currently not officially part of Slackware Linux. It is unofficially provided and mantained by [[http:// | ||
+ | |||
+ | For the goals of this guide, the required steps for having it use ALSA as standard output device are the same as for [[pulseaudio# | ||
+ | |||
+ | Please notice that environment startup scripts that in KDE4 were previously placed in '' | ||
+ | <code bash>$ echo export KMIX_PULSEAUDIO_DISABLE=1 > ~/ | ||
+ | $ chmod +x ~/ | ||
+ | <note important> | ||
+ | |||
+ | ===== Configuration of specific applications ===== | ||
+ | |||
+ | Some of the multimedia software present in Slackware can be configured for using ALSA output or PulseAudio output at run-time, but there is software where the output selection is hardcoded and it can be changed only by means of a recompilation. | ||
+ | |||
+ | All the software that is using KDE's phonon for their output (eg: Amarok) will not require any further changes besides those listed above. | ||
+ | |||
+ | Here is an evolving list of common software and required actions: | ||
+ | |||
+ | ==== mpg123 ==== | ||
+ | |||
+ | This software has been compiled for using Pulseaudio as default output but you can change this by simply adding an option on command-line: | ||
+ | |||
+ | === Clementine === | ||
+ | |||
+ | Clementine audio player requires being compiled with the following cmake options: | ||
+ | <code cmake> | ||
+ | [...] | ||
+ | -DENABLE_LIBPULSE=NO | ||
+ | [...]</ | ||
+ | |||
+ | === Audacious === | ||
+ | |||
+ | Also Audacious can be configured to use ALSA even if it's been compiled with PA support. | ||
+ | |||
+ | In Settings-> | ||
+ | |||
+ | ====== Sources ====== | ||
+ | <!-- If you are copying information from another source, then specify that source --> | ||
+ | <!-- * Original source: [[http:// | ||
+ | <!-- Authors are allowed to give credit to themselves! --> | ||
+ | <!-- * Originally written by [[wiki: | ||
+ | <!-- * Contributions by [[wiki: | ||
+ | * Originally written by [[wiki: | ||
+ | |||
+ | <!-- Please do not modify anything below, except adding new tags.--> | ||
+ | <!-- You must remove the tag-word " | ||
+ | {{tag> |