Skip to content

Commit

Permalink
comp: Add initial Google CTC component
Browse files Browse the repository at this point in the history
Introduce a new component to perform crosstalk-cancellation on
the playback path.

Signed-off-by: Eddy Hsu <eddyhsu@google.com>
  • Loading branch information
Eddy Hsu authored and cujomalainey committed Aug 6, 2024
1 parent f7eb1ab commit b2521ea
Show file tree
Hide file tree
Showing 15 changed files with 849 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/arch/host/configs/library_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ CONFIG_COMP_DCBLOCK=y
CONFIG_COMP_DRC=y
CONFIG_COMP_FIR=y
CONFIG_COMP_GOOGLE_RTC_AUDIO_PROCESSING=y
CONFIG_COMP_GOOGLE_CTC_AUDIO_PROCESSING=y
CONFIG_COMP_IIR=y
CONFIG_COMP_IGO_NR=y
CONFIG_COMP_MFCC=y
Expand Down
25 changes: 25 additions & 0 deletions src/audio/google/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,31 @@ if((NOT CONFIG_LIBRARY) OR CONFIG_LIBRARY_STATIC)
target_link_libraries(sof PRIVATE c)
endif()
endif()

if(CONFIG_COMP_GOOGLE_CTC_AUDIO_PROCESSING)
target_include_directories(sof PRIVATE ${CMAKE_SOURCE_DIR}/third_party/include)
add_local_sources(sof
google_ctc_audio_processing.c
)
if(CONFIG_IPC_MAJOR_3)
add_local_sources(sof google_ctc_audio_processing_ipc3.c)
elseif(CONFIG_IPC_MAJOR_4)
add_local_sources(sof google_ctc_audio_processing_ipc4.c)
endif()
if(CONFIG_GOOGLE_CTC_AUDIO_PROCESSING_MOCK)
add_local_sources(sof
google_ctc_audio_processing_mock.c
)
else()
message(INFO "Link with google_ctc_audio_processing")
target_link_directories(sof PRIVATE ${CMAKE_SOURCE_DIR}/third_party/lib)
target_link_libraries(sof PRIVATE google_ctc_audio_processing)
target_link_libraries(sof PRIVATE c++)
target_link_libraries(sof PRIVATE c++abi)
target_link_libraries(sof PRIVATE m)
target_link_libraries(sof PRIVATE c)
endif()
endif()
return()
endif()

20 changes: 20 additions & 0 deletions src/audio/google/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,24 @@ config GOOGLE_RTC_AUDIO_PROCESSING_MOCK

endif # COMP_GOOGLE_RTC_AUDIO_PROCESSING

config COMP_GOOGLE_CTC_AUDIO_PROCESSING
bool "Google Crosstalk Cancellation Audio processing"
select COMP_BLOB
select GOOGLE_CTC_AUDIO_PROCESSING_MOCK if COMP_STUBS
select STATIC_INIT_GNU if ZEPHYR_SOF_MODULE
default n
depends on ZEPHYR_SOF_MODULE
help
Select for Google crosstalk cancellation audio processing. It
uses the Google real-time audio processing library to perform
crosstalk cancellation.

config GOOGLE_CTC_AUDIO_PROCESSING_MOCK
bool "Google Crosstalk Cancellation Audio processing mock"
default y if COMP_STUBS
depends on COMP_GOOGLE_CTC_AUDIO_PROCESSING
help
Mock Google crosstalk cancellation audio processing.
It allows for compilation check and basic audio flow checking.

endmenu
Loading

0 comments on commit b2521ea

Please sign in to comment.