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

#ifndef TRACE_HW_AUDIO_GENERATED_TRACERS_H
#define TRACE_HW_AUDIO_GENERATED_TRACERS_H

#include "trace/control.h"

extern TraceEvent _TRACE_CS4231_MEM_READL_DREG_EVENT;
extern TraceEvent _TRACE_CS4231_MEM_READL_REG_EVENT;
extern TraceEvent _TRACE_CS4231_MEM_WRITEL_REG_EVENT;
extern TraceEvent _TRACE_CS4231_MEM_WRITEL_DREG_EVENT;
extern TraceEvent _TRACE_ES1370_FRAME_ADDRESS_RD_EVENT;
extern TraceEvent _TRACE_ES1370_FRAME_ADDRESS_WR_EVENT;
extern TraceEvent _TRACE_ES1370_FRAME_COUNT_RD_EVENT;
extern TraceEvent _TRACE_ES1370_FRAME_COUNT_WR_EVENT;
extern TraceEvent _TRACE_ES1370_LOST_INTERRUPT_EVENT;
extern TraceEvent _TRACE_ES1370_SAMPLE_COUNT_RD_EVENT;
extern TraceEvent _TRACE_ES1370_SAMPLE_COUNT_WR_EVENT;
extern TraceEvent _TRACE_ES1370_STREAM_FORMAT_EVENT;
extern TraceEvent _TRACE_ES1370_TRANSFER_AUDIO_EVENT;
extern TraceEvent _TRACE_HDA_AUDIO_RUNNING_EVENT;
extern TraceEvent _TRACE_HDA_AUDIO_FORMAT_EVENT;
extern TraceEvent _TRACE_HDA_AUDIO_ADJUST_EVENT;
extern TraceEvent _TRACE_HDA_AUDIO_OVERRUN_EVENT;
extern TraceEvent _TRACE_PCSPK_IO_READ_EVENT;
extern TraceEvent _TRACE_PCSPK_IO_WRITE_EVENT;
extern TraceEvent _TRACE_VIA_AC97_CODEC_WRITE_EVENT;
extern TraceEvent _TRACE_VIA_AC97_SGD_FETCH_EVENT;
extern TraceEvent _TRACE_VIA_AC97_SGD_READ_EVENT;
extern TraceEvent _TRACE_VIA_AC97_SGD_WRITE_EVENT;
extern TraceEvent _TRACE_ASC_READ_FIFO_EVENT;
extern TraceEvent _TRACE_ASC_READ_REG_EVENT;
extern TraceEvent _TRACE_ASC_READ_EXTREG_EVENT;
extern TraceEvent _TRACE_ASC_FIFO_GET_EVENT;
extern TraceEvent _TRACE_ASC_WRITE_FIFO_EVENT;
extern TraceEvent _TRACE_ASC_WRITE_REG_EVENT;
extern TraceEvent _TRACE_ASC_WRITE_EXTREG_EVENT;
extern TraceEvent _TRACE_ASC_UPDATE_IRQ_EVENT;
extern TraceEvent _TRACE_VIRTIO_SND_GET_CONFIG_EVENT;
extern TraceEvent _TRACE_VIRTIO_SND_GET_FEATURES_EVENT;
extern TraceEvent _TRACE_VIRTIO_SND_VM_STATE_RUNNING_EVENT;
extern TraceEvent _TRACE_VIRTIO_SND_VM_STATE_STOPPED_EVENT;
extern TraceEvent _TRACE_VIRTIO_SND_REALIZE_EVENT;
extern TraceEvent _TRACE_VIRTIO_SND_UNREALIZE_EVENT;
extern TraceEvent _TRACE_VIRTIO_SND_HANDLE_PCM_SET_PARAMS_EVENT;
extern TraceEvent _TRACE_VIRTIO_SND_HANDLE_CTRL_EVENT;
extern TraceEvent _TRACE_VIRTIO_SND_HANDLE_PCM_INFO_EVENT;
extern TraceEvent _TRACE_VIRTIO_SND_HANDLE_PCM_START_STOP_EVENT;
extern TraceEvent _TRACE_VIRTIO_SND_HANDLE_PCM_RELEASE_EVENT;
extern TraceEvent _TRACE_VIRTIO_SND_HANDLE_CODE_EVENT;
extern TraceEvent _TRACE_VIRTIO_SND_HANDLE_CHMAP_INFO_EVENT;
extern TraceEvent _TRACE_VIRTIO_SND_HANDLE_EVENT_EVENT;
extern TraceEvent _TRACE_VIRTIO_SND_PCM_STREAM_FLUSH_EVENT;
extern TraceEvent _TRACE_VIRTIO_SND_HANDLE_TX_XFER_EVENT;
extern TraceEvent _TRACE_VIRTIO_SND_HANDLE_RX_XFER_EVENT;
extern uint16_t _TRACE_CS4231_MEM_READL_DREG_DSTATE;
extern uint16_t _TRACE_CS4231_MEM_READL_REG_DSTATE;
extern uint16_t _TRACE_CS4231_MEM_WRITEL_REG_DSTATE;
extern uint16_t _TRACE_CS4231_MEM_WRITEL_DREG_DSTATE;
extern uint16_t _TRACE_ES1370_FRAME_ADDRESS_RD_DSTATE;
extern uint16_t _TRACE_ES1370_FRAME_ADDRESS_WR_DSTATE;
extern uint16_t _TRACE_ES1370_FRAME_COUNT_RD_DSTATE;
extern uint16_t _TRACE_ES1370_FRAME_COUNT_WR_DSTATE;
extern uint16_t _TRACE_ES1370_LOST_INTERRUPT_DSTATE;
extern uint16_t _TRACE_ES1370_SAMPLE_COUNT_RD_DSTATE;
extern uint16_t _TRACE_ES1370_SAMPLE_COUNT_WR_DSTATE;
extern uint16_t _TRACE_ES1370_STREAM_FORMAT_DSTATE;
extern uint16_t _TRACE_ES1370_TRANSFER_AUDIO_DSTATE;
extern uint16_t _TRACE_HDA_AUDIO_RUNNING_DSTATE;
extern uint16_t _TRACE_HDA_AUDIO_FORMAT_DSTATE;
extern uint16_t _TRACE_HDA_AUDIO_ADJUST_DSTATE;
extern uint16_t _TRACE_HDA_AUDIO_OVERRUN_DSTATE;
extern uint16_t _TRACE_PCSPK_IO_READ_DSTATE;
extern uint16_t _TRACE_PCSPK_IO_WRITE_DSTATE;
extern uint16_t _TRACE_VIA_AC97_CODEC_WRITE_DSTATE;
extern uint16_t _TRACE_VIA_AC97_SGD_FETCH_DSTATE;
extern uint16_t _TRACE_VIA_AC97_SGD_READ_DSTATE;
extern uint16_t _TRACE_VIA_AC97_SGD_WRITE_DSTATE;
extern uint16_t _TRACE_ASC_READ_FIFO_DSTATE;
extern uint16_t _TRACE_ASC_READ_REG_DSTATE;
extern uint16_t _TRACE_ASC_READ_EXTREG_DSTATE;
extern uint16_t _TRACE_ASC_FIFO_GET_DSTATE;
extern uint16_t _TRACE_ASC_WRITE_FIFO_DSTATE;
extern uint16_t _TRACE_ASC_WRITE_REG_DSTATE;
extern uint16_t _TRACE_ASC_WRITE_EXTREG_DSTATE;
extern uint16_t _TRACE_ASC_UPDATE_IRQ_DSTATE;
extern uint16_t _TRACE_VIRTIO_SND_GET_CONFIG_DSTATE;
extern uint16_t _TRACE_VIRTIO_SND_GET_FEATURES_DSTATE;
extern uint16_t _TRACE_VIRTIO_SND_VM_STATE_RUNNING_DSTATE;
extern uint16_t _TRACE_VIRTIO_SND_VM_STATE_STOPPED_DSTATE;
extern uint16_t _TRACE_VIRTIO_SND_REALIZE_DSTATE;
extern uint16_t _TRACE_VIRTIO_SND_UNREALIZE_DSTATE;
extern uint16_t _TRACE_VIRTIO_SND_HANDLE_PCM_SET_PARAMS_DSTATE;
extern uint16_t _TRACE_VIRTIO_SND_HANDLE_CTRL_DSTATE;
extern uint16_t _TRACE_VIRTIO_SND_HANDLE_PCM_INFO_DSTATE;
extern uint16_t _TRACE_VIRTIO_SND_HANDLE_PCM_START_STOP_DSTATE;
extern uint16_t _TRACE_VIRTIO_SND_HANDLE_PCM_RELEASE_DSTATE;
extern uint16_t _TRACE_VIRTIO_SND_HANDLE_CODE_DSTATE;
extern uint16_t _TRACE_VIRTIO_SND_HANDLE_CHMAP_INFO_DSTATE;
extern uint16_t _TRACE_VIRTIO_SND_HANDLE_EVENT_DSTATE;
extern uint16_t _TRACE_VIRTIO_SND_PCM_STREAM_FLUSH_DSTATE;
extern uint16_t _TRACE_VIRTIO_SND_HANDLE_TX_XFER_DSTATE;
extern uint16_t _TRACE_VIRTIO_SND_HANDLE_RX_XFER_DSTATE;
#define TRACE_CS4231_MEM_READL_DREG_ENABLED 1
#define TRACE_CS4231_MEM_READL_REG_ENABLED 1
#define TRACE_CS4231_MEM_WRITEL_REG_ENABLED 1
#define TRACE_CS4231_MEM_WRITEL_DREG_ENABLED 1
#define TRACE_ES1370_FRAME_ADDRESS_RD_ENABLED 1
#define TRACE_ES1370_FRAME_ADDRESS_WR_ENABLED 1
#define TRACE_ES1370_FRAME_COUNT_RD_ENABLED 1
#define TRACE_ES1370_FRAME_COUNT_WR_ENABLED 1
#define TRACE_ES1370_LOST_INTERRUPT_ENABLED 1
#define TRACE_ES1370_SAMPLE_COUNT_RD_ENABLED 1
#define TRACE_ES1370_SAMPLE_COUNT_WR_ENABLED 1
#define TRACE_ES1370_STREAM_FORMAT_ENABLED 1
#define TRACE_ES1370_TRANSFER_AUDIO_ENABLED 1
#define TRACE_HDA_AUDIO_RUNNING_ENABLED 1
#define TRACE_HDA_AUDIO_FORMAT_ENABLED 1
#define TRACE_HDA_AUDIO_ADJUST_ENABLED 1
#define TRACE_HDA_AUDIO_OVERRUN_ENABLED 1
#define TRACE_PCSPK_IO_READ_ENABLED 1
#define TRACE_PCSPK_IO_WRITE_ENABLED 1
#define TRACE_VIA_AC97_CODEC_WRITE_ENABLED 1
#define TRACE_VIA_AC97_SGD_FETCH_ENABLED 1
#define TRACE_VIA_AC97_SGD_READ_ENABLED 1
#define TRACE_VIA_AC97_SGD_WRITE_ENABLED 1
#define TRACE_ASC_READ_FIFO_ENABLED 1
#define TRACE_ASC_READ_REG_ENABLED 1
#define TRACE_ASC_READ_EXTREG_ENABLED 1
#define TRACE_ASC_FIFO_GET_ENABLED 1
#define TRACE_ASC_WRITE_FIFO_ENABLED 1
#define TRACE_ASC_WRITE_REG_ENABLED 1
#define TRACE_ASC_WRITE_EXTREG_ENABLED 1
#define TRACE_ASC_UPDATE_IRQ_ENABLED 1
#define TRACE_VIRTIO_SND_GET_CONFIG_ENABLED 1
#define TRACE_VIRTIO_SND_GET_FEATURES_ENABLED 1
#define TRACE_VIRTIO_SND_VM_STATE_RUNNING_ENABLED 1
#define TRACE_VIRTIO_SND_VM_STATE_STOPPED_ENABLED 1
#define TRACE_VIRTIO_SND_REALIZE_ENABLED 1
#define TRACE_VIRTIO_SND_UNREALIZE_ENABLED 1
#define TRACE_VIRTIO_SND_HANDLE_PCM_SET_PARAMS_ENABLED 1
#define TRACE_VIRTIO_SND_HANDLE_CTRL_ENABLED 1
#define TRACE_VIRTIO_SND_HANDLE_PCM_INFO_ENABLED 1
#define TRACE_VIRTIO_SND_HANDLE_PCM_START_STOP_ENABLED 1
#define TRACE_VIRTIO_SND_HANDLE_PCM_RELEASE_ENABLED 1
#define TRACE_VIRTIO_SND_HANDLE_CODE_ENABLED 1
#define TRACE_VIRTIO_SND_HANDLE_CHMAP_INFO_ENABLED 1
#define TRACE_VIRTIO_SND_HANDLE_EVENT_ENABLED 1
#define TRACE_VIRTIO_SND_PCM_STREAM_FLUSH_ENABLED 1
#define TRACE_VIRTIO_SND_HANDLE_TX_XFER_ENABLED 1
#define TRACE_VIRTIO_SND_HANDLE_RX_XFER_ENABLED 1
#include "qemu/log-for-trace.h"


