-
Notifications
You must be signed in to change notification settings - Fork 349
cmake/zephyr: start deduplication of src/audio/CMakeLists.txt #9906
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
cmake/zephyr: start deduplication of src/audio/CMakeLists.txt #9906
Conversation
lyakh
left a comment
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.
would be good to add a commit to convert src/math/CMakeLists.txt to the new macro
Adding all source files in a single, giant zephyr/CMakeLists.txt is inconvenient and does not scale. The audio directory is one of the more complex cmake files in the tree, so make the changes incrementally. This commit starts by adding including top/src/audio to Zephyr cmake, and moving over the first set of files. Link: thesofproject#8260 Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Add sof_list_append_ifdef() macro and make it available for both Zephyr and XTOS builds. This is helpful when writing cmake rules for SOF modules. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
eb203fc to
df8b5e7
Compare
|
V2 pushed:
|
|
@lyakh Let's convert math in a separate PR once this is merged and makes the macro available to all. The old conventions weren't unifrom either, some build rules used helpers, some not. So having more verbose code now in math won't break the bank if we don't fix it immediately. |
|
Getting a failure with SRC_LITE on MTL in Intel internal tests: |
df8b5e7 to
a50b287
Compare
| # SPDX-License-Identifier: BSD-3-Clause | ||
|
|
||
| add_local_sources(sof src_generic.c src_hifi2ep.c src_hifi3.c src_hifi4.c src_hifi5.c src_common.c src.c) | ||
| set(base_files src_generic.c src_hifi2ep.c src_hifi3.c src_hifi4.c src_hifi5.c src_common.c src.c) |
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.
I know this is a copy of existing, but we should not need to build hifi2 for hifi 5 targets
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.
Can be fixed later though. @singalsu fyi.
| is_zephyr(it_is) | ||
| if(it_is) ### Zephyr ### |
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.
Would it not be simpler and more readable with
if(is_zephyr)
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.
@lgirdwood there's a slight risk of broken telephone when I've been continueing Marc's work, but this would seem a standard cmake macro trick. possible more readable:
-is_zephyr(it_is)
-if(it_is) ### Zephyr ###
+is_zephyr(zephyr)
+if(zephyr) ### Zephyr ###
...?
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.
ok, lest factor this improvement in as we go, not blocking this one though.
|
V3 pushed:
|
Adding all source files in a single, giant zephyr/CMakeLists.txt is inconvenient and does not scale. Modify Zephyr rules to use definitions in src/audio/buffers/ instead. Link: thesofproject#8260 Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Adding all source files in a single, giant zephyr/CMakeLists.txt is inconvenient and does not scale. Modify Zephyr rules to use definitions in src/audio/pipeline/ instead. Link: thesofproject#8260 Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Adding all source files in a single, giant zephyr/CMakeLists.txt is inconvenient and does not scale. Modify Zephyr rules to use definitions in src/audio/ instead. Link: thesofproject#8260 Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
The register to testbench needs the init function prototype into sof/audio/component.h. Add src_lite to the prototype list, so it can be enabled in testbench builds. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Adding all source files in a single, giant zephyr/CMakeLists.txt is inconvenient and does not scale. Modify Zephyr rules to use definitions in src/audio/src/ instead. Link: thesofproject#8260 Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Adding all source files in a single, giant zephyr/CMakeLists.txt is inconvenient and does not scale. Modify Zephyr rules to use definitions in src/audio for dai and host component source files. Link: thesofproject#8260 Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
The audio top-level CMakeLists.txt is a bit complex to follow as it has two separate set of build rules. One to build normal SOF firmware target, with rules in subfolders and another for the host-library build (not using subfolder CMakeLists.txt). The two sets are broken with a return() in the middle. Add inline commentary to the different sections making this easier to follow. Link: thesofproject#8606 Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Adding all source files in a single, giant zephyr/CMakeLists.txt is inconvenient and does not scale. Modify Zephyr rules to use definitions in src/audio/eq-iir and src/audio/eq-fir instead. Link: thesofproject#8260 Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Adding all source files in a single, giant zephyr/CMakeLists.txt is inconvenient and does not scale. Modify Zephyr rules to use definitions in src/audio/asrc instead Link: thesofproject#8260 Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Adding all source files in a single, giant zephyr/CMakeLists.txt is inconvenient and does not scale. Modify Zephyr rules to use definitions in src/audio/dcblock instead Link: thesofproject#8260 Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Adding all source files in a single, giant zephyr/CMakeLists.txt is inconvenient and does not scale. Modify Zephyr rules to use definitions in src/audio/selector instead Link: thesofproject#8260 Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Adding all source files in a single, giant zephyr/CMakeLists.txt is inconvenient and does not scale. Modify Zephyr rules to use definitions in src/audio instead Link: thesofproject#8260 Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
a50b287 to
df91fc1
Compare
|
V4 pushed:
|
First set of patches to convert audio cmake rules to common ones.
Link: #8260