On Fri, Sep 29, 2023 at 1:55 PM BALATON Zoltan <bala...@eik.bme.hu> wrote: > > On Fri, 29 Sep 2023, Paolo Bonzini wrote: > > Now that all callers support setting an audiodev, forbid using the default > > audiodev if any audiodev is defined on the command line. To make the > > detection easier make AUD_register_card() return false on error. > > So this means that now qemu-system-ppc -M pegasos2 -audiodev sdl,id=au > will give an error saying that audiodev must be specified but does not say > it should be set on the machine so users will not know, as oppsed to now > just getting a warning but things still working
The plan is to extend -audio with -M audiodev= support, so you can use "-M pegasos2" for the default backend or "-M pegasos2 -audio sdl" for a specific one. I didn't include it yet because I also want to add support for something like "-audio none", removing the current QEMU_AUDIO_DRV special case that is needed by libqtest. > This is not helpful. Why > is this feature deprecated and what does removing bring that justifies > this? Could we keep the more intuitive current behaviour and drop the > deprecation instead unless removing this is needed for later patches as > the current default handling is more convenient for command line users. There's intuitivity, and there's behavior that is only intuitive if you are used to it. For example, -audiodev is the only backend that does something even if its id is never referenced. In that it's completely different from -blockdev/-chardev and from -object backends. The idea of this patch is that "-audiodev" means "opt out of all magic", but I'll drop it for now and wait until I figure out how to handle "-audio" without a model. Paolo