#include <linux/debugfs.h>
#include <linux/sched/signal.h>
#include "sof-priv.h"
#include "sof-audio.h"
#include "ops.h"
#include "sof-utils.h"
#include "ipc3-priv.h"
#define TRACE_FILTER_ELEMENTS_PER_ENTRY …
#define TRACE_FILTER_MAX_CONFIG_STRING_LENGTH …
enum sof_dtrace_state { … };
struct sof_dtrace_priv { … };
static bool trace_pos_update_expected(struct sof_dtrace_priv *priv)
{ … }
static int trace_filter_append_elem(struct snd_sof_dev *sdev, u32 key, u32 value,
struct sof_ipc_trace_filter_elem *elem_list,
int capacity, int *counter)
{ … }
static int trace_filter_parse_entry(struct snd_sof_dev *sdev, const char *line,
struct sof_ipc_trace_filter_elem *elem,
int capacity, int *counter)
{ … }
static int trace_filter_parse(struct snd_sof_dev *sdev, char *string,
int *out_elem_cnt,
struct sof_ipc_trace_filter_elem **out)
{ … }
static int ipc3_trace_update_filter(struct snd_sof_dev *sdev, int num_elems,
struct sof_ipc_trace_filter_elem *elems)
{ … }
static ssize_t dfsentry_trace_filter_write(struct file *file, const char __user *from,
size_t count, loff_t *ppos)
{ … }
static const struct file_operations sof_dfs_trace_filter_fops = …;
static int debugfs_create_trace_filter(struct snd_sof_dev *sdev)
{ … }
static bool sof_dtrace_set_host_offset(struct sof_dtrace_priv *priv, u32 new_offset)
{ … }
static size_t sof_dtrace_avail(struct snd_sof_dev *sdev,
loff_t pos, size_t buffer_size)
{ … }
static size_t sof_wait_dtrace_avail(struct snd_sof_dev *sdev, loff_t pos,
size_t buffer_size)
{ … }
static ssize_t dfsentry_dtrace_read(struct file *file, char __user *buffer,
size_t count, loff_t *ppos)
{ … }
static int dfsentry_dtrace_release(struct inode *inode, struct file *file)
{ … }
static const struct file_operations sof_dfs_dtrace_fops = …;
static int debugfs_create_dtrace(struct snd_sof_dev *sdev)
{ … }
static int ipc3_dtrace_enable(struct snd_sof_dev *sdev)
{ … }
static int ipc3_dtrace_init(struct snd_sof_dev *sdev)
{ … }
int ipc3_dtrace_posn_update(struct snd_sof_dev *sdev,
struct sof_ipc_dma_trace_posn *posn)
{ … }
static void ipc3_dtrace_fw_crashed(struct snd_sof_dev *sdev)
{ … }
static void ipc3_dtrace_release(struct snd_sof_dev *sdev, bool only_stop)
{ … }
static void ipc3_dtrace_suspend(struct snd_sof_dev *sdev, pm_message_t pm_state)
{ … }
static int ipc3_dtrace_resume(struct snd_sof_dev *sdev)
{ … }
static void ipc3_dtrace_free(struct snd_sof_dev *sdev)
{ … }
const struct sof_ipc_fw_tracing_ops ipc3_dtrace_ops = …;