]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
hw/pcspk: use explicitly the required PIT types
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Tue, 21 Oct 2025 09:02:35 +0000 (13:02 +0400)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Wed, 22 Oct 2025 06:55:28 +0000 (08:55 +0200)
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20251021090317.425409-5-marcandre.lureau@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
hw/audio/pcspk.c
hw/timer/i8254_common.c
include/hw/timer/i8254.h

index 610a5b216266f6e821b41c37a30fc9e23c0f1d9a..9cf78ff55fa57777d135b1ea5d21cb8478465d70 100644 (file)
@@ -51,7 +51,7 @@ struct PCSpkState {
     uint8_t sample_buf[PCSPK_BUF_LEN];
     QEMUSoundCard card;
     SWVoiceOut *voice;
-    void *pit;
+    PITCommonState *pit;
     unsigned int pit_count;
     unsigned int samples;
     unsigned int play_pos;
index ad091594cdeeb44eb63cf00cda7487496e31b3c9..419d4cd6e572e4387a26c9981456dd5ebe6b5806 100644 (file)
@@ -32,9 +32,8 @@
 #include "migration/vmstate.h"
 
 /* val must be 0 or 1 */
-void pit_set_gate(ISADevice *dev, int channel, int val)
+void pit_set_gate(PITCommonState *pit, int channel, int val)
 {
-    PITCommonState *pit = PIT_COMMON(dev);
     PITChannelState *s = &pit->channels[channel];
     PITCommonClass *c = PIT_COMMON_GET_CLASS(pit);
 
@@ -139,9 +138,8 @@ void pit_get_channel_info_common(PITCommonState *s, PITChannelState *sc,
     info->out = pit_get_out(sc, qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL));
 }
 
-void pit_get_channel_info(ISADevice *dev, int channel, PITChannelInfo *info)
+void pit_get_channel_info(PITCommonState *pit, int channel, PITChannelInfo *info)
 {
-    PITCommonState *pit = PIT_COMMON(dev);
     PITChannelState *s = &pit->channels[channel];
     PITCommonClass *c = PIT_COMMON_GET_CLASS(pit);
 
index 8402caad30733f2d166c24007730f87b27c78ac7..f7148d92865f8744217fbcfcf2ae87267e8fd9f9 100644 (file)
@@ -75,7 +75,7 @@ static inline ISADevice *kvm_pit_init(ISABus *bus, int base)
     return d;
 }
 
-void pit_set_gate(ISADevice *dev, int channel, int val);
-void pit_get_channel_info(ISADevice *dev, int channel, PITChannelInfo *info);
+void pit_set_gate(PITCommonState *pit, int channel, int val);
+void pit_get_channel_info(PITCommonState *pit, int channel, PITChannelInfo *info);
 
 #endif /* HW_I8254_H */