[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 16/20] audio: create pcspk device early
From: |
Gerd Hoffmann |
Subject: |
[PULL 16/20] audio: create pcspk device early |
Date: |
Mon, 6 Jul 2020 21:29:17 +0200 |
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
---
include/hw/i386/pc.h | 1 +
hw/i386/pc.c | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index d7690bf4290f..a802e699749a 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -33,6 +33,7 @@ struct PCMachineState {
PCIBus *bus;
I2CBus *smbus;
PFlashCFI01 *flash[2];
+ ISADevice *pcspk;
/* Configuration options: */
uint64_t max_ram_below_4g;
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 4fc1b7048b28..88785f9dcc70 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)
--
2.18.4
- [PULL 12/20] pc_basic_device_init: drop has_pit arg, (continued)
- [PULL 12/20] pc_basic_device_init: drop has_pit arg, Gerd Hoffmann, 2020/07/06
- [PULL 19/20] pcspk: update docs/system/target-i386-desc.rst.inc, Gerd Hoffmann, 2020/07/06
- [PULL 17/20] audio: deprecate -soundhw pcspk, Gerd Hoffmann, 2020/07/06
- [PULL 18/20] audio: add soundhw deprecation notice, Gerd Hoffmann, 2020/07/06
- [PULL 06/20] audio: deprecate -soundhw adlib, Gerd Hoffmann, 2020/07/06
- [PULL 10/20] audio: deprecate -soundhw hda, Gerd Hoffmann, 2020/07/06
- [PULL 13/20] pc_basic_device_init: drop no_vmport arg, Gerd Hoffmann, 2020/07/06
- [PULL 07/20] audio: deprecate -soundhw cs4231a, Gerd Hoffmann, 2020/07/06
- [PULL 05/20] audio: deprecate -soundhw es1370, Gerd Hoffmann, 2020/07/06
- [PULL 14/20] softmmu: initialize spice and audio earlier, Gerd Hoffmann, 2020/07/06
- [PULL 16/20] audio: create pcspk device early,
Gerd Hoffmann <=
- [PULL 20/20] audio: set default value for pcspk.iobase property, Gerd Hoffmann, 2020/07/06
- [PULL 11/20] pc_basic_device_init: pass PCMachineState, Gerd Hoffmann, 2020/07/06
- Re: [PULL 00/20] Audio 20200706 patches, Peter Maydell, 2020/07/08