klange / toaruos

A completely-from-scratch hobby operating system: bootloader, kernel, drivers, C library, and userspace including a composited graphical UI, dynamic linker, syntax-highlighting text editor, network stack, etc.
https://toaruos.org/
University of Illinois/NCSA Open Source License
6.03k stars 475 forks source link

SoundHw in Qemu no longer works #278

Closed mxlgv closed 1 year ago

mxlgv commented 1 year ago

Since Qemu 7, the -soundhw option has been removed. Now we need to use the new parameters. Please fix this in the README. Here's where I read it from: https://computernewb.com/wiki/QEMU/Devices/Sound_cards

klange commented 1 year ago

The README specifies its arguments are appropriate for Ubuntu 20.04, there is no issue with the README.

klange commented 1 year ago

Now the makefile convenience targets, on the other hand...

Okay, so, annoying, while you can do -device AC97 and this works without having to specify a backend, I can find no way to enable the PC speaker without one. -device isa-pcspk does not work because only "pluggable device types" can be attached with -device; the option to -M requires an audio dev, and there is no 'default' one that can be referenced by name, so you have to make one, and making one with -audio or -audiodev requires a backend. Ultimately, this will probably just mean having the Makefile pick one based on the host platform - coreaudio for macOS, pa for Linux, but it's still annoying.

It also seems like the QEMU devs intend to remove the idea of a "default" audio backend entirely, so in 9.x or 10.x there may be no option but to take a guess at what audio backend might be available...

This sort of removal of options that make it feasible to use the same command line across multiple environments is quite frustrating.