Skip to content

Commit 9ca86c9

Browse files
johnylin76lgirdwood
authored andcommitted
smart_amp: revamp to two-layer modular design structure
The motivation is depicted in thesofproject#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]>
1 parent cbc04be commit 9ca86c9

File tree

8 files changed

+1506
-906
lines changed

8 files changed

+1506
-906
lines changed

src/audio/smart_amp/CMakeLists.txt

+2
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@ else()
1010
sof_add_static_library(dsm ${CMAKE_CURRENT_LIST_DIR}/lib/release/dsm_lib/libdsm.a)
1111
endif()
1212
target_include_directories(sof PUBLIC ${CMAKE_CURRENT_LIST_DIR}/include/dsm_api/inc)
13+
else()
14+
add_local_sources(sof smart_amp_passthru.c)
1315
endif()

src/audio/smart_amp/Kconfig

+24-5
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,39 @@
11
# SPDX-License-Identifier: BSD-3-Clause
22

3-
menu "Smart amplifier solutions"
4-
visible if COMP_SMART_AMP
3+
if COMP_SMART_AMP
4+
5+
choice
6+
prompt "Smart Amplifier solution applied"
7+
default PASSTHRU_AMP
8+
help
9+
The selection for Smart Amplifier component implementation
10+
will depend on the Amplifier solution supplier. It is fair
11+
to treat the supported solutions as mutually exclusive ones.
12+
There should be no more than one solution selected per build
13+
config. When Smart Amplifier is present but no solution is
14+
supported, the passthrough mode will be applied as default.
15+
16+
config PASSTHRU_AMP
17+
bool "Stream Passthrough"
18+
help
19+
The default option as the passthrough mode while no other
20+
solution is applied. While selected, the feed-forward input
21+
frames will be passed to output after channel remapping. No
22+
gain or latency will be produced. In the meanwhile, the
23+
feedback input frames will be consumed but dropped directly.
524

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

35+
endchoice
36+
1737
config MAXIM_DSM_STUB
1838
bool "Maxim DSM solution"
1939
depends on MAXIM_DSM
@@ -22,5 +42,4 @@ menu "Smart amplifier solutions"
2242
Select to build the Maxim DSM adapter with a stub library. This
2343
should only be used for CI and testing.
2444

25-
endmenu
26-
45+
endif

0 commit comments

Comments
 (0)