Skip to content

Commit 228ff07

Browse files
committed
toml: 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 <guennadi.liakhovetski@linux.intel.com>
1 parent 486ccfe commit 228ff07

File tree

23 files changed

+598
-515
lines changed

23 files changed

+598
-515
lines changed

src/audio/aria/aria.toml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Aria module config
2+
[[module.entry]]
3+
name = "ARIA"
4+
uuid = "99F7166D-372C-43EF-81F6-22007AA15F03"
5+
affinity_mask = "0x1"
6+
instance_count = "8"
7+
domain_types = "0"
8+
load_type = "0"
9+
init_config = "1"
10+
module_type = "30"
11+
auto_start = "0"
12+
sched_caps = [1, 0x00008000]
13+
14+
// pin = [dir, type, sample rate, size, container, channel-cfg]
15+
pin = [0, 0, 0xfeef, 0xf, 0xa, 0x45ff,
16+
1, 0, 0xfeef, 0xf, 0xa, 0x45ff]
17+
18+
// mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS]
19+
mod_cfg = [0, 0, 0, 0, 260, 1063000, 16, 21, 0, 0, 0,
20+
1, 0, 0, 0, 260, 1873500, 192, 256, 0, 0, 0,
21+
2, 0, 0, 0, 260, 2680000, 32, 42, 0, 0, 0,
22+
3, 0, 0, 0, 260, 3591000, 64, 85, 0, 0, 0,
23+
4, 0, 0, 0, 260, 4477000, 96, 128, 0, 0, 0,
24+
5, 0, 0, 0, 260, 7195000, 192, 192, 0, 0, 0]
25+
index = __COUNTER__

src/audio/copier/copier.toml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
[[module.entry]]
2+
name = "COPIER"
3+
uuid = "9BA00C83-CA12-4A83-943C-1FA2E82F9DDA"
4+
affinity_mask = "0x1"
5+
instance_count = "32"
6+
domain_types = "0"
7+
load_type = "0"
8+
module_type = "3"
9+
auto_start = "0"
10+
sched_caps = [1, 0x00008000]
11+
12+
// pin = [dir, type, sample rate, size, container, channel-cfg]
13+
pin = [0, 0, 0xfeef, 0xf, 0xf, 0x45ff,
14+
1, 0, 0xfeef, 0xf, 0xf, 0x1ff,
15+
1, 0, 0xfeef, 0xf, 0xf, 0x1ff,
16+
1, 0, 0xfeef, 0xf, 0xf, 0x1ff,
17+
1, 0, 0xfeef, 0xf, 0xf, 0x1ff]
18+
19+
// mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS]
20+
mod_cfg = [ 0, 0, 0, 0, 280, 640100, 45, 60, 0, 0, 0,
21+
1, 0, 0, 0, 280, 1106300, 192, 192, 0, 0, 0,
22+
2, 0, 0, 0, 280, 1573000, 45, 45, 0, 0, 0,
23+
3, 0, 0, 0, 280, 2040600, 192, 256, 0, 0, 0,
24+
4, 0, 0, 0, 280, 2507500, 192, 256, 0, 0, 0,
25+
5, 0, 0, 0, 280, 2999000, 192, 256, 0, 0, 0,
26+
6, 0, 0, 0, 280, 3501000, 45, 60, 0, 0, 0,
27+
7, 0, 0, 0, 280, 3927000, 192, 256, 0, 0, 0,
28+
8, 0, 0, 0, 280, 4424000, 192, 256, 0, 0, 0,
29+
9, 0, 0, 0, 280, 4941000, 192, 256, 0, 0, 0]
30+
index = __COUNTER__

src/audio/crossover/crossover.toml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Crossover module config
2+
// Note: Crossover has init_config set to 1 to let kernel know that the base_cfg_ext needs to
3+
// be appended to the IPC payload. The Extension is needed to know the output pin indices.
4+
[[module.entry]]
5+
name = "XOVER"
6+
uuid = "948C9AD1-806A-4131-AD6C-B2BDA9E35A9F"
7+
affinity_mask = "0x1"
8+
instance_count = "40"
9+
domain_types = "0"
10+
load_type = "0"
11+
module_type = "9"
12+
init_config = "1"
13+
auto_start = "0"
14+
sched_caps = [1, 0x00008000]
15+
// pin = [dir, type, sample rate, size, container, channel-cfg]
16+
pin = [0, 0, 0xfeef, 0xf, 0xf, 0x45ff, 1, 0, 0xfeef, 0xf, 0xf, 0x1ff]
17+
// mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS]
18+
mod_cfg = [0, 0, 0, 0, 4096, 1000000, 128, 128, 0, 0, 0]
19+
index = __COUNTER__

