Skip to content

Commit 9eb65a8

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> include/sound/sof/ipc4/header.h: Revert pipe interim_heap + lifetime_heap change
1 parent c9d47f8 commit 9eb65a8

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
@@ -3062,7 +3062,9 @@ static int sof_ipc4_widget_mod_init_msg_payload(struct snd_sof_dev *sdev,
30623062
dp_mem_data = (struct sof_ipc4_mod_init_ext_dp_memory_data *)&payload[ext_pos];
30633063
dp_mem_data->domain_id = swidget->domain_id;
30643064
dp_mem_data->stack_bytes = swidget->stack_bytes;
3065-
dp_mem_data->heap_bytes = swidget->interim_bytes;
3065+
dp_mem_data->interim_heap_bytes = swidget->interim_bytes;
3066+
dp_mem_data->lifetime_heap_bytes = swidget->interim_bytes;
3067+
dp_mem_data->shared_bytes = swidget->shared_bytes;
30663068
ext_pos += DIV_ROUND_UP(sizeof(*dp_mem_data), sizeof(u32));
30673069
}
30683070
/* If another array object is added, remember clear previous OBJ_LAST bit */

0 commit comments

Comments
 (0)