Skip to content

Commit dadf2ac

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 dadf2ac

File tree

28 files changed

+841
-713
lines changed

28 files changed

+841
-713
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/asrc/asrc.toml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
[[module.entry]]
2+
name = "ASRC"
3+
uuid = "66B4402D-B468-42F2-81A7-B37121863DD4"
4+
affinity_mask = "0x3"
5+
instance_count = "2"
6+
domain_types = "0"
7+
8+
load_type = "0"
9+
module_type = "9"
10+
auto_start = "0"
11+
sched_caps = [1, 0x00008000]
12+
13+
pin = [0, 0, 0xfeef, 0xc, 0x8, 0x45ff,
14+
1, 0, 0xfeef, 0xc, 0x8, 0x45ff]
15+
16+
mod_cfg = [1, 0, 0, 0, 20480, 21808000, 64, 192, 0, 21808, 0,
17+
2, 0, 0, 0, 20480, 45820000, 64, 384, 0, 45820, 0,
18+
3, 0, 0, 0, 20480, 75236000, 512, 1440, 0, 75236, 0,
19+
4, 0, 0, 0, 20480, 79732000, 512, 1536, 0, 79732, 0,
20+
5, 0, 0, 0, 20480, 50411000, 184, 384, 0, 50411, 0,
21+
6, 0, 0, 0, 20480, 24236000, 192, 128, 0, 24236, 0,
22+
7, 0, 0, 0, 20480, 46753000, 192, 384, 0, 46753, 0,
23+
8, 0, 0, 0, 20480, 30032000, 256, 256, 0, 30032, 0,
24+
9, 0, 0, 0, 20480, 48676000, 256, 384, 0, 48676, 0,
25+
10, 0, 0, 0, 20480, 46548000, 360, 360, 0, 46548, 0,
26+
11, 0, 0, 0, 20480, 94372000, 1440, 1536, 0, 94372, 0,
27+
12, 0, 0, 0, 20480, 42912000, 1536, 512, 0, 42912, 0,
28+
13, 0, 0, 0, 20480, 31871000, 384, 192, 0, 31871, 0,
29+
14, 0, 0, 0, 20480, 34216000, 384, 256, 0, 34216, 0,
30+
15, 0, 0, 0, 20480, 83448000, 1536, 1440, 0, 83448, 0]
31+
32+
index = __COUNTER__

src/audio/codec/dts/dts.toml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// dts codec module config
2+
[[module.entry]]
3+
name = "DTS"
4+
uuid = "D95FC34F-370F-4AC7-BC86-BFDC5BE241E6"
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, 296, 5000000, 384, 384, 0, 5000, 0]
19+
20+
index = __COUNTER__

