/* This file is autogenerated by tracetool, do not edit. */
/* SPDX-License-Identifier: GPL-2.0-or-later */

#ifndef TRACE_AUDIO_GENERATED_TRACERS_H
#define TRACE_AUDIO_GENERATED_TRACERS_H

#include "trace/control.h"

extern TraceEvent _TRACE_ALSA_REVENTS_EVENT;
extern TraceEvent _TRACE_ALSA_POLLOUT_EVENT;
extern TraceEvent _TRACE_ALSA_SET_HANDLER_EVENT;
extern TraceEvent _TRACE_ALSA_WROTE_ZERO_EVENT;
extern TraceEvent _TRACE_ALSA_READ_ZERO_EVENT;
extern TraceEvent _TRACE_ALSA_XRUN_OUT_EVENT;
extern TraceEvent _TRACE_ALSA_XRUN_IN_EVENT;
extern TraceEvent _TRACE_ALSA_RESUME_OUT_EVENT;
extern TraceEvent _TRACE_OSS_VERSION_EVENT;
extern TraceEvent _TRACE_DBUS_AUDIO_REGISTER_EVENT;
extern TraceEvent _TRACE_DBUS_AUDIO_PUT_BUFFER_OUT_EVENT;
extern TraceEvent _TRACE_DBUS_AUDIO_READ_EVENT;
extern TraceEvent _TRACE_PW_STATE_CHANGED_EVENT;
extern TraceEvent _TRACE_PW_READ_EVENT;
extern TraceEvent _TRACE_PW_WRITE_EVENT;
extern TraceEvent _TRACE_PW_VOL_EVENT;
extern TraceEvent _TRACE_PW_PERIOD_EVENT;
extern TraceEvent _TRACE_PW_AUDIO_INIT_EVENT;
extern TraceEvent _TRACE_AUDIO_TIMER_START_EVENT;
extern TraceEvent _TRACE_AUDIO_TIMER_STOP_EVENT;
extern TraceEvent _TRACE_AUDIO_TIMER_DELAYED_EVENT;
extern uint16_t _TRACE_ALSA_REVENTS_DSTATE;
extern uint16_t _TRACE_ALSA_POLLOUT_DSTATE;
extern uint16_t _TRACE_ALSA_SET_HANDLER_DSTATE;
extern uint16_t _TRACE_ALSA_WROTE_ZERO_DSTATE;
extern uint16_t _TRACE_ALSA_READ_ZERO_DSTATE;
extern uint16_t _TRACE_ALSA_XRUN_OUT_DSTATE;
extern uint16_t _TRACE_ALSA_XRUN_IN_DSTATE;
extern uint16_t _TRACE_ALSA_RESUME_OUT_DSTATE;
extern uint16_t _TRACE_OSS_VERSION_DSTATE;
extern uint16_t _TRACE_DBUS_AUDIO_REGISTER_DSTATE;
extern uint16_t _TRACE_DBUS_AUDIO_PUT_BUFFER_OUT_DSTATE;
extern uint16_t _TRACE_DBUS_AUDIO_READ_DSTATE;
extern uint16_t _TRACE_PW_STATE_CHANGED_DSTATE;
extern uint16_t _TRACE_PW_READ_DSTATE;
extern uint16_t _TRACE_PW_WRITE_DSTATE;
extern uint16_t _TRACE_PW_VOL_DSTATE;
extern uint16_t _TRACE_PW_PERIOD_DSTATE;
extern uint16_t _TRACE_PW_AUDIO_INIT_DSTATE;
extern uint16_t _TRACE_AUDIO_TIMER_START_DSTATE;
extern uint16_t _TRACE_AUDIO_TIMER_STOP_DSTATE;
extern uint16_t _TRACE_AUDIO_TIMER_DELAYED_DSTATE;
#define TRACE_ALSA_REVENTS_ENABLED 1
#define TRACE_ALSA_POLLOUT_ENABLED 1
#define TRACE_ALSA_SET_HANDLER_ENABLED 1
#define TRACE_ALSA_WROTE_ZERO_ENABLED 1
#define TRACE_ALSA_READ_ZERO_ENABLED 1
#define TRACE_ALSA_XRUN_OUT_ENABLED 1
#define TRACE_ALSA_XRUN_IN_ENABLED 1
#define TRACE_ALSA_RESUME_OUT_ENABLED 1
#define TRACE_OSS_VERSION_ENABLED 1
#define TRACE_DBUS_AUDIO_REGISTER_ENABLED 1
#define TRACE_DBUS_AUDIO_PUT_BUFFER_OUT_ENABLED 1
#define TRACE_DBUS_AUDIO_READ_ENABLED 1
#define TRACE_PW_STATE_CHANGED_ENABLED 1
#define TRACE_PW_READ_ENABLED 1
#define TRACE_PW_WRITE_ENABLED 1
#define TRACE_PW_VOL_ENABLED 1
#define TRACE_PW_PERIOD_ENABLED 1
#define TRACE_PW_AUDIO_INIT_ENABLED 1
#define TRACE_AUDIO_TIMER_START_ENABLED 1
#define TRACE_AUDIO_TIMER_STOP_ENABLED 1
#define TRACE_AUDIO_TIMER_DELAYED_ENABLED 1
#include "qemu/log-for-trace.h"


