qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: BALATON Zoltan <balaton@eik.bme.hu>
Cc: qemu-devel <qemu-devel@nongnu.org>,
	"Martin Kletzander" <mkletzan@redhat.com>,
	"Volker Rümelin" <vr_qemu@t-online.de>
Subject: Re: [PATCH 11/13] vt82c686: Support machine-default audiodev with fallback
Date: Sun, 24 Sep 2023 18:06:22 +0200	[thread overview]
Message-ID: <CABgObfZ5X2_nenFUf4zibki+aKTG=KJ_wa1OOOX+hXA3d44fQA@mail.gmail.com> (raw)
In-Reply-To: <8a271e94-9762-81ca-70ad-9a0d4fbfaefa@eik.bme.hu>

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



  reply	other threads:[~2023-09-24 16:07 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-23  8:54 [PATCH 00/13] Cleanup deprecated audio features, take 2 Paolo Bonzini
2023-09-23  8:54 ` [PATCH 01/13] ui/vnc: Require audiodev= to enable audio Paolo Bonzini
2023-09-25  9:05   ` Daniel P. Berrangé
2023-09-23  8:54 ` [PATCH 02/13] audio: Require AudioState in AUD_add_capture Paolo Bonzini
2023-09-23 11:48   ` BALATON Zoltan
2023-09-24  8:53     ` Paolo Bonzini
2023-09-28 11:59     ` BALATON Zoltan
2023-09-28 13:01     ` Markus Armbruster
2023-09-23  8:54 ` [PATCH 03/13] audio: allow returning an error from the driver init Paolo Bonzini
2023-09-23  8:54 ` [PATCH 04/13] audio: return Error ** from audio_state_by_name Paolo Bonzini
2023-09-23  8:54 ` [PATCH 05/13] audio: commonize voice initialization Paolo Bonzini
2023-09-23  8:54 ` [PATCH 06/13] audio: simplify flow in audio_init Paolo Bonzini
2023-09-23  8:55 ` [PATCH 07/13] audio: remove QEMU_AUDIO_* and -audio-help support Paolo Bonzini
2023-09-23  8:55 ` [PATCH 08/13] Introduce machine property "audiodev" Paolo Bonzini
2023-09-23  8:55 ` [PATCH 09/13] hw/arm: Support machine-default audiodev with fallback Paolo Bonzini
2023-09-23  8:55 ` [PATCH 10/13] hw/ppc: " Paolo Bonzini
2023-09-23  8:55 ` [PATCH 11/13] vt82c686: " Paolo Bonzini
2023-09-23 12:23   ` BALATON Zoltan
2023-09-24  8:53     ` Paolo Bonzini
2023-09-24 12:14       ` BALATON Zoltan
2023-09-24 16:06         ` Paolo Bonzini [this message]
2023-09-23  8:55 ` [PATCH 12/13] audio: forbid mixing default audiodev backend and -audiodev Paolo Bonzini
2023-09-23  8:55 ` [PATCH 13/13] audio: forbid default audiodev backend with -nodefaults Paolo Bonzini
  -- strict thread matches above, loose matches on Subject: below --
2023-09-28  7:36 [PATCH v2 00/13] Cleanup deprecated audio features, take 2 Paolo Bonzini
2023-09-28  7:36 ` [PATCH 11/13] vt82c686: Support machine-default audiodev with fallback Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CABgObfZ5X2_nenFUf4zibki+aKTG=KJ_wa1OOOX+hXA3d44fQA@mail.gmail.com' \
    --to=pbonzini@redhat.com \
    --cc=balaton@eik.bme.hu \
    --cc=mkletzan@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=vr_qemu@t-online.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).