View and Set an Audio Output Interface
List the audio outputs on your Pi, pick the default one and set its volume.
This guide covers viewing all audio output interfaces on a device, setting one as the default and setting its volume.
This applies only to players running the PulseAudio sound server, not PipeWire. To check on a Raspberry Pi, run
alsamixerand look at the top-left corner. The Card and Chip details should mention PulseAudio. Press Esc to exit alsamixer.
alsamixer
See also Setting the audio volume and Audio output on 3.5mm port.
View all audio output interfaces in detail
This shows details for every audio interface on the device, including state, volume and channel data.
pacmd list-sinks
View only the index and description
This lists the Index of each interface. You need the index to change the volume or set the default interface. An asterisk next to an index marks the interface currently in use.
pacmd list-sinks | grep -e 'index:' -e 'device.description'
Set the default audio output interface
Replace <interface-index> with the index of the interface you want.
pacmd set-default-sink <interface-index>
For example, for index 7:
pacmd set-default-sink 7
Set the volume of the current audio output interface
Replace <interface-index> with the index and <volume-percentage> with the level you want.
pactl set-sink-volume <interface-index> <volume-percentage>
For example, to set index 6 to 100%:
pactl set-sink-volume 6 100%
Fix a suspended audio device
A sink can become suspended after being idle for a long time, or when it is suspended manually. In the pacmd list-sinks output the state shows as SUSPENDED.
- Get the device name of the current active index. For example, index 0 has the device name
alsa_output.platform-107c701400.hdmi.hdmi-stereo. If a different device needs unsuspending, set it as the default first using the steps above. - Run the suspend-sink command with the device name and
0. The0unsets the suspend-sink flag.pacmd suspend-sink <audio-output-device-name> 0 pacmd suspend-sink alsa_output.platform-107c701400.hdmi.hdmi-stereo 0 - Reboot the Raspberry Pi.
sudo reboot
If the device keeps suspending after being idle
- Change to the
/etc/pulsedirectory.cd /etc/pulse - Open
default.pawith sudo.sudo nano default.pa - Find the
load-module module-suspend-on-idleline under this comment:### Automatically suspend sinks/sources that become idle for too long load-module module-suspend-on-idle - Comment the line out with
#:
Or let this command do it for you:### Automatically suspend sinks/sources that become idle for too long #load-module module-suspend-on-idlesudo sed -i 's/^load-module module-suspend-on-idle/#load-module module-suspend-on-idle/' /etc/pulse/default.pa - Save the file and reboot.
sudo reboot