@samitouri / QOSamiQemu / commits / 5eafa1e1ba

audio: replace DEBUG_AUDIO with trace

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 Jan 21, 2026 at 15:59 UTC 5eafa1e1ba6b4a1cbd86f8455eb2b8c3d83baf04
3 files changed +6 -14
audio/audio-mixeng-be.c
-9
@@ -620,15 +620,6 @@ static size_t audio_pcm_sw_write(SWVoiceOut *sw, void *buf, size_t buf_len)
620 return total_in * sw->info.bytes_per_frame;
621 }
622
623 -#ifdef DEBUG_AUDIO
624 -static void audio_pcm_print_info (const char *cap, struct audio_pcm_info *info)
625 -{
626 - dolog("%s: %s, freq %d, nchan %d\n",
627 - cap, AudioFormat_str(info->af), info->freq,
628 - info->nchannels);
629 -}
630 -#endif
631 -
623 #define DAC
624 #include "audio_template.h"
625 #undef DAC
audio/audio_template.h
+5 -5
@@ -556,11 +556,11 @@ static SW *glue(audio_mixeng_backend_open_, TYPE) (
556 sw->callback.fn = callback_fn;
557 sw->callback.opaque = callback_opaque;
558
559 -#ifdef DEBUG_AUDIO
560 - dolog ("%s\n", name);
561 - audio_pcm_print_info ("hw", &sw->hw->info);
562 - audio_pcm_print_info ("sw", &sw->info);
563 -#endif
559 + trace_audio_voice_pair(G_STRINGIFY(TYPE), name,
560 + AudioFormat_str(sw->hw->info.af),
561 + sw->hw->info.freq, sw->hw->info.nchannels,
562 + AudioFormat_str(sw->info.af),
563 + sw->info.freq, sw->info.nchannels);
564
565 return sw;
566
audio/trace-events
+1
@@ -74,3 +74,4 @@ audio_out_played(size_t played) "played=%zu"
74 # audio_template.h
75 audio_open_out(const char *name, int freq, int nchannels, int fmt) "open %s, freq %d, nchannels %d, fmt %d"
76 audio_open_in(const char *name, int freq, int nchannels, int fmt) "open %s, freq %d, nchannels %d, fmt %d"
77 +audio_voice_pair(const char *type, const char *name, const char *hw_fmt, int hw_freq, int hw_nchannels, const char *sw_fmt, int sw_freq, int sw_nchannels) "%s: name=%s hw=%s/%d/%d sw=%s/%d/%d"