How can I tell if I'm using alsa or pulse-audio by default? (Switching to i3-wm)
Solution 1:
Ubuntu uses both ALSA, and Pulseaudio for controlling sound input and output.
ALSA
ALSA serves as a kernel based system to connect your sound hardware to the operating system. All sound cards in your system will controlled using drivers and card specific settings. Most of this is done under the hood with no need for users to interfere.
In addition ALSA offers libraries and tools to control our sound system. The tool most of us may have come across may be the alsamixer
, a semi-graphical terminal application to control sound volume, and mute state of all cards and profiles in our system.
We can give out sound to our sound card simply by using ALSA without the need of PulseAudio or any other sound server.
Pulse Audio
On top of the ALSA base the PulseAudio sound server provides further tools to better control our sound system. This is done with modules to define volume levels, audio card profiles, output sinks, or input sources, and more for easy access from most Ubuntu applications.
Like ALSA, PulseAudio is also designed to run with as few user interactions as possible. Whenever we need to change volume, balance, or input/output devices it is a PulseAudio module or application we or our application call.
A professional alternative to PulseAudio is the JACK audio server with more options to interact with our sound hardware and a better low latency support. Only few music production applications expect to have JACK running, which can be done in parallel to PulseAudio.
Application/Desktop integration
The Ubuntu sound system can further be controlled from applications that run from the Unity/GNOME desktop, such as a volume control applet.
Where any given application makes use of sound control will be up to the application developers. Some applications will only use ALSA, some need PulseAudio, some need JACK.
Therefore whenever we install another desktop manager on top of Ubuntu we may lose the desktop specific applications to control sound but still, ALSA and PulseAudio will run in the background for sound control.
We may have to install additional packages like e.g. pavucontrol, the pulseaudio GTK-based volume control application.
Is any of ALSA or PulseAudio running?
Both ALSA and PulseAudio come with command line applications to print out the state of our sound system.
-
PulseAudio:
pactl list
-
ALSA:
aplay -l
Both will give an error if the sound system is not running. ALSA will be loaded with the kernel, PulseAudio will be started later. If this was not the case we can start PulseAudio manually from the terminal with:
pulseaudio [options] ## option -D starts the daemon
In case we have audio issues I recommend reading the post written by David Henningsson on things we should not do before we go further to debug our audio issue.