#define TRACE_CS4231_MEM_READL_DREG_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_CS4231_MEM_READL_DREG) || \
    false)

static inline void trace_cs4231_mem_readl_dreg(uint32_t reg, uint32_t ret)
{
    if (trace_event_get_state(TRACE_CS4231_MEM_READL_DREG)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 4 "../xemu/hw/audio/trace-events"
            qemu_log("cs4231_mem_readl_dreg " "read dreg %d: 0x%02x" "\n", reg, ret);
#line 167 "trace/trace-hw_audio.h"
        }
    }
}

#define TRACE_CS4231_MEM_READL_REG_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_CS4231_MEM_READL_REG) || \
    false)

static inline void trace_cs4231_mem_readl_reg(uint32_t reg, uint32_t ret)
{
    if (trace_event_get_state(TRACE_CS4231_MEM_READL_REG)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 5 "../xemu/hw/audio/trace-events"
            qemu_log("cs4231_mem_readl_reg " "read reg %d: 0x%08x" "\n", reg, ret);
#line 182 "trace/trace-hw_audio.h"
        }
    }
}

#define TRACE_CS4231_MEM_WRITEL_REG_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_CS4231_MEM_WRITEL_REG) || \
    false)

static inline void trace_cs4231_mem_writel_reg(uint32_t reg, uint32_t old, uint32_t val)
{
    if (trace_event_get_state(TRACE_CS4231_MEM_WRITEL_REG)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 6 "../xemu/hw/audio/trace-events"
            qemu_log("cs4231_mem_writel_reg " "write reg %d: 0x%08x -> 0x%08x" "\n", reg, old, val);
#line 197 "trace/trace-hw_audio.h"
        }
    }
}