#define TRACE_ALSA_REVENTS_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_ALSA_REVENTS) || \
    false)

static inline void trace_alsa_revents(int revents)
{
    if (trace_event_get_state(TRACE_ALSA_REVENTS)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 4 "../xemu/audio/trace-events"
            qemu_log("alsa_revents " "revents = %d" "\n", revents);
#line 86 "trace/trace-audio.h"
        }
    }
}

#define TRACE_ALSA_POLLOUT_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_ALSA_POLLOUT) || \
    false)

static inline void trace_alsa_pollout(int i, int fd)
{
    if (trace_event_get_state(TRACE_ALSA_POLLOUT)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 5 "../xemu/audio/trace-events"
            qemu_log("alsa_pollout " "i = %d fd = %d" "\n", i, fd);
#line 101 "trace/trace-audio.h"
        }
    }
}

#define TRACE_ALSA_SET_HANDLER_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_ALSA_SET_HANDLER) || \
    false)

static inline void trace_alsa_set_handler(int events, int index, int fd, int err)
{
    if (trace_event_get_state(TRACE_ALSA_SET_HANDLER)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 6 "../xemu/audio/trace-events"
            qemu_log("alsa_set_handler " "events=0x%x index=%d fd=%d err=%d" "\n", events, index, fd, err);
#line 116 "trace/trace-audio.h"
        }
    }
}

#define TRACE_ALSA_WROTE_ZERO_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_ALSA_WROTE_ZERO) || \
    false)

static inline void trace_alsa_wrote_zero(int len)
{
    if (trace_event_get_state(TRACE_ALSA_WROTE_ZERO)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 7 "../xemu/audio/trace-events"
            qemu_log("alsa_wrote_zero " "Failed to write %d frames (wrote zero)" "\n", len);
#line 131 "trace/trace-audio.h"
        }
    }
}

#define TRACE_ALSA_READ_ZERO_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_ALSA_READ_ZERO) || \
    false)

static inline void trace_alsa_read_zero(long len)
{
    if (trace_event_get_state(TRACE_ALSA_READ_ZERO)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 8 "../xemu/audio/trace-events"
            qemu_log("alsa_read_zero " "Failed to read %ld frames (read zero)" "\n", len);
#line 146 "trace/trace-audio.h"
        }
    }
}

#define TRACE_ALSA_XRUN_OUT_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_ALSA_XRUN_OUT) || \
    false)

static inline void trace_alsa_xrun_out(void)
{
    if (trace_event_get_state(TRACE_ALSA_XRUN_OUT)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 9 "../xemu/audio/trace-events"
            qemu_log("alsa_xrun_out " "Recovering from playback xrun" "\n");
#line 161 "trace/trace-audio.h"
        }
    }
}

#define TRACE_ALSA_XRUN_IN_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_ALSA_XRUN_IN) || \
    false)

static inline void trace_alsa_xrun_in(void)
{
    if (trace_event_get_state(TRACE_ALSA_XRUN_IN)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 10 "../xemu/audio/trace-events"
            qemu_log("alsa_xrun_in " "Recovering from capture xrun" "\n");
#line 176 "trace/trace-audio.h"
        }
    }
}

#define TRACE_ALSA_RESUME_OUT_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_ALSA_RESUME_OUT) || \
    false)

static inline void trace_alsa_resume_out(void)
{
    if (trace_event_get_state(TRACE_ALSA_RESUME_OUT)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 11 "../xemu/audio/trace-events"
            qemu_log("alsa_resume_out " "Resuming suspended output stream" "\n");
#line 191 "trace/trace-audio.h"
        }
    }
}

#define TRACE_OSS_VERSION_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_OSS_VERSION) || \
    false)

static inline void trace_oss_version(int version)
{
    if (trace_event_get_state(TRACE_OSS_VERSION)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 14 "../xemu/audio/trace-events"
            qemu_log("oss_version " "OSS version = 0x%x" "\n", version);
#line 206 "trace/trace-audio.h"
        }
    }
}

#define TRACE_DBUS_AUDIO_REGISTER_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_DBUS_AUDIO_REGISTER) || \
    false)

static inline void trace_dbus_audio_register(const char *s, const char *dir)
{
    if (trace_event_get_state(TRACE_DBUS_AUDIO_REGISTER)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 17 "../xemu/audio/trace-events"
            qemu_log("dbus_audio_register " "sender = %s, dir = %s" "\n", s, dir);
#line 221 "trace/trace-audio.h"
        }
    }
}

#define TRACE_DBUS_AUDIO_PUT_BUFFER_OUT_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_DBUS_AUDIO_PUT_BUFFER_OUT) || \
    false)

