* [Qemu-devel] [PATCH 1/3] Bring audio cards structs to C99 initializers
2009-08-10 23:50 [Qemu-devel] [PATCH v2 0/3] Make pcspk like rest of audio cards Juan Quintela
@ 2009-08-10 23:50 ` Juan Quintela
2009-08-10 23:50 ` [Qemu-devel] [PATCH 2/3] What cards to compile is a per target thing Juan Quintela
2009-08-10 23:50 ` [Qemu-devel] [PATCH 3/3] Make pc speaker be configured the same way that the rest of the cards Juan Quintela
2 siblings, 0 replies; 4+ messages in thread
From: Juan Quintela @ 2009-08-10 23:50 UTC (permalink / raw)
To: qemu-devel
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
vl.c | 89 +++++++++++++++++++++++++++--------------------------------------
1 files changed, 37 insertions(+), 52 deletions(-)
diff --git a/vl.c b/vl.c
index 8b2b289..2702036 100644
--- a/vl.c
+++ b/vl.c
@@ -4347,82 +4347,67 @@ static const QEMUOption qemu_options[] = {
struct soundhw soundhw[] = {
#ifdef HAS_AUDIO_CHOICE
#if defined(TARGET_I386) || defined(TARGET_MIPS)
- {
- "pcspk",
- "PC speaker",
- 0,
- 1,
- { .init_isa = pcspk_audio_init }
- },
+ {.name = "pcspk",
+ .descr = "PC speaker",
+ .enabled = 0,
+ .isa = 1,
+ .init.init_isa = pcspk_audio_init },
#endif
#ifdef CONFIG_SB16
- {
- "sb16",
- "Creative Sound Blaster 16",
- 0,
- 1,
- { .init_isa = SB16_init }
- },
+ {.name = "sb16",
+ .descr = "Creative Sound Blaster 16",
+ .enabled = 0,
+ .isa = 1,
+ .init.init_isa = SB16_init},
#endif
#ifdef CONFIG_CS4231A
- {
- "cs4231a",
- "CS4231A",
- 0,
- 1,
- { .init_isa = cs4231a_init }
- },
+ {.name = "cs4231a",
+ .descr = "CS4231A",
+ .enabled = 0,
+ .isa = 1,
+ .init.init_isa = cs4231a_init},
#endif
#ifdef CONFIG_ADLIB
- {
- "adlib",
+ {.name = "adlib",
#ifdef HAS_YMF262
- "Yamaha YMF262 (OPL3)",
+ .descr = "Yamaha YMF262 (OPL3)",
#else
- "Yamaha YM3812 (OPL2)",
+ .descr = "Yamaha YM3812 (OPL2)",
#endif
- 0,
- 1,
- { .init_isa = Adlib_init }
- },
+ .enabled = 0,
+ .isa = 1,
+ .init.init_isa = Adlib_init},
#endif
#ifdef CONFIG_GUS
- {
- "gus",
- "Gravis Ultrasound GF1",
- 0,
- 1,
- { .init_isa = GUS_init }
- },
+ {.name = "gus",
+ .descr = "Gravis Ultrasound GF1",
+ .enabled = 0,
+ .isa = 1,
+ .init.init_isa = GUS_init},
#endif
#ifdef CONFIG_AC97
- {
- "ac97",
- "Intel 82801AA AC97 Audio",
- 0,
- 0,
- { .init_pci = ac97_init }
- },
+ {.name = "ac97",
+ .descr = "Intel 82801AA AC97 Audio",
+ .enabled = 0,
+ .isa = 0,
+ .init.init_pci = ac97_init},
#endif
#ifdef CONFIG_ES1370
- {
- "es1370",
- "ENSONIQ AudioPCI ES1370",
- 0,
- 0,
- { .init_pci = es1370_init }
- },
+ {.name = "es1370",
+ .descr = "ENSONIQ AudioPCI ES1370",
+ .enabled = 0,
+ .isa = 0,
+ .init.init_pci = es1370_init},
#endif
#endif /* HAS_AUDIO_CHOICE */
-
- { NULL, NULL, 0, 0, { NULL } }
+ { /* End of list */ }
};
static void select_soundhw (const char *optarg)
--
1.6.2.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Qemu-devel] [PATCH 3/3] Make pc speaker be configured the same way that the rest of the cards
2009-08-10 23:50 [Qemu-devel] [PATCH v2 0/3] Make pcspk like rest of audio cards Juan Quintela
2009-08-10 23:50 ` [Qemu-devel] [PATCH 1/3] Bring audio cards structs to C99 initializers Juan Quintela
2009-08-10 23:50 ` [Qemu-devel] [PATCH 2/3] What cards to compile is a per target thing Juan Quintela
@ 2009-08-10 23:50 ` Juan Quintela
2 siblings, 0 replies; 4+ messages in thread
From: Juan Quintela @ 2009-08-10 23:50 UTC (permalink / raw)
To: qemu-devel
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
Makefile.target | 5 +++--
configure | 7 +++++++
vl.c | 2 +-
3 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/Makefile.target b/Makefile.target
index 3f5d24a..c45d24b 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -160,6 +160,7 @@ sound-obj-$(CONFIG_AC97) += ac97.o
sound-obj-$(CONFIG_ADLIB) += fmopl.o adlib.o
sound-obj-$(CONFIG_GUS) += gus.o gusemu_hal.o gusemu_mixer.o
sound-obj-$(CONFIG_CS4231A) += cs4231a.o
+sound-obj-$(CONFIG_PCSPK) += pcspk.o
adlib.o fmopl.o: QEMU_CFLAGS += -DBUILD_Y8950=0
@@ -184,7 +185,7 @@ obj-y += wdt_ib700.o wdt_i6300esb.o
# Hardware support
obj-i386-y = ide.o pckbd.o vga.o $(sound-obj-y) dma.o isa-bus.o
-obj-i386-y += fdc.o mc146818rtc.o serial.o i8259.o i8254.o pcspk.o pc.o
+obj-i386-y += fdc.o mc146818rtc.o serial.o i8259.o i8254.o pc.o
obj-i386-y += cirrus_vga.o apic.o ioapic.o parallel.o acpi.o piix_pci.o
obj-i386-y += usb-uhci.o vmmouse.o vmport.o vmware_vga.o hpet.o
obj-i386-y += device-hotplug.o pci-hotplug.o smbios.o
@@ -212,7 +213,7 @@ obj-mips-y = mips_r4k.o mips_jazz.o mips_malta.o mips_mipssim.o
obj-mips-y += mips_timer.o mips_int.o dma.o vga.o serial.o i8254.o i8259.o rc4030.o
obj-mips-y += g364fb.o jazz_led.o dp8393x.o
obj-mips-y += ide.o gt64xxx.o pckbd.o fdc.o mc146818rtc.o usb-uhci.o acpi.o ds1225y.o
-obj-mips-y += piix_pci.o parallel.o cirrus_vga.o isa-bus.o pcspk.o $(sound-obj-y)
+obj-mips-y += piix_pci.o parallel.o cirrus_vga.o isa-bus.o $(sound-obj-y)
obj-mips-y += mipsnet.o
obj-mips-y += pflash_cfi01.o
obj-mips-y += vmware_vga.o
diff --git a/configure b/configure
index a1db8b9..1de6d95 100755
--- a/configure
+++ b/configure
@@ -2208,6 +2208,13 @@ for card in $audio_card_list; do
def=CONFIG_`echo $card | tr '[:lower:]' '[:upper:]'`
echo "$def=y" >> $config_mak
done
+
+# MIPS and x86 always need pcspk compiled in, because
+# they used it with a port, not only as "sound card"
+case "$TARGET_BASE_ARCH" in
+i386|mips)
+ echo "CONFIG_PCSPK=y" >> $config_mak
+esac
fi
echo "LDFLAGS+=$ldflags" >> $config_mak
diff --git a/vl.c b/vl.c
index 2702036..f6fabbd 100644
--- a/vl.c
+++ b/vl.c
@@ -4346,7 +4346,7 @@ static const QEMUOption qemu_options[] = {
#ifdef HAS_AUDIO
struct soundhw soundhw[] = {
#ifdef HAS_AUDIO_CHOICE
-#if defined(TARGET_I386) || defined(TARGET_MIPS)
+#ifdef CONFIG_PCSPK
{.name = "pcspk",
.descr = "PC speaker",
.enabled = 0,
--
1.6.2.5
^ permalink raw reply related [flat|nested] 4+ messages in thread