Skip to content

Commit 391b2c7

Browse files
committed
modules: blob size: add Kconfig for max module blob size
Currently max blob size is hard coded. make it a kconfig so it can be tuned for needs. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
1 parent dc941dd commit 391b2c7

3 files changed

Lines changed: 9 additions & 4 deletions

File tree

src/audio/Kconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,13 @@ config COMP_BLOB
8989
multiple IPC messages. Not all components or modules need
9090
this. If unsure, say yes.
9191

92+
config MODULE_MAX_BLOB_SIZE
93+
int "Maximum IPC blob size in bytes"
94+
default 8192
95+
help
96+
Specify the maximum size of IPC4 module blob data that can be
97+
appended to each message.
98+
9299
rsource "src/Kconfig"
93100

94101
config COMP_STUBS

src/audio/module_adapter/module/generic.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -437,9 +437,9 @@ int module_set_configuration(struct processing_module *mod,
437437
if (!md->new_cfg_size)
438438
return 0;
439439

440-
if (md->new_cfg_size > MAX_BLOB_SIZE) {
440+
if (md->new_cfg_size > CONFIG_MODULE_MAX_BLOB_SIZE) {
441441
comp_err(dev, "module_set_configuration(): error: blob size is too big cfg size %zu, allowed %d",
442-
md->new_cfg_size, MAX_BLOB_SIZE);
442+
md->new_cfg_size, CONFIG_MODULE_MAX_BLOB_SIZE);
443443
return -EINVAL;
444444
}
445445

src/include/sof/audio/module_adapter/module/generic.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@
2727
#define IS_PROCESSING_MODE_RAW_DATA(mod) ((mod)->proc_type == MODULE_PROCESS_TYPE_RAW)
2828
#define IS_PROCESSING_MODE_SINK_SOURCE(mod) ((mod)->proc_type == MODULE_PROCESS_TYPE_SOURCE_SINK)
2929

30-
#define MAX_BLOB_SIZE 8192
31-
3230
#if CONFIG_IPC_MAJOR_4
3331
#define IPC_MOD_CMD(v)
3432
#elif CONFIG_IPC_MAJOR_3

0 commit comments

Comments
 (0)