whexy1999
Use PulseAudio to handle the sound system
🎵

Use PulseAudio to handle the sound system

Created
Dec 14, 2022 09:37 PM
Last edited time
May 22, 2023 09:24 PM
Tags
PulseAudio is a powerful sound system that manages all the sound devices in your system.

Audio Layout

I have three speakers. Speaker A is directly connected to the motherboard audio card. Speaker B is connected to a monitor and then to the GPU through DisplayPort. In addition, I have a monitor that has an embedded speaker.
I want to use Speaker B as my default speaker to play music.

PulseAudio configuration

Normally, you can use a graphic interface of PulseAudio. There’re many of them in AUR. But today, I only want to solve the problem with its command line interface.
First, check all the interfaces you have in your system discovered by PulseAudio.
So I got my card name <alsa_card.pci-0000_07_00.1>. I also got the profile using Speaker B (connected to the HDMI 2 interface) named output:hdmi-stereo-extra1.
Now, if I want to switch to Speaker B, I can use the following command:
If I want to make the config permanent, I can edit the file /etc/pulse/default.pa, and add to the bottom.