#include <linux/debugfs.h>
#include <linux/sched/signal.h>
#include <linux/sched/clock.h>
#include <sound/sof/ipc4/header.h>
#include "sof-priv.h"
#include "ipc4-priv.h"
#define FW_EPOCH_DELTA …
#define MAX_ALLOWED_LIBRARIES …
#define SOF_IPC4_INVALID_SLOT_OFFSET …
#define SOF_MTRACE_SLOT_CORE_MASK …
#define SOF_MTRACE_SLOT_TYPE_MASK …
#define DEFAULT_AGING_TIMER_PERIOD_MS …
#define DEFAULT_FIFO_FULL_TIMER_PERIOD_MS …
#define SOF_MTRACE_LOG_LEVEL_CRITICAL …
#define SOF_MTRACE_LOG_LEVEL_ERROR …
#define SOF_MTRACE_LOG_LEVEL_WARNING …
#define SOF_MTRACE_LOG_LEVEL_INFO …
#define SOF_MTRACE_LOG_LEVEL_VERBOSE …
#define SOF_MTRACE_LOG_SOURCE_INFRA …
#define SOF_MTRACE_LOG_SOURCE_HAL …
#define SOF_MTRACE_LOG_SOURCE_MODULE …
#define SOF_MTRACE_LOG_SOURCE_AUDIO …
#define SOF_MTRACE_LOG_SOURCE_SCHEDULER …
#define SOF_MTRACE_LOG_SOURCE_ULP_INFRA …
#define SOF_MTRACE_LOG_SOURCE_ULP_MODULE …
#define SOF_MTRACE_LOG_SOURCE_VISION …
#define DEFAULT_LOGS_PRIORITIES_MASK …
struct sof_log_state_info { … } __packed;
enum sof_mtrace_state { … };
struct sof_mtrace_core_data { … };
struct sof_mtrace_priv { … };
static int sof_ipc4_mtrace_dfs_open(struct inode *inode, struct file *file)
{ … }
static bool sof_wait_mtrace_avail(struct sof_mtrace_core_data *core_data)
{ … }
static ssize_t sof_ipc4_mtrace_dfs_read(struct file *file, char __user *buffer,
size_t count, loff_t *ppos)
{ … }
static int sof_ipc4_mtrace_dfs_release(struct inode *inode, struct file *file)
{ … }
static const struct file_operations sof_dfs_mtrace_fops = …;
static ssize_t sof_ipc4_priority_mask_dfs_read(struct file *file, char __user *to,
size_t count, loff_t *ppos)
{ … }
static ssize_t sof_ipc4_priority_mask_dfs_write(struct file *file,
const char __user *from,
size_t count, loff_t *ppos)
{ … }
static const struct file_operations sof_dfs_priority_mask_fops = …;
static int mtrace_debugfs_create(struct snd_sof_dev *sdev)
{ … }
static int ipc4_mtrace_enable(struct snd_sof_dev *sdev)
{ … }
static void ipc4_mtrace_disable(struct snd_sof_dev *sdev)
{ … }
static void sof_mtrace_find_core_slots(struct snd_sof_dev *sdev)
{ … }
static int ipc4_mtrace_init(struct snd_sof_dev *sdev)
{ … }
static void ipc4_mtrace_free(struct snd_sof_dev *sdev)
{ … }
static int sof_ipc4_mtrace_update_pos_all_cores(struct snd_sof_dev *sdev)
{ … }
int sof_ipc4_mtrace_update_pos(struct snd_sof_dev *sdev, int core)
{ … }
static void ipc4_mtrace_fw_crashed(struct snd_sof_dev *sdev)
{ … }
static int ipc4_mtrace_resume(struct snd_sof_dev *sdev)
{ … }
static void ipc4_mtrace_suspend(struct snd_sof_dev *sdev, pm_message_t pm_state)
{ … }
const struct sof_ipc_fw_tracing_ops ipc4_mtrace_ops = …;