Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lmdk: dwmix: Add example of loadable down mixer module #8546

Closed
wants to merge 3 commits into from
Closed
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
6 changes: 0 additions & 6 deletions lmdk/libraries/dummy/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,4 @@ set(MODULES_LIST dummy)
# toml file for rimage to generate manifets
set(TOML "${CMAKE_CURRENT_LIST_DIR}/dummy_mtl.toml")

# TODO: Move it somewhere?! This probably should be defined in some API header file!
# SOF loadable modules API version
add_definitions(-DMAJOR_IADSP_API_VERSION=5)
add_definitions(-DMIDDLE_IADSP_API_VERSION=0)
add_definitions(-DMINOR_IADSP_API_VERSION=0)

include(../../cmake/build.cmake)
13 changes: 13 additions & 0 deletions lmdk/libraries/dwmix/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

cmake_minimum_required(VERSION 3.20)
set(CMAKE_TOOLCHAIN_FILE "${CMAKE_CURRENT_LIST_DIR}/../../cmake/xtensa-toolchain.cmake")

project(dwmix)

# list of modules to be built and included into this loadable library
set(MODULES_LIST down_mixer)

# toml file for rimage to generate manifets
set(TOML "${CMAKE_CURRENT_LIST_DIR}/dwmix_mtl.toml")

include(../../cmake/build.cmake)
78 changes: 78 additions & 0 deletions lmdk/libraries/dwmix/dwmix_mtl.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
version = [3, 0]

[adsp]
name = "mtl"
image_size = "0x2C0000" # (22) bank * 128KB
alias_mask = "0xE0000000"

[[adsp.mem_zone]]
type = "ROM"
base = "0x1FF80000"
size = "0x400"
[[adsp.mem_zone]]
type = "IMR"
base = "0xA104A000"
size = "0x2000"
[[adsp.mem_zone]]
type = "SRAM"
base = "0xa00f0000"
size = "0x100000"

[[adsp.mem_alias]]
type = "uncached"
base = "0x40000000"
[[adsp.mem_alias]]
type = "cached"
base = "0xA0000000"

[cse]
partition_name = "ADSP"
[[cse.entry]]
name = "ADSP.man"
offset = "0x5c"
length = "0x464"
[[cse.entry]]
name = "ADSP.met"
offset = "0x4c0"
length = "0x70"
[[cse.entry]]
name = "ADSP"
offset = "0x540"
length = "0x0" # calculated by rimage

[css]

[signed_pkg]
name = "ADSP"
[[signed_pkg.module]]
name = "ADSP.met"

[adsp_file]
[[adsp_file.comp]]
base_offset = "0x2000"

[fw_desc.header]
name = "ADSPFW"
load_offset = "0x40000"

[module]
count = 1

[[module.entry]]
name = "DWMIX"
uuid = "1234F1F1-1234-1A34-8C08-884BE5D14FAA"
affinity_mask = "0x1"
instance_count = "15"
domain_types = "0"
load_type = "0"
module_type = "9"
auto_start = "0"
sched_caps = [1, 0x00008000]

# pin = [dir, type, sample rate, size, container, channel-cfg]
pin = [0, 0, 0xffff, 0xc, 0xC, 0xffff,
0, 0, 0xffff, 0xc, 0xC, 0xffff,
1, 0, 0xffff, 0xc, 0xC, 0xffff]

# mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS]
mod_cfg = [0, 0, 0, 0, 4096, 1000000, 512, 256, 0, 0, 0]
6 changes: 6 additions & 0 deletions lmdk/modules/down_mixer/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

target_sources(down_mixer PRIVATE downmixer.c)

set_target_properties(down_mixer PROPERTIES
HPSRAM_ADDR "0xa0691000"
)
Loading
Loading