linux/sound/soc/intel/avs/messages.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright(c) 2021-2022 Intel Corporation
 *
 * Authors: Cezary Rojewski <[email protected]>
 *          Amadeusz Slawinski <[email protected]>
 */

#ifndef __SOUND_SOC_INTEL_AVS_MSGS_H
#define __SOUND_SOC_INTEL_AVS_MSGS_H

#include <linux/sizes.h>

struct avs_dev;

#define AVS_MAILBOX_SIZE

enum avs_msg_target {};

enum avs_msg_direction {};

enum avs_global_msg_type {};

avs_global_msg __packed;
static_assert();

struct avs_tlv {} __packed;
static_assert();

enum avs_module_msg_type {};

avs_module_msg __packed;
static_assert();

#define AVS_IPC_NOT_SUPPORTED

avs_reply_msg __packed;
static_assert();

enum avs_notify_msg_type {};

avs_notify_msg __packed;
static_assert();

#define AVS_MSG(hdr)

#define AVS_GLOBAL_REQUEST(msg_type)

#define AVS_MODULE_REQUEST(msg_type)

#define AVS_NOTIFICATION(msg_type)

#define avs_msg_is_reply(hdr)

/* Notification types */

struct avs_notify_voice_data {} __packed;
static_assert();

struct avs_notify_res_data {} __packed;
static_assert();

struct avs_notify_mod_data {} __packed;
static_assert();

/* ROM messages */
enum avs_rom_control_msg_type {};

int avs_ipc_set_boot_config(struct avs_dev *adev, u32 dma_id, u32 purge);

/* Code loading messages */
int avs_ipc_load_modules(struct avs_dev *adev, u16 *mod_ids, u32 num_mod_ids);
int avs_ipc_unload_modules(struct avs_dev *adev, u16 *mod_ids, u32 num_mod_ids);
int avs_ipc_load_library(struct avs_dev *adev, u32 dma_id, u32 lib_id);

/* Pipeline management messages */
enum avs_pipeline_state {};

int avs_ipc_create_pipeline(struct avs_dev *adev, u16 req_size, u8 priority,
			    u8 instance_id, bool lp, u16 attributes);
int avs_ipc_delete_pipeline(struct avs_dev *adev, u8 instance_id);
int avs_ipc_set_pipeline_state(struct avs_dev *adev, u8 instance_id,
			       enum avs_pipeline_state state);
int avs_ipc_get_pipeline_state(struct avs_dev *adev, u8 instance_id,
			       enum avs_pipeline_state *state);

/* Module management messages */
int avs_ipc_init_instance(struct avs_dev *adev, u16 module_id, u8 instance_id,
			  u8 ppl_id, u8 core_id, u8 domain,
			  void *param, u32 param_size);
int avs_ipc_delete_instance(struct avs_dev *adev, u16 module_id, u8 instance_id);
int avs_ipc_bind(struct avs_dev *adev, u16 module_id, u8 instance_id,
		 u16 dst_module_id, u8 dst_instance_id,
		 u8 dst_queue, u8 src_queue);
int avs_ipc_unbind(struct avs_dev *adev, u16 module_id, u8 instance_id,
		   u16 dst_module_id, u8 dst_instance_id,
		   u8 dst_queue, u8 src_queue);
int avs_ipc_set_large_config(struct avs_dev *adev, u16 module_id,
			     u8 instance_id, u8 param_id,
			     u8 *request, size_t request_size);
int avs_ipc_get_large_config(struct avs_dev *adev, u16 module_id, u8 instance_id,
			     u8 param_id, u8 *request_data, size_t request_size,
			     u8 **reply_data, size_t *reply_size);

/* DSP cores and domains power management messages */
struct avs_dxstate_info {} __packed;
static_assert();

int avs_ipc_set_dx(struct avs_dev *adev, u32 core_mask, bool powerup);
int avs_ipc_set_d0ix(struct avs_dev *adev, bool enable_pg, bool streaming);

/* Base-firmware runtime parameters */

#define AVS_BASEFW_MOD_ID
#define AVS_BASEFW_INST_ID

enum avs_basefw_runtime_param {};

enum avs_log_enable {};

enum avs_skl_log_priority {};

struct avs_skl_log_state {} __packed;
static_assert();

struct avs_skl_log_state_info {} __packed;
static_assert();

struct avs_apl_log_state_info {} __packed;
static_assert();

enum avs_icl_log_priority {};

enum avs_icl_log_source {};

struct avs_icl_log_state_info {} __packed;
static_assert();

int avs_ipc_set_enable_logs(struct avs_dev *adev, u8 *log_info, size_t size);

struct avs_fw_version {};

enum avs_fw_cfg_params {};

struct avs_fw_cfg {};

int avs_ipc_get_fw_config(struct avs_dev *adev, struct avs_fw_cfg *cfg);

enum avs_hw_cfg_params {};

enum avs_iface_version {};

enum avs_i2s_version {};

struct avs_i2s_caps {};

struct avs_hw_cfg {};

int avs_ipc_get_hw_config(struct avs_dev *adev, struct avs_hw_cfg *cfg);

