aboutsummaryrefslogtreecommitdiff
path: root/hw/i386
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2020-07-02 15:25:21 +0200
committerGerd Hoffmann <kraxel@redhat.com>2020-07-06 17:01:11 +0200
commit6b8d1416482feb84f5c1d33a4e2acf7367a8f11f (patch)
tree87681a2aecf03db01dc4f5512e52ebc190a55d77 /hw/i386
parent525d654d7a113e24e5c4efc21e6f2f8c952d21d9 (diff)
downloadqemu-6b8d1416482feb84f5c1d33a4e2acf7367a8f11f.zip
qemu-6b8d1416482feb84f5c1d33a4e2acf7367a8f11f.tar.gz
qemu-6b8d1416482feb84f5c1d33a4e2acf7367a8f11f.tar.bz2
audio: create pcspk device early
Create the pcspk device early, so it exists at machine type initialization time. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20200702132525.6849-17-kraxel@redhat.com
Diffstat (limited to 'hw/i386')
-rw-r--r--hw/i386/pc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 4fc1b70..88785f9 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1219,7 +1219,7 @@ void pc_basic_device_init(struct PCMachineState *pcms,
/* connect PIT to output control line of the HPET */
qdev_connect_gpio_out(hpet, 0, qdev_get_gpio_in(DEVICE(pit), 0));
}
- pcspk_init(isa_new(TYPE_PC_SPEAKER), isa_bus, pit);
+ pcspk_init(pcms->pcspk, isa_bus, pit);
}
i8257_dma_init(isa_bus, 0);
@@ -1891,6 +1891,7 @@ static void pc_machine_initfn(Object *obj)
pcms->pit_enabled = true;
pc_system_flash_create(pcms);
+ pcms->pcspk = isa_new(TYPE_PC_SPEAKER);
}
static void pc_machine_reset(MachineState *machine)