#define TRACE_CS4231_MEM_WRITEL_DREG_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_CS4231_MEM_WRITEL_DREG) || \
    false)

static inline void trace_cs4231_mem_writel_dreg(uint32_t reg, uint32_t old, uint32_t val)
{
    if (trace_event_get_state(TRACE_CS4231_MEM_WRITEL_DREG)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 7 "../xemu/hw/audio/trace-events"
            qemu_log("cs4231_mem_writel_dreg " "write dreg %d: 0x%02x -> 0x%02x" "\n", reg, old, val);
#line 212 "trace/trace-hw_audio.h"
        }
    }
}

#define TRACE_ES1370_FRAME_ADDRESS_RD_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_ES1370_FRAME_ADDRESS_RD) || \
    false)

static inline void trace_es1370_frame_address_rd(int ch, uint32_t addr)
{
    if (trace_event_get_state(TRACE_ES1370_FRAME_ADDRESS_RD)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 10 "../xemu/hw/audio/trace-events"
            qemu_log("es1370_frame_address_rd " "ch=%d addr=0x%08x" "\n", ch, addr);
#line 227 "trace/trace-hw_audio.h"
        }
    }
}

#define TRACE_ES1370_FRAME_ADDRESS_WR_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_ES1370_FRAME_ADDRESS_WR) || \
    false)