#define AVS_MODULE_LOAD_TYPE_BUILTIN
#define AVS_MODULE_LOAD_TYPE_LOADABLE
#define AVS_MODULE_STATE_LOADED

struct avs_module_type {} __packed;
static_assert();

avs_segment_flags __packed;
static_assert();

struct avs_segment_desc {} __packed;
static_assert();

struct avs_module_entry {} __packed;
static_assert();

struct avs_mods_info {} __packed;
static_assert();

static inline bool avs_module_entry_is_loaded(struct avs_module_entry *mentry)
{}

int avs_ipc_get_modules_info(struct avs_dev *adev, struct avs_mods_info **info);

struct avs_sys_time {} __packed;
static_assert();

int avs_ipc_set_system_time(struct avs_dev *adev);

/* Module configuration */

#define AVS_MIXIN_MOD_UUID

#define AVS_MIXOUT_MOD_UUID

#define AVS_COPIER_MOD_UUID

#define AVS_PEAKVOL_MOD_UUID

#define AVS_GAIN_MOD_UUID

#define AVS_KPBUFF_MOD_UUID

#define AVS_MICSEL_MOD_UUID

#define AVS_MUX_MOD_UUID

#define AVS_UPDWMIX_MOD_UUID

#define AVS_SRCINTC_MOD_UUID

#define AVS_PROBE_MOD_UUID

#define AVS_AEC_MOD_UUID

#define AVS_ASRC_MOD_UUID

#define AVS_INTELWOV_MOD_UUID

/* channel map */
enum avs_channel_index {};

enum avs_channel_config {};

enum avs_interleaving {};

enum avs_sample_type {};

#define AVS_CHANNELS_MAX
#define AVS_ALL_CHANNELS_MASK

struct avs_audio_format {} __packed;
static_assert();

struct avs_modcfg_base {} __packed;
static_assert();

struct avs_pin_format {} __packed;
static_assert();

struct avs_modcfg_ext {} __packed;
static_assert();

enum avs_dma_type {};

avs_virtual_index __packed;
static_assert();

avs_connector_node_id __packed;
static_assert();

#define INVALID_PIPELINE_ID
#define INVALID_NODE_ID

avs_gtw_attributes __packed;
static_assert();

struct avs_copier_gtw_cfg {} __packed;
static_assert();

struct avs_copier_cfg {} __packed;
static_assert();

struct avs_volume_cfg {} __packed;
static_assert();

struct avs_peakvol_cfg {} __packed;
static_assert();

struct avs_micsel_cfg {} __packed;
static_assert();

struct avs_mux_cfg {} __packed;
static_assert();

struct avs_updown_mixer_cfg {} __packed;
static_assert();

struct avs_src_cfg {} __packed;
static_assert();

struct avs_probe_gtw_cfg {} __packed;
static_assert();

struct avs_probe_cfg {} __packed;
static_assert();

struct avs_aec_cfg {} __packed;
static_assert();

struct avs_asrc_cfg {} __packed;
static_assert();

struct avs_wov_cfg {} __packed;
static_assert();

/* Module runtime parameters */

enum avs_copier_runtime_param {};

struct avs_copier_sink_format {} __packed;
static_assert();

int avs_ipc_copier_set_sink_format(struct avs_dev *adev, u16 module_id,
				   u8 instance_id, u32 sink_id,
				   const struct avs_audio_format *src_fmt,
				   const struct avs_audio_format *sink_fmt);

enum avs_peakvol_runtime_param {};

enum avs_audio_curve_type {};

int avs_ipc_peakvol_set_volume(struct avs_dev *adev, u16 module_id, u8 instance_id,
			       struct avs_volume_cfg *vol);
int avs_ipc_peakvol_get_volume(struct avs_dev *adev, u16 module_id, u8 instance_id,
			       struct avs_volume_cfg **vols, size_t *num_vols);

#define AVS_PROBE_INST_ID

enum avs_probe_runtime_param {};

struct avs_probe_dma {} __packed;
static_assert();

enum avs_probe_type {};

avs_probe_point_id __packed;
static_assert();

enum avs_connection_purpose {};

struct avs_probe_point_desc {} __packed;
static_assert();

int avs_ipc_probe_get_dma(struct avs_dev *adev, struct avs_probe_dma **dmas, size_t *num_dmas);
int avs_ipc_probe_attach_dma(struct avs_dev *adev, struct avs_probe_dma *dmas, size_t num_dmas);
int avs_ipc_probe_detach_dma(struct avs_dev *adev, union avs_connector_node_id *node_ids,
			     size_t num_node_ids);
int avs_ipc_probe_get_points(struct avs_dev *adev, struct avs_probe_point_desc **descs,
			     size_t *num_descs);
int avs_ipc_probe_connect_points(struct avs_dev *adev, struct avs_probe_point_desc *descs,
				 size_t num_descs);
int avs_ipc_probe_disconnect_points(struct avs_dev *adev, union avs_probe_point_id *ids,
				    size_t num_ids);

#endif /* __SOUND_SOC_INTEL_AVS_MSGS_H */