Skip to content

Commit a3430c5

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 91c9b6e commit a3430c5

2 files changed

Lines changed: 10 additions & 6 deletions

File tree

include/sound/sof/ipc4/header.h

Lines changed: 7 additions & 5 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

@@ -763,8 +765,8 @@ enum sof_ipc4_glb_pipe_ext_obj_id {
763765
struct sof_ipc4_glb_pipe_ext_obj_memory_data {
764766
u32 domain_id; /* userspace domain ID */
765767
u32 stack_bytes; /* stack size in bytes */
766-
u32 interim_bytes; /* interim heap size in bytes */
767-
u32 lifetime_bytes; /* lifetime heap size in bytes */
768+
u32 interim_heap_bytes; /* interim heap size in bytes */
769+
u32 lifetime_heap_bytes;/* lifetime heap size in bytes */
768770
u32 shared_bytes; /* shared size in bytes */
769771
} __packed __aligned(4);
770772

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)