static inline void trace_es1370_frame_address_wr(int ch, uint32_t addr)
{
    if (trace_event_get_state(TRACE_ES1370_FRAME_ADDRESS_WR)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 11 "../xemu/hw/audio/trace-events"
            qemu_log("es1370_frame_address_wr " "ch=%d addr=0x%08x" "\n", ch, addr);
#line 242 "trace/trace-hw_audio.h"
        }
    }
}

#define TRACE_ES1370_FRAME_COUNT_RD_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_ES1370_FRAME_COUNT_RD) || \
    false)

static inline void trace_es1370_frame_count_rd(int ch, uint32_t curr, uint32_t size)
{
    if (trace_event_get_state(TRACE_ES1370_FRAME_COUNT_RD)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 12 "../xemu/hw/audio/trace-events"
            qemu_log("es1370_frame_count_rd " "ch=%d CURR_CT=%u BUF_SIZE=%u" "\n", ch, curr, size);
#line 257 "trace/trace-hw_audio.h"
        }
    }
}

#define TRACE_ES1370_FRAME_COUNT_WR_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_ES1370_FRAME_COUNT_WR) || \
    false)

static inline void trace_es1370_frame_count_wr(int ch, uint32_t curr, uint32_t size)
{
    if (trace_event_get_state(TRACE_ES1370_FRAME_COUNT_WR)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 13 "../xemu/hw/audio/trace-events"
            qemu_log("es1370_frame_count_wr " "ch=%d CURR_CT=%u BUF_SIZE=%u" "\n", ch, curr, size);
#line 272 "trace/trace-hw_audio.h"
        }
    }
}

#define TRACE_ES1370_LOST_INTERRUPT_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_ES1370_LOST_INTERRUPT) || \
    false)

static inline void trace_es1370_lost_interrupt(int ch)
{
    if (trace_event_get_state(TRACE_ES1370_LOST_INTERRUPT)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 14 "../xemu/hw/audio/trace-events"
            qemu_log("es1370_lost_interrupt " "ch=%d lost interrupt" "\n", ch);
#line 287 "trace/trace-hw_audio.h"
        }
    }
}

#define TRACE_ES1370_SAMPLE_COUNT_RD_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_ES1370_SAMPLE_COUNT_RD) || \
    false)

static inline void trace_es1370_sample_count_rd(int ch, uint32_t curr, uint32_t num)
{
    if (trace_event_get_state(TRACE_ES1370_SAMPLE_COUNT_RD)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 15 "../xemu/hw/audio/trace-events"
            qemu_log("es1370_sample_count_rd " "ch=%d CURR_SAMP_CT=%u SAMP_CT=%u" "\n", ch, curr, num);
#line 302 "trace/trace-hw_audio.h"
        }
    }
}

#define TRACE_ES1370_SAMPLE_COUNT_WR_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_ES1370_SAMPLE_COUNT_WR) || \
    false)

static inline void trace_es1370_sample_count_wr(int ch, uint32_t curr, uint32_t num)
{
    if (trace_event_get_state(TRACE_ES1370_SAMPLE_COUNT_WR)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 16 "../xemu/hw/audio/trace-events"
            qemu_log("es1370_sample_count_wr " "ch=%d CURR_SAMP_CT=%u SAMP_CT=%u" "\n", ch, curr, num);
#line 317 "trace/trace-hw_audio.h"
        }
    }
}

#define TRACE_ES1370_STREAM_FORMAT_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_ES1370_STREAM_FORMAT) || \
    false)

static inline void trace_es1370_stream_format(int ch, uint32_t freq, const char *fmt, const char *mode, uint32_t shift)
{
    if (trace_event_get_state(TRACE_ES1370_STREAM_FORMAT)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 17 "../xemu/hw/audio/trace-events"
            qemu_log("es1370_stream_format " "ch=%d fmt=%u:%s:%s shift=%u" "\n", ch, freq, fmt, mode, shift);
#line 332 "trace/trace-hw_audio.h"
        }
    }
}

#define TRACE_ES1370_TRANSFER_AUDIO_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_ES1370_TRANSFER_AUDIO) || \
    false)

