* [Qemu-devel] [PATCH 0/3] Make pcspk like rest of audio cards
@ 2009-08-10 19:06 Juan Quintela
2009-08-10 19:06 ` [Qemu-devel] [PATCH 1/3] Bring audio cards structs to C99 initializers Juan Quintela
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Juan Quintela @ 2009-08-10 19:06 UTC (permalink / raw)
To: qemu-devel
Hi
This patch series add c99 initializers to sound cards in vl.c.
Sound card support depends of target, move CONFIG_FOO generation there.
Once here, I wanted to disable CONFIG_PCSPK, but found a problem.
pcskpr is registered as a port on mips_jazz.c and pc.c, and then as an audio card.
Options are:
- let things as they are (if you get a pc or mips_jazz, you get a
pc speaker port and a pcspk audio card.
- be able to remove pc speaker audio support, but let the speaker port
as it is now
- make pcspk_init() an empty function in hw.h depending of CONFIG_PCSPK value.
Any thoughts?
Later, Juan.
Juan Quintela (3):
Bring audio cards structs to C99 initializers
What cards to compile is a per target thing
Make pc speaker be configured the same way that the rest of the cards
Makefile.target | 5 ++-
configure | 16 ++++++++---
vl.c | 76 +++++++++++++++++++++++++++---------------------------
3 files changed, 53 insertions(+), 44 deletions(-)
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Qemu-devel] [PATCH 1/3] Bring audio cards structs to C99 initializers
2009-08-10 19:06 [Qemu-devel] [PATCH 0/3] Make pcspk like rest of audio cards Juan Quintela
@ 2009-08-10 19:06 ` Juan Quintela
2009-08-10 21:46 ` malc
2009-08-10 19:06 ` [Qemu-devel] [PATCH 2/3] What cards to compile is a per target thing Juan Quintela
2009-08-10 19:06 ` [Qemu-devel] [PATCH 3/3] Make pc speaker be configured the same way that the rest of the cards Juan Quintela
2 siblings, 1 reply; 5+ messages in thread
From: Juan Quintela @ 2009-08-10 19:06 UTC (permalink / raw)
To: qemu-devel
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
vl.c | 74 +++++++++++++++++++++++++++++++++---------------------------------
1 files changed, 37 insertions(+), 37 deletions(-)
diff --git a/vl.c b/vl.c
index a526cb0..e399f0f 100644
--- a/vl.c
+++ b/vl.c
@@ -4405,81 +4405,81 @@ 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] 5+ messages in thread
* [Qemu-devel] [PATCH 2/3] What cards to compile is a per target thing
2009-08-10 19:06 [Qemu-devel] [PATCH 0/3] Make pcspk like rest of audio cards Juan Quintela
2009-08-10 19:06 ` [Qemu-devel] [PATCH 1/3] Bring audio cards structs to C99 initializers Juan Quintela
@ 2009-08-10 19:06 ` Juan Quintela
2009-08-10 19:06 ` [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; 5+ messages in thread
From: Juan Quintela @ 2009-08-10 19:06 UTC (permalink / raw)
To: qemu-devel
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
configure | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/configure b/configure
index e5b9431..6679919 100755
--- a/configure
+++ b/configure
@@ -1573,10 +1573,6 @@ if test "$vde" = "yes" ; then
echo "CONFIG_VDE=y" >> $config_host_mak
echo "VDE_LIBS=$vde_libs" >> $config_host_mak
fi
-for card in $audio_card_list; do
- def=CONFIG_`echo $card | tr '[:lower:]' '[:upper:]'`
- echo "$def=y" >> $config_host_mak
-done
echo "CONFIG_AUDIO_DRIVERS=$audio_drv_list" >> $config_host_mak
for drv in $audio_drv_list; do
def=CONFIG_`echo $drv | tr '[:lower:]' '[:upper:]'`
@@ -2090,6 +2086,11 @@ if test "$target_softmmu" = "yes" ; then
ldflags='-Wl,-G0 -Wl,-T../config-host.ld -Wl,-T,$(SRC_PATH)/$(ARCH).ld -static'
;;
esac
+
+for card in $audio_card_list; do
+ def=CONFIG_`echo $card | tr '[:lower:]' '[:upper:]'`
+ echo "$def=y" >> $config_mak
+done
fi
if test "$ldflags" != "" ; then
--
1.6.2.5
^ permalink raw reply related [flat|nested] 5+ 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 19:06 [Qemu-devel] [PATCH 0/3] Make pcspk like rest of audio cards Juan Quintela
2009-08-10 19:06 ` [Qemu-devel] [PATCH 1/3] Bring audio cards structs to C99 initializers Juan Quintela
2009-08-10 19:06 ` [Qemu-devel] [PATCH 2/3] What cards to compile is a per target thing Juan Quintela
@ 2009-08-10 19:06 ` Juan Quintela
2 siblings, 0 replies; 5+ messages in thread
From: Juan Quintela @ 2009-08-10 19:06 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 49ba08d..0b58c94 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -288,6 +288,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
ifdef CONFIG_ADLIB
adlib.o fmopl.o: CFLAGS := ${CFLAGS} -DBUILD_Y8950=0
@@ -328,7 +329,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
-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
@@ -366,7 +367,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 pcspk.o $(sound-obj-y)
+obj-mips-y += piix_pci.o parallel.o cirrus_vga.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 6679919..56a0dc8 100755
--- a/configure
+++ b/configure
@@ -2091,6 +2091,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" >> $config_mak
+esac
fi
if test "$ldflags" != "" ; then
diff --git a/vl.c b/vl.c
index e399f0f..abb9af1 100644
--- a/vl.c
+++ b/vl.c
@@ -4403,7 +4403,7 @@ static const QEMUOption qemu_options[] = {
#ifdef HAS_AUDIO
struct soundhw soundhw[] = {
#ifdef HAS_AUDIO_CHOICE
-#if defined(TARGET_I386) || defined(TARGET_MIPS)
+#if CONFIG_PCSPK
{
.name = "pcspk",
.descr = "PC speaker",
--
1.6.2.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH 1/3] Bring audio cards structs to C99 initializers
2009-08-10 19:06 ` [Qemu-devel] [PATCH 1/3] Bring audio cards structs to C99 initializers Juan Quintela
@ 2009-08-10 21:46 ` malc
0 siblings, 0 replies; 5+ messages in thread
From: malc @ 2009-08-10 21:46 UTC (permalink / raw)
To: Juan Quintela; +Cc: qemu-devel
On Mon, 10 Aug 2009, Juan Quintela wrote:
>
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
> vl.c | 74 +++++++++++++++++++++++++++++++++---------------------------------
> 1 files changed, 37 insertions(+), 37 deletions(-)
>
> diff --git a/vl.c b/vl.c
> index a526cb0..e399f0f 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -4405,81 +4405,81 @@ 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
I'd prefer this to be vertically aligned.
[..snip..]
--
mailto:av1474@comtv.ru
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-08-10 21:46 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-10 19:06 [Qemu-devel] [PATCH 0/3] Make pcspk like rest of audio cards Juan Quintela
2009-08-10 19:06 ` [Qemu-devel] [PATCH 1/3] Bring audio cards structs to C99 initializers Juan Quintela
2009-08-10 21:46 ` malc
2009-08-10 19:06 ` [Qemu-devel] [PATCH 2/3] What cards to compile is a per target thing Juan Quintela
2009-08-10 19:06 ` [Qemu-devel] [PATCH 3/3] Make pc speaker be configured the same way that the rest of the cards Juan Quintela
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.