Skip to content

Commit 2bb5dc3

Browse files
committed
build: audio: put modules in alphabetical order
Put the Cmake and Kconfig modules in alphabetical order to help convenience scripting insert new modules. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
1 parent 471322c commit 2bb5dc3

File tree

2 files changed

+53
-73
lines changed

2 files changed

+53
-73
lines changed

src/audio/CMakeLists.txt

Lines changed: 27 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,18 @@ if(NOT CONFIG_COMP_MODULE_SHARED_LIBRARY_BUILD)
1717
add_subdirectory(pcm_converter)
1818
add_subdirectory(pipeline)
1919

20+
if(CONFIG_COMP_BASEFW_IPC4 AND NOT CONFIG_LIBRARY)
21+
add_local_sources(sof base_fw.c)
22+
endif()
23+
add_local_sources_ifdef(CONFIG_IPC4_BASE_FW_INTEL sof base_fw_intel.c)
24+
2025
# directories and files included conditionally (alphabetical order)
2126
if(CONFIG_COMP_ARIA)
2227
add_subdirectory(aria)
2328
endif()
2429
if(CONFIG_COMP_ASRC)
2530
add_subdirectory(asrc)
2631
endif()
27-
if(CONFIG_COMP_BASEFW_IPC4 AND NOT CONFIG_LIBRARY)
28-
add_local_sources(sof base_fw.c)
29-
endif()
30-
add_local_sources_ifdef(CONFIG_IPC4_BASE_FW_INTEL sof base_fw_intel.c)
31-
if(CONFIG_COMP_CHAIN_DMA)
32-
add_local_sources(sof chain_dma.c)
33-
endif()
3432
if(CONFIG_COMP_COPIER)
3533
add_subdirectory(copier)
3634
endif()
@@ -52,19 +50,14 @@ if(NOT CONFIG_COMP_MODULE_SHARED_LIBRARY_BUILD)
5250
if(CONFIG_COMP_IIR)
5351
add_subdirectory(eq_iir)
5452
endif()
55-
if(CONFIG_COMP_KPB AND NOT CONFIG_LIBRARY_STATIC)
56-
add_local_sources(sof
57-
kpb.c
58-
)
59-
endif()
6053
if(CONFIG_COMP_MFCC)
6154
add_subdirectory(mfcc)
6255
endif()
6356
if(CONFIG_COMP_MIXER)
64-
add_subdirectory(mixer)
57+
add_subdirectory(mixer)
6558
endif()
6659
if(CONFIG_COMP_MIXIN_MIXOUT)
67-
add_subdirectory(mixin_mixout)
60+
add_subdirectory(mixin_mixout)
6861
endif()
6962
if(CONFIG_COMP_MODULE_ADAPTER)
7063
add_subdirectory(module_adapter)
@@ -90,39 +83,49 @@ if(NOT CONFIG_COMP_MODULE_SHARED_LIBRARY_BUILD)
9083
if(CONFIG_COMP_TDFB)
9184
add_subdirectory(tdfb)
9285
endif()
93-
if(CONFIG_COMP_TONE)
94-
add_local_sources(sof
95-
tone.c
96-
)
86+
if(CONFIG_COMP_TEMPLATE_COMP)
87+
add_subdirectory(template_comp)
88+
endif()
89+
if(CONFIG_COMP_TENSORFLOW)
90+
add_subdirectory(tensorflow)
9791
endif()
9892
if(CONFIG_COMP_UP_DOWN_MIXER)
9993
add_subdirectory(up_down_mixer)
10094
endif()
10195
if(CONFIG_COMP_VOLUME)
10296
add_subdirectory(volume)
10397
endif()
104-
if(CONFIG_COMP_TENSORFLOW)
105-
add_subdirectory(tensorflow)
106-
endif()
10798
if(CONFIG_DTS_CODEC)
10899
add_subdirectory(codec)
109100
endif()
101+
# end of directories and files included conditionally (alphabetical order)
102+
110103
add_subdirectory(google)
111104
add_subdirectory(nxp)
112105

106+
if(CONFIG_COMP_CHAIN_DMA)
107+
add_local_sources(sof chain_dma.c)
108+
endif()
109+
if(CONFIG_COMP_KPB AND NOT CONFIG_LIBRARY_STATIC)
110+
add_local_sources(sof
111+
kpb.c
112+
)
113+
endif()
113114
if(CONFIG_INTEL_ADSP_MIC_PRIVACY)
114115
add_subdirectory(mic_privacy_manager)
115116
endif()
117+
if(CONFIG_COMP_TONE)
118+
add_local_sources(sof
119+
tone.c
120+
)
121+
endif()
116122
if(CONFIG_ZEPHYR_NATIVE_DRIVERS)
117123
list(APPEND base_files host-zephyr.c)
118124
sof_list_append_ifdef(CONFIG_COMP_DAI base_files dai-zephyr.c)
119125
else()
120126
list(APPEND base_files host-legacy.c)
121127
sof_list_append_ifdef(CONFIG_COMP_DAI base_files dai-legacy.c)
122128
endif()
123-
if(CONFIG_COMP_TEMPLATE_COMP)
124-
add_subdirectory(template_comp)
125-
endif()
126129
endif()
127130

