Skip to content

Commit

Permalink
toml: modularise TOML configuration
Browse files Browse the repository at this point in the history
Split TOML configuration files into platform and module parts. Use
the C preprocessor to merge them back together.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
  • Loading branch information
lyakh authored and lgirdwood committed Dec 21, 2023
1 parent 60212cf commit cf9a444
Show file tree
Hide file tree
Showing 28 changed files with 845 additions and 713 deletions.
25 changes: 25 additions & 0 deletions src/audio/aria/aria.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Aria module config
[[module.entry]]
name = "ARIA"
uuid = "99F7166D-372C-43EF-81F6-22007AA15F03"
affinity_mask = "0x1"
instance_count = "8"
domain_types = "0"
load_type = "0"
init_config = "1"
module_type = "30"
auto_start = "0"
sched_caps = [1, 0x00008000]

// 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 = [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__
32 changes: 32 additions & 0 deletions src/audio/asrc/asrc.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[[module.entry]]
name = "ASRC"
uuid = "66B4402D-B468-42F2-81A7-B37121863DD4"
affinity_mask = "0x3"
instance_count = "2"
domain_types = "0"

load_type = "0"
module_type = "9"
auto_start = "0"
sched_caps = [1, 0x00008000]

pin = [0, 0, 0xfeef, 0xc, 0x8, 0x45ff,
1, 0, 0xfeef, 0xc, 0x8, 0x45ff]

mod_cfg = [1, 0, 0, 0, 20480, 21808000, 64, 192, 0, 21808, 0,
2, 0, 0, 0, 20480, 45820000, 64, 384, 0, 45820, 0,
3, 0, 0, 0, 20480, 75236000, 512, 1440, 0, 75236, 0,
4, 0, 0, 0, 20480, 79732000, 512, 1536, 0, 79732, 0,
5, 0, 0, 0, 20480, 50411000, 184, 384, 0, 50411, 0,
6, 0, 0, 0, 20480, 24236000, 192, 128, 0, 24236, 0,
7, 0, 0, 0, 20480, 46753000, 192, 384, 0, 46753, 0,
8, 0, 0, 0, 20480, 30032000, 256, 256, 0, 30032, 0,
9, 0, 0, 0, 20480, 48676000, 256, 384, 0, 48676, 0,
10, 0, 0, 0, 20480, 46548000, 360, 360, 0, 46548, 0,
11, 0, 0, 0, 20480, 94372000, 1440, 1536, 0, 94372, 0,
12, 0, 0, 0, 20480, 42912000, 1536, 512, 0, 42912, 0,
13, 0, 0, 0, 20480, 31871000, 384, 192, 0, 31871, 0,
14, 0, 0, 0, 20480, 34216000, 384, 256, 0, 34216, 0,
15, 0, 0, 0, 20480, 83448000, 1536, 1440, 0, 83448, 0]

index = __COUNTER__
20 changes: 20 additions & 0 deletions src/audio/codec/dts/dts.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// dts codec module config
[[module.entry]]
name = "DTS"
uuid = "D95FC34F-370F-4AC7-BC86-BFDC5BE241E6"
affinity_mask = "0x1"
instance_count = "40"
domain_types = "0"
load_type = "0"
module_type = "9"
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]

// 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, 5000000, 384, 384, 0, 5000, 0]