static inline void trace_dbus_audio_put_buffer_out(size_t pos, size_t size)
{
    if (trace_event_get_state(TRACE_DBUS_AUDIO_PUT_BUFFER_OUT)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 18 "../xemu/audio/trace-events"
            qemu_log("dbus_audio_put_buffer_out " "buf_pos = %zu, buf_size = %zu" "\n", pos, size);
#line 236 "trace/trace-audio.h"
        }
    }
}

#define TRACE_DBUS_AUDIO_READ_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_DBUS_AUDIO_READ) || \
    false)

static inline void trace_dbus_audio_read(size_t len)
{
    if (trace_event_get_state(TRACE_DBUS_AUDIO_READ)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 19 "../xemu/audio/trace-events"
            qemu_log("dbus_audio_read " "len = %zu" "\n", len);
#line 251 "trace/trace-audio.h"
        }
    }
}

#define TRACE_PW_STATE_CHANGED_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_PW_STATE_CHANGED) || \
    false)

static inline void trace_pw_state_changed(int nodeid, const char *s)
{
    if (trace_event_get_state(TRACE_PW_STATE_CHANGED)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 22 "../xemu/audio/trace-events"
            qemu_log("pw_state_changed " "node id: %d stream state: %s" "\n", nodeid, s);
#line 266 "trace/trace-audio.h"
        }
    }
}

#define TRACE_PW_READ_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_PW_READ) || \
    false)

static inline void trace_pw_read(int32_t avail, uint32_t index, size_t len)
{
    if (trace_event_get_state(TRACE_PW_READ)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 23 "../xemu/audio/trace-events"
            qemu_log("pw_read " "avail=%d index=%u len=%zu" "\n", avail, index, len);
#line 281 "trace/trace-audio.h"
        }
    }
}

#define TRACE_PW_WRITE_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_PW_WRITE) || \
    false)

static inline void trace_pw_write(int32_t filled, int32_t avail, uint32_t index, size_t len)
{
    if (trace_event_get_state(TRACE_PW_WRITE)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 24 "../xemu/audio/trace-events"
            qemu_log("pw_write " "filled=%d avail=%d index=%u len=%zu" "\n", filled, avail, index, len);
#line 296 "trace/trace-audio.h"
        }
    }
}

#define TRACE_PW_VOL_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_PW_VOL) || \
    false)

static inline void trace_pw_vol(const char *ret)
{
    if (trace_event_get_state(TRACE_PW_VOL)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 25 "../xemu/audio/trace-events"
            qemu_log("pw_vol " "set volume: %s" "\n", ret);
#line 311 "trace/trace-audio.h"
        }
    }
}

#define TRACE_PW_PERIOD_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_PW_PERIOD) || \
    false)

static inline void trace_pw_period(uint64_t quantum, uint32_t rate)
{
    if (trace_event_get_state(TRACE_PW_PERIOD)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 26 "../xemu/audio/trace-events"
            qemu_log("pw_period " "period =%" PRIu64 "/%u" "\n", quantum, rate);
#line 326 "trace/trace-audio.h"
        }
    }
}

#define TRACE_PW_AUDIO_INIT_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_PW_AUDIO_INIT) || \
    false)

static inline void trace_pw_audio_init(void)
{
    if (trace_event_get_state(TRACE_PW_AUDIO_INIT)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 27 "../xemu/audio/trace-events"
            qemu_log("pw_audio_init " "Initialize PipeWire context" "\n");
#line 341 "trace/trace-audio.h"
        }
    }
}

#define TRACE_AUDIO_TIMER_START_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_AUDIO_TIMER_START) || \
    false)

static inline void trace_audio_timer_start(int interval)
{
    if (trace_event_get_state(TRACE_AUDIO_TIMER_START)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 30 "../xemu/audio/trace-events"
            qemu_log("audio_timer_start " "interval %d ms" "\n", interval);
#line 356 "trace/trace-audio.h"
        }
    }
}

#define TRACE_AUDIO_TIMER_STOP_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_AUDIO_TIMER_STOP) || \
    false)

static inline void trace_audio_timer_stop(void)
{
    if (trace_event_get_state(TRACE_AUDIO_TIMER_STOP)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 31 "../xemu/audio/trace-events"
            qemu_log("audio_timer_stop " "" "\n");
#line 371 "trace/trace-audio.h"
        }
    }
}

#define TRACE_AUDIO_TIMER_DELAYED_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_AUDIO_TIMER_DELAYED) || \
    false)

static inline void trace_audio_timer_delayed(int interval)
{
    if (trace_event_get_state(TRACE_AUDIO_TIMER_DELAYED)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 32 "../xemu/audio/trace-events"
            qemu_log("audio_timer_delayed " "interval %d ms" "\n", interval);
#line 386 "trace/trace-audio.h"
        }
    }
}
#endif /* TRACE_AUDIO_GENERATED_TRACERS_H */
