aboutsummaryrefslogtreecommitdiff
path: root/hw/audio/pcspk.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2013-04-18 18:43:58 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2013-04-29 12:16:36 -0500
commit36cd6f6f20724d49aac1910e310f81a43e0cb657 (patch)
tree2e6e7d689d79dfb2da14684e1415cd3003cb89ec /hw/audio/pcspk.c
parent8c444a1978fd9956c9712572d9ad0b83bbbc0a63 (diff)
downloadqemu-36cd6f6f20724d49aac1910e310f81a43e0cb657.zip
qemu-36cd6f6f20724d49aac1910e310f81a43e0cb657.tar.gz
qemu-36cd6f6f20724d49aac1910e310f81a43e0cb657.tar.bz2
audio: remove the need for audio card CONFIG_* symbols
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 1366303444-24620-3-git-send-email-pbonzini@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/audio/pcspk.c')
-rw-r--r--hw/audio/pcspk.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/audio/pcspk.c b/hw/audio/pcspk.c
index d844e85..3a7285f 100644
--- a/hw/audio/pcspk.c
+++ b/hw/audio/pcspk.c
@@ -25,6 +25,7 @@
#include "hw/hw.h"
#include "hw/i386/pc.h"
#include "hw/isa/isa.h"
+#include "hw/audio/audio.h"
#include "audio/audio.h"
#include "qemu/timer.h"
#include "hw/timer/i8254.h"
@@ -108,7 +109,7 @@ static void pcspk_callback(void *opaque, int free)
}
}
-int pcspk_audio_init(ISABus *bus)
+static int pcspk_audio_init(ISABus *bus)
{
PCSpkState *s = pcspk_state;
struct audsettings as = {PCSPK_SAMPLE_RATE, 1, AUD_FMT_U8, 0};
@@ -200,5 +201,6 @@ static const TypeInfo pcspk_info = {
static void pcspk_register(void)
{
type_register_static(&pcspk_info);
+ isa_register_soundhw("pcspk", "PC speaker", pcspk_audio_init);
}
type_init(pcspk_register)