Skip to content

Commit

Permalink
smart_amp: revamp to two-layer modular design structure
Browse files Browse the repository at this point in the history
The motivation is depicted in
#7801

This commit revamps smart_amp component design to two-layer structure, i.e.
generic layer and inner model layer.

Generic layer is the common part of smart amp process which can be regarded
as the glue code interacting between SOF component ops and inner model.
While inner model may have various implementations respectively for
solution suppliers in a modular way.

Signed-off-by: Pin-chih Lin <[email protected]>
  • Loading branch information
johnylin76 authored and lgirdwood committed Sep 26, 2023
1 parent cbc04be commit 9ca86c9
Show file tree
Hide file tree
Showing 8 changed files with 1,506 additions and 906 deletions.
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
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

0 comments on commit 9ca86c9

Please sign in to comment.