@samitouri / QOSamiQemu / commits / b77fa6d559

audio-be: add some state trace for debugging

Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com> Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>

Marc-André Lureau committed Dec 1, 2025 at 13:42 UTC b77fa6d559a305fd94d8febcde23a1166bec0400
2 files changed +9
audio/audio-be.c
+5
@@ -4,6 +4,7 @@
4 #include "qemu/audio.h"
5 #include "qemu/audio-capture.h"
6 #include "qapi/error.h"
7 +#include "trace.h"
8
9 bool audio_be_check(AudioBackend **be, Error **errp)
10 {
@@ -134,6 +135,8 @@ void audio_be_set_active_out(AudioBackend *be, SWVoiceOut *sw, bool on)
135 {
136 AudioBackendClass *klass = AUDIO_BACKEND_GET_CLASS(be);
137
138 + trace_audio_be_set_active_out(sw, on);
139 +
140 if (!sw) {
141 return;
142 }
@@ -145,6 +148,8 @@ void audio_be_set_active_in(AudioBackend *be, SWVoiceIn *sw, bool on)
148 {
149 AudioBackendClass *klass = AUDIO_BACKEND_GET_CLASS(be);
150
151 + trace_audio_be_set_active_in(sw, on);
152 +
153 if (!sw) {
154 return;
155 }
audio/trace-events
+4
@@ -26,6 +26,10 @@ pw_vol(const char *ret) "set volume: %s"
26 pw_period(uint64_t quantum, uint32_t rate) "period =%" PRIu64 "/%u"
27 pw_audio_init(void) "Initialize PipeWire context"
28
29 +# audio-be.c
30 +audio_be_set_active_in(void *sw, bool on) "sw=%p, on=%d"
31 +audio_be_set_active_out(void *sw, bool on) "sw=%p, on=%d"
32 +
33 # audio.c
34 audio_timer_start(int interval) "interval %d ms"
35 audio_timer_stop(void) ""