-
Notifications
You must be signed in to change notification settings - Fork 349
Closed
Labels
P2Critical bugs or normal featuresCritical bugs or normal featuresbugSomething isn't working as expectedSomething isn't working as expected
Milestone
Description
The primary message for init module instance structure is listed below:
struct {
/**< module id */
uint32_t module_id : 16;
/**< instance id */
uint32_t instance_id : 8;
/**< ModuleMsg::INIT_INSTANCE */
uint32_t type : 5;
/**< Msg::MSG_REQUEST */
uint32_t rsp : 1;
/**< Msg::MODULE_MSG */
uint32_t msg_tgt : 1;
uint32_t _reserved_0 : 1;
} r;
module id takes 16 bits, and instance_id takes next 8 bits.
Here is how we assign component ID;
comp_id = IPC4_COMP_ID(module_init->primary.r.module_id,
module_init->primary.r.instance_id);
and the ID macros:
#define IPC4_COMP_ID(x, y) ((x) << 16 | (y))
#define IPC4_MOD_ID(x) ((x) >> 16)
#define IPC4_INST_ID(x) ((x) & 0xffff)
#define IPC4_SRC_QUEUE_ID(x) (((x) >> 16) & 0xffff)
#define IPC4_SINK_QUEUE_ID(x) ((x) & 0xffff)
module_id<<16|instance_id doesn't comply to the ipc structure, which make it hard to do message cross check between mtrace and linux kernel message, and also leave a 8 bit hole in the 32bit comp_id, bad.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2Critical bugs or normal featuresCritical bugs or normal featuresbugSomething isn't working as expectedSomething isn't working as expected