src/audio/copier/copier.toml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
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, 0x45ff,
15+
1, 0, 0xfeef, 0xf, 0xf, 0x45ff,
16+
1, 0, 0xfeef, 0xf, 0xf, 0x45ff,
17+
1, 0, 0xfeef, 0xf, 0xf, 0x45ff]
18+
19+
// mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS]
20+
mod_cfg = [1, 0, 0, 0, 280, 4918000, 768, 768, 0, 4918, 0,
21+
2, 0, 0, 0, 280, 6526000, 768, 768, 0, 6526, 0,
22+
3, 0, 0, 0, 280, 6388000, 384, 384, 0, 6388, 0,
23+
4, 0, 0, 0, 280, 4682000, 512, 512, 0, 4682, 0,
24+
5, 0, 0, 0, 280, 5738000, 512, 512, 0, 5738, 0,
25+
6, 0, 0, 0, 280, 6250000, 256, 256, 0, 6250, 0,
26+
7, 0, 0, 0, 280, 6460000, 768, 768, 0, 6460, 0,
27+
8, 0, 0, 0, 280, 7116000, 768, 768, 0, 7116, 0,
28+
9, 0, 0, 0, 280, 6008000, 384, 384, 0, 6008, 0,
29+
10, 0, 0, 0, 280, 6258000, 512, 512, 0, 6258, 0,
30+
11, 0, 0, 0, 280, 7188000, 1024, 1024, 0, 7188, 0,
31+
12, 0, 0, 0, 280, 7272000, 1536, 1536, 0, 7272, 0,
32+
13, 0, 0, 0, 280, 6290000, 768, 768, 0, 6290, 0,
33+
14, 0, 0, 0, 280, 6604000, 1024, 1024, 0, 6604, 0,
34+
15, 0, 0, 0, 280, 6198000, 384, 384, 0, 6198, 0,
35+
16, 0, 0, 0, 280, 6250000, 384, 384, 0, 6250, 0,
36+
17, 0, 0, 0, 280, 6258000, 256, 256, 0, 6258, 0,
37+
18, 0, 0, 0, 280, 4354000, 256, 256, 0, 4354, 0,
38+
19, 0, 0, 0, 280, 6198000, 256, 256, 0, 6198, 0,
39+
20, 0, 0, 0, 280, 6250000, 128, 128, 0, 6250, 0,
40+
21, 0, 0, 0, 280, 6250000, 128, 128, 0, 6250, 0,
41+
22, 0, 0, 0, 280, 6206000, 128, 128, 0, 6206, 0,
42+
23, 0, 0, 0, 280, 4170000, 64, 64, 0, 4170, 0,
43+
24, 0, 0, 0, 280, 4234000, 96, 96, 0, 4234, 0,
44+
25, 0, 0, 0, 280, 6198000, 96, 96, 0, 6198, 0,
45+
26, 0, 0, 0, 280, 6250000, 96, 96, 0, 6250, 0,
46+
27, 0, 0, 0, 280, 6198000, 192, 192, 0, 6198, 0,
47+
28, 0, 0, 0, 280, 6258000, 192, 192, 0, 6258, 0,
48+
29, 0, 0, 0, 280, 6392000, 720, 720, 0, 6392, 0,
49+
30, 0, 0, 0, 280, 6250000, 360, 360, 0, 6250, 0,
50+
31, 0, 0, 0, 280, 5326000, 360, 360, 0, 5326, 0,
51+
32, 0, 0, 0, 280, 6258000, 180, 180, 0, 6258, 0,
52+
33, 0, 0, 0, 280, 4354000, 256, 256, 0, 4354, 0,
53+
34, 0, 0, 0, 280, 4898000, 256, 256, 0, 4898, 0,
54+
35, 0, 0, 0, 280, 6246000, 128, 128, 0, 6246, 0,
55+
36, 0, 0, 0, 280, 6250000, 192, 192, 0, 6250, 0,
56+
37, 0, 0, 0, 280, 6250000, 48, 48, 0, 6250, 0,
57+
38, 0, 0, 0, 280, 4170000, 64, 64, 0, 4170, 0,
58+
39, 0, 0, 0, 280, 6198000, 64, 64, 0, 6198, 0,
59+
40, 0, 0, 0, 280, 6246000, 32, 32, 0, 6246, 0,
60+
41, 0, 0, 0, 280, 5272000, 192, 384, 0, 5272, 0]
61+
62+
index = __COUNTER__

src/audio/crossover/crossover.toml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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+
20+
index = __COUNTER__

src/audio/dcblock/dcblock.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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+
17+
index = __COUNTER__

src/audio/drc/drc.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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+
17+
index = __COUNTER__

src/audio/eq_fir/eq_fir.toml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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+
20+
index = __COUNTER__

src/audio/eq_iir/eq_iir.toml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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, 1000, 0,
19+
0, 0, 0, 0, 4096, 20663000, 768, 768, 0, 20663, 0]
20+
21+
index = __COUNTER__
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[[module.entry]]
2+
name = "RTC_AEC"
3+
uuid = "B780A0A6-269F-466F-B477-23DFA05AF758"
4+
// bit #i = 1 means core #i is allowed.
5+
affinity_mask = "0x7"
6+
instance_count = "1"
7+
domain_types = "1"
8+
load_type = "1"
9+
module_type = "10"
10+
init_config = "1"
11+
auto_start = "0"
12+
sched_caps = [1, 0x00008000]
13+
14+
// pin = [dir, type, sample rate, size, container, channel-cfg]
15+
pin = [0, 0, 0x8, 0x2, 0x2, 0x1,
16+
0, 0, 0x8, 0x2, 0x2, 0x4,
17+
1, 0, 0x8, 0x2, 0x2, 0x1]
18+
19+
index = __COUNTER__

0 commit comments

Comments
 (0)