index = __COUNTER__
62 changes: 62 additions & 0 deletions src/audio/copier/copier.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
[[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, 0x45ff,
1, 0, 0xfeef, 0xf, 0xf, 0x45ff,
1, 0, 0xfeef, 0xf, 0xf, 0x45ff,
1, 0, 0xfeef, 0xf, 0xf, 0x45ff]

// mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS]
mod_cfg = [1, 0, 0, 0, 280, 4918000, 768, 768, 0, 4918, 0,
2, 0, 0, 0, 280, 6526000, 768, 768, 0, 6526, 0,
3, 0, 0, 0, 280, 6388000, 384, 384, 0, 6388, 0,
4, 0, 0, 0, 280, 4682000, 512, 512, 0, 4682, 0,
5, 0, 0, 0, 280, 5738000, 512, 512, 0, 5738, 0,
6, 0, 0, 0, 280, 6250000, 256, 256, 0, 6250, 0,
7, 0, 0, 0, 280, 6460000, 768, 768, 0, 6460, 0,
8, 0, 0, 0, 280, 7116000, 768, 768, 0, 7116, 0,
9, 0, 0, 0, 280, 6008000, 384, 384, 0, 6008, 0,
10, 0, 0, 0, 280, 6258000, 512, 512, 0, 6258, 0,
11, 0, 0, 0, 280, 7188000, 1024, 1024, 0, 7188, 0,
12, 0, 0, 0, 280, 7272000, 1536, 1536, 0, 7272, 0,
13, 0, 0, 0, 280, 6290000, 768, 768, 0, 6290, 0,
14, 0, 0, 0, 280, 6604000, 1024, 1024, 0, 6604, 0,
15, 0, 0, 0, 280, 6198000, 384, 384, 0, 6198, 0,
16, 0, 0, 0, 280, 6250000, 384, 384, 0, 6250, 0,
17, 0, 0, 0, 280, 6258000, 256, 256, 0, 6258, 0,
18, 0, 0, 0, 280, 4354000, 256, 256, 0, 4354, 0,
19, 0, 0, 0, 280, 6198000, 256, 256, 0, 6198, 0,
20, 0, 0, 0, 280, 6250000, 128, 128, 0, 6250, 0,
21, 0, 0, 0, 280, 6250000, 128, 128, 0, 6250, 0,
22, 0, 0, 0, 280, 6206000, 128, 128, 0, 6206, 0,
23, 0, 0, 0, 280, 4170000, 64, 64, 0, 4170, 0,
24, 0, 0, 0, 280, 4234000, 96, 96, 0, 4234, 0,
25, 0, 0, 0, 280, 6198000, 96, 96, 0, 6198, 0,
26, 0, 0, 0, 280, 6250000, 96, 96, 0, 6250, 0,
27, 0, 0, 0, 280, 6198000, 192, 192, 0, 6198, 0,
28, 0, 0, 0, 280, 6258000, 192, 192, 0, 6258, 0,
29, 0, 0, 0, 280, 6392000, 720, 720, 0, 6392, 0,
30, 0, 0, 0, 280, 6250000, 360, 360, 0, 6250, 0,
31, 0, 0, 0, 280, 5326000, 360, 360, 0, 5326, 0,
32, 0, 0, 0, 280, 6258000, 180, 180, 0, 6258, 0,
33, 0, 0, 0, 280, 4354000, 256, 256, 0, 4354, 0,
34, 0, 0, 0, 280, 4898000, 256, 256, 0, 4898, 0,
35, 0, 0, 0, 280, 6246000, 128, 128, 0, 6246, 0,
36, 0, 0, 0, 280, 6250000, 192, 192, 0, 6250, 0,
37, 0, 0, 0, 280, 6250000, 48, 48, 0, 6250, 0,
38, 0, 0, 0, 280, 4170000, 64, 64, 0, 4170, 0,
39, 0, 0, 0, 280, 6198000, 64, 64, 0, 6198, 0,
40, 0, 0, 0, 280, 6246000, 32, 32, 0, 6246, 0,
41, 0, 0, 0, 280, 5272000, 192, 384, 0, 5272, 0]

index = __COUNTER__
20 changes: 20 additions & 0 deletions src/audio/crossover/crossover.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// 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"
affinity_mask = "0x1"
instance_count = "40"
domain_types = "0"
load_type = "0"
module_type = "9"
init_config = "1"
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]
// 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__
17 changes: 17 additions & 0 deletions src/audio/dcblock/dcblock.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// DCblock module config
[[module.entry]]
name = "DCBLOCK"
uuid = "B809EFAF-5681-42B1-9ED6-04BB012DD384"
affinity_mask = "0x1"
instance_count = "40"
domain_types = "0"
load_type = "0"
module_type = "9"
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]
// 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__
17 changes: 17 additions & 0 deletions src/audio/drc/drc.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// DRC module config
[[module.entry]]
name = "DRC"
uuid = "B36EE4DA-006F-47F9-A06D-FECBE2D8B6CE"
affinity_mask = "0x1"
instance_count = "40"
domain_types = "0"
load_type = "0"
module_type = "9"
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]
// 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__
20 changes: 20 additions & 0 deletions src/audio/eq_fir/eq_fir.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// eq fir module config
[[module.entry]]
name = "EQFIR"
uuid = "43A90CE7-f3A5-41Df-AC06-BA98651AE6A3"
affinity_mask = "0x1"
instance_count = "40"
domain_types = "0"
load_type = "0"
module_type = "9"
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]

