-
Notifications
You must be signed in to change notification settings - Fork 349
cmake/zephyr: src/audio/CMakeLists.txt unification part 2 #9912
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
9dfc213
5e92106
d86eed9
b77283c
b81e313
f8413d6
8a82825
c6b6dd2
4d57eb9
b20974a
d12fe79
fdfc176
dc24142
f2b4d22
0be61fc
61727d1
47a7b81
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,8 @@ | ||
| # SPDX-License-Identifier: BSD-3-Clause | ||
|
|
||
| add_local_sources(sof aria.c aria_hifi5.c aria_hifi3.c aria_generic.c) | ||
| if(CONFIG_COMP_ARIA STREQUAL "m") | ||
| add_subdirectory(llext ${PROJECT_BINARY_DIR}/aria_llext) | ||
| add_dependencies(app aria) | ||
| else() | ||
| add_local_sources(sof aria.c aria_hifi5.c aria_hifi3.c aria_generic.c) | ||
| endif() |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,19 @@ | ||
| add_local_sources(sof | ||
| drc.c | ||
| drc_generic.c | ||
| drc_hifi3.c | ||
| drc_hifi4.c | ||
| drc_math_generic.c | ||
| drc_math_hifi3.c | ||
| drc_log.c | ||
| ) | ||
| # SPDX-License-Identifier: BSD-3-Clause | ||
|
|
||
| if(CONFIG_COMP_DRC STREQUAL "m") | ||
| add_subdirectory(llext ${PROJECT_BINARY_DIR}/drc_llext) | ||
| add_dependencies(app drc) | ||
| else() | ||
| add_local_sources(sof | ||
| drc.c | ||
| drc_generic.c | ||
| drc_hifi3.c | ||
| drc_hifi4.c | ||
| drc_math_generic.c | ||
| drc_math_hifi3.c | ||
| ) | ||
| endif() | ||
|
|
||
| if(NOT CONFIG_COMP_DRC STREQUAL "n") | ||
| add_local_sources(sof drc_log.c) | ||
| endif() |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,8 @@ | ||
| # SPDX-License-Identifier: BSD-3-Clause | ||
|
|
||
| add_local_sources(sof mfcc.c mfcc_setup.c mfcc_common.c mfcc_generic.c mfcc_hifi4.c mfcc_hifi3.c) | ||
| if(CONFIG_COMP_MFCC STREQUAL "m") | ||
| add_subdirectory(llext ${PROJECT_BINARY_DIR}/mfcc_llext) | ||
| add_dependencies(app mfcc) | ||
| else() | ||
| add_local_sources(sof mfcc.c mfcc_setup.c mfcc_common.c mfcc_generic.c mfcc_hifi4.c mfcc_hifi3.c) | ||
| endif() |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,12 @@ | ||
| add_local_sources(sof mixin_mixout.c mixin_mixout_generic.c mixin_mixout_hifi3.c mixin_mixout_hifi5.c) | ||
| # SPDX-License-Identifier: BSD-3-Clause | ||
|
|
||
| if(CONFIG_COMP_MIXIN_MIXOUT STREQUAL "m") | ||
|
|
||
| add_subdirectory(llext ${PROJECT_BINARY_DIR}/mixin_mixout_llext) | ||
| add_dependencies(app mixin_mixout) | ||
|
|
||
| else() | ||
|
|
||
| add_local_sources(sof mixin_mixout.c mixin_mixout_generic.c mixin_mixout_hifi3.c mixin_mixout_hifi5.c) | ||
|
|
||
| endif() |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,15 @@ | ||
| add_local_sources(sof multiband_drc.c) | ||
| add_local_sources(sof multiband_drc_generic.c) | ||
| # SPDX-License-Identifier: BSD-3-Clause | ||
|
|
||
| if(CONFIG_IPC_MAJOR_3) | ||
| add_local_sources(sof multiband_drc_ipc3.c) | ||
| elseif(CONFIG_IPC_MAJOR_4) | ||
| add_local_sources(sof multiband_drc_ipc4.c) | ||
| if(CONFIG_COMP_MULTIBAND_DRC STREQUAL "m") | ||
| add_subdirectory(llext ${PROJECT_BINARY_DIR}/multiband_drc_llext) | ||
| add_dependencies(app multiband_drc) | ||
| else() | ||
| add_local_sources(sof multiband_drc.c) | ||
| add_local_sources(sof multiband_drc_generic.c) | ||
|
|
||
| if(CONFIG_IPC_MAJOR_3) | ||
| add_local_sources(sof multiband_drc_ipc3.c) | ||
| elseif(CONFIG_IPC_MAJOR_4) | ||
| add_local_sources(sof multiband_drc_ipc4.c) | ||
| endif() | ||
| endif() |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,14 @@ | ||
| # SPDX-License-Identifier: BSD-3-Clause | ||
|
|
||
| add_local_sources(sof mux.c mux_generic.c) | ||
| if(CONFIG_COMP_MUX STREQUAL "m") | ||
| add_subdirectory(llext ${PROJECT_BINARY_DIR}/mux_llext) | ||
| add_dependencies(app mux) | ||
| else() | ||
| add_local_sources(sof mux.c mux_generic.c) | ||
|
|
||
| if(CONFIG_IPC_MAJOR_3) | ||
| add_local_sources(sof mux_ipc3.c) | ||
| elseif(CONFIG_IPC_MAJOR_4) | ||
| add_local_sources(sof mux_ipc4.c) | ||
| if(CONFIG_IPC_MAJOR_3) | ||
| add_local_sources(sof mux_ipc3.c) | ||
| elseif(CONFIG_IPC_MAJOR_4) | ||
| add_local_sources(sof mux_ipc4.c) | ||
| endif() | ||
| endif() | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,13 @@ | ||
| # SPDX-License-Identifier: BSD-3-Clause | ||
|
|
||
| add_local_sources(sof tdfb.c tdfb_generic.c tdfb_hifiep.c tdfb_hifi3.c tdfb_direction.c) | ||
| if(CONFIG_IPC_MAJOR_3) | ||
| add_local_sources(sof tdfb_ipc3.c) | ||
| elseif(CONFIG_IPC_MAJOR_4) | ||
| add_local_sources(sof tdfb_ipc4.c) | ||
| if(CONFIG_COMP_TDFB STREQUAL "m") | ||
| add_subdirectory(llext ${PROJECT_BINARY_DIR}/tdfb_llext) | ||
| add_dependencies(app tdfb) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why not
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @lyakh Ack, this might have been a return() case. I've used two approaches to convert src/audio/foo/ build rules:
I think this might have been better as a (2) case. |
||
| else() | ||
| add_local_sources(sof tdfb.c tdfb_generic.c tdfb_hifiep.c tdfb_hifi3.c tdfb_direction.c) | ||
| if(CONFIG_IPC_MAJOR_3) | ||
| add_local_sources(sof tdfb_ipc3.c) | ||
| elseif(CONFIG_IPC_MAJOR_4) | ||
| add_local_sources(sof tdfb_ipc4.c) | ||
| endif() | ||
| endif() | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,19 +1,22 @@ | ||
| # SPDX-License-Identifier: BSD-3-Clause | ||
|
|
||
| if(CONFIG_COMP_VOLUME) | ||
| add_local_sources(sof | ||
| volume_generic.c | ||
| volume_hifi3.c | ||
| volume_hifi4.c | ||
| volume_hifi5.c | ||
| volume_generic_with_peakvol.c | ||
| volume_hifi3_with_peakvol.c | ||
| volume_hifi4_with_peakvol.c | ||
| volume_hifi5_with_peakvol.c | ||
| volume.c) | ||
| if(CONFIG_IPC_MAJOR_3) | ||
| add_local_sources(sof volume_ipc3.c) | ||
| elseif(CONFIG_IPC_MAJOR_4) | ||
| add_local_sources(sof volume_ipc4.c) | ||
| endif() | ||
| endif() | ||
| if(CONFIG_COMP_VOLUME STREQUAL "m") | ||
| add_subdirectory(llext ${PROJECT_BINARY_DIR}/volume_llext) | ||
| add_dependencies(app volume) | ||
| else() | ||
| add_local_sources(sof | ||
| volume_generic.c | ||
| volume_hifi3.c | ||
| volume_hifi4.c | ||
| volume_hifi5.c | ||
| volume_generic_with_peakvol.c | ||
| volume_hifi3_with_peakvol.c | ||
| volume_hifi4_with_peakvol.c | ||
| volume_hifi5_with_peakvol.c | ||
| volume.c) | ||
| if(CONFIG_IPC_MAJOR_3) | ||
| add_local_sources(sof volume_ipc3.c) | ||
| elseif(CONFIG_IPC_MAJOR_4) | ||
| add_local_sources(sof volume_ipc4.c) | ||
| endif() | ||
| endif() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(a general comment to an earlier discussion) I think optically I actually prefer TAB over "two spaces" indentation. And cmake shouldn't really go beyond 3 levels of indentation... So 8-space TABs shouldn't exceed maximum line length
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lyakh I'll redirect to https://github.com/orgs/thesofproject/discussions/9899 and note that even the "Mastering CMake" O'Reily book follows the 2-space indent ;)