Skip to content

Instantly share code, notes, and snippets.

@peteristhegreat
Last active January 10, 2025 22:30
Show Gist options
  • Save peteristhegreat/e60e6dbe4ef2940958a4f17a7c63d59d to your computer and use it in GitHub Desktop.
Save peteristhegreat/e60e6dbe4ef2940958a4f17a7c63d59d to your computer and use it in GitHub Desktop.
Raspberry Pi Audio configuration

PulseAudio, the new hotness

Though if you are now running a fully updated Raspberry Pi Operating System, though ALSA is the base kernel audio, these days PulseAudio Sound Server which sits atop ALSA is used for controlling all Audio I/O:

https://www.raspberrypi.org/blog/new-ra ... mber-2020/

PulseAudio has a Configuration Mixer which gives more control:

sudo apt-get install pulseaudio pavucontrol pulseaudio-utils
pacmd list-sinks
# pacmd set-default-sink <name_of_hdmi_sink>
pacmd set-default-sink 0

Consider commenting out lines in /boot/config.txt that mention hdmi and force

Consider adding a config to retroarch.cfg to force it to prefer pulse-audio and the named device or index you picked.

echo 'audio_driver = "pulse"
audio_device = "0"' >> ~/.config/retroarch/retroarch.cfg

OLD DIRECTIONS

alsamixer

This is a great way to see which audio elements there are and which are connnected.

amixer

This gives a scripting way to force or use a particular audio device.

https://www.raspberrypi.org/documentation/configuration/audio-config.md

Kodi > Settings > Audio Settings

Changing the source here makes a big difference

rasp-config

sudo rasp-config
# Advanced Settings > Audio > Source
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment