aboutsummaryrefslogtreecommitdiffstats
path: root/hw/sb16.c
diff options
context:
space:
mode:
authorPaul Brook <paul@codesourcery.com>2009-05-12 12:33:04 +0100
committerPaul Brook <paul@codesourcery.com>2009-05-12 12:33:04 +0100
commit22d83b140e7b2dda555b7e3035050454f8764b7f (patch)
treeb80cd7f2cbae7951323871218db3772dd8b3b8c7 /hw/sb16.c
parent0d9acba8fddbf970c7353083e6a60b47017ce3e4 (diff)
Push AUD_init down to devices
Now we can safely call AUD_init multiple times we can push it down to individual audio devices, rather than having to pass it from the board init. Signed-off-by: Paul Brook <paul@codesourcery.com>
Diffstat (limited to 'hw/sb16.c')
-rw-r--r--hw/sb16.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/hw/sb16.c b/hw/sb16.c
index 14f3e3d25..32e6a2840 100644
--- a/hw/sb16.c
+++ b/hw/sb16.c
@@ -1398,18 +1398,14 @@ static int SB_load (QEMUFile *f, void *opaque, int version_id)
return 0;
}
-int SB16_init (AudioState *audio, qemu_irq *pic)
+int SB16_init (qemu_irq *pic)
{
+ AudioState *audio = AUD_init();
SB16State *s;
int i;
static const uint8_t dsp_write_ports[] = {0x6, 0xc};
static const uint8_t dsp_read_ports[] = {0x6, 0xa, 0xc, 0xd, 0xe, 0xf};
- if (!audio) {
- dolog ("No audio state\n");
- return -1;
- }
-
s = qemu_mallocz (sizeof (*s));
s->cmd = -1;