#include <linux/debugfs.h>
#include <linux/errno.h>
#include <linux/list.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/slab.h>
#include <sound/sof/ipc4/header.h>
#include "ops.h"
#include "sof-client.h"
#include "sof-priv.h"
#include "ipc3-priv.h"
#include "ipc4-priv.h"
struct sof_ipc_event_entry { … };
struct sof_state_event_entry { … };
static void sof_client_auxdev_release(struct device *dev)
{ … }
static int sof_client_dev_add_data(struct sof_client_dev *cdev, const void *data,
size_t size)
{ … }
#if IS_ENABLED(CONFIG_SND_SOC_SOF_DEBUG_IPC_FLOOD_TEST)
static int sof_register_ipc_flood_test(struct snd_sof_dev *sdev)
{ … }
static void sof_unregister_ipc_flood_test(struct snd_sof_dev *sdev)
{ … }
#else
static inline int sof_register_ipc_flood_test(struct snd_sof_dev *sdev)
{
return 0;
}
static inline void sof_unregister_ipc_flood_test(struct snd_sof_dev *sdev) {}
#endif
#if IS_ENABLED(CONFIG_SND_SOC_SOF_DEBUG_IPC_MSG_INJECTOR)
static int sof_register_ipc_msg_injector(struct snd_sof_dev *sdev)
{ … }
static void sof_unregister_ipc_msg_injector(struct snd_sof_dev *sdev)
{ … }
#else
static inline int sof_register_ipc_msg_injector(struct snd_sof_dev *sdev)
{
return 0;
}
static inline void sof_unregister_ipc_msg_injector(struct snd_sof_dev *sdev) {}
#endif
#if IS_ENABLED(CONFIG_SND_SOC_SOF_DEBUG_IPC_KERNEL_INJECTOR)
static int sof_register_ipc_kernel_injector(struct snd_sof_dev *sdev)
{ … }
static void sof_unregister_ipc_kernel_injector(struct snd_sof_dev *sdev)
{ … }
#else
static inline int sof_register_ipc_kernel_injector(struct snd_sof_dev *sdev)
{
return 0;
}
static inline void sof_unregister_ipc_kernel_injector(struct snd_sof_dev *sdev) {}
#endif
int sof_register_clients(struct snd_sof_dev *sdev)
{ … }
void sof_unregister_clients(struct snd_sof_dev *sdev)
{ … }
int sof_client_dev_register(struct snd_sof_dev *sdev, const char *name, u32 id,
const void *data, size_t size)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
void sof_client_dev_unregister(struct snd_sof_dev *sdev, const char *name, u32 id)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
int sof_client_ipc_tx_message(struct sof_client_dev *cdev, void *ipc_msg,
void *reply_data, size_t reply_bytes)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
int sof_client_ipc_rx_message(struct sof_client_dev *cdev, void *ipc_msg, void *msg_buf)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
int sof_client_ipc_set_get_data(struct sof_client_dev *cdev, void *ipc_msg,
bool set)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
#ifdef CONFIG_SND_SOC_SOF_IPC4
struct sof_ipc4_fw_module *sof_client_ipc4_find_module(struct sof_client_dev *c, const guid_t *uuid)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
#endif
int sof_suspend_clients(struct snd_sof_dev *sdev, pm_message_t state)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
int sof_resume_clients(struct snd_sof_dev *sdev)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
struct dentry *sof_client_get_debugfs_root(struct sof_client_dev *cdev)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
struct device *sof_client_get_dma_dev(struct sof_client_dev *cdev)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
const struct sof_ipc_fw_version *sof_client_get_fw_version(struct sof_client_dev *cdev)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
size_t sof_client_get_ipc_max_payload_size(struct sof_client_dev *cdev)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
enum sof_ipc_type sof_client_get_ipc_type(struct sof_client_dev *cdev)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
int sof_client_core_module_get(struct sof_client_dev *cdev)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
void sof_client_core_module_put(struct sof_client_dev *cdev)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
void sof_client_ipc_rx_dispatcher(struct snd_sof_dev *sdev, void *msg_buf)
{ … }
int sof_client_register_ipc_rx_handler(struct sof_client_dev *cdev,
u32 ipc_msg_type,
sof_client_event_callback callback)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
void sof_client_unregister_ipc_rx_handler(struct sof_client_dev *cdev,
u32 ipc_msg_type)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
void sof_client_fw_state_dispatcher(struct snd_sof_dev *sdev)
{ … }
int sof_client_register_fw_state_handler(struct sof_client_dev *cdev,
sof_client_fw_state_callback callback)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
void sof_client_unregister_fw_state_handler(struct sof_client_dev *cdev)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
enum sof_fw_state sof_client_get_fw_state(struct sof_client_dev *cdev)
{ … }
EXPORT_SYMBOL_NS_GPL(…);