aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Kletzander <mkletzan@redhat.com>2022-04-25 10:21:55 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2023-10-03 10:29:40 +0200
commit2b16397264a8ea4b5274023b22b09a69e92cb8e9 (patch)
tree268b1525fd10e3810446058c7f3aed9236bfee91
parentb8ab0303de5a72d89da5ab25d8fe817d8797888f (diff)
downloadqemu-2b16397264a8ea4b5274023b22b09a69e92cb8e9.zip
qemu-2b16397264a8ea4b5274023b22b09a69e92cb8e9.tar.gz
qemu-2b16397264a8ea4b5274023b22b09a69e92cb8e9.tar.bz2
hw/ppc: Support machine-default audiodev with fallback
Signed-off-by: Martin Kletzander <mkletzan@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r--hw/ppc/prep.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c
index f6fd35f..137276b 100644
--- a/hw/ppc/prep.c
+++ b/hw/ppc/prep.c
@@ -45,6 +45,7 @@
#include "trace.h"
#include "elf.h"
#include "qemu/units.h"
+#include "audio/audio.h"
/* SMP is not enabled, for now */
#define MAX_CPUS 1
@@ -310,6 +311,10 @@ static void ibm_40p_init(MachineState *machine)
dev = DEVICE(isa_dev);
qdev_prop_set_uint32(dev, "iobase", 0x830);
qdev_prop_set_uint32(dev, "irq", 10);
+
+ if (machine->audiodev) {
+ qdev_prop_set_string(dev, "audiodev", machine->audiodev);
+ }
isa_realize_and_unref(isa_dev, isa_bus, &error_fatal);
isa_dev = isa_new("pc87312");
@@ -426,6 +431,8 @@ static void ibm_40p_machine_init(MachineClass *mc)
mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("604");
mc->default_display = "std";
mc->default_nic = "pcnet";
+
+ machine_add_audiodev_property(mc);
}
DEFINE_MACHINE("40p", ibm_40p_machine_init)