Skip to content

Commit

Permalink
buf: rename buffer.c to comp_buffer.c and move to buffers
Browse files Browse the repository at this point in the history
comp_buffer, implemented in buffer.c file, should
be kept in the buffers directory, together with all
buffers
Also it has been renamed to comp_buffer.c

Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
  • Loading branch information
marcinszkudlinski committed Aug 14, 2024
1 parent 9023cfd commit a9caa0a
Show file tree
Hide file tree
Showing 15 changed files with 44 additions and 19 deletions.
5 changes: 3 additions & 2 deletions src/audio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ if(NOT CONFIG_COMP_MODULE_SHARED_LIBRARY_BUILD)
add_local_sources(sof
host-legacy.c
component.c
buffer.c
source_api_helper.c
sink_api_helper.c
sink_source_utils.c
audio_stream.c
channel_map.c
)

add_subdirectory(buffers)

if(CONFIG_COMP_BLOB)
add_local_sources(sof data_blob.c)
endif()
Expand Down Expand Up @@ -128,7 +129,7 @@ endif()
add_local_sources(sof
component.c
data_blob.c
buffer.c
buffers/comp_buffer.c
buffers/audio_buffer.c
source_api_helper.c
sink_api_helper.c
Expand Down
8 changes: 8 additions & 0 deletions src/audio/buffers/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# SPDX-License-Identifier: BSD-3-Clause

add_local_sources(sof audio_buffer.c)
add_local_sources(sof comp_buffer.c)

if(CONFIG_PIPELINE_2_0)
add_local_sources(sof ring_buffer.c)
endif()
File renamed without changes.
12 changes: 8 additions & 4 deletions test/cmocka/src/audio/buffer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
cmocka_test(buffer_copy
buffer_copy.c
${PROJECT_SOURCE_DIR}/test/cmocka/src/notifier_mocks.c
${PROJECT_SOURCE_DIR}/src/audio/buffer.c
${PROJECT_SOURCE_DIR}/src/audio/buffers/comp_buffer.c
${PROJECT_SOURCE_DIR}/src/audio/buffers/audio_buffer.c
${PROJECT_SOURCE_DIR}/src/audio/source_api_helper.c
${PROJECT_SOURCE_DIR}/src/audio/sink_api_helper.c
${PROJECT_SOURCE_DIR}/src/audio/sink_source_utils.c
Expand All @@ -27,7 +28,8 @@ cmocka_test(buffer_new
buffer_new.c
${PROJECT_SOURCE_DIR}/test/cmocka/src/common_mocks.c
${PROJECT_SOURCE_DIR}/test/cmocka/src/notifier_mocks.c
${PROJECT_SOURCE_DIR}/src/audio/buffer.c
${PROJECT_SOURCE_DIR}/src/audio/buffers/comp_buffer.c
${PROJECT_SOURCE_DIR}/src/audio/buffers/audio_buffer.c
${PROJECT_SOURCE_DIR}/src/audio/source_api_helper.c
${PROJECT_SOURCE_DIR}/src/audio/sink_api_helper.c
${PROJECT_SOURCE_DIR}/src/audio/sink_source_utils.c
Expand All @@ -50,7 +52,8 @@ cmocka_test(buffer_wrap
buffer_wrap.c
${PROJECT_SOURCE_DIR}/test/cmocka/src/common_mocks.c
${PROJECT_SOURCE_DIR}/test/cmocka/src/notifier_mocks.c
${PROJECT_SOURCE_DIR}/src/audio/buffer.c
${PROJECT_SOURCE_DIR}/src/audio/buffers/comp_buffer.c
${PROJECT_SOURCE_DIR}/src/audio/buffers/audio_buffer.c
${PROJECT_SOURCE_DIR}/src/audio/source_api_helper.c
${PROJECT_SOURCE_DIR}/src/audio/sink_api_helper.c
${PROJECT_SOURCE_DIR}/src/audio/sink_source_utils.c
Expand All @@ -73,7 +76,8 @@ cmocka_test(buffer_write
buffer_write.c
${PROJECT_SOURCE_DIR}/test/cmocka/src/common_mocks.c
${PROJECT_SOURCE_DIR}/test/cmocka/src/notifier_mocks.c
${PROJECT_SOURCE_DIR}/src/audio/buffer.c
${PROJECT_SOURCE_DIR}/src/audio/buffers/comp_buffer.c
${PROJECT_SOURCE_DIR}/src/audio/buffers/audio_buffer.c
${PROJECT_SOURCE_DIR}/src/audio/source_api_helper.c
${PROJECT_SOURCE_DIR}/src/audio/sink_api_helper.c
${PROJECT_SOURCE_DIR}/src/audio/sink_source_utils.c
Expand Down
3 changes: 2 additions & 1 deletion test/cmocka/src/audio/component/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ cmocka_test(comp_set_state
${PROJECT_SOURCE_DIR}/test/cmocka/src/notifier_mocks.c
${PROJECT_SOURCE_DIR}/src/ipc/ipc-common.c
${PROJECT_SOURCE_DIR}/src/ipc/ipc-helper.c
${PROJECT_SOURCE_DIR}/src/audio/buffer.c
${PROJECT_SOURCE_DIR}/src/audio/buffers/comp_buffer.c
${PROJECT_SOURCE_DIR}/src/audio/buffers/audio_buffer.c
${PROJECT_SOURCE_DIR}/src/audio/source_api_helper.c
${PROJECT_SOURCE_DIR}/src/audio/sink_api_helper.c
${PROJECT_SOURCE_DIR}/src/audio/sink_source_utils.c
Expand Down
3 changes: 2 additions & 1 deletion test/cmocka/src/audio/eq_fir/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ add_library(audio_for_eq_fir STATIC
${PROJECT_SOURCE_DIR}/src/audio/module_adapter/module_adapter.c
${PROJECT_SOURCE_DIR}/src/audio/module_adapter/module_adapter_ipc3.c
${PROJECT_SOURCE_DIR}/src/audio/module_adapter/module/generic.c
${PROJECT_SOURCE_DIR}/src/audio/buffer.c
${PROJECT_SOURCE_DIR}/src/audio/buffers/comp_buffer.c
${PROJECT_SOURCE_DIR}/src/audio/buffers/audio_buffer.c
${PROJECT_SOURCE_DIR}/src/audio/source_api_helper.c
${PROJECT_SOURCE_DIR}/src/audio/sink_api_helper.c
${PROJECT_SOURCE_DIR}/src/audio/sink_source_utils.c
Expand Down
3 changes: 2 additions & 1 deletion test/cmocka/src/audio/eq_iir/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ add_library(audio_for_eq_iir STATIC
${PROJECT_SOURCE_DIR}/src/audio/module_adapter/module_adapter.c
${PROJECT_SOURCE_DIR}/src/audio/module_adapter/module_adapter_ipc3.c
${PROJECT_SOURCE_DIR}/src/audio/module_adapter/module/generic.c
${PROJECT_SOURCE_DIR}/src/audio/buffer.c
${PROJECT_SOURCE_DIR}/src/audio/buffers/comp_buffer.c
${PROJECT_SOURCE_DIR}/src/audio/buffers/audio_buffer.c
${PROJECT_SOURCE_DIR}/src/audio/source_api_helper.c
${PROJECT_SOURCE_DIR}/src/audio/sink_api_helper.c
${PROJECT_SOURCE_DIR}/src/audio/sink_source_utils.c
Expand Down
3 changes: 2 additions & 1 deletion test/cmocka/src/audio/mixer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ cmocka_test(mixer
${PROJECT_SOURCE_DIR}/src/audio/module_adapter/module_adapter.c
${PROJECT_SOURCE_DIR}/src/audio/module_adapter/module_adapter_ipc3.c
${PROJECT_SOURCE_DIR}/src/audio/module_adapter/module/generic.c
${PROJECT_SOURCE_DIR}/src/audio/buffer.c
${PROJECT_SOURCE_DIR}/src/audio/buffers/comp_buffer.c
${PROJECT_SOURCE_DIR}/src/audio/buffers/audio_buffer.c
${PROJECT_SOURCE_DIR}/src/audio/source_api_helper.c
${PROJECT_SOURCE_DIR}/src/audio/sink_api_helper.c
${PROJECT_SOURCE_DIR}/src/audio/sink_source_utils.c
Expand Down
3 changes: 2 additions & 1 deletion test/cmocka/src/audio/mux/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ add_library(
${PROJECT_SOURCE_DIR}/src/audio/mux/mux_generic.c
${PROJECT_SOURCE_DIR}/src/audio/component.c
${PROJECT_SOURCE_DIR}/src/audio/data_blob.c
${PROJECT_SOURCE_DIR}/src/audio/buffer.c
${PROJECT_SOURCE_DIR}/src/audio/buffers/comp_buffer.c
${PROJECT_SOURCE_DIR}/src/audio/buffers/audio_buffer.c
${PROJECT_SOURCE_DIR}/src/audio/source_api_helper.c
${PROJECT_SOURCE_DIR}/src/audio/sink_api_helper.c
${PROJECT_SOURCE_DIR}/src/audio/sink_source_utils.c
Expand Down
3 changes: 2 additions & 1 deletion test/cmocka/src/audio/pcm_converter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ if(CONFIG_FORMAT_FLOAT)
${PROJECT_SOURCE_DIR}/src/math/numbers.c
${PROJECT_SOURCE_DIR}/src/audio/pcm_converter/pcm_converter.c
${PROJECT_SOURCE_DIR}/src/audio/pcm_converter/pcm_converter_generic.c
${PROJECT_SOURCE_DIR}/src/audio/buffer.c
${PROJECT_SOURCE_DIR}/src/audio/buffers/comp_buffer.c
${PROJECT_SOURCE_DIR}/src/audio/buffers/audio_buffer.c
${PROJECT_SOURCE_DIR}/src/audio/source_api_helper.c
${PROJECT_SOURCE_DIR}/src/audio/sink_api_helper.c
${PROJECT_SOURCE_DIR}/src/audio/sink_source_utils.c
Expand Down
9 changes: 6 additions & 3 deletions test/cmocka/src/audio/pipeline/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ cmocka_test(pipeline_new
${PROJECT_SOURCE_DIR}/src/ipc/ipc3/helper.c
${PROJECT_SOURCE_DIR}/src/ipc/ipc-common.c
${PROJECT_SOURCE_DIR}/src/ipc/ipc-helper.c
${PROJECT_SOURCE_DIR}/src/audio/buffer.c
${PROJECT_SOURCE_DIR}/src/audio/buffers/comp_buffer.c
${PROJECT_SOURCE_DIR}/src/audio/buffers/audio_buffer.c
${PROJECT_SOURCE_DIR}/src/audio/source_api_helper.c
${PROJECT_SOURCE_DIR}/src/audio/sink_api_helper.c
${PROJECT_SOURCE_DIR}/src/audio/sink_source_utils.c
Expand All @@ -48,7 +49,8 @@ cmocka_test(pipeline_connect_upstream
${PROJECT_SOURCE_DIR}/src/ipc/ipc3/helper.c
${PROJECT_SOURCE_DIR}/src/ipc/ipc-common.c
${PROJECT_SOURCE_DIR}/src/ipc/ipc-helper.c
${PROJECT_SOURCE_DIR}/src/audio/buffer.c
${PROJECT_SOURCE_DIR}/src/audio/buffers/comp_buffer.c
${PROJECT_SOURCE_DIR}/src/audio/buffers/audio_buffer.c
${PROJECT_SOURCE_DIR}/src/audio/source_api_helper.c
${PROJECT_SOURCE_DIR}/src/audio/sink_api_helper.c
${PROJECT_SOURCE_DIR}/src/audio/sink_source_utils.c
Expand All @@ -72,7 +74,8 @@ cmocka_test(pipeline_free
${PROJECT_SOURCE_DIR}/src/ipc/ipc3/helper.c
${PROJECT_SOURCE_DIR}/src/ipc/ipc-common.c
${PROJECT_SOURCE_DIR}/src/ipc/ipc-helper.c
${PROJECT_SOURCE_DIR}/src/audio/buffer.c
${PROJECT_SOURCE_DIR}/src/audio/buffers/comp_buffer.c
${PROJECT_SOURCE_DIR}/src/audio/buffers/audio_buffer.c
${PROJECT_SOURCE_DIR}/src/audio/source_api_helper.c
${PROJECT_SOURCE_DIR}/src/audio/sink_api_helper.c
${PROJECT_SOURCE_DIR}/src/audio/sink_source_utils.c
Expand Down
3 changes: 2 additions & 1 deletion test/cmocka/src/audio/selector/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ add_library(audio_for_selector STATIC
${PROJECT_SOURCE_DIR}/src/math/numbers.c
${PROJECT_SOURCE_DIR}/src/audio/selector/selector.c
${PROJECT_SOURCE_DIR}/src/audio/selector/selector_generic.c
${PROJECT_SOURCE_DIR}/src/audio/buffer.c
${PROJECT_SOURCE_DIR}/src/audio/buffers/comp_buffer.c
${PROJECT_SOURCE_DIR}/src/audio/buffers/audio_buffer.c
${PROJECT_SOURCE_DIR}/src/audio/source_api_helper.c
${PROJECT_SOURCE_DIR}/src/audio/sink_api_helper.c
${PROJECT_SOURCE_DIR}/src/audio/sink_source_utils.c
Expand Down
3 changes: 2 additions & 1 deletion test/cmocka/src/audio/volume/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ add_library(audio_for_volume STATIC
${PROJECT_SOURCE_DIR}/src/audio/module_adapter/module_adapter.c
${PROJECT_SOURCE_DIR}/src/audio/module_adapter/module_adapter_ipc3.c
${PROJECT_SOURCE_DIR}/src/audio/module_adapter/module/generic.c
${PROJECT_SOURCE_DIR}/src/audio/buffer.c
${PROJECT_SOURCE_DIR}/src/audio/buffers/comp_buffer.c
${PROJECT_SOURCE_DIR}/src/audio/buffers/audio_buffer.c
${PROJECT_SOURCE_DIR}/src/audio/source_api_helper.c
${PROJECT_SOURCE_DIR}/src/audio/sink_api_helper.c
${PROJECT_SOURCE_DIR}/src/audio/sink_source_utils.c
Expand Down
3 changes: 2 additions & 1 deletion test/cmocka/src/math/fft/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ cmocka_test(fft
${PROJECT_SOURCE_DIR}/src/math/fft/fft_16_hifi3.c
${PROJECT_SOURCE_DIR}/src/math/fft/fft_32.c
${PROJECT_SOURCE_DIR}/src/math/fft/fft_32_hifi3.c
${PROJECT_SOURCE_DIR}/src/audio/buffer.c
${PROJECT_SOURCE_DIR}/src/audio/buffers/comp_buffer.c
${PROJECT_SOURCE_DIR}/src/audio/buffers/audio_buffer.c
${PROJECT_SOURCE_DIR}/src/audio/source_api_helper.c
${PROJECT_SOURCE_DIR}/src/audio/sink_api_helper.c
${PROJECT_SOURCE_DIR}/src/audio/sink_source_utils.c
Expand Down
2 changes: 1 addition & 1 deletion zephyr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ zephyr_library_sources(

# SOF mandatory audio processing
${SOF_AUDIO_PATH}/channel_map.c
${SOF_AUDIO_PATH}/buffer.c
${SOF_AUDIO_PATH}/buffers/comp_buffer.c
${SOF_AUDIO_PATH}/buffers/audio_buffer.c
${SOF_AUDIO_PATH}/source_api_helper.c
${SOF_AUDIO_PATH}/sink_api_helper.c
Expand Down

0 comments on commit a9caa0a

Please sign in to comment.