128131
### Common files (also used in shared library build)

src/audio/Kconfig

Lines changed: 26 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22

33
menu "Audio components"
44

5-
rsource "volume/Kconfig"
6-
rsource "aria/Kconfig"
7-
85
config COMP_BASEFW_IPC4
96
bool "BASEFW component"
107
default y
@@ -20,8 +17,6 @@ config IPC4_BASE_FW_INTEL
2017
This implements a set of additional IPC4 properties that
2118
extend the base spec.
2219

23-
rsource "copier/Kconfig"
24-
2520
config HOST_DMA_RELOAD_DELAY_ENABLE
2621
bool "Delay reloading DMA for host interfaces"
2722
default y
@@ -79,8 +74,6 @@ config MODULE_MAX_CONNECTIONS
7974
Specifies the maximum number of sink and source connections a module
8075
may have to other modules.
8176

82-
rsource "up_down_mixer/Kconfig"
83-
8477
config COMP_BLOB
8578
bool "Large IPC data as compound message blobs"
8679
default y
@@ -96,19 +89,13 @@ config MODULE_MAX_BLOB_SIZE
9689
Specify the maximum size of IPC4 module blob data that can be
9790
appended to each message.
9891

99-
rsource "src/Kconfig"
100-
10192
config COMP_STUBS
10293
bool "Build all selected third-party (3P) components with stubs"
10394
default n
10495
help
10596
Select to force all 3P blocks to link against stubs rather than their libraries. This
10697
should only be used in testing environments like fuzzers or CI.
10798

108-
rsource "eq_fir/Kconfig"
109-
110-
rsource "eq_iir/Kconfig"
111-
11299
config COMP_TONE
113100
bool "Tone component"
114101
default n
@@ -117,12 +104,6 @@ config COMP_TONE
117104
Select for Tone component.
118105
Warning: This component is deprecated and will be removed from SOF v2.8.
119106

120-
rsource "mixer/Kconfig"
121-
122-
rsource "mixin_mixout/Kconfig"
123-
124-
rsource "mux/Kconfig"
125-
126107
config COMP_KPB
127108
bool "KPB component"
128109
default y
@@ -139,28 +120,6 @@ config KPB_FORCE_COPY_TYPE_NORMAL
139120

140121
endif # COMP_KPB
141122

142-
rsource "google/Kconfig"
143-
144-
rsource "nxp/Kconfig"
145-
146-
rsource "selector/Kconfig"
147-
148-
rsource "crossover/Kconfig"
149-
150-
rsource "drc/Kconfig"
151-
152-
rsource "multiband_drc/Kconfig"
153-
154-
rsource "dcblock/Kconfig"
155-
156-
rsource "smart_amp/Kconfig"
157-
158-
rsource "asrc/Kconfig"
159-
160-
rsource "tdfb/Kconfig"
161-
162-
rsource "tensorflow/Kconfig"
163-
164123
config COMP_MODULE_ADAPTER
165124
bool "Module adapter"
166125
default y
@@ -172,17 +131,35 @@ config COMP_MODULE_ADAPTER
172131
"src\include\sof\audio\module_adapter\interfaces.h". It is possible to link several
173132
different codecs and use them in parallel.
174133

175-
rsource "module_adapter/Kconfig"
176-
134+
# --- Kconfig Sources (alphabetical order) ---
135+
rsource "aria/Kconfig"
136+
rsource "asrc/Kconfig"
137+
rsource "codec/Kconfig"
138+
rsource "copier/Kconfig"
139+
rsource "crossover/Kconfig"
140+
rsource "dcblock/Kconfig"
141+
rsource "drc/Kconfig"
142+
rsource "eq_fir/Kconfig"
143+
rsource "eq_iir/Kconfig"
144+
rsource "google/Kconfig"
177145
rsource "igo_nr/Kconfig"
178-
179-
rsource "rtnr/Kconfig"
180-
181146
rsource "mfcc/Kconfig"
182-
183-
rsource "codec/Kconfig"
184-
147+
rsource "mixer/Kconfig"
148+
rsource "mixin_mixout/Kconfig"
149+
rsource "module_adapter/Kconfig"
150+
rsource "multiband_drc/Kconfig"
151+
rsource "mux/Kconfig"
152+
rsource "nxp/Kconfig"
153+
rsource "rtnr/Kconfig"
154+
rsource "selector/Kconfig"
155+
rsource "smart_amp/Kconfig"
156+
rsource "src/Kconfig"
157+
rsource "tdfb/Kconfig"
185158
rsource "template_comp/Kconfig"
159+
rsource "tensorflow/Kconfig"
160+
rsource "up_down_mixer/Kconfig"
161+
rsource "volume/Kconfig"
162+
# --- End Kconfig Sources (alphabetical order) ---
186163

187164
endmenu # "Audio components"
188165

0 commit comments

Comments
 (0)