Skip to content

Commit 15ea481

Browse files
ranj063lgirdwood
authored andcommitted
src: adsp_config: Use reserved bits for module init config
Use some of the reserved bits to add a new field, init_config, in struct sof_man_module_type. This will be used to specify the type of payload that the module expects. For now, the 2 options are to have the base config only or the base config with an extension that contains the pin formats. This can be extended in the future to support additional options for modules that need more than the base config or base config + extension. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
1 parent ec649f3 commit 15ea481

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

src/adsp_config.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2236,6 +2236,11 @@ static int parse_module(const toml_table_t *toml, struct parse_ctx *pctx,
22362236
if (ret < 0)
22372237
return err_key_parse("load_type", NULL);
22382238

2239+
mod_man->type.init_config = parse_uint32_hex_key(mod_entry, &ctx_entry,
2240+
"init_config", 1, &ret);
2241+
if (ret < 0)
2242+
return err_key_parse("init_config", NULL);
2243+
22392244
mod_man->type.auto_start = parse_uint32_hex_key(mod_entry, &ctx_entry,
22402245
"auto_start", 1, &ret);
22412246
if (ret < 0)

src/include/rimage/sof/user/manifest.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,18 @@
2626
#define SOF_MAN_MOD_TYPE_BUILTIN 0
2727
#define SOF_MAN_MOD_TYPE_MODULE 1
2828

29+
/* module init config */
30+
#define SOF_MAN_MOD_INIT_CONFIG_BASE_CFG 0 /* Base config only */
31+
#define SOF_MAN_MOD_INIT_CONFIG_BASE_CFG_WITH_EXT 1 /* Base config with extension */
32+
2933
struct sof_man_module_type {
3034
uint32_t load_type:4; /* SOF_MAN_MOD_TYPE_ */
3135
uint32_t auto_start:1;
3236
uint32_t domain_ll:1;
3337
uint32_t domain_dp:1;
3438
uint32_t lib_code:1;
35-
uint32_t rsvd_:24;
39+
uint32_t init_config:4; /* SOF_MAN_MOD_INIT_CONFIG_ */
40+
uint32_t rsvd_:20;
3641
};
3742

3843
/* segment flags.type */

0 commit comments

Comments
 (0)