Skip to content

Commit 9818189

Browse files
author
Jyri Sarha
committed
ASoC: SOF: ipc4-topology: Change struct sof_ipc4_mod_init_ext_dp_memory_data
Change struct sof_ipc4_mod_init_ext_dp_memory_data to what is required for the SOF FW userspace DP processing. The earlier version of the firmware (v2.14) did not use the contents of the struct for anything, and if it receives a struct that is larger than the original, the extra words are simply ignored, so there should not be any problem in changing the struct. The following FW versions will expect larger struct and ignore anything that is smaller. Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
1 parent 2dec631 commit 9818189

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

include/sound/sof/ipc4/header.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -690,9 +690,11 @@ enum sof_ipc4_mod_init_ext_obj_id {
690690

691691
/* DP module memory configuration data object for ext_init object array */
692692
struct sof_ipc4_mod_init_ext_dp_memory_data {
693-
u32 domain_id; /* userspace domain ID */
694-
u32 stack_bytes; /* stack size in bytes, 0 means default size */
695-
u32 heap_bytes; /* stack size in bytes, 0 means default size */
693+
u32 domain_id; /* userspace domain ID */
694+
u32 stack_bytes; /* required stack size in bytes */
695+
u32 interim_heap_bytes; /* required interim heap size in bytes */
696+
u32 lifetime_heap_bytes; /* required lifetime heap size in bytes */
697+
u32 shared_bytes; /* required shared memory size in bytes */
696698
} __packed __aligned(4);
697699

698700
/*

sound/soc/sof/ipc4-topology.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3178,7 +3178,9 @@ static int sof_ipc4_widget_mod_init_msg_payload(struct snd_sof_dev *sdev,
31783178
dp_mem_data = (struct sof_ipc4_mod_init_ext_dp_memory_data *)&payload[ext_pos];
31793179
dp_mem_data->domain_id = swidget->domain_id;
31803180
dp_mem_data->stack_bytes = swidget->stack_bytes;
3181-
dp_mem_data->heap_bytes = swidget->interim_bytes;
3181+
dp_mem_data->interim_heap_bytes = swidget->interim_bytes;
3182+
dp_mem_data->lifetime_heap_bytes = swidget->lifetime_bytes;
3183+
dp_mem_data->shared_bytes = swidget->shared_bytes;
31823184
ext_pos += DIV_ROUND_UP(sizeof(*dp_mem_data), sizeof(u32));
31833185
}
31843186
/* If another array object is added, remember clear previous OBJ_LAST bit */

0 commit comments

Comments
 (0)