Skip to content

Commit cca4d87

Browse files
softwareckikv2019i
authored andcommitted
ipc4: module: Add definitions for Config Get / Set ipc
Using Module Config Get / Set command, host driver may send a parameter that fits into the header (a very short one), packed along with parameter id. Larger parameters require fragmentation and a series of Large Config Set commands. Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
1 parent 9018bc4 commit cca4d87

1 file changed

Lines changed: 74 additions & 0 deletions

File tree

src/include/ipc4/module.h

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,80 @@ struct ipc4_module_bind_unbind {
225225
} extension;
226226
} __attribute__((packed, aligned(4)));
227227

228+
/*
229+
* Using Module Config Get / Set command, host driver may send a parameter
230+
* that fits into the header (a very short one), packed along with parameter id.
231+
* Larger parameters require fragmentation and a series of Large Config Set
232+
* commands.
233+
*
234+
* param_id_data specifies both ID of the parameter, defined by the module
235+
* and value of the parameter.
236+
* It is up to the module how to distribute bits to ID and value of the parameter.
237+
* If there are more bits required than available to value, then Input Data may
238+
* be used to pass the value
239+
*
240+
* NOTE: Module Config Get/Set commands are used internally by the driver
241+
* for small parameters defined by Intel components. While all externally
242+
* developed components communicates with host using Large Config commands
243+
* no matter what the size of parameter is.
244+
*/
245+
struct ipc4_module_config {
246+
union {
247+
uint32_t dat;
248+
249+
struct {
250+
uint32_t module_id : 16; /* module id */
251+
uint32_t instance_id : 8; /* instance id */
252+
/* SOF_IPC4_MOD_CONFIG_GET / SOF_IPC4_MOD_CONFIG_SET */
253+
uint32_t type : 5;
254+
uint32_t rsp : 1; /* SOF_IPC4_MESSAGE_DIR_MSG_REQUEST */
255+
uint32_t msg_tgt : 1; /* SOF_IPC4_MESSAGE_TARGET_MODULE_MSG */
256+
uint32_t _reserved_0 : 1;
257+
} r;
258+
} primary;
259+
260+
union {
261+
uint32_t dat;
262+
263+
struct {
264+
/* Param id and data */
265+
uint32_t param_id_data : 30;
266+
uint32_t _reserved_2 : 2;
267+
} r;
268+
} extension;
269+
} __attribute__((packed, aligned(4)));
270+
271+
/*
272+
* Sent by FW in response to Module Config Get.
273+
*/
274+
struct ipc4_module_config_reply {
275+
union {
276+
uint32_t dat;
277+
278+
struct {
279+
uint32_t status : IPC4_IXC_STATUS_BITS;
280+
uint32_t type : 5; /* SOF_IPC4_MOD_CONFIG_GET */
281+
uint32_t rsp : 1; /* SOF_IPC4_MESSAGE_DIR_MSG_REPLY */
282+
uint32_t msg_tgt : 1; /* SOF_IPC4_MESSAGE_TARGET_MODULE_MSG */
283+
uint32_t _reserved_0 : 1;
284+
} r;
285+
} primary;
286+
287+
union {
288+
uint32_t dat;
289+
290+
struct {
291+
/*
292+
* Value of this field may be changed by the module
293+
* if parameter value fits into the available bits,
294+
* or stay intact if the value is copied to the Output Data.
295+
*/
296+
uint32_t param_id_data : 30;
297+
uint32_t _reserved_2 : 2;
298+
} r;
299+
} extension;
300+
} __attribute__((packed, aligned(4)));
301+
228302
struct ipc4_module_large_config {
229303
union {
230304
uint32_t dat;

0 commit comments

Comments
 (0)