From c73c40a21d00880b68807d59238a93dc12a95221 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Sat, 31 Jul 2021 16:28:07 +0200 Subject: Meta: Fix compatibility with QEMU 5.x QEMU 5 doesn't support -machine pcspk-audiodev so we need to fall back to using -soundhw for that. --- Meta/run.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'Meta/run.sh') diff --git a/Meta/run.sh b/Meta/run.sh index edcfe1a1b7..928cf0a55f 100755 --- a/Meta/run.sh +++ b/Meta/run.sh @@ -104,6 +104,12 @@ else SERENITY_AUDIO_BACKEND="-audiodev pa,id=snd0" fi +if [ "$installed_major_version" -gt 5 ]; then + SERENITY_AUDIO_HW="-machine pcspk-audiodev=snd0" +else + SERENITY_AUDIO_HW="-soundhw pcspk" +fi + SERENITY_SCREENS="${SERENITY_SCREENS:-1}" if [ "$SERENITY_SPICE" ]; then SERENITY_QEMU_DISPLAY_BACKEND="${SERENITY_QEMU_DISPLAY_BACKEND:-spice-app}" @@ -157,7 +163,7 @@ $SERENITY_SPICE_SERVER_CHARDEV -device isa-debugcon,chardev=stdout -device virtio-rng-pci $SERENITY_AUDIO_BACKEND --machine pcspk-audiodev=snd0 +$SERENITY_AUDIO_HW -device sb16,audiodev=snd0 -device pci-bridge,chassis_nr=1,id=bridge1 -device $SERENITY_ETHERNET_DEVICE_TYPE,bus=bridge1 -device i82801b11-bridge,bus=bridge1,id=bridge2 -device sdhci-pci,bus=bridge2 @@ -199,7 +205,8 @@ $SERENITY_EXTRA_QEMU_ARGS -device virtconsole,chardev=stdout -device isa-debugcon,chardev=stdout -device virtio-rng-pci --soundhw pcspk +$SERENITY_AUDIO_BACKEND +$SERENITY_AUDIO_HW -device sb16 " -- cgit v1.2.3