diff options
author | Gunnar Beutner <gbeutner@serenityos.org> | 2021-07-31 16:28:07 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-08-02 00:35:22 +0200 |
commit | c73c40a21d00880b68807d59238a93dc12a95221 (patch) | |
tree | f3e5c526ba24fe1b0a2554b5e6b020109b772e7b | |
parent | f599f2be3d338af09aff7c64008fd8c93eac78dd (diff) | |
download | serenity-c73c40a21d00880b68807d59238a93dc12a95221.zip |
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.
-rwxr-xr-x | Meta/run.sh | 11 |
1 files changed, 9 insertions, 2 deletions
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 " |