hw/ppc/prep: Remove superfluous call to soundhw_init()
PATCH 1/1 hw/ppc/prep: Remove superfluous call to soundhw_init()
When using the 40p machine, soundhw_init() is currently called twice, one time from vl.c and one time from ibm_40p_init(). The call in ibm_40p_init() was likely just a copy-and-paste from a old version of the prep machine - but there the call to audio_init() (which was the previous name of this function) has been removed many years ago already, with commit b3e6d591b05538056d665572f3e3bbfb3cbb70e7 ("audio: enable PCI audio cards for all PCI-enabled targets"), so we certainly also do not need the soundhw_init() in the 40p function anymore nowadays.
--- hw/ppc/prep.c | 4 ---- 1 file changed, 4 deletions(-)
hw/ppc/prep.c +0 -4
@@ -36,7 +36,6 @@#include "hw/pci/pci_host.h" #include "hw/ppc/ppc.h" #include "hw/boards.h" -#include "hw/audio/soundhw.h" #include "qemu/error-report.h" #include "qemu/log.h" #include "hw/ide.h"
@@ -782,9 +781,6 @@ static void ibm_40p_init(MachineState *machine)qbus_walk_children (BUS (isa_bus), prep_set_cmos_checksum,NULL ,NULL ,NULL , &cmos_checksum); -/* initialize audio subsystem */ -soundhw_init (); -/* add some more devices */ if (defaults_enabled ()) {isa_create_simple (isa_bus,"i8042" );
Signature · 1 line
1.8.3.1
Quoted 11 lines · Thomas Huth
When using the 40p machine,
soundhw_init()is currently called twice, one time fromvl.cand one time fromibm_40p_init(). The call inibm_40p_init()was likely just a copy-and-paste from a old version of the prep machine - but there the call toaudio_init()(which was the previous name of this function) has been removed many years ago already, with commitb3e6d591b05538056d665572f3e3bbfb3cbb70e7("audio: enable PCI audio cards for all PCI-enabled targets"), so we certainly also do not need thesoundhw_init()in the 40p function anymore nowadays.Signed-off-by Thomas Huth <[email protected]>
For information:
b3e6d591 - audio: enable PCI audio cards for all PCI-enabled targets 4c565674 - audio: Rename audio_init() to soundhw_init()
Quoted 29 lines
--- hw/ppc/prep.c | 4 ---- 1 file changed, 4 deletions(-)hw/ppc/prep.c +0
-4@@ -36,7 +36,6 @@#include "hw/pci/pci_host.h" #include "hw/ppc/ppc.h" #include "hw/boards.h" -#include "hw/audio/soundhw.h" #include "qemu/error-report.h" #include "qemu/log.h" #include "hw/ide.h" @@ -782,9 +781,6 @@ static void ibm_40p_init(MachineState *machine)qbus_walk_children (BUS (isa_bus), prep_set_cmos_checksum,NULL ,NULL ,NULL , &cmos_checksum); -/* initialize audio subsystem */ -soundhw_init (); -/* add some more devices */ if (defaults_enabled ()) {isa_create_simple (isa_bus,"i8042" );Signature · 1 line
1.8.3.1
Quoted 11 lines · Thomas Huth
When using the 40p machine,
soundhw_init()is currently called twice, one time fromvl.cand one time fromibm_40p_init(). The call inibm_40p_init()was likely just a copy-and-paste from a old version of the prep machine - but there the call toaudio_init()(which was the previous name of this function) has been removed many years ago already, with commitb3e6d591b05538056d665572f3e3bbfb3cbb70e7("audio: enable PCI audio cards for all PCI-enabled targets"), so we certainly also do not need thesoundhw_init()in the 40p function anymore nowadays.Signed-off-by Thomas Huth <[email protected]>
Thanks for the investigation! I knew something was wrong, but as soundhw_init() is called after machine_run_board_init() in main(), I didn't know if 40p required soundhw_init() to be initialized earlier for some reason.
Quoted 29 lines
--- hw/ppc/prep.c | 4 ---- 1 file changed, 4 deletions(-)hw/ppc/prep.c +0
-4@@ -36,7 +36,6 @@#include "hw/pci/pci_host.h" #include "hw/ppc/ppc.h" #include "hw/boards.h" -#include "hw/audio/soundhw.h" #include "qemu/error-report.h" #include "qemu/log.h" #include "hw/ide.h" @@ -782,9 +781,6 @@ static void ibm_40p_init(MachineState *machine)qbus_walk_children (BUS (isa_bus), prep_set_cmos_checksum,NULL ,NULL ,NULL , &cmos_checksum); -/* initialize audio subsystem */ -soundhw_init (); -/* add some more devices */ if (defaults_enabled ()) {isa_create_simple (isa_bus,"i8042" );Signature · 1 line
1.8.3.1
Signature · 1 line
Eduardo
Quoted 11 lines · Thomas Huth
When using the 40p machine,
soundhw_init()is currently called twice, one time fromvl.cand one time fromibm_40p_init(). The call inibm_40p_init()was likely just a copy-and-paste from a old version of the prep machine - but there the call toaudio_init()(which was the previous name of this function) has been removed many years ago already, with commitb3e6d591b05538056d665572f3e3bbfb3cbb70e7("audio: enable PCI audio cards for all PCI-enabled targets"), so we certainly also do not need thesoundhw_init()in the 40p function anymore nowadays.Signed-off-by Thomas Huth <[email protected]>
Quoted 27 lines
--- hw/ppc/prep.c | 4 ---- 1 file changed, 4 deletions(-)hw/ppc/prep.c +0
-4@@ -36,7 +36,6 @@#include "hw/pci/pci_host.h" #include "hw/ppc/ppc.h" #include "hw/boards.h" -#include "hw/audio/soundhw.h" #include "qemu/error-report.h" #include "qemu/log.h" #include "hw/ide.h" @@ -782,9 +781,6 @@ static void ibm_40p_init(MachineState *machine)qbus_walk_children (BUS (isa_bus), prep_set_cmos_checksum,NULL ,NULL ,NULL , &cmos_checksum); -/* initialize audio subsystem */ -soundhw_init (); -/* add some more devices */ if (defaults_enabled ()) {isa_create_simple (isa_bus,"i8042" );