// 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__
21 changes: 21 additions & 0 deletions src/audio/eq_iir/eq_iir.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// eq iir module config
[[module.entry]]
name = "EQIIR"
uuid = "5150C0E6-27F9-4EC8-8351-C705B642D12F"
affinity_mask = "0x1"
instance_count = "40"
domain_types = "0"
load_type = "0"
module_type = "9"
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]

// 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, 1000, 0,
0, 0, 0, 0, 4096, 20663000, 768, 768, 0, 20663, 0]

index = __COUNTER__
19 changes: 19 additions & 0 deletions src/audio/google/google_rtc_audio_processing.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[[module.entry]]
name = "RTC_AEC"
uuid = "B780A0A6-269F-466F-B477-23DFA05AF758"
// bit #i = 1 means core #i is allowed.
affinity_mask = "0x7"
instance_count = "1"
domain_types = "1"
load_type = "1"
module_type = "10"
init_config = "1"
auto_start = "0"
sched_caps = [1, 0x00008000]

// 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__
19 changes: 19 additions & 0 deletions src/audio/kpb.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[[module.entry]]
name = "KPB"
uuid = "A8A0CB32-4A77-4DB1-85C7-53D7EE07BCE6"
affinity_mask = "0x1"
instance_count = "1"
domain_types = "0"
load_type = "0"
module_type = "0xB"
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, 0xa, 0x45ff]

// 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__
56 changes: 56 additions & 0 deletions src/audio/mixin_mixout/mixin_mixout.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
[[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, 0x45ff,
1, 0, 0xfeef, 0xc, 0x8, 0x45ff,
1, 0, 0xfeef, 0xc, 0x8, 0x45ff]

// mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS]
mod_cfg = [1, 0, 0, 0, 296, 4996000, 384, 384, 0, 4996, 0,
2, 0, 0, 0, 296, 2652000, 384, 384, 0, 2652, 0,
3, 0, 0, 0, 296, 2928000, 512, 512, 0, 2928, 0,
4, 0, 0, 0, 296, 2572000, 128, 128, 0, 2572, 0,
5, 0, 0, 0, 296, 3760000, 1536, 1536, 0, 3760, 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 = [0, 0, 0xfeef, 0xc, 0x8, 0x45ff,
0, 0, 0xfeef, 0xc, 0x8, 0x45ff,
0, 0, 0xfeef, 0xc, 0x8, 0x45ff,
0, 0, 0xfeef, 0xc, 0x8, 0x45ff,
0, 0, 0xfeef, 0xc, 0x8, 0x45ff,
0, 0, 0xfeef, 0xc, 0x8, 0x45ff,
0, 0, 0xfeef, 0xc, 0x8, 0x45ff,
0, 0, 0xfeef, 0xc, 0x8, 0x45ff,
1, 0, 0xfeef, 0xc, 0x8, 0x45ff]

// mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS]
mod_cfg = [1, 0, 0, 0, 520, 2280000, 384, 384, 0, 2280, 0,
2, 0, 0, 0, 520, 1988000, 384, 384, 0, 1988, 0,
3, 0, 0, 0, 520, 7631000, 512, 512, 0, 7631, 0,
4, 0, 0, 0, 520, 1953000, 128, 128, 0, 1953, 0,
5, 0, 0, 0, 520, 2301000, 1536, 1536, 0, 2301, 0]

index = __COUNTER__
22 changes: 22 additions & 0 deletions src/audio/module_adapter/module/cadence.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Cadence module config
[[module.entry]]
name = "CADENCE"
uuid = "D8218443-5FF3-4A4C-B388-6CFE07B956AA"
affinity_mask = "0x3"
instance_count = "1"
domain_types = "0"
load_type = "0"
init_config = "1"
module_type = "31"
auto_start = "0"
sched_caps = [1, 0x00008000]

// 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 = [0, 0, 0, 0, 4096, 1000000, 128, 128, 0, 0, 0]

index = __COUNTER__
17 changes: 17 additions & 0 deletions src/audio/multiband_drc/multiband_drc.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Multiband-DRC module config
[[module.entry]]
name = "MB_DRC"
uuid = "0D9F2256-8E4F-47B3-8448-239A334F1191"
affinity_mask = "0x1"
instance_count = "40"
domain_types = "0"
load_type = "0"
module_type = "9"
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]
// 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__
Loading

0 comments on commit cf9a444

Please sign in to comment.