Skip to content

Commit a60b216

Browse files
committed
lmdk: add loadable smart amp support
A loadable smart amp implementation. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Signed-off-by: Chao Song <chao.song@linux.intel.com> Signed-off-by: Rander Wang <rander.wang@intel.com>
1 parent 25a3a53 commit a60b216

File tree

5 files changed

+554
-0
lines changed

5 files changed

+554
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
cmake_minimum_required(VERSION 3.20)
2+
set(CMAKE_TOOLCHAIN_FILE "${CMAKE_CURRENT_LIST_DIR}/../../cmake/xtensa-toolchain.cmake")
3+
4+
project(smart_amp_test)
5+
6+
macro(is_zephyr ret)
7+
if(CONFIG_ZEPHYR_SOF_MODULE)
8+
set(${ret} TRUE)
9+
else()
10+
set(${ret} FALSE)
11+
endif()
12+
endmacro()
13+
14+
# list of modules to be built and included into this loadable library
15+
set(MODULES_LIST smart_amp_test)
16+
17+
# toml file for rimage to generate manifets
18+
set(TOML "${CMAKE_CURRENT_LIST_DIR}/smart_amp_test.toml")
19+
20+
# TODO: Move it somewhere???
21+
add_definitions(-DMAJOR_IADSP_API_VERSION=5)
22+
add_definitions(-DMIDDLE_IADSP_API_VERSION=0)
23+
add_definitions(-DMINOR_IADSP_API_VERSION=0)
24+
25+
include(../../cmake/build.cmake)
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
version = [3, 0]
2+
3+
[adsp]
4+
name = "mtl"
5+
image_size = "0x2C0000" # (22) bank * 128KB
6+
alias_mask = "0xE0000000"
7+
8+
[[adsp.mem_zone]]
9+
type = "ROM"
10+
base = "0x1FF80000"
11+
size = "0x400"
12+
[[adsp.mem_zone]]
13+
type = "IMR"
14+
base = "0xA104A000"
15+
size = "0x2000"
16+
[[adsp.mem_zone]]
17+
type = "SRAM"
18+
base = "0xa00f0000"
19+
size = "0x100000"
20+
21+
[[adsp.mem_alias]]
22+
type = "uncached"
23+
base = "0x40000000"
24+
[[adsp.mem_alias]]
25+
type = "cached"
26+
base = "0xA0000000"
27+
28+
[cse]
29+
partition_name = "ADSP"
30+
[[cse.entry]]
31+
name = "ADSP.man"
32+
offset = "0x5c"
33+
length = "0x464"
34+
[[cse.entry]]
35+
name = "ADSP.met"
36+
offset = "0x4c0"
37+
length = "0x70"
38+
[[cse.entry]]
39+
name = "ADSP"
40+
offset = "0x540"
41+
length = "0x0" # calculated by rimage
42+
43+
[css]
44+
45+
[signed_pkg]
46+
name = "ADSP"
47+
[[signed_pkg.module]]
48+
name = "ADSP.met"
49+
50+
[adsp_file]
51+
[[adsp_file.comp]]
52+
base_offset = "0x2000"
53+
54+
[fw_desc.header]
55+
name = "ADSPFW"
56+
load_offset = "0x40000"
57+
58+
[module]
59+
count = 1
60+
61+
[[module.entry]]
62+
name = "SMATEST"
63+
uuid = "167A961E-8AE4-11EA-89F1-000C29CE1635"
64+
affinity_mask = "0x1"
65+
instance_count = "1"
66+
domain_types = "0"
67+
load_type = "0"
68+
init_config = "1"
69+
module_type = "0xD"
70+
auto_start = "0"
71+
sched_caps = [1, 0x00008000]
72+
73+
# pin = [dir, type, sample rate, size, container, channel-cfg]
74+
pin = [0, 0, 0xfeef, 0xf, 0xa, 0x45ff,
75+
0, 0, 0xfeef, 0xf, 0xa, 0x45ff,
76+
1, 0, 0xfeef, 0xf, 0xa, 0x45ff]
77+
78+
# mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS]
79+
mod_cfg = [0, 0, 0, 0, 4096, 1000000, 128, 128, 0, 0, 0]
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
target_sources(smart_amp_test PRIVATE smart_amp_test.c)
2+
3+
set_target_properties(smart_amp_test PROPERTIES
4+
HPSRAM_ADDR "0xa06c1000"
5+
)
6+
7+
target_compile_definitions(smart_amp_test PRIVATE
8+
__ZEPHYR__=1
9+
CONFIG_XTENSA=1
10+
CONFIG_IPC_MAJOR_4=1
11+
)

0 commit comments

Comments
 (0)