[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 10/18] hw/input/tsc210x.c: Support machine-default audiodev with
From: |
Martin Kletzander |
Subject: |
[PATCH 10/18] hw/input/tsc210x.c: Support machine-default audiodev with fallback |
Date: |
Mon, 25 Apr 2022 10:21:53 +0200 |
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
---
hw/input/tsc210x.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/hw/input/tsc210x.c b/hw/input/tsc210x.c
index f16a8090b7c7..f0b02bc72280 100644
--- a/hw/input/tsc210x.c
+++ b/hw/input/tsc210x.c
@@ -1098,6 +1098,14 @@ static void tsc210x_init(TSC210xState *s,
qemu_add_mouse_event_handler(tsc210x_touchscreen_event, s, 1, name);
+ const char *audiodev_id = audio_maybe_init_dummy("tsc.defaudio");
+ s->card.name = g_strdup(audiodev_id);
+ s->card.state = audio_state_by_name(s->card.name);
+ if (!s->card.state) {
+ error_setg(&error_fatal, "Cannot find audiodev with id '%s'",
+ s->card.name);
+ }
+
AUD_register_card(s->name, &s->card);
qemu_register_reset((void *) tsc210x_reset, s);
--
2.35.1
- [PATCH 00/18] RFC: Remove deprecated audio features, Martin Kletzander, 2022/04/25
- [PATCH 14/18] audio: Require AudioState in AUD_add_capture, Martin Kletzander, 2022/04/25
- [PATCH 04/18] hw/audio/lm4549: Add errp error reporting to init function, Martin Kletzander, 2022/04/25
- [PATCH 10/18] hw/input/tsc210x.c: Support machine-default audiodev with fallback,
Martin Kletzander <=
- [PATCH 13/18] audio: Make AUD_register_card fallible and require audiodev=, Martin Kletzander, 2022/04/25
- [PATCH 16/18] audio: Remove legacy audio environment variables and options, Martin Kletzander, 2022/04/25
- [PATCH 08/18] audio: Add easy dummy audio initialiser, Martin Kletzander, 2022/04/25
- [PATCH 01/18] hw/audio: Remove -soundhw support, Martin Kletzander, 2022/04/25