-
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
Changes from all commits
c8dd6a6
e381bcf
0f60206
c639252
2a71157
0d08ae2
1b2e4ad
d7d8a12
7a85ec7
5d44f49
ad82eaa
a167dc9
ff97a17
df91fc1
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,10 +1,16 @@ | ||
| # SPDX-License-Identifier: BSD-3-Clause | ||
|
|
||
| if(CONFIG_COMP_ASRC STREQUAL "m") | ||
| add_subdirectory(llext ${PROJECT_BINARY_DIR}/asrc_llext) | ||
| add_dependencies(app asrc) | ||
| return() | ||
| endif() | ||
|
|
||
| add_local_sources(sof asrc.c asrc_farrow.c asrc_farrow_generic.c | ||
| asrc_farrow_hifi3.c asrc_farrow_hifi5.c) | ||
| asrc_farrow_hifi3.c asrc_farrow_hifi5.c) | ||
|
|
||
| if(CONFIG_IPC_MAJOR_3) | ||
| add_local_sources(sof asrc_ipc3.c) | ||
| add_local_sources(sof asrc_ipc3.c) | ||
| elseif(CONFIG_IPC_MAJOR_4) | ||
| add_local_sources(sof asrc_ipc4.c) | ||
| add_local_sources(sof asrc_ipc4.c) | ||
| endif() |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,5 @@ | ||
| # SPDX-License-Identifier: BSD-3-Clause | ||
|
|
||
| add_local_sources(sof audio_buffer.c) | ||
| add_local_sources(sof comp_buffer.c) | ||
| add_local_sources(sof audio_buffer.c comp_buffer.c) | ||
|
|
||
| if(CONFIG_PIPELINE_2_0) | ||
| add_local_sources(sof ring_buffer.c) | ||
| endif() | ||
| add_local_sources_ifdef(CONFIG_PIPELINE_2_0 sof ring_buffer.c) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,16 @@ | ||
| if(CONFIG_COMP_DCBLOCK STREQUAL "m") | ||
| add_subdirectory(llext ${PROJECT_BINARY_DIR}/dcblock_llext) | ||
| add_dependencies(app dcblock) | ||
| return() | ||
| endif() | ||
|
|
||
| add_local_sources(sof dcblock.c) | ||
| add_local_sources(sof dcblock_generic.c) | ||
| add_local_sources(sof dcblock_hifi3.c) | ||
| add_local_sources(sof dcblock_hifi4.c) | ||
|
|
||
| if(CONFIG_IPC_MAJOR_3) | ||
| add_local_sources(sof dcblock_ipc3.c) | ||
| add_local_sources(sof dcblock_ipc3.c) | ||
| elseif(CONFIG_IPC_MAJOR_4) | ||
| add_local_sources(sof dcblock_ipc4.c) | ||
| add_local_sources(sof dcblock_ipc4.c) | ||
| endif() |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,18 @@ | ||
| # SPDX-License-Identifier: BSD-3-Clause | ||
|
|
||
| add_local_sources(sof eq_fir.c eq_fir_generic.c eq_fir_hifi2ep.c eq_fir_hifi3.c) | ||
| if(CONFIG_IPC_MAJOR_3) | ||
| add_local_sources(sof eq_fir_ipc3.c) | ||
| elseif(CONFIG_IPC_MAJOR_4) | ||
| add_local_sources(sof eq_fir_ipc4.c) | ||
| endif() | ||
| if(CONFIG_COMP_FIR STREQUAL "m") | ||
|
|
||
| add_subdirectory(llext ${PROJECT_BINARY_DIR}/eq_fir_llext) | ||
| add_dependencies(app eq_fir) | ||
|
|
||
| else() | ||
|
|
||
| add_local_sources(sof eq_fir.c eq_fir_generic.c eq_fir_hifi2ep.c eq_fir_hifi3.c) | ||
|
|
||
| if(CONFIG_IPC_MAJOR_3) | ||
| add_local_sources(sof eq_fir_ipc3.c) | ||
| elseif(CONFIG_IPC_MAJOR_4) | ||
| add_local_sources(sof eq_fir_ipc4.c) | ||
| endif() | ||
|
|
||
| endif() |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,18 @@ | ||
| # SPDX-License-Identifier: BSD-3-Clause | ||
|
|
||
| add_local_sources(sof eq_iir.c eq_iir_generic.c) | ||
| if(CONFIG_IPC_MAJOR_3) | ||
| add_local_sources(sof eq_iir_ipc3.c) | ||
| elseif(CONFIG_IPC_MAJOR_4) | ||
| add_local_sources(sof eq_iir_ipc4.c) | ||
| if(CONFIG_COMP_IIR STREQUAL "m") | ||
|
|
||
| add_subdirectory(llext ${PROJECT_BINARY_DIR}/eq_iir_llext) | ||
| add_dependencies(app eq_iir) | ||
|
|
||
| else() | ||
|
|
||
| add_local_sources(sof eq_iir.c eq_iir_generic.c) | ||
|
|
||
| if(CONFIG_IPC_MAJOR_3) | ||
| add_local_sources(sof eq_iir_ipc3.c) | ||
| elseif(CONFIG_IPC_MAJOR_4) | ||
| add_local_sources(sof eq_iir_ipc4.c) | ||
| endif() | ||
|
|
||
| endif() |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,9 @@ | ||
| # SPDX-License-Identifier: BSD-3-Clause | ||
|
|
||
| add_local_sources(sof | ||
| pipeline-graph.c | ||
| pipeline-stream.c | ||
| pipeline-params.c | ||
| pipeline-xrun.c | ||
| pipeline-schedule.c | ||
| pipeline-graph.c | ||
| pipeline-stream.c | ||
| pipeline-params.c | ||
| pipeline-xrun.c | ||
| pipeline-schedule.c | ||
| ) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,9 @@ | ||
| # SPDX-License-Identifier: BSD-3-Clause | ||
|
|
||
| if(CONFIG_COMP_SEL STREQUAL "m") | ||
| add_subdirectory(llext ${PROJECT_BINARY_DIR}/selector_llext) | ||
| add_dependencies(app selector) | ||
| return() | ||
| endif() | ||
|
|
||
| add_local_sources(sof selector_generic.c selector.c) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,31 @@ | ||
| # 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) | ||
|
|
||
| if(CONFIG_IPC_MAJOR_3) | ||
| add_local_sources(sof src_ipc3.c) | ||
| list(APPEND base_files src_ipc3.c) | ||
| elseif(CONFIG_IPC_MAJOR_4) | ||
| add_local_sources(sof src_ipc4.c) | ||
| list(APPEND base_files src_ipc4.c) | ||
| endif() | ||
|
|
||
| sof_list_append_ifdef(CONFIG_COMP_SRC_LITE base_files src_lite.c) | ||
|
|
||
| is_zephyr(it_is) | ||
| if(it_is) ### Zephyr ### | ||
|
Comment on lines
+13
to
+14
Member
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. Would it not be simpler and more readable with
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. @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: ...?
Member
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. ok, lest factor this improvement in as we go, not blocking this one though. |
||
|
|
||
| if(CONFIG_COMP_SRC STREQUAL "m") | ||
|
|
||
| add_subdirectory(llext ${PROJECT_BINARY_DIR}/src_llext) | ||
| add_dependencies(app src) | ||
|
|
||
| else() | ||
|
|
||
| zephyr_library_sources(${base_files}) | ||
|
|
||
| endif() | ||
|
|
||
| else() ### XTOS ### | ||
|
|
||
| add_local_sources(sof ${base_files}) | ||
|
|
||
| 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.
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.