Browse Source

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>
master
Marc-André Lureau 7 months ago
parent
commit
5eafa1e1ba
  1. 9
      audio/audio-mixeng-be.c
  2. 10
      audio/audio_template.h
  3. 1
      audio/trace-events

9
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; 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 #define DAC
#include "audio_template.h" #include "audio_template.h"
#undef DAC #undef DAC

10
audio/audio_template.h

@ -556,11 +556,11 @@ static SW *glue(audio_mixeng_backend_open_, TYPE) (
sw->callback.fn = callback_fn; sw->callback.fn = callback_fn;
sw->callback.opaque = callback_opaque; sw->callback.opaque = callback_opaque;
#ifdef DEBUG_AUDIO trace_audio_voice_pair(G_STRINGIFY(TYPE), name,
dolog ("%s\n", name); AudioFormat_str(sw->hw->info.af),
audio_pcm_print_info ("hw", &sw->hw->info); sw->hw->info.freq, sw->hw->info.nchannels,
audio_pcm_print_info ("sw", &sw->info); AudioFormat_str(sw->info.af),
#endif sw->info.freq, sw->info.nchannels);
return sw; return sw;

1
audio/trace-events

@ -74,3 +74,4 @@ audio_out_played(size_t played) "played=%zu"
# audio_template.h # 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_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_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"

Loading…
Cancel
Save