Skip to content

qemu: Make QEMU audio backend configurable

Minecrell requested to merge Minecrell/pmbootstrap:qemu-audio-backend into master

At the moment we assume that everyone running QEMU is either using ALSA, or has the ALSA PulseAudio plugin configured on the host system. (Since we run QEMU outside of the chroot at the moment, configuration files are read from the host system instead of the chroot...)

Other distributions have much wider support for PulseAudio, so not everyone will actually have the ALSA PulseAudio plugin configured. In that case, it is better to use QEMU's PulseAudio backend since that does not require any configuration. It also lets us drop the alsa-lib fork, since that was only needed for loading the ALSA PulseAudio plugin.

In general, it seems difficult to detect which audio backend the user wants to run (if any). Selecting the wrong one results in ugly warnings when running QEMU. So let's not assume any by default, and add a --audio option instead which accepts one of QEMU's audio backends (alsa, pa or sdl).

Related Alpine MR: https://gitlab.alpinelinux.org/alpine/aports/merge_requests/2998

Cc: @drebrez

Edited by Minecrell

Merge request reports