audio: rework pcspk_init()

Instead of creating and returning the pc speaker accept it as argument.
That allows to rework the initialization workflow in followup patches.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20200702132525.6849-16-kraxel@redhat.com
This commit is contained in:
Gerd Hoffmann 2020-07-02 15:25:20 +02:00
parent dea1fb887c
commit 525d654d7a
4 changed files with 4 additions and 8 deletions

View file

@ -1219,7 +1219,7 @@ void pc_basic_device_init(struct PCMachineState *pcms,
/* connect PIT to output control line of the HPET */
qdev_connect_gpio_out(hpet, 0, qdev_get_gpio_in(DEVICE(pit), 0));
}
pcspk_init(isa_bus, pit);
pcspk_init(isa_new(TYPE_PC_SPEAKER), isa_bus, pit);
}
i8257_dma_init(isa_bus, 0);