Skip to content

Commit eb13b52

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 83af640 commit eb13b52

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

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+
uint32_t stack_bytes; /* required stack size in bytes */
695+
uint32_t interim_heap_bytes; /* required interim heap size in bytes */
696+
uint32_t lifetime_heap_bytes; /* required lifetime heap size in bytes */
697+
uint32_t 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
@@ -3109,7 +3109,9 @@ static int sof_ipc4_widget_mod_init_msg_payload(struct snd_sof_dev *sdev,
31093109
dp_mem_data = (struct sof_ipc4_mod_init_ext_dp_memory_data *)&payload[ext_pos];
31103110
dp_mem_data->domain_id = swidget->domain_id;
31113111
dp_mem_data->stack_bytes = swidget->stack_bytes;
3112-
dp_mem_data->heap_bytes = swidget->interim_bytes;
3112+
dp_mem_data->interim_heap_bytes = swidget->interim_bytes;
3113+
dp_mem_data->lifetime_heap_bytes = swidget->lifetime_bytes;
3114+
dp_mem_data->shared_bytes = swidget->shared_bytes;
31133115
ext_pos += DIV_ROUND_UP(sizeof(*dp_mem_data), sizeof(u32));
31143116
}
31153117
/* If another array object is added, remember clear previous OBJ_LAST bit */

0 commit comments

Comments
 (0)