static inline void trace_es1370_transfer_audio(int ch, uint32_t f_curr, uint32_t f_size, uint32_t s_curr, uint32_t s_num, uint32_t leftover, bool irq)
{
    if (trace_event_get_state(TRACE_ES1370_TRANSFER_AUDIO)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 18 "../xemu/hw/audio/trace-events"
            qemu_log("es1370_transfer_audio " "ch=%d CURR_CT=%u BUF_SIZE=%u CURR_SAMP_CT=%u SAMP_CT=%u leftover=%u irq=%d" "\n", ch, f_curr, f_size, s_curr, s_num, leftover, irq);
#line 347 "trace/trace-hw_audio.h"
        }
    }
}

#define TRACE_HDA_AUDIO_RUNNING_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_HDA_AUDIO_RUNNING) || \
    false)

static inline void trace_hda_audio_running(const char *stream, int nr, bool running)
{
    if (trace_event_get_state(TRACE_HDA_AUDIO_RUNNING)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 21 "../xemu/hw/audio/trace-events"
            qemu_log("hda_audio_running " "st %s, nr %d, run %d" "\n", stream, nr, running);
#line 362 "trace/trace-hw_audio.h"
        }
    }
}

#define TRACE_HDA_AUDIO_FORMAT_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_HDA_AUDIO_FORMAT) || \
    false)

static inline void trace_hda_audio_format(const char *stream, int chan, const char *fmt, int freq)
{
    if (trace_event_get_state(TRACE_HDA_AUDIO_FORMAT)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 22 "../xemu/hw/audio/trace-events"
            qemu_log("hda_audio_format " "st %s, %d x %s @ %d Hz" "\n", stream, chan, fmt, freq);
#line 377 "trace/trace-hw_audio.h"
        }
    }
}

#define TRACE_HDA_AUDIO_ADJUST_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_HDA_AUDIO_ADJUST) || \
    false)

static inline void trace_hda_audio_adjust(const char *stream, int pos)
{
    if (trace_event_get_state(TRACE_HDA_AUDIO_ADJUST)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 23 "../xemu/hw/audio/trace-events"
            qemu_log("hda_audio_adjust " "st %s, pos %d" "\n", stream, pos);
#line 392 "trace/trace-hw_audio.h"
        }
    }
}

#define TRACE_HDA_AUDIO_OVERRUN_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_HDA_AUDIO_OVERRUN) || \
    false)

static inline void trace_hda_audio_overrun(const char *stream)
{
    if (trace_event_get_state(TRACE_HDA_AUDIO_OVERRUN)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 24 "../xemu/hw/audio/trace-events"
            qemu_log("hda_audio_overrun " "st %s" "\n", stream);
#line 407 "trace/trace-hw_audio.h"
        }
    }
}

#define TRACE_PCSPK_IO_READ_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_PCSPK_IO_READ) || \
    false)

static inline void trace_pcspk_io_read(uint16_t addr, uint8_t val)
{
    if (trace_event_get_state(TRACE_PCSPK_IO_READ)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 27 "../xemu/hw/audio/trace-events"
            qemu_log("pcspk_io_read " "[0x%"PRIx16"] -> 0x%"PRIx8 "\n", addr, val);
#line 422 "trace/trace-hw_audio.h"
        }
    }
}

#define TRACE_PCSPK_IO_WRITE_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_PCSPK_IO_WRITE) || \
    false)

static inline void trace_pcspk_io_write(uint16_t addr, uint8_t val)
{
    if (trace_event_get_state(TRACE_PCSPK_IO_WRITE)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 28 "../xemu/hw/audio/trace-events"
            qemu_log("pcspk_io_write " "[0x%"PRIx16"] <- 0x%"PRIx8 "\n", addr, val);
#line 437 "trace/trace-hw_audio.h"
        }
    }
}

#define TRACE_VIA_AC97_CODEC_WRITE_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_VIA_AC97_CODEC_WRITE) || \
    false)

static inline void trace_via_ac97_codec_write(uint8_t addr, uint16_t val)
{
    if (trace_event_get_state(TRACE_VIA_AC97_CODEC_WRITE)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 31 "../xemu/hw/audio/trace-events"
            qemu_log("via_ac97_codec_write " "0x%x <- 0x%x" "\n", addr, val);
#line 452 "trace/trace-hw_audio.h"
        }
    }
}

#define TRACE_VIA_AC97_SGD_FETCH_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_VIA_AC97_SGD_FETCH) || \
    false)

static inline void trace_via_ac97_sgd_fetch(uint32_t curr, uint32_t addr, char stop, char eol, char flag, uint32_t len)
{
    if (trace_event_get_state(TRACE_VIA_AC97_SGD_FETCH)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 32 "../xemu/hw/audio/trace-events"
            qemu_log("via_ac97_sgd_fetch " "curr=0x%x addr=0x%x %c%c%c len=%d" "\n", curr, addr, stop, eol, flag, len);
#line 467 "trace/trace-hw_audio.h"
        }
    }
}

#define TRACE_VIA_AC97_SGD_READ_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_VIA_AC97_SGD_READ) || \
    false)

