From 9eacc99e82c8d7518a2f36f50815b368b23457a6 Mon Sep 17 00:00:00 2001 From: Guennadi Liakhovetski Date: Fri, 17 Nov 2023 16:56:43 +0100 Subject: [PATCH] toml: (draft) modularise TOML configuration Split TOML configuration files into platform and module parts. Use the C preprocessor to merge them back together. Signed-off-by: Guennadi Liakhovetski --- src/audio/copier/copier.toml | 30 +++ src/audio/mixin_mixout/mixin_mixout.toml | 63 ++++++ .../{tgl-cavs.toml => tgl-cavs-common.toml} | 208 ++++++------------ tools/rimage/config/tgl.toml.h | 2 + tools/rimage/src/adsp_config.c | 3 + 5 files changed, 169 insertions(+), 137 deletions(-) create mode 100644 src/audio/copier/copier.toml create mode 100644 src/audio/mixin_mixout/mixin_mixout.toml rename tools/rimage/config/{tgl-cavs.toml => tgl-cavs-common.toml} (61%) create mode 100644 tools/rimage/config/tgl.toml.h diff --git a/src/audio/copier/copier.toml b/src/audio/copier/copier.toml new file mode 100644 index 000000000000..7d127ff94570 --- /dev/null +++ b/src/audio/copier/copier.toml @@ -0,0 +1,30 @@ + [[module.entry]] + name = "COPIER" + uuid = "9BA00C83-CA12-4A83-943C-1FA2E82F9DDA" + affinity_mask = "0x1" + instance_count = "32" + domain_types = "0" + load_type = "0" + module_type = "3" + auto_start = "0" + sched_caps = [1, 0x00008000] + + // # pin = [dir, type, sample rate, size, container, channel-cfg] + pin = [0, 0, 0xfeef, 0xf, 0xf, 0x45ff, + 1, 0, 0xfeef, 0xf, 0xf, 0x1ff, + 1, 0, 0xfeef, 0xf, 0xf, 0x1ff, + 1, 0, 0xfeef, 0xf, 0xf, 0x1ff, + 1, 0, 0xfeef, 0xf, 0xf, 0x1ff] + + // # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] + mod_cfg = [ 0, 0, 0, 0, 280, 640100, 45, 60, 0, 0, 0, + 1, 0, 0, 0, 280, 1106300, 192, 192, 0, 0, 0, + 2, 0, 0, 0, 280, 1573000, 45, 45, 0, 0, 0, + 3, 0, 0, 0, 280, 2040600, 192, 256, 0, 0, 0, + 4, 0, 0, 0, 280, 2507500, 192, 256, 0, 0, 0, + 5, 0, 0, 0, 280, 2999000, 192, 256, 0, 0, 0, + 6, 0, 0, 0, 280, 3501000, 45, 60, 0, 0, 0, + 7, 0, 0, 0, 280, 3927000, 192, 256, 0, 0, 0, + 8, 0, 0, 0, 280, 4424000, 192, 256, 0, 0, 0, + 9, 0, 0, 0, 280, 4941000, 192, 256, 0, 0, 0] + index = __COUNTER__ diff --git a/src/audio/mixin_mixout/mixin_mixout.toml b/src/audio/mixin_mixout/mixin_mixout.toml new file mode 100644 index 000000000000..a3a74b498d18 --- /dev/null +++ b/src/audio/mixin_mixout/mixin_mixout.toml @@ -0,0 +1,63 @@ + [[module.entry]] + name = "MIXIN" + uuid = "39656EB2-3B71-4049-8D3F-F92CD5C43C09" + affinity_mask = "0x1" + instance_count = "30" + domain_types = "0" + load_type = "0" + module_type = "1" + auto_start = "0" + sched_caps = [1, 0x00008000] + + // # pin = [dir, type, sample rate, size, container, channel-cfg] + pin = [0, 0, 0xfeef, 0xc, 0x8, 0x45ff, + 1, 0, 0xfeef, 0xc, 0x8, 0x1ff, + 1, 0, 0xfeef, 0xc, 0x8, 0x1ff, + 1, 0, 0xfeef, 0xc, 0x8, 0x1ff, + 1, 0, 0xfeef, 0xc, 0x8, 0x1ff] + + // # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] + mod_cfg = [ 0, 0, 0, 0, 296, 644000, 45, 60, 0, 0, 0, + 1, 0, 0, 0, 296, 669900, 48, 64, 0, 0, 0, + 2, 0, 0, 0, 296, 934000, 96, 128, 0, 0, 0, + 3, 0, 0, 0, 296, 1137000, 96, 128, 0, 0, 0, + 4, 0, 0, 0, 296, 1482000, 48, 64, 0, 0, 0, + 5, 0, 0, 0, 296, 1746000, 96, 128, 0, 0, 0, + 6, 0, 0, 0, 296, 2274000, 192, 256, 0, 0, 0, + 7, 0, 0, 0, 296, 2700000, 48, 64, 0, 0, 0, + 8, 0, 0, 0, 296, 2964000, 96, 128, 0, 0, 0, + 9, 0, 0, 0, 296, 3492000, 192, 256, 0, 0, 0] + index = __COUNTER__ + + [[module.entry]] + name = "MIXOUT" + uuid = "3C56505A-24D7-418F-BDDC-C1F5A3AC2AE0" + affinity_mask = "0x1" + instance_count = "30" + domain_types = "0" + load_type = "0" + module_type = "2" + auto_start = "0" + sched_caps = [1, 0x00008000] + + // # pin = [dir, type, sample rate, size, container, channel-cfg] + pin = [1, 0, 0xfeef, 0xc, 0x8, 0x45ff, + 1, 0, 0xfeef, 0xc, 0x8, 0x1ff, + 1, 0, 0xfeef, 0xc, 0x8, 0x1ff, + 1, 0, 0xfeef, 0xc, 0x8, 0x1ff, + 1, 0, 0xfeef, 0xc, 0x8, 0x1ff, + 1, 0, 0xfeef, 0xc, 0x8, 0x1ff, + 1, 0, 0xfeef, 0xc, 0x8, 0x1ff, + 1, 0, 0xfeef, 0xc, 0x8, 0x1ff, + 0, 0, 0xfeef, 0xc, 0x8, 0x1ff] + + // # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] + mod_cfg = [0, 0, 0, 0, 520, 649600, 48, 64, 0, 0, 0, + 1, 0, 0, 0, 520, 966300, 96, 128, 0, 0, 0, + 2, 0, 0, 0, 520, 2101000, 48, 64, 0, 0, 0, + 3, 0, 0, 0, 520, 2500800, 192, 256, 0, 0, 0, + 4, 0, 0, 0, 520, 2616700, 192, 256, 0, 0, 0, + 5, 0, 0, 0, 520, 2964500, 192, 256, 0, 0, 0, + 6, 0, 0, 0, 520, 4202000, 96, 128, 0, 0, 0, + 7, 0, 0, 0, 520, 3730000, 192, 256, 0, 0, 0] + index = __COUNTER__ diff --git a/tools/rimage/config/tgl-cavs.toml b/tools/rimage/config/tgl-cavs-common.toml similarity index 61% rename from tools/rimage/config/tgl-cavs.toml rename to tools/rimage/config/tgl-cavs-common.toml index 3811e2e170c7..c9adae9342a6 100644 --- a/tools/rimage/config/tgl-cavs.toml +++ b/tools/rimage/config/tgl-cavs-common.toml @@ -2,7 +2,7 @@ version = [2, 5] [adsp] name = "tgl" -image_size = "0x2F0000" +image_size = IMAGE_SIZE alias_mask = "0xE0000000" [[adsp.mem_zone]] @@ -42,7 +42,7 @@ length = "0x70" [[cse.entry]] name = "cavs0015" offset = "0x540" -length = "0x0" # calculated by rimage +length = "0x0" // # calculated by rimage [css] @@ -59,8 +59,6 @@ base_offset = "0x2000" name = "ADSPFW" load_offset = "0x30000" -[module] -count = 22 [[module.entry]] name = "BRNGUP" uuid = "61EB0CB9-34D8-4F59-A21D-04C54C21D3A4" @@ -70,6 +68,7 @@ count = 22 load_type = "0" module_type = "0" auto_start = "0" + index = __COUNTER__ [[module.entry]] name = "BASEFW" @@ -80,98 +79,13 @@ count = 22 load_type = "0" module_type = "0" auto_start = "0" + index = __COUNTER__ - [[module.entry]] - name = "MIXIN" - uuid = "39656EB2-3B71-4049-8D3F-F92CD5C43C09" - affinity_mask = "0x1" - instance_count = "30" - domain_types = "0" - load_type = "0" - module_type = "1" - auto_start = "0" - sched_caps = [1, 0x00008000] - - # pin = [dir, type, sample rate, size, container, channel-cfg] - pin = [0, 0, 0xfeef, 0xc, 0x8, 0x45ff, - 1, 0, 0xfeef, 0xc, 0x8, 0x1ff, - 1, 0, 0xfeef, 0xc, 0x8, 0x1ff, - 1, 0, 0xfeef, 0xc, 0x8, 0x1ff, - 1, 0, 0xfeef, 0xc, 0x8, 0x1ff] - - # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] - mod_cfg = [ 0, 0, 0, 0, 296, 644000, 45, 60, 0, 0, 0, - 1, 0, 0, 0, 296, 669900, 48, 64, 0, 0, 0, - 2, 0, 0, 0, 296, 934000, 96, 128, 0, 0, 0, - 3, 0, 0, 0, 296, 1137000, 96, 128, 0, 0, 0, - 4, 0, 0, 0, 296, 1482000, 48, 64, 0, 0, 0, - 5, 0, 0, 0, 296, 1746000, 96, 128, 0, 0, 0, - 6, 0, 0, 0, 296, 2274000, 192, 256, 0, 0, 0, - 7, 0, 0, 0, 296, 2700000, 48, 64, 0, 0, 0, - 8, 0, 0, 0, 296, 2964000, 96, 128, 0, 0, 0, - 9, 0, 0, 0, 296, 3492000, 192, 256, 0, 0, 0] - - [[module.entry]] - name = "MIXOUT" - uuid = "3C56505A-24D7-418F-BDDC-C1F5A3AC2AE0" - affinity_mask = "0x1" - instance_count = "30" - domain_types = "0" - load_type = "0" - module_type = "2" - auto_start = "0" - sched_caps = [1, 0x00008000] - - # pin = [dir, type, sample rate, size, container, channel-cfg] - pin = [1, 0, 0xfeef, 0xc, 0x8, 0x45ff, - 1, 0, 0xfeef, 0xc, 0x8, 0x1ff, - 1, 0, 0xfeef, 0xc, 0x8, 0x1ff, - 1, 0, 0xfeef, 0xc, 0x8, 0x1ff, - 1, 0, 0xfeef, 0xc, 0x8, 0x1ff, - 1, 0, 0xfeef, 0xc, 0x8, 0x1ff, - 1, 0, 0xfeef, 0xc, 0x8, 0x1ff, - 1, 0, 0xfeef, 0xc, 0x8, 0x1ff, - 0, 0, 0xfeef, 0xc, 0x8, 0x1ff] - - # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] - mod_cfg = [0, 0, 0, 0, 520, 649600, 48, 64, 0, 0, 0, - 1, 0, 0, 0, 520, 966300, 96, 128, 0, 0, 0, - 2, 0, 0, 0, 520, 2101000, 48, 64, 0, 0, 0, - 3, 0, 0, 0, 520, 2500800, 192, 256, 0, 0, 0, - 4, 0, 0, 0, 520, 2616700, 192, 256, 0, 0, 0, - 5, 0, 0, 0, 520, 2964500, 192, 256, 0, 0, 0, - 6, 0, 0, 0, 520, 4202000, 96, 128, 0, 0, 0, - 7, 0, 0, 0, 520, 3730000, 192, 256, 0, 0, 0] - - [[module.entry]] - name = "COPIER" - uuid = "9BA00C83-CA12-4A83-943C-1FA2E82F9DDA" - affinity_mask = "0x1" - instance_count = "32" - domain_types = "0" - load_type = "0" - module_type = "3" - auto_start = "0" - sched_caps = [1, 0x00008000] - - # pin = [dir, type, sample rate, size, container, channel-cfg] - pin = [0, 0, 0xfeef, 0xf, 0xf, 0x45ff, - 1, 0, 0xfeef, 0xf, 0xf, 0x1ff, - 1, 0, 0xfeef, 0xf, 0xf, 0x1ff, - 1, 0, 0xfeef, 0xf, 0xf, 0x1ff, - 1, 0, 0xfeef, 0xf, 0xf, 0x1ff] +#include - # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] - mod_cfg = [ 0, 0, 0, 0, 280, 640100, 45, 60, 0, 0, 0, - 1, 0, 0, 0, 280, 1106300, 192, 192, 0, 0, 0, - 2, 0, 0, 0, 280, 1573000, 45, 45, 0, 0, 0, - 3, 0, 0, 0, 280, 2040600, 192, 256, 0, 0, 0, - 4, 0, 0, 0, 280, 2507500, 192, 256, 0, 0, 0, - 5, 0, 0, 0, 280, 2999000, 192, 256, 0, 0, 0, - 6, 0, 0, 0, 280, 3501000, 45, 60, 0, 0, 0, - 7, 0, 0, 0, 280, 3927000, 192, 256, 0, 0, 0, - 8, 0, 0, 0, 280, 4424000, 192, 256, 0, 0, 0, - 9, 0, 0, 0, 280, 4941000, 192, 256, 0, 0, 0] +#ifdef CONFIG_COMP_COPIER +#include +#endif [[module.entry]] name = "PEAKVOL" @@ -184,11 +98,11 @@ count = 22 auto_start = "0" sched_caps = [1, 0x00008000] - # pin = [dir, type, sample rate, size, container, channel-cfg] + // # pin = [dir, type, sample rate, size, container, channel-cfg] pin = [0, 0, 0xfeef, 0xf, 0xa, 0x45ff, 1, 0, 0xfeef, 0xf, 0xa, 0x1ff] - # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] + // # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] mod_cfg = [0, 0, 0, 0, 480, 1114000, 48, 64, 0, 0, 0, 1, 0, 0, 0, 480, 3321600, 192, 256, 0, 0, 0, 2, 0, 0, 0, 480, 3786000, 192, 256, 0, 0, 0, @@ -196,6 +110,7 @@ count = 22 4, 0, 0, 0, 480, 4910000, 192, 256, 0, 0, 0, 5, 0, 0, 0, 480, 5441000, 192, 256, 0, 0, 0, 6, 0, 0, 0, 480, 6265000, 192, 256, 0, 0, 0] + index = __COUNTER__ [[module.entry]] name = "GAIN" @@ -208,11 +123,11 @@ count = 22 auto_start = "0" sched_caps = [1, 0x00008000] - # pin = [dir, type, sample rate, size, container, channel-cfg] + // # pin = [dir, type, sample rate, size, container, channel-cfg] pin = [0, 0, 0xfeef, 0xf, 0xf, 0x45ff, 1, 0, 0xfeef, 0xf, 0xf, 0x1ff] - # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] + // # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] mod_cfg = [0, 0, 0, 0, 416, 914000, 48, 64, 0, 0, 0, 1, 0, 0, 0, 416, 1321600, 192, 256, 0, 0, 0, 2, 0, 0, 0, 416, 1786000, 192, 256, 0, 0, 0, @@ -220,6 +135,7 @@ count = 22 4, 0, 0, 0, 416, 2910000, 192, 256, 0, 0, 0, 5, 0, 0, 0, 416, 3441000, 192, 256, 0, 0, 0, 6, 0, 0, 0, 416, 4265000, 192, 256, 0, 0, 0] + index = __COUNTER__ [[module.entry]] name = "PROBE" @@ -232,8 +148,9 @@ count = 22 auto_start = "0" sched_caps = [1, 0x00008000] - # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] + // # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] mod_cfg = [0, 0, 0, 0, 4096, 100000, 48, 48, 0, 1000, 0] + index = __COUNTER__ [[module.entry]] name = "SRCINTC" @@ -246,11 +163,11 @@ count = 22 auto_start = "0" sched_caps = [1, 0x00008000] - # pin = [dir, type, sample rate, size, container, channel-cfg] + // # pin = [dir, type, sample rate, size, container, channel-cfg] pin = [0, 0, 0xffff, 0xc, 0x8, 0x45ff, 1, 0, 0xf6c9, 0xc, 0x8, 0x45ff] - # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] + // # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] mod_cfg = [0, 0, 0, 0, 12832, 1365500, 0, 0, 0, 1365, 0, 1, 0, 0, 0, 12832, 2302300, 0, 0, 0, 2302, 0, 2, 0, 0, 0, 12832, 3218200, 0, 0, 0, 3218, 0, @@ -274,8 +191,9 @@ count = 22 20, 0, 0, 0, 12832, 20881000, 0, 0, 0, 20881, 0, 21, 0, 0, 0, 12832, 23431000, 0, 0, 0, 23431, 0, 22, 0, 0, 0, 12832, 30471000, 0, 0, 0, 30471, 0] + index = __COUNTER__ - # smart amp test module config + // # smart amp test module config [[module.entry]] name = "SMATEST" uuid = "167A961E-8AE4-11EA-89F1-000C29CE1635" @@ -288,15 +206,16 @@ count = 22 auto_start = "0" sched_caps = [1, 0x00008000] - # pin = [dir, type, sample rate, size, container, channel-cfg] + // # pin = [dir, type, sample rate, size, container, channel-cfg] pin = [0, 0, 0xfeef, 0xf, 0xa, 0x45ff, 0, 0, 0xfeef, 0xf, 0xa, 0x45ff, 1, 0, 0xfeef, 0xf, 0xa, 0x45ff] - # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] + // # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] mod_cfg = [0, 0, 0, 0, 4096, 1000000, 128, 128, 0, 0, 0] + index = __COUNTER__ - # eq iir module config + // # eq iir module config [[module.entry]] name = "EQIIR" uuid = "5150C0E6-27F9-4EC8-8351-C705B642D12F" @@ -308,14 +227,15 @@ count = 22 auto_start = "0" sched_caps = [1, 0x00008000] - # pin = [dir, type, sample rate, size, container, channel-cfg] + // # pin = [dir, type, sample rate, size, container, channel-cfg] pin = [0, 0, 0xfeef, 0xf, 0xf, 0x45ff, 1, 0, 0xfeef, 0xf, 0xf, 0x1ff] - # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] + // # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] mod_cfg = [0, 0, 0, 0, 4096, 1000000, 128, 128, 0, 0, 0] + index = __COUNTER__ - # eq fir module config + // # eq fir module config [[module.entry]] name = "EQFIR" uuid = "43A90CE7-f3A5-41Df-AC06-BA98651AE6A3" @@ -327,12 +247,13 @@ count = 22 auto_start = "0" sched_caps = [1, 0x00008000] - # pin = [dir, type, sample rate, size, container, channel-cfg] + // # pin = [dir, type, sample rate, size, container, channel-cfg] pin = [0, 0, 0xfeef, 0xf, 0xf, 0x45ff, 1, 0, 0xfeef, 0xf, 0xf, 0x1ff] - # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] + // # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] mod_cfg = [0, 0, 0, 0, 4096, 1000000, 128, 128, 0, 0, 0] + index = __COUNTER__ [[module.entry]] name = "KDTEST" @@ -345,12 +266,13 @@ count = 22 auto_start = "0" sched_caps = [1, 0x00008000] - # pin = [dir, type, sample rate, size, container, channel-cfg] + // # pin = [dir, type, sample rate, size, container, channel-cfg] pin = [0, 0, 0xfeef, 0xf, 0xf, 0x45ff, 1, 0, 0xfeef, 0xf, 0xa, 0x45ff] - # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] + // # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] mod_cfg = [0, 0, 0, 0, 480, 1114000, 64, 64, 0, 0, 0] + index = __COUNTER__ [[module.entry]] name = "KPB" @@ -363,12 +285,13 @@ count = 22 auto_start = "0" sched_caps = [1, 0x00008000] - # pin = [dir, type, sample rate, size, container, channel-cfg] + // # pin = [dir, type, sample rate, size, container, channel-cfg] pin = [0, 0, 0xfeef, 0xf, 0xf, 0x45ff, 1, 0, 0xfeef, 0xf, 0xa, 0x45ff] - # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] + // # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] mod_cfg = [0, 0, 0, 0, 14400, 1114000, 16, 16, 0, 0, 0] + index = __COUNTER__ [[module.entry]] name = "MICSEL" @@ -381,15 +304,16 @@ count = 22 auto_start = "0" sched_caps = [1, 0x00008000] - # pin = [dir, type, sample rate, size, container, channel-cfg] + // # pin = [dir, type, sample rate, size, container, channel-cfg] pin = [0, 0, 0xfeef, 0xe, 0xa, 0x45ff, 1, 0, 0xfeef, 0xe, 0xa, 0x45ff] - # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] + // # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] mod_cfg = [0, 0, 0, 0, 960, 488500, 16, 16, 0, 0, 0, 1, 0, 0, 0, 960, 964500, 16, 16, 0, 0, 0, 2, 0, 0, 0, 960, 2003000, 16, 16, 0, 0, 0] + index = __COUNTER__ - # Aria module config + // # Aria module config [[module.entry]] name = "ARIA" uuid = "99F7166D-372C-43EF-81F6-22007AA15F03" @@ -402,19 +326,20 @@ count = 22 auto_start = "0" sched_caps = [1, 0x00008000] - # pin = [dir, type, sample rate, size, container, channel-cfg] + // # pin = [dir, type, sample rate, size, container, channel-cfg] pin = [0, 0, 0xfeef, 0xf, 0xa, 0x45ff, 1, 0, 0xfeef, 0xf, 0xa, 0x45ff] - # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] + // # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] mod_cfg = [0, 0, 0, 0, 260, 1063000, 16, 21, 0, 0, 0, 1, 0, 0, 0, 260, 1873500, 192, 256, 0, 0, 0, 2, 0, 0, 0, 260, 2680000, 32, 42, 0, 0, 0, 3, 0, 0, 0, 260, 3591000, 64, 85, 0, 0, 0, 4, 0, 0, 0, 260, 4477000, 96, 128, 0, 0, 0, 5, 0, 0, 0, 260, 7195000, 192, 192, 0, 0, 0] + index = __COUNTER__ - # DRC module config + // # DRC module config [[module.entry]] name = "DRC" uuid = "B36EE4DA-006F-47F9-A06D-FECBE2D8B6CE" @@ -425,14 +350,15 @@ count = 22 module_type = "9" auto_start = "0" sched_caps = [1, 0x00008000] - # pin = [dir, type, sample rate, size, container, channel-cfg] + // # pin = [dir, type, sample rate, size, container, channel-cfg] pin = [0, 0, 0xfeef, 0xf, 0xf, 0x45ff, 1, 0, 0xfeef, 0xf, 0xf, 0x1ff] - # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] + // # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] mod_cfg = [0, 0, 0, 0, 4096, 1000000, 128, 128, 0, 0, 0] + index = __COUNTER__ - # Crossover module config - # Note: Crossover has init_config set to 1 to let kernel know that the base_cfg_ext needs to - # be appended to the IPC payload. The Extension is needed to know the output pin indices. + // # Crossover module config + // # Note: Crossover has init_config set to 1 to let kernel know that the base_cfg_ext needs to + // # be appended to the IPC payload. The Extension is needed to know the output pin indices. [[module.entry]] name = "XOVER" uuid = "948C9AD1-806A-4131-AD6C-B2BDA9E35A9F" @@ -444,12 +370,13 @@ count = 22 init_config = "1" auto_start = "0" sched_caps = [1, 0x00008000] - # pin = [dir, type, sample rate, size, container, channel-cfg] + // # pin = [dir, type, sample rate, size, container, channel-cfg] pin = [0, 0, 0xfeef, 0xf, 0xf, 0x45ff, 1, 0, 0xfeef, 0xf, 0xf, 0x1ff] - # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] + // # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] mod_cfg = [0, 0, 0, 0, 4096, 1000000, 128, 128, 0, 0, 0] + index = __COUNTER__ - # Multiband-DRC module config + // # Multiband-DRC module config [[module.entry]] name = "MB_DRC" uuid = "0D9F2256-8E4F-47B3-8448-239A334F1191" @@ -460,12 +387,13 @@ count = 22 module_type = "9" auto_start = "0" sched_caps = [1, 0x00008000] - # pin = [dir, type, sample rate, size, container, channel-cfg] + // # pin = [dir, type, sample rate, size, container, channel-cfg] pin = [0, 0, 0xfeef, 0xf, 0xf, 0x45ff, 1, 0, 0xfeef, 0xf, 0xf, 0x1ff] - # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] + // # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] mod_cfg = [0, 0, 0, 0, 4096, 1000000, 128, 128, 0, 0, 0] + index = __COUNTER__ - # DCblock module config + // # DCblock module config [[module.entry]] name = "DCBLOCK" uuid = "B809EFAF-5681-42B1-9ED6-04BB012DD384" @@ -476,12 +404,13 @@ count = 22 module_type = "9" auto_start = "0" sched_caps = [1, 0x00008000] - # pin = [dir, type, sample rate, size, container, channel-cfg] + // # pin = [dir, type, sample rate, size, container, channel-cfg] pin = [0, 0, 0xfeef, 0xf, 0xf, 0x45ff, 1, 0, 0xfeef, 0xf, 0xf, 0x1ff] - # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] + // # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] mod_cfg = [0, 0, 0, 0, 4096, 1000000, 128, 128, 0, 0, 0] + index = __COUNTER__ - # TDFB module config + // # TDFB module config [[module.entry]] name = "TDFB" uuid = "DD511749-D9FA-455C-B3A7-13585693F1AF" @@ -492,10 +421,11 @@ count = 22 module_type = "9" auto_start = "0" sched_caps = [1, 0x00008000] - # pin = [dir, type, sample rate, size, container, channel-cfg] + // # pin = [dir, type, sample rate, size, container, channel-cfg] pin = [0, 0, 0xfeef, 0xf, 0xf, 0x45ff, 1, 0, 0xfeef, 0xf, 0xf, 0x1ff] - # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] + // # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS] mod_cfg = [0, 0, 0, 0, 4096, 1000000, 128, 128, 0, 0, 0] + index = __COUNTER__ [[module.entry]] name = "RTC_AEC" @@ -509,7 +439,11 @@ count = 22 auto_start = "0" sched_caps = [1, 0x00008000] - # pin = [dir, type, sample rate, size, container, channel-cfg] + // # pin = [dir, type, sample rate, size, container, channel-cfg] pin = [0, 0, 0x8, 0x2, 0x2, 0x1, 0, 0, 0x8, 0x2, 0x2, 0x4, 1, 0, 0x8, 0x2, 0x2, 0x1] + index = __COUNTER__ + +[module] +count = __COUNTER__ diff --git a/tools/rimage/config/tgl.toml.h b/tools/rimage/config/tgl.toml.h new file mode 100644 index 000000000000..1b0cab1b24e0 --- /dev/null +++ b/tools/rimage/config/tgl.toml.h @@ -0,0 +1,2 @@ +#define IMAGE_SIZE "0x2F0000" +#include "tgl-cavs-common.toml" diff --git a/tools/rimage/src/adsp_config.c b/tools/rimage/src/adsp_config.c index 9a9423cbada7..189e3bf56cd2 100644 --- a/tools/rimage/src/adsp_config.c +++ b/tools/rimage/src/adsp_config.c @@ -1939,6 +1939,9 @@ static int parse_module(const toml_table_t *toml, struct parse_ctx *pctx, if (ret < 0) return err_key_parse("auto_start", NULL); + parse_uint32_key(mod_entry, &ctx_entry, "index", 1, &ret); + /* Ignore if "index" is missing for backwards compatibility */ + header = &modules->mod_ext.ext_mod_config_array[i].header; header->version_major = 2; header->version_minor = 5;