Commit e32acf7b authored by Mark Brown's avatar Mark Brown

ASoC: SOF: ipc4-topology: Add support for effect

Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>:

The following series will add support for IPC4 process modules as effect
widgets.  We can cover wide range of modules as a generic process or
effect module, the patches will lay down the fundation and the generic
code to handle them.

At initialization time process modules can receive additional
information on top of the base_cfg, which is defined as base_cfg_ext, an
extension for the base configuration struct.  Other parameters or blobs
for these modules are sent as a separate message via
LARGE_CONFIG message, which is handled by the existing bytes control support.
parents 6a36690a 811a742f
This diff is collapsed.
......@@ -26,6 +26,10 @@
#define SOF_IPC4_MODULE_LL BIT(5)
#define SOF_IPC4_MODULE_DP BIT(6)
#define SOF_IPC4_MODULE_LIB_CODE BIT(7)
#define SOF_IPC4_MODULE_INIT_CONFIG_MASK GENMASK(11, 8)
#define SOF_IPC4_MODULE_INIT_CONFIG_TYPE_BASE_CFG 0
#define SOF_IPC4_MODULE_INIT_CONFIG_TYPE_BASE_CFG_WITH_EXT 1
#define SOF_IPC4_MODULE_INSTANCE_LIST_ITEM_SIZE 12
#define SOF_IPC4_PIPELINE_OBJECT_SIZE 448
......@@ -347,4 +351,45 @@ struct sof_ipc4_src {
struct sof_ipc4_msg msg;
};
/**
* struct sof_ipc4_base_module_cfg_ext - base module config extension containing the pin format
* information for the module. Both @num_input_pin_fmts and @num_output_pin_fmts cannot be 0 for a
* module.
* @num_input_pin_fmts: number of input pin formats in the @pin_formats array
* @num_output_pin_fmts: number of output pin formats in the @pin_formats array
* @reserved: reserved for future use
* @pin_formats: flexible array consisting of @num_input_pin_fmts input pin format items followed
* by @num_output_pin_fmts output pin format items
*/
struct sof_ipc4_base_module_cfg_ext {
u16 num_input_pin_fmts;
u16 num_output_pin_fmts;
u8 reserved[12];
DECLARE_FLEX_ARRAY(struct sof_ipc4_pin_format, pin_formats);
} __packed;
/**
* struct sof_ipc4_process - process config data
* @base_config: IPC base config data
* @base_config_ext: Base config extension data for module init
* @output_format: Output audio format
* @available_fmt: Available audio format
* @ipc_config_data: Process module config data
* @ipc_config_size: Size of process module config data
* @msg: IPC4 message struct containing header and data info
* @base_config_ext_size: Size of the base config extension data in bytes
* @init_config: Module init config type (SOF_IPC4_MODULE_INIT_CONFIG_TYPE_*)
*/
struct sof_ipc4_process {
struct sof_ipc4_base_module_cfg base_config;
struct sof_ipc4_base_module_cfg_ext *base_config_ext;
struct sof_ipc4_audio_format output_format;
struct sof_ipc4_available_audio_format available_fmt;
void *ipc_config_data;
uint32_t ipc_config_size;
struct sof_ipc4_msg msg;
u32 base_config_ext_size;
u32 init_config;
};
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment