From: Marc-André Lureau <[email protected]>
Signed-off-by: Marc-André Lureau <[email protected]>
---
audio/audio-be.c | 9 +++++++--
audio/trace-events | 4 ++++
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/audio/audio-be.c b/audio/audio-be.c
index fde9c20e12..7b141566bc 100644
--- a/audio/audio-be.c
+++ b/audio/audio-be.c
@@ -1,9 +1,10 @@
/* SPDX-License-Identifier: MIT */
#include "qemu/osdep.h"
-#include "qemu/audio.h"
-#include "qemu/audio-capture.h"
#include "qapi/error.h"
+#include "qemu/audio-capture.h"
+#include "qemu/audio.h"
+#include "trace-audio.h"
bool audio_be_backend_check(AudioBackend **be, Error **errp)
{
@@ -134,6 +135,8 @@ void audio_be_set_active_out(AudioBackend *be, SWVoiceOut
*sw, bool on)
{
AudioBackendClass *klass = AUDIO_BACKEND_GET_CLASS(be);
+ trace_audio_be_set_active_out(sw, on);
+
if (!sw) {
return;
}
@@ -145,6 +148,8 @@ void audio_be_set_active_in(AudioBackend *be, SWVoiceIn
*sw, bool on)
{
AudioBackendClass *klass = AUDIO_BACKEND_GET_CLASS(be);
+ trace_audio_be_set_active_in(sw, on);
+
if (!sw) {
return;
}
diff --git a/audio/trace-events b/audio/trace-events
index 7e3f1593c8..f7f639d960 100644
--- a/audio/trace-events
+++ b/audio/trace-events
@@ -26,6 +26,10 @@ pw_vol(const char *ret) "set volume: %s"
pw_period(uint64_t quantum, uint32_t rate) "period =%" PRIu64 "/%u"
pw_audio_init(void) "Initialize PipeWire context"
+# audio-be.c
+audio_be_set_active_in(void *sw, bool on) "sw=%p, on=%d"
+audio_be_set_active_out(void *sw, bool on) "sw=%p, on=%d"
+
# audio.c
audio_timer_start(int interval) "interval %d ms"
audio_timer_stop(void) ""
--
2.51.1