From 22d83b140e7b2dda555b7e3035050454f8764b7f Mon Sep 17 00:00:00 2001 From: Paul Brook Date: Tue, 12 May 2009 12:33:04 +0100 Subject: 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 --- hw/sb16.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'hw/sb16.c') diff --git a/hw/sb16.c b/hw/sb16.c index 14f3e3d..32e6a28 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; -- cgit v1.1