Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/audio/smart_amp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ else()
sof_add_static_library(dsm ${CMAKE_CURRENT_LIST_DIR}/lib/release/dsm_lib/libdsm.a)
endif()
target_include_directories(sof PUBLIC ${CMAKE_CURRENT_LIST_DIR}/include/dsm_api/inc)
else()
add_local_sources(sof smart_amp_passthru.c)
endif()
29 changes: 24 additions & 5 deletions src/audio/smart_amp/Kconfig
Original file line number Diff line number Diff line change
@@ -1,19 +1,39 @@
# SPDX-License-Identifier: BSD-3-Clause

menu "Smart amplifier solutions"
visible if COMP_SMART_AMP
if COMP_SMART_AMP

choice
prompt "Smart Amplifier solution applied"
default PASSTHRU_AMP
help
The selection for Smart Amplifier component implementation
will depend on the Amplifier solution supplier. It is fair
to treat the supported solutions as mutually exclusive ones.
There should be no more than one solution selected per build
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why can't we setup a system similar to modules and have support for all devices at once? You could also do composition and just have this by a stand in for default implementation in a module?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are able to do it for sure. The code implementation will be a bit more complicated (as how module_adapter is implemented https://github.com/thesofproject/sof/blob/main/src/include/sof/audio/module_adapter/module/generic.h

I didn't implement that way due to the proposed plan in #7801 said the long-term goal is to use module API for all components, so I would defer that to the future task for converting smart_amp to use module API.

config. When Smart Amplifier is present but no solution is
supported, the passthrough mode will be applied as default.

config PASSTHRU_AMP
bool "Stream Passthrough"
help
The default option as the passthrough mode while no other
solution is applied. While selected, the feed-forward input
frames will be passed to output after channel remapping. No
gain or latency will be produced. In the meanwhile, the
feedback input frames will be consumed but dropped directly.

config MAXIM_DSM
bool "Maxim DSM solution"
select MAXIM_DSM_STUB if COMP_STUBS
default n
help
Select to apply Maxim DSM(Dynamic Speaker Management) solution
for Smart Amplifier. As the third-party supply, the
pre-compiled library provided by Maxim will be required for
building the FW binary with this option enabled. The library
itself should be statically linked with the SoF FW binary image.

endchoice

config MAXIM_DSM_STUB
bool "Maxim DSM solution"
depends on MAXIM_DSM
Expand All @@ -22,5 +42,4 @@ menu "Smart amplifier solutions"
Select to build the Maxim DSM adapter with a stub library. This
should only be used for CI and testing.

endmenu

endif
Loading