mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 16:53:55 -06:00
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>
This commit is contained in:
parent
0d9acba8fd
commit
22d83b140e
23 changed files with 46 additions and 102 deletions
10
hw/pc.c
10
hw/pc.c
|
@ -788,17 +788,13 @@ static void audio_init (PCIBus *pci_bus, qemu_irq *pic)
|
|||
}
|
||||
|
||||
if (audio_enabled) {
|
||||
AudioState *s;
|
||||
|
||||
s = AUD_init ();
|
||||
for (c = soundhw; c->name; ++c) {
|
||||
if (c->enabled) {
|
||||
if (c->isa) {
|
||||
c->init.init_isa (s, pic);
|
||||
}
|
||||
else {
|
||||
c->init.init_isa(pic);
|
||||
} else {
|
||||
if (pci_bus) {
|
||||
c->init.init_pci (pci_bus, s);
|
||||
c->init.init_pci(pci_bus);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue