* Re: [Qemu-devel] [PATCH] hw/ppc/prep: Remove superfluous call to soundhw_init()
2017-06-09 6:53 [Qemu-devel] [PATCH] hw/ppc/prep: Remove superfluous call to soundhw_init() Thomas Huth
@ 2017-06-09 10:08 ` Sahid Orentino Ferdjaoui
2017-06-09 13:47 ` Eduardo Habkost
2017-06-11 19:15 ` Hervé Poussineau
2 siblings, 0 replies; 4+ messages in thread
From: Sahid Orentino Ferdjaoui @ 2017-06-09 10:08 UTC (permalink / raw)
To: Thomas Huth
Cc: Hervé Poussineau, David Gibson, qemu-devel, qemu-ppc,
Alexander Graf, Eduardo Habkost
On Fri, Jun 09, 2017 at 08:53:17AM +0200, Thomas Huth wrote:
> 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.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Sahid Ferdjaoui <sferdjao@redhat.com>
For information:
b3e6d591 - audio: enable PCI audio cards for all PCI-enabled targets
4c565674 - audio: Rename audio_init() to soundhw_init()
> ---
> hw/ppc/prep.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c
> index d16646c..36d3dcd 100644
> --- a/hw/ppc/prep.c
> +++ b/hw/ppc/prep.c
> @@ -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");
> --
> 1.8.3.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] hw/ppc/prep: Remove superfluous call to soundhw_init()
2017-06-09 6:53 [Qemu-devel] [PATCH] hw/ppc/prep: Remove superfluous call to soundhw_init() Thomas Huth
2017-06-09 10:08 ` Sahid Orentino Ferdjaoui
@ 2017-06-09 13:47 ` Eduardo Habkost
2017-06-11 19:15 ` Hervé Poussineau
2 siblings, 0 replies; 4+ messages in thread
From: Eduardo Habkost @ 2017-06-09 13:47 UTC (permalink / raw)
To: Thomas Huth
Cc: Hervé Poussineau, David Gibson, qemu-devel, Alexander Graf,
qemu-ppc
On Fri, Jun 09, 2017 at 08:53:17AM +0200, Thomas Huth wrote:
> 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.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
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.
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
> ---
> hw/ppc/prep.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c
> index d16646c..36d3dcd 100644
> --- a/hw/ppc/prep.c
> +++ b/hw/ppc/prep.c
> @@ -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");
> --
> 1.8.3.1
>
--
Eduardo
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] hw/ppc/prep: Remove superfluous call to soundhw_init()
2017-06-09 6:53 [Qemu-devel] [PATCH] hw/ppc/prep: Remove superfluous call to soundhw_init() Thomas Huth
2017-06-09 10:08 ` Sahid Orentino Ferdjaoui
2017-06-09 13:47 ` Eduardo Habkost
@ 2017-06-11 19:15 ` Hervé Poussineau
2 siblings, 0 replies; 4+ messages in thread
From: Hervé Poussineau @ 2017-06-11 19:15 UTC (permalink / raw)
To: Thomas Huth, David Gibson, qemu-devel
Cc: Alexander Graf, qemu-ppc, Eduardo Habkost
Le 09/06/2017 à 08:53, Thomas Huth a écrit :
> 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.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Hervé Poussineau <hpoussin@reactos.org>
> ---
> hw/ppc/prep.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c
> index d16646c..36d3dcd 100644
> --- a/hw/ppc/prep.c
> +++ b/hw/ppc/prep.c
> @@ -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");
>
^ permalink raw reply [flat|nested] 4+ messages in thread