[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
- Re: [PATCH 06/18] ui/vnc: Require audiodev=, (continued)
- [PATCH 15/18] audio: Be more strict during audio backend initialisation, Martin Kletzander, 2022/04/25
- [PATCH 03/18] hw/audio: Simplify hda audio init, Martin Kletzander, 2022/04/25
- [PATCH 01/18] hw/audio: Remove -soundhw support, Martin Kletzander, 2022/04/25
- [PATCH 10/18] hw/input/tsc210x.c: Support machine-default audiodev with fallback,
Martin Kletzander <=
- [PATCH 08/18] audio: Add easy dummy audio initialiser, Martin Kletzander, 2022/04/25
- [PATCH 07/18] Introduce machine's default-audiodev property, Martin Kletzander, 2022/04/25
- [PATCH 14/18] audio: Require AudioState in AUD_add_capture, Martin Kletzander, 2022/04/25
- [PATCH 05/18] tests/qtest: Specify audiodev= and -audiodev, Martin Kletzander, 2022/04/25
- [PATCH 18/18] audio/spiceaudio: Fail initialisation when not using spice, Martin Kletzander, 2022/04/25