diff options
author | Martin Kletzander <mkletzan@redhat.com> | 2023-09-22 17:21:39 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2023-10-03 10:29:39 +0200 |
commit | b8ab0303de5a72d89da5ab25d8fe817d8797888f (patch) | |
tree | 0609ead6c7f95ccb566ff221369e3f7466077af0 /hw/input | |
parent | 7a2c7da6448eb8538bccbbc288508bde69bc4c2d (diff) |
hw/arm: Support machine-default audiodev with fallback
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/input')
-rw-r--r-- | hw/input/tsc210x.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/input/tsc210x.c b/hw/input/tsc210x.c index f568759e05..e7960a5069 100644 --- a/hw/input/tsc210x.c +++ b/hw/input/tsc210x.c @@ -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); |