static inline void trace_via_ac97_sgd_read(uint64_t addr, unsigned size, uint64_t val)
{
    if (trace_event_get_state(TRACE_VIA_AC97_SGD_READ)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 33 "../xemu/hw/audio/trace-events"
            qemu_log("via_ac97_sgd_read " "0x%"PRIx64" %d -> 0x%"PRIx64 "\n", addr, size, val);
#line 482 "trace/trace-hw_audio.h"
        }
    }
}

#define TRACE_VIA_AC97_SGD_WRITE_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_VIA_AC97_SGD_WRITE) || \
    false)

static inline void trace_via_ac97_sgd_write(uint64_t addr, unsigned size, uint64_t val)
{
    if (trace_event_get_state(TRACE_VIA_AC97_SGD_WRITE)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 34 "../xemu/hw/audio/trace-events"
            qemu_log("via_ac97_sgd_write " "0x%"PRIx64" %d <- 0x%"PRIx64 "\n", addr, size, val);
#line 497 "trace/trace-hw_audio.h"
        }
    }
}

#define TRACE_ASC_READ_FIFO_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_ASC_READ_FIFO) || \
    false)

static inline void trace_asc_read_fifo(const char fifo, int reg, unsigned size, uint64_t value)
{
    if (trace_event_get_state(TRACE_ASC_READ_FIFO)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 37 "../xemu/hw/audio/trace-events"
            qemu_log("asc_read_fifo " "fifo %c reg=0x%03x size=%u value=0x%"PRIx64 "\n", fifo, reg, size, value);
#line 512 "trace/trace-hw_audio.h"
        }
    }
}

#define TRACE_ASC_READ_REG_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_ASC_READ_REG) || \
    false)

static inline void trace_asc_read_reg(int reg, unsigned size, uint64_t value)
{
    if (trace_event_get_state(TRACE_ASC_READ_REG)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 38 "../xemu/hw/audio/trace-events"
            qemu_log("asc_read_reg " "reg=0x%03x size=%u value=0x%"PRIx64 "\n", reg, size, value);
#line 527 "trace/trace-hw_audio.h"
        }
    }
}

#define TRACE_ASC_READ_EXTREG_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_ASC_READ_EXTREG) || \
    false)

static inline void trace_asc_read_extreg(const char fifo, int reg, unsigned size, uint64_t value)
{
    if (trace_event_get_state(TRACE_ASC_READ_EXTREG)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 39 "../xemu/hw/audio/trace-events"
            qemu_log("asc_read_extreg " "fifo %c reg=0x%03x size=%u value=0x%"PRIx64 "\n", fifo, reg, size, value);
#line 542 "trace/trace-hw_audio.h"
        }
    }
}

#define TRACE_ASC_FIFO_GET_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_ASC_FIFO_GET) || \
    false)

static inline void trace_asc_fifo_get(const char fifo, int rptr, int cnt, uint64_t value)
{
    if (trace_event_get_state(TRACE_ASC_FIFO_GET)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 40 "../xemu/hw/audio/trace-events"
            qemu_log("asc_fifo_get " "fifo %c rptr=0x%x cnt=0x%x value=0x%"PRIx64 "\n", fifo, rptr, cnt, value);
#line 557 "trace/trace-hw_audio.h"
        }
    }
}

#define TRACE_ASC_WRITE_FIFO_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_ASC_WRITE_FIFO) || \
    false)

static inline void trace_asc_write_fifo(const char fifo, int reg, unsigned size, int wrptr, int cnt, uint64_t value)
{
    if (trace_event_get_state(TRACE_ASC_WRITE_FIFO)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 41 "../xemu/hw/audio/trace-events"
            qemu_log("asc_write_fifo " "fifo %c reg=0x%03x size=%u wptr=0x%x cnt=0x%x value=0x%"PRIx64 "\n", fifo, reg, size, wrptr, cnt, value);
#line 572 "trace/trace-hw_audio.h"
        }
    }
}

#define TRACE_ASC_WRITE_REG_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_ASC_WRITE_REG) || \
    false)

static inline void trace_asc_write_reg(int reg, unsigned size, uint64_t value)
{
    if (trace_event_get_state(TRACE_ASC_WRITE_REG)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 42 "../xemu/hw/audio/trace-events"
            qemu_log("asc_write_reg " "reg=0x%03x size=%u value=0x%"PRIx64 "\n", reg, size, value);
#line 587 "trace/trace-hw_audio.h"
        }
    }
}

#define TRACE_ASC_WRITE_EXTREG_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_ASC_WRITE_EXTREG) || \
    false)

static inline void trace_asc_write_extreg(const char fifo, int reg, unsigned size, uint64_t value)
{
    if (trace_event_get_state(TRACE_ASC_WRITE_EXTREG)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 43 "../xemu/hw/audio/trace-events"
            qemu_log("asc_write_extreg " "fifo %c reg=0x%03x size=%u value=0x%"PRIx64 "\n", fifo, reg, size, value);
#line 602 "trace/trace-hw_audio.h"
        }
    }
}

#define TRACE_ASC_UPDATE_IRQ_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_ASC_UPDATE_IRQ) || \
    false)

static inline void trace_asc_update_irq(int irq, int a, int b)
{
    if (trace_event_get_state(TRACE_ASC_UPDATE_IRQ)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 44 "../xemu/hw/audio/trace-events"
            qemu_log("asc_update_irq " "set IRQ to %d (A: 0x%x B: 0x%x)" "\n", irq, a, b);
#line 617 "trace/trace-hw_audio.h"
        }
    }
}

