[2020/12]
Linux sound/audio drivers is a mess.
Avoid PulseAudio for privacy.
PulseAudio is server/daemon that can send audio out to the Internet.
Even lobotomized Redmond drones aren't this stupid.
ALSA will function by default, in most cases. Design of ALSA drivers is convoluted (or complex because audio hardware varies widely), registering dozens of virtual devices, configuration is arcane.
[2020/12]
This configuration file is /etc/asound.conf
,
though at first, can experiment as ~/.asoundrc
.
Run aplay --list-pcms
to find virtual mixer device, edit line with dmix:
.
On some systems, softvol
is necessary for audio thru HDMI (for whatever reason).
pcm.!default { type plug slave.pcm "softvol" } pcm.softvol { type softvol slave { pcm "dmix:CARD=PCH,DEV=0" } control { name "SoftVolume" card 0 } }
[2020/12]
ALSA will save/restore audio state across bootings. Becomes annoying if audio programs misconfigure audio state. To prevent ALSA saving/restoring audio state:
First archive, then delete: /var/lib/alsa/asound.state*
Then lock this directory: chattr +i /var/lib/alsa/