From b082488e948b2ae6b782309cc0b5205348998600 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Tue, 3 Aug 2021 14:49:57 +0200 Subject: Meta: Prefer to use -machine pcspk-audiodev for QEMU >=5.1 This gets rid of the following warning message from QEMU on startup: qemu-system-i386: warning: '-soundhw pcspk' is deprecated, please set a backend using '-machine pcspk-audiodev=' instead Fixes #4093. --- Meta/run.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Meta/run.sh') diff --git a/Meta/run.sh b/Meta/run.sh index 1af3902e8f..61929cb178 100755 --- a/Meta/run.sh +++ b/Meta/run.sh @@ -82,6 +82,7 @@ fi SERENITY_QEMU_MIN_REQ_VERSION=5 installed_major_version=$("$SERENITY_QEMU_BIN" -version | head -n 1 | sed -E 's/QEMU emulator version ([1-9][0-9]*|0).*/\1/') +installed_minor_version=$("$SERENITY_QEMU_BIN" -version | head -n 1 | sed -E 's/QEMU emulator version [0-9]+\.([1-9][0-9]*|0).*/\1/') if [ "$installed_major_version" -lt "$SERENITY_QEMU_MIN_REQ_VERSION" ]; then echo "Required QEMU >= 5.0! Found $($SERENITY_QEMU_BIN -version | head -n 1)" echo "Please install a newer version of QEMU or use the Toolchain/BuildQemu.sh script." @@ -104,10 +105,10 @@ else SERENITY_AUDIO_BACKEND="-audiodev pa,id=snd0" fi -if [ "$installed_major_version" -gt 5 ]; then - SERENITY_AUDIO_HW="-machine pcspk-audiodev=snd0" -else +if [ "$installed_major_version" -eq 5 ] && [ "$installed_minor_version" -eq 0 ]; then SERENITY_AUDIO_HW="-soundhw pcspk" +else + SERENITY_AUDIO_HW="-machine pcspk-audiodev=snd0" fi SERENITY_SCREENS="${SERENITY_SCREENS:-1}" -- cgit v1.2.3