[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 11/13] vt82c686: Support machine-default audiodev with fallba
From: |
Paolo Bonzini |
Subject: |
Re: [PATCH 11/13] vt82c686: Support machine-default audiodev with fallback |
Date: |
Sun, 24 Sep 2023 18:06:22 +0200 |
On Sun, Sep 24, 2023 at 2:14 PM BALATON Zoltan <balaton@eik.bme.hu> wrote:
> > If you still want a machine audiodev propery then could the device handle
> >> it without needing changes to the machine? Like in via_isa_realize() add
> >>
> >> if (current_machine->audiodev) {
> >> qdev_prop_set_string(DEVICE(pci_dev), "audiodev", machine->audiodev);
> >> }
> >>
> >> before qdev_realize(DEVICE(&s->ac97) then no need to change the device
> >> creation in board code.
> >>
> >
> > No, current_machine should not be used at all outside board code.
>
> OK, can you start from pci_bus and walk up the QOM tree then to find the
> machine in vt92686.c so the board code does not have to care about this?
The machine itself should not be used outside board code, neither via
current_machine nor by any other means. There are so few places where
it happens (most of them in fw_cfg) that I'm not really willing to
compromise on this. The board sets properties on the devices, it's not
the devices that fetch settings from outside.
Paolo
- [PATCH 04/13] audio: return Error ** from audio_state_by_name, (continued)
- [PATCH 04/13] audio: return Error ** from audio_state_by_name, Paolo Bonzini, 2023/09/23
- [PATCH 05/13] audio: commonize voice initialization, Paolo Bonzini, 2023/09/23
- [PATCH 06/13] audio: simplify flow in audio_init, Paolo Bonzini, 2023/09/23
- [PATCH 08/13] Introduce machine property "audiodev", Paolo Bonzini, 2023/09/23
- [PATCH 10/13] hw/ppc: Support machine-default audiodev with fallback, Paolo Bonzini, 2023/09/23
- [PATCH 09/13] hw/arm: Support machine-default audiodev with fallback, Paolo Bonzini, 2023/09/23
- [PATCH 11/13] vt82c686: Support machine-default audiodev with fallback, Paolo Bonzini, 2023/09/23
[PATCH 07/13] audio: remove QEMU_AUDIO_* and -audio-help support, Paolo Bonzini, 2023/09/23
[PATCH 13/13] audio: forbid default audiodev backend with -nodefaults, Paolo Bonzini, 2023/09/23
[PATCH 12/13] audio: forbid mixing default audiodev backend and -audiodev, Paolo Bonzini, 2023/09/23