#define TRACE_VIRTIO_SND_GET_CONFIG_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_VIRTIO_SND_GET_CONFIG) || \
    false)

static inline void trace_virtio_snd_get_config(void *vdev, uint32_t jacks, uint32_t streams, uint32_t chmaps)
{
    if (trace_event_get_state(TRACE_VIRTIO_SND_GET_CONFIG)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 47 "../xemu/hw/audio/trace-events"
            qemu_log("virtio_snd_get_config " "snd %p: get_config jacks=%"PRIu32" streams=%"PRIu32" chmaps=%"PRIu32"" "\n", vdev, jacks, streams, chmaps);
#line 632 "trace/trace-hw_audio.h"
        }
    }
}

#define TRACE_VIRTIO_SND_GET_FEATURES_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_VIRTIO_SND_GET_FEATURES) || \
    false)

static inline void trace_virtio_snd_get_features(void *vdev, uint64_t features)
{
    if (trace_event_get_state(TRACE_VIRTIO_SND_GET_FEATURES)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 48 "../xemu/hw/audio/trace-events"
            qemu_log("virtio_snd_get_features " "snd %p: get_features 0x%"PRIx64 "\n", vdev, features);
#line 647 "trace/trace-hw_audio.h"
        }
    }
}

#define TRACE_VIRTIO_SND_VM_STATE_RUNNING_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_VIRTIO_SND_VM_STATE_RUNNING) || \
    false)

static inline void trace_virtio_snd_vm_state_running(void)
{
    if (trace_event_get_state(TRACE_VIRTIO_SND_VM_STATE_RUNNING)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 49 "../xemu/hw/audio/trace-events"
            qemu_log("virtio_snd_vm_state_running " "vm state running" "\n");
#line 662 "trace/trace-hw_audio.h"
        }
    }
}

#define TRACE_VIRTIO_SND_VM_STATE_STOPPED_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_VIRTIO_SND_VM_STATE_STOPPED) || \
    false)

static inline void trace_virtio_snd_vm_state_stopped(void)
{
    if (trace_event_get_state(TRACE_VIRTIO_SND_VM_STATE_STOPPED)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 50 "../xemu/hw/audio/trace-events"
            qemu_log("virtio_snd_vm_state_stopped " "vm state stopped" "\n");
#line 677 "trace/trace-hw_audio.h"
        }
    }
}

#define TRACE_VIRTIO_SND_REALIZE_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_VIRTIO_SND_REALIZE) || \
    false)

static inline void trace_virtio_snd_realize(void *snd)
{
    if (trace_event_get_state(TRACE_VIRTIO_SND_REALIZE)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 51 "../xemu/hw/audio/trace-events"
            qemu_log("virtio_snd_realize " "snd %p: realize" "\n", snd);
#line 692 "trace/trace-hw_audio.h"
        }
    }
}

#define TRACE_VIRTIO_SND_UNREALIZE_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_VIRTIO_SND_UNREALIZE) || \
    false)

static inline void trace_virtio_snd_unrealize(void *snd)
{
    if (trace_event_get_state(TRACE_VIRTIO_SND_UNREALIZE)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 52 "../xemu/hw/audio/trace-events"
            qemu_log("virtio_snd_unrealize " "snd %p: unrealize" "\n", snd);
#line 707 "trace/trace-hw_audio.h"
        }
    }
}

#define TRACE_VIRTIO_SND_HANDLE_PCM_SET_PARAMS_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_VIRTIO_SND_HANDLE_PCM_SET_PARAMS) || \
    false)

static inline void trace_virtio_snd_handle_pcm_set_params(uint32_t stream)
{
    if (trace_event_get_state(TRACE_VIRTIO_SND_HANDLE_PCM_SET_PARAMS)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 53 "../xemu/hw/audio/trace-events"
            qemu_log("virtio_snd_handle_pcm_set_params " "VIRTIO_SND_PCM_SET_PARAMS called for stream %"PRIu32 "\n", stream);
#line 722 "trace/trace-hw_audio.h"
        }
    }
}

#define TRACE_VIRTIO_SND_HANDLE_CTRL_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_VIRTIO_SND_HANDLE_CTRL) || \
    false)

static inline void trace_virtio_snd_handle_ctrl(void *vdev, void *vq)
{
    if (trace_event_get_state(TRACE_VIRTIO_SND_HANDLE_CTRL)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 54 "../xemu/hw/audio/trace-events"
            qemu_log("virtio_snd_handle_ctrl " "snd %p: handle ctrl event for queue %p" "\n", vdev, vq);
#line 737 "trace/trace-hw_audio.h"
        }
    }
}

#define TRACE_VIRTIO_SND_HANDLE_PCM_INFO_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_VIRTIO_SND_HANDLE_PCM_INFO) || \
    false)

