summary refs log tree commit diff stats
path: root/hw/input/tsc210x.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/input/tsc210x.c')
-rw-r--r--hw/input/tsc210x.c5
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);