Skip to content

Commit f7000aa

Browse files
committed
ASoC: SOF: ipc4-topology: set domain bit based on dp domain type
Currently the domain bit in ipc msg for module initialization is set to lp (low power) mode for pipeline. This is not correct since it is for module domain type: ll domain or dp domain which are for scheduler in fw. If the domain bit is set to 1 fw will process the module in dp domain or deal it with ll domain. So set domain bit based on dp domain setting. Signed-off-by: Rander Wang <rander.wang@intel.com>
1 parent d017544 commit f7000aa

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

sound/soc/sof/ipc4-topology.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,7 @@ static int sof_ipc4_widget_set_module_info(struct snd_sof_widget *swidget)
314314
static int sof_ipc4_widget_setup_msg(struct snd_sof_widget *swidget, struct sof_ipc4_msg *msg)
315315
{
316316
struct sof_ipc4_fw_module *fw_module;
317+
uint32_t type;
317318
int ret;
318319

319320
ret = sof_ipc4_widget_set_module_info(swidget);
@@ -330,6 +331,9 @@ static int sof_ipc4_widget_setup_msg(struct snd_sof_widget *swidget, struct sof_
330331
msg->extension = SOF_IPC4_MOD_EXT_PPL_ID(swidget->pipeline_id);
331332
msg->extension |= SOF_IPC4_MOD_EXT_CORE_ID(swidget->core);
332333

334+
type = fw_module->man4_module_entry.type & SOF_IPC4_MODULE_DP ? 1 : 0;
335+
msg->extension |= SOF_IPC4_MOD_EXT_DOMAIN(type);
336+
333337
return 0;
334338
}
335339

@@ -1543,8 +1547,6 @@ static int sof_ipc4_widget_setup(struct snd_sof_dev *sdev, struct snd_sof_widget
15431547

15441548
msg->extension &= ~SOF_IPC4_MOD_EXT_PARAM_SIZE_MASK;
15451549
msg->extension |= ipc_size >> 2;
1546-
msg->extension &= ~SOF_IPC4_MOD_EXT_DOMAIN_MASK;
1547-
msg->extension |= SOF_IPC4_MOD_EXT_DOMAIN(pipeline->lp_mode);
15481550
}
15491551

15501552
msg->data_size = ipc_size;

sound/soc/sof/ipc4-topology.h

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,18 @@
1515
#define SOF_IPC4_FW_PAGE(x) ((((x) + BIT(12) - 1) & ~(BIT(12) - 1)) >> 12)
1616
#define SOF_IPC4_FW_ROUNDUP(x) (((x) + BIT(6) - 1) & (~(BIT(6) - 1)))
1717

18-
#define SOF_IPC4_MODULE_LL BIT(5)
18+
#define SOF_IPC4_MODULE_LOAD_TYPE GENMASK(3, 0)
19+
#define SOF_IPC4_MODULE_AUTO_START BIT(4)
20+
/*
21+
* Two module schedule domains in fw :
22+
* LL domain - Low latency domain
23+
* DP domain - Data processing domain
24+
* The LL setting should be equal to !DP setting
25+
*/
26+
#define SOF_IPC4_MODULE_LL BIT(5)
27+
#define SOF_IPC4_MODULE_DP BIT(6)
28+
#define SOF_IPC4_MODULE_LIB_CODE BIT(7)
29+
1930
#define SOF_IPC4_MODULE_INSTANCE_LIST_ITEM_SIZE 12
2031
#define SOF_IPC4_PIPELINE_OBJECT_SIZE 448
2132
#define SOF_IPC4_DATA_QUEUE_OBJECT_SIZE 128

0 commit comments

Comments
 (0)