From 5eafa1e1ba6b4a1cbd86f8455eb2b8c3d83baf04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Wed, 21 Jan 2026 15:59:58 +0400 Subject: [PATCH] audio: replace DEBUG_AUDIO with trace MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Mark Cave-Ayland Reviewed-by: Akihiko Odaki Signed-off-by: Marc-André Lureau --- audio/audio-mixeng-be.c | 9 --------- audio/audio_template.h | 10 +++++----- audio/trace-events | 1 + 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/audio/audio-mixeng-be.c b/audio/audio-mixeng-be.c index 3dd9d17dd2..7eabb1c250 100644 --- a/audio/audio-mixeng-be.c +++ b/audio/audio-mixeng-be.c @@ -620,15 +620,6 @@ static size_t audio_pcm_sw_write(SWVoiceOut *sw, void *buf, size_t buf_len) return total_in * sw->info.bytes_per_frame; } -#ifdef DEBUG_AUDIO -static void audio_pcm_print_info (const char *cap, struct audio_pcm_info *info) -{ - dolog("%s: %s, freq %d, nchan %d\n", - cap, AudioFormat_str(info->af), info->freq, - info->nchannels); -} -#endif - #define DAC #include "audio_template.h" #undef DAC diff --git a/audio/audio_template.h b/audio/audio_template.h index c47a2f202f..e884c8e9b1 100644 --- a/audio/audio_template.h +++ b/audio/audio_template.h @@ -556,11 +556,11 @@ static SW *glue(audio_mixeng_backend_open_, TYPE) ( sw->callback.fn = callback_fn; sw->callback.opaque = callback_opaque; -#ifdef DEBUG_AUDIO - dolog ("%s\n", name); - audio_pcm_print_info ("hw", &sw->hw->info); - audio_pcm_print_info ("sw", &sw->info); -#endif + trace_audio_voice_pair(G_STRINGIFY(TYPE), name, + AudioFormat_str(sw->hw->info.af), + sw->hw->info.freq, sw->hw->info.nchannels, + AudioFormat_str(sw->info.af), + sw->info.freq, sw->info.nchannels); return sw; diff --git a/audio/trace-events b/audio/trace-events index 7a73d6eb84..ed04792d50 100644 --- a/audio/trace-events +++ b/audio/trace-events @@ -74,3 +74,4 @@ audio_out_played(size_t played) "played=%zu" # audio_template.h audio_open_out(const char *name, int freq, int nchannels, int fmt) "open %s, freq %d, nchannels %d, fmt %d" audio_open_in(const char *name, int freq, int nchannels, int fmt) "open %s, freq %d, nchannels %d, fmt %d" +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"