copier: Added important comment about field position in structure

config must be the first field in copier_data structure, because function
ipc4_create_buffer casts components private data as ipc4_base_module_cfg.

Signed-off-by: Adrian Warecki <adrianx.warecki@intel.com>
This commit is contained in:
Adrian Warecki 2022-01-18 15:04:52 +01:00 committed by Liam Girdwood
parent a892e0f66c
commit 3056ce3005
1 changed files with 3 additions and 0 deletions

View File

@ -46,6 +46,9 @@ DECLARE_SOF_RT_UUID("copier", copier_comp_uuid, 0x9ba00c83, 0xca12, 0x4a83,
DECLARE_TR_CTX(copier_comp_tr, SOF_UUID(copier_comp_uuid), LOG_LEVEL_INFO);
struct copier_data {
/* Must be the 1st field, function ipc4_create_buffer casts components private data
* as ipc4_base_module_cfg!
*/
struct ipc4_copier_module_cfg config;
struct comp_dev *endpoint;
struct comp_buffer *endpoint_buffer;