src/audio/dcblock/dcblock.toml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// DCblock module config
2+
[[module.entry]]
3+
name = "DCBLOCK"
4+
uuid = "B809EFAF-5681-42B1-9ED6-04BB012DD384"
5+
affinity_mask = "0x1"
6+
instance_count = "40"
7+
domain_types = "0"
8+
load_type = "0"
9+
module_type = "9"
10+
auto_start = "0"
11+
sched_caps = [1, 0x00008000]
12+
// pin = [dir, type, sample rate, size, container, channel-cfg]
13+
pin = [0, 0, 0xfeef, 0xf, 0xf, 0x45ff, 1, 0, 0xfeef, 0xf, 0xf, 0x1ff]
14+
// mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS]
15+
mod_cfg = [0, 0, 0, 0, 4096, 1000000, 128, 128, 0, 0, 0]
16+
index = __COUNTER__

src/audio/drc/drc.toml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// DRC module config
2+
[[module.entry]]
3+
name = "DRC"
4+
uuid = "B36EE4DA-006F-47F9-A06D-FECBE2D8B6CE"
5+
affinity_mask = "0x1"
6+
instance_count = "40"
7+
domain_types = "0"
8+
load_type = "0"
9+
module_type = "9"
10+
auto_start = "0"
11+
sched_caps = [1, 0x00008000]
12+
// pin = [dir, type, sample rate, size, container, channel-cfg]
13+
pin = [0, 0, 0xfeef, 0xf, 0xf, 0x45ff, 1, 0, 0xfeef, 0xf, 0xf, 0x1ff]
14+
// mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS]
15+
mod_cfg = [0, 0, 0, 0, 4096, 1000000, 128, 128, 0, 0, 0]
16+
index = __COUNTER__

src/audio/eq_fir/eq_fir.toml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// eq fir module config
2+
[[module.entry]]
3+
name = "EQFIR"
4+
uuid = "43A90CE7-f3A5-41Df-AC06-BA98651AE6A3"
5+
affinity_mask = "0x1"
6+
instance_count = "40"
7+
domain_types = "0"
8+
load_type = "0"
9+
module_type = "9"
10+
auto_start = "0"
11+
sched_caps = [1, 0x00008000]
12+
13+
// pin = [dir, type, sample rate, size, container, channel-cfg]
14+
pin = [0, 0, 0xfeef, 0xf, 0xf, 0x45ff,
15+
1, 0, 0xfeef, 0xf, 0xf, 0x1ff]
16+
17+
// mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS]
18+
mod_cfg = [0, 0, 0, 0, 4096, 1000000, 128, 128, 0, 0, 0]
19+
index = __COUNTER__

src/audio/eq_iir/eq_iir.toml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// eq iir module config
2+
[[module.entry]]
3+
name = "EQIIR"
4+
uuid = "5150C0E6-27F9-4EC8-8351-C705B642D12F"
5+
affinity_mask = "0x1"
6+
instance_count = "40"
7+
domain_types = "0"
8+
load_type = "0"
9+
module_type = "9"
10+
auto_start = "0"
11+
sched_caps = [1, 0x00008000]
12+
13+
// pin = [dir, type, sample rate, size, container, channel-cfg]
14+
pin = [0, 0, 0xfeef, 0xf, 0xf, 0x45ff,
15+
1, 0, 0xfeef, 0xf, 0xf, 0x1ff]
16+
17+
// mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS]
18+
mod_cfg = [0, 0, 0, 0, 4096, 1000000, 128, 128, 0, 0, 0]
19+
index = __COUNTER__
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[[module.entry]]
2+
name = "RTC_AEC"
3+
uuid = "B780A0A6-269F-466F-B477-23DFA05AF758"
4+
affinity_mask = "0x3"
5+
instance_count = "1"
6+
domain_types = "0"
7+
load_type = "1"
8+
module_type = "10"
9+
init_config = "1"
10+
auto_start = "0"
11+
sched_caps = [1, 0x00008000]
12+
13+
// pin = [dir, type, sample rate, size, container, channel-cfg]
14+
pin = [0, 0, 0x8, 0x2, 0x2, 0x1,
15+
0, 0, 0x8, 0x2, 0x2, 0x4,
16+
1, 0, 0x8, 0x2, 0x2, 0x1]
17+
index = __COUNTER__

