]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
hw/audio: drop audio_model.isa
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Mon, 27 Oct 2025 13:44:10 +0000 (17:44 +0400)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Thu, 30 Oct 2025 09:30:06 +0000 (13:30 +0400)
That's no longer necessary, the code is bus-agnostic.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
hw/audio/ac97.c
hw/audio/adlib.c
hw/audio/cs4231a.c
hw/audio/es1370.c
hw/audio/gus.c
hw/audio/model.c
hw/audio/sb16.c
hw/audio/virtio-snd-pci.c
include/hw/audio/model.h

index 9dee5bb143e4e507c77d835ad1ddb3ec51dd67d2..6b9013ebb804deb1fb47e83d28689edda2662fbe 100644 (file)
@@ -1362,7 +1362,7 @@ static const TypeInfo ac97_info = {
 static void ac97_register_types(void)
 {
     type_register_static(&ac97_info);
-    audio_register_model("ac97", "Intel 82801AA AC97 Audio", 0, TYPE_AC97);
+    audio_register_model("ac97", "Intel 82801AA AC97 Audio", TYPE_AC97);
 }
 
 type_init(ac97_register_types)
index d0b2817843e5c35f115279d4ac7e3b0aa86edad0..6aae365f47491f455c2afbe88d6b2f89e919a260 100644 (file)
@@ -323,7 +323,7 @@ static const TypeInfo adlib_info = {
 static void adlib_register_types (void)
 {
     type_register_static (&adlib_info);
-    audio_register_model("adlib", ADLIB_DESC, 1, TYPE_ADLIB);
+    audio_register_model("adlib", ADLIB_DESC, TYPE_ADLIB);
 }
 
 type_init (adlib_register_types)
index 0979cf5f16d8e1d4615e30e07e6965ad209ce569..3b80a61378681a238f484a7fd226ca4d5d0f8fb1 100644 (file)
@@ -723,7 +723,7 @@ static const TypeInfo cs4231a_info = {
 static void cs4231a_register_types (void)
 {
     type_register_static (&cs4231a_info);
-    audio_register_model("cs4231a", "CS4231A", 1, TYPE_CS4231A);
+    audio_register_model("cs4231a", "CS4231A", TYPE_CS4231A);
 }
 
 type_init (cs4231a_register_types)
index 066b9906fa0d8e537961f56425bd0bc368766ce8..721c02be0a03ad89c8ce71cf8f4668eae0f7f07e 100644 (file)
@@ -905,7 +905,7 @@ static const TypeInfo es1370_info = {
 static void es1370_register_types (void)
 {
     type_register_static (&es1370_info);
-    audio_register_model("es1370", "ENSONIQ AudioPCI ES1370", 0, TYPE_ES1370);
+    audio_register_model("es1370", "ENSONIQ AudioPCI ES1370", TYPE_ES1370);
 }
 
 type_init (es1370_register_types)
index d5b1e62135cdc98d70cddb3467cf98af07ade41b..45ea04bf89568a6c33b4b7f7cdef4374cc5bb8fc 100644 (file)
@@ -320,7 +320,7 @@ static const TypeInfo gus_info = {
 static void gus_register_types (void)
 {
     type_register_static (&gus_info);
-    audio_register_model("gus", "Gravis Ultrasound GF1", 1, TYPE_GUS);
+    audio_register_model("gus", "Gravis Ultrasound GF1", TYPE_GUS);
 }
 
 type_init (gus_register_types)
index 7af0d960f59f52b96a724bd0b3b7953c84660933..40929c6e77a6dbed51914c7bcb522926215409f4 100644 (file)
 #include "monitor/qdev.h"
 #include "qemu/error-report.h"
 #include "qapi/error.h"
-#include "qom/object.h"
 #include "hw/qdev-properties.h"
-#include "hw/isa/isa.h"
 #include "hw/audio/model.h"
 
 struct audio_model {
     const char *name;
     const char *descr;
     const char *typename;
-    int isa;
     void (*init)(const char *audiodev);
 };
 
@@ -48,18 +45,16 @@ void audio_register_model_with_cb(const char *name, const char *descr,
     assert(audio_models_count < ARRAY_SIZE(audio_models) - 1);
     audio_models[audio_models_count].name = name;
     audio_models[audio_models_count].descr = descr;
-    audio_models[audio_models_count].isa = 0;
     audio_models[audio_models_count].init = init_audio_model;
     audio_models_count++;
 }
 
 void audio_register_model(const char *name, const char *descr,
-                          int isa, const char *typename)
+                          const char *typename)
 {
     assert(audio_models_count < ARRAY_SIZE(audio_models) - 1);
     audio_models[audio_models_count].name = name;
     audio_models[audio_models_count].descr = descr;
-    audio_models[audio_models_count].isa = isa;
     audio_models[audio_models_count].typename = typename;
     audio_models_count++;
 }
@@ -120,7 +115,6 @@ void audio_model_init(void)
         qdev_prop_set_string(dev, "audiodev", audiodev_id);
         qdev_realize_and_unref(dev, bus, &error_fatal);
     } else {
-        assert(!c->isa);
         c->init(audiodev_id);
     }
 }
index 5faa3f5fe3837b744c8b7e86485bb1d08e19cbc2..e86aafd488dceebc615fb6aff769e1f9716d3d46 100644 (file)
@@ -1470,7 +1470,7 @@ static const TypeInfo sb16_info = {
 static void sb16_register_types (void)
 {
     type_register_static (&sb16_info);
-    audio_register_model("sb16", "Creative Sound Blaster 16", 1, TYPE_SB16);
+    audio_register_model("sb16", "Creative Sound Blaster 16", TYPE_SB16);
 }
 
 type_init (sb16_register_types)
index b78eaff8510437c1004bec19966cacf818546743..230581ed634724057c5f6605142763bc58fdf9fd 100644 (file)
@@ -74,7 +74,7 @@ static const VirtioPCIDeviceTypeInfo virtio_snd_pci_info = {
 static void virtio_snd_pci_register(void)
 {
     virtio_pci_types_register(&virtio_snd_pci_info);
-    audio_register_model("virtio", "Virtio Sound", 0, TYPE_VIRTIO_SND_PCI);
+    audio_register_model("virtio", "Virtio Sound", TYPE_VIRTIO_SND_PCI);
 }
 
 type_init(virtio_snd_pci_register);
index 4d0be93042c119423c533bf7f0f0cf8aa925da26..c38b3594136f2dfa46f7eae00bed4479c1612768 100644 (file)
@@ -5,7 +5,7 @@
 void audio_register_model_with_cb(const char *name, const char *descr,
                                   void (*init_audio_model)(const char *audiodev));
 void audio_register_model(const char *name, const char *descr,
-                          int isa, const char *typename);
+                          const char *typename);
 
 void audio_model_init(void);
 void audio_print_available_models(void);