fix: Check for PipeWire as well as PulseAudio before falling back to ALSA (#1565)

* fix: Check for PipeWire as well as PulseAudio before falling back to ALSA

* fix: Use PipeWire backend if available, and where QEMU version is >8.1

Co-authored-by: Liam <33645555+lj3954@users.noreply.github.com>

---------

Co-authored-by: Liam <33645555+lj3954@users.noreply.github.com>
This commit is contained in:
Alex Haydock 2025-01-20 19:59:00 +00:00 committed by GitHub
parent 20b17cb129
commit 0c772d5619
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 1 deletions

View File

@ -882,7 +882,12 @@ function configure_storage() {
function configure_display() { function configure_display() {
# Determine which audio driver use between Pulseaudio or ALSA # Determine which audio driver use between Pulseaudio or ALSA
local AUDIO_DRIVER="pa" local AUDIO_DRIVER="pa"
if ! command -v pacmd >/dev/null 2>&1 ; then if pidof pipewire >/dev/null 2>&1; then
# QEMU's pipewire audio backend was added in version 8.1
if [ "${QEMU_VER_SHORT}" -ge 81 ]; then
AUDIO_DRIVER="pipewire"
fi
elif ! pidof pulseaudio >/dev/null 2>&1; then
AUDIO_DRIVER="alsa" AUDIO_DRIVER="alsa"
fi fi