mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
hw/arm: Support machine-default audiodev with fallback
Signed-off-by: Martin Kletzander <mkletzan@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
7a2c7da644
commit
b8ab0303de
12 changed files with 92 additions and 9 deletions
|
@ -27,6 +27,7 @@
|
|||
#include "sysemu/reset.h"
|
||||
#include "ui/console.h"
|
||||
#include "hw/arm/omap.h" /* For I2SCodec */
|
||||
#include "hw/boards.h" /* for current_machine */
|
||||
#include "hw/input/tsc2xxx.h"
|
||||
#include "hw/irq.h"
|
||||
#include "migration/vmstate.h"
|
||||
|
@ -1097,6 +1098,10 @@ static void tsc210x_init(TSC210xState *s,
|
|||
|
||||
qemu_add_mouse_event_handler(tsc210x_touchscreen_event, s, 1, name);
|
||||
|
||||
if (current_machine->audiodev) {
|
||||
s->card.name = g_strdup(current_machine->audiodev);
|
||||
s->card.state = audio_state_by_name(s->card.name, &error_fatal);
|
||||
}
|
||||
AUD_register_card(s->name, &s->card);
|
||||
|
||||
qemu_register_reset((void *) tsc210x_reset, s);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue