As it stands, Serenity only has the one soundcard driver and thats for the Soundblaster 16. Unfortunately its for the SB16 ISA, not PCI, because that is what qemu emulates. This isn't much use for us hardcore few wanting to run Serenity on bare metal because many desktop PCs of the Pentium 3/4 era (which are the majority of machines capable of running Serenity) had already ditched ISA slots.
Thankfully, both qemu-system-i386 and qemu-system-x86_64 support emulating the Esonique AudioPCI / es1370 PCI sound card, which is more accessible as a physical device simply by virtue of it being a PCI card. After the AudioPCI was released, Ensoniq was acquired by Creative Labs, which re-labeled the AudioPCI as the SoundBlaster PCI 64, and later the SoundBlaster PCI 128.
I was unable to get qemu's es1370 driver working under Ubuntu 20.04 or FreeBSD 12 VMs when running under virt-manager but I have got it working under a NetBSD 9.1 i386 qemu VM (running on a Ubuntu host) so we have a known-working-with-qemu, BSD licensed driver available as reference.
http://ftp.jp.freebsd.org/pub/NetBSD/misc/joerg/GENERIC/src/src/sys/dev/pci/eap.c.html
ftp://ftp.alsa-project.org/pub/manuals/ensoniq/ (ES1370 and 1371 datasheets)
https://wiki.osdev.org/Ensoniq_AudioPCI
$ qemu-img create netbsd-disk.img 20G
$ qemu-system-i386 -enable-kvm -m 2048M -drive file=netbsd-disk.img,if=virtio -cdrom \
./Downloads/NetBSD-9.1-i386.iso -display curses -boot d \
-nic user,model=virtio-net-pci
# Install NetBSD then quit the installer and `poweroff`
$ qemu-system-i386 -enable-kvm -m 2048M -drive file=netbsd-disk.img,if=virtio -display curses -boot d -net nic -net user -soundhw es1370
# After booting into NetBSD:
$/etc/rc.d/dhcpcd onestart
$ ftp https://freewavesamples.com/files/Ensoniq-ZR-76-03-Dope-85.wav
$ audioplay Ensoniq-ZR-76-03-Dope-85.wav
I failed to get NetBSD 9.1 and 9.0 to boot under virt-manager but they boot fine under qemu with the above commands.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too