src/audio/kpb.toml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[[module.entry]]
2+
name = "KPB"
3+
uuid = "D8218443-5FF3-4A4C-B388-6CFE07B9562E"
4+
affinity_mask = "0x1"
5+
instance_count = "1"
6+
domain_types = "0"
7+
load_type = "1"
8+
module_type = "0xB"
9+
auto_start = "0"
10+
sched_caps = [1, 0x00008000]
11+
12+
// pin = [dir, type, sample rate, size, container, channel-cfg]
13+
pin = [0, 0, 0xfeef, 0xf, 0xf, 0x45ff,
14+
1, 0, 0xfeef, 0xf, 0xa, 0x45ff]
15+
16+
// mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS]
17+
mod_cfg = [0, 0, 0, 0, 14400, 1114000, 16, 16, 0, 0, 0]
18+
index = __COUNTER__
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
[[module.entry]]
2+
name = "MIXIN"
3+
uuid = "39656EB2-3B71-4049-8D3F-F92CD5C43C09"
4+
affinity_mask = "0x1"
5+
instance_count = "30"
6+
domain_types = "0"
7+
load_type = "0"
8+
module_type = "1"
9+
auto_start = "0"
10+
sched_caps = [1, 0x00008000]
11+
12+
// pin = [dir, type, sample rate, size, container, channel-cfg]
13+
pin = [0, 0, 0xfeef, 0xc, 0x8, 0x45ff,
14+
1, 0, 0xfeef, 0xc, 0x8, 0x1ff,
15+
1, 0, 0xfeef, 0xc, 0x8, 0x1ff,
16+
1, 0, 0xfeef, 0xc, 0x8, 0x1ff,
17+
1, 0, 0xfeef, 0xc, 0x8, 0x1ff]
18+
19+
// mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS]
20+
mod_cfg = [ 0, 0, 0, 0, 296, 644000, 45, 60, 0, 0, 0,
21+
1, 0, 0, 0, 296, 669900, 48, 64, 0, 0, 0,
22+
2, 0, 0, 0, 296, 934000, 96, 128, 0, 0, 0,
23+
3, 0, 0, 0, 296, 1137000, 96, 128, 0, 0, 0,
24+
4, 0, 0, 0, 296, 1482000, 48, 64, 0, 0, 0,
25+
5, 0, 0, 0, 296, 1746000, 96, 128, 0, 0, 0,
26+
6, 0, 0, 0, 296, 2274000, 192, 256, 0, 0, 0,
27+
7, 0, 0, 0, 296, 2700000, 48, 64, 0, 0, 0,
28+
8, 0, 0, 0, 296, 2964000, 96, 128, 0, 0, 0,
29+
9, 0, 0, 0, 296, 3492000, 192, 256, 0, 0, 0]
30+
index = __COUNTER__
31+
32+
[[module.entry]]
33+
name = "MIXOUT"
34+
uuid = "3C56505A-24D7-418F-BDDC-C1F5A3AC2AE0"
35+
affinity_mask = "0x1"
36+
instance_count = "30"
37+
domain_types = "0"
38+
load_type = "0"
39+
module_type = "2"
40+
auto_start = "0"
41+
sched_caps = [1, 0x00008000]
42+
43+
// pin = [dir, type, sample rate, size, container, channel-cfg]
44+
pin = [1, 0, 0xfeef, 0xc, 0x8, 0x45ff,
45+
1, 0, 0xfeef, 0xc, 0x8, 0x1ff,
46+
1, 0, 0xfeef, 0xc, 0x8, 0x1ff,
47+
1, 0, 0xfeef, 0xc, 0x8, 0x1ff,
48+
1, 0, 0xfeef, 0xc, 0x8, 0x1ff,
49+
1, 0, 0xfeef, 0xc, 0x8, 0x1ff,
50+
1, 0, 0xfeef, 0xc, 0x8, 0x1ff,
51+
1, 0, 0xfeef, 0xc, 0x8, 0x1ff,
52+
0, 0, 0xfeef, 0xc, 0x8, 0x1ff]
53+
54+
// mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS]
55+
mod_cfg = [0, 0, 0, 0, 520, 649600, 48, 64, 0, 0, 0,
56+
1, 0, 0, 0, 520, 966300, 96, 128, 0, 0, 0,
57+
2, 0, 0, 0, 520, 2101000, 48, 64, 0, 0, 0,
58+
3, 0, 0, 0, 520, 2500800, 192, 256, 0, 0, 0,
59+
4, 0, 0, 0, 520, 2616700, 192, 256, 0, 0, 0,
60+
5, 0, 0, 0, 520, 2964500, 192, 256, 0, 0, 0,
61+
6, 0, 0, 0, 520, 4202000, 96, 128, 0, 0, 0,
62+
7, 0, 0, 0, 520, 3730000, 192, 256, 0, 0, 0]
63+
index = __COUNTER__

0 commit comments

Comments
 (0)