1 /* SPDX-License-Identifier: GPL-2.0-only */ 1 2 3 #ifndef __SOC_SOF_CLIENT_H 4 #define __SOC_SOF_CLIENT_H 5 6 #include <linux/auxiliary_bus.h> 7 #include <linux/device.h> 8 #include <linux/list.h> 9 #include <sound/sof.h> 10 11 struct sof_ipc_fw_version; 12 struct sof_ipc_cmd_hdr; 13 struct snd_sof_dev; 14 struct dentry; 15 16 struct sof_ipc4_fw_module; 17 18 /** 19 * struct sof_client_dev - SOF client device 20 * @auxdev: auxiliary device 21 * @sdev: pointer to SOF core device str 22 * @list: item in SOF core client dev li 23 * @data: device specific data 24 */ 25 struct sof_client_dev { 26 struct auxiliary_device auxdev; 27 struct snd_sof_dev *sdev; 28 struct list_head list; 29 void *data; 30 }; 31 32 #define sof_client_dev_to_sof_dev(cdev) 33 34 #define auxiliary_dev_to_sof_client_dev(auxili 35 container_of(auxiliary_dev, struct sof 36 37 #define dev_to_sof_client_dev(dev) \ 38 container_of(to_auxiliary_dev(dev), st 39 40 int sof_client_ipc_tx_message(struct sof_clien 41 void *reply_data 42 static inline int sof_client_ipc_tx_message_no 43 { 44 return sof_client_ipc_tx_message(cdev, 45 } 46 int sof_client_ipc_set_get_data(struct sof_cli 47 bool set); 48 49 struct sof_ipc4_fw_module *sof_client_ipc4_fin 50 51 struct dentry *sof_client_get_debugfs_root(str 52 struct device *sof_client_get_dma_dev(struct s 53 const struct sof_ipc_fw_version *sof_client_ge 54 size_t sof_client_get_ipc_max_payload_size(str 55 enum sof_ipc_type sof_client_get_ipc_type(stru 56 57 /* module refcount management of SOF core */ 58 int sof_client_core_module_get(struct sof_clie 59 void sof_client_core_module_put(struct sof_cli 60 61 /* IPC notification */ 62 typedef void (*sof_client_event_callback)(stru 63 64 int sof_client_register_ipc_rx_handler(struct 65 u32 ipc 66 sof_cli 67 void sof_client_unregister_ipc_rx_handler(stru 68 u32 69 70 /* DSP state notification and query */ 71 typedef void (*sof_client_fw_state_callback)(s 72 e 73 74 int sof_client_register_fw_state_handler(struc 75 sof_c 76 void sof_client_unregister_fw_state_handler(st 77 enum sof_fw_state sof_client_get_fw_state(stru 78 int sof_client_ipc_rx_message(struct sof_clien 79 80 #endif /* __SOC_SOF_CLIENT_H */ 81
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.