static inline void trace_virtio_snd_handle_pcm_info(uint32_t stream)
{
    if (trace_event_get_state(TRACE_VIRTIO_SND_HANDLE_PCM_INFO)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 55 "../xemu/hw/audio/trace-events"
            qemu_log("virtio_snd_handle_pcm_info " "VIRTIO_SND_R_PCM_INFO called for stream %"PRIu32 "\n", stream);
#line 752 "trace/trace-hw_audio.h"
        }
    }
}

#define TRACE_VIRTIO_SND_HANDLE_PCM_START_STOP_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_VIRTIO_SND_HANDLE_PCM_START_STOP) || \
    false)

static inline void trace_virtio_snd_handle_pcm_start_stop(const char *code, uint32_t stream)
{
    if (trace_event_get_state(TRACE_VIRTIO_SND_HANDLE_PCM_START_STOP)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 56 "../xemu/hw/audio/trace-events"
            qemu_log("virtio_snd_handle_pcm_start_stop " "%s called for stream %"PRIu32 "\n", code, stream);
#line 767 "trace/trace-hw_audio.h"
        }
    }
}

#define TRACE_VIRTIO_SND_HANDLE_PCM_RELEASE_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_VIRTIO_SND_HANDLE_PCM_RELEASE) || \
    false)

static inline void trace_virtio_snd_handle_pcm_release(uint32_t stream)
{
    if (trace_event_get_state(TRACE_VIRTIO_SND_HANDLE_PCM_RELEASE)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 57 "../xemu/hw/audio/trace-events"
            qemu_log("virtio_snd_handle_pcm_release " "VIRTIO_SND_PCM_RELEASE called for stream %"PRIu32 "\n", stream);
#line 782 "trace/trace-hw_audio.h"
        }
    }
}

#define TRACE_VIRTIO_SND_HANDLE_CODE_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_VIRTIO_SND_HANDLE_CODE) || \
    false)

static inline void trace_virtio_snd_handle_code(uint32_t val, const char *code)
{
    if (trace_event_get_state(TRACE_VIRTIO_SND_HANDLE_CODE)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 58 "../xemu/hw/audio/trace-events"
            qemu_log("virtio_snd_handle_code " "ctrl code msg val = %"PRIu32" == %s" "\n", val, code);
#line 797 "trace/trace-hw_audio.h"
        }
    }
}

#define TRACE_VIRTIO_SND_HANDLE_CHMAP_INFO_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_VIRTIO_SND_HANDLE_CHMAP_INFO) || \
    false)

static inline void trace_virtio_snd_handle_chmap_info(void)
{
    if (trace_event_get_state(TRACE_VIRTIO_SND_HANDLE_CHMAP_INFO)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 59 "../xemu/hw/audio/trace-events"
            qemu_log("virtio_snd_handle_chmap_info " "VIRTIO_SND_CHMAP_INFO called" "\n");
#line 812 "trace/trace-hw_audio.h"
        }
    }
}

#define TRACE_VIRTIO_SND_HANDLE_EVENT_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_VIRTIO_SND_HANDLE_EVENT) || \
    false)

static inline void trace_virtio_snd_handle_event(void)
{
    if (trace_event_get_state(TRACE_VIRTIO_SND_HANDLE_EVENT)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 60 "../xemu/hw/audio/trace-events"
            qemu_log("virtio_snd_handle_event " "event queue callback called" "\n");
#line 827 "trace/trace-hw_audio.h"
        }
    }
}

#define TRACE_VIRTIO_SND_PCM_STREAM_FLUSH_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_VIRTIO_SND_PCM_STREAM_FLUSH) || \
    false)

static inline void trace_virtio_snd_pcm_stream_flush(uint32_t stream)
{
    if (trace_event_get_state(TRACE_VIRTIO_SND_PCM_STREAM_FLUSH)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 61 "../xemu/hw/audio/trace-events"
            qemu_log("virtio_snd_pcm_stream_flush " "flushing stream %"PRIu32 "\n", stream);
#line 842 "trace/trace-hw_audio.h"
        }
    }
}

#define TRACE_VIRTIO_SND_HANDLE_TX_XFER_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_VIRTIO_SND_HANDLE_TX_XFER) || \
    false)

static inline void trace_virtio_snd_handle_tx_xfer(void)
{
    if (trace_event_get_state(TRACE_VIRTIO_SND_HANDLE_TX_XFER)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 62 "../xemu/hw/audio/trace-events"
            qemu_log("virtio_snd_handle_tx_xfer " "tx queue callback called" "\n");
#line 857 "trace/trace-hw_audio.h"
        }
    }
}

#define TRACE_VIRTIO_SND_HANDLE_RX_XFER_BACKEND_DSTATE() ( \
    trace_event_get_state_dynamic_by_id(TRACE_VIRTIO_SND_HANDLE_RX_XFER) || \
    false)

static inline void trace_virtio_snd_handle_rx_xfer(void)
{
    if (trace_event_get_state(TRACE_VIRTIO_SND_HANDLE_RX_XFER)) {
        if (qemu_loglevel_mask(LOG_TRACE)) {
#line 63 "../xemu/hw/audio/trace-events"
            qemu_log("virtio_snd_handle_rx_xfer " "rx queue callback called" "\n");
#line 872 "trace/trace-hw_audio.h"
        }
    }
}
#endif /* TRACE_HW_AUDIO_GENERATED_TRACERS_H */
