Skip to content

Commit

Permalink
src: src_lite depends on src, make this explicit
Browse files Browse the repository at this point in the history
src_lite uses all the code as src only with a different set of
coefficients. Make this obvious in Kconfig and in TOML.

Signed-off-by: Guennadi Liakhovetski <[email protected]>
  • Loading branch information
lyakh authored and kv2019i committed Jun 13, 2024
1 parent 73458ce commit 8795e0f
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 52 deletions.
5 changes: 3 additions & 2 deletions src/audio/src/Kconfig
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# SPDX-License-Identifier: BSD-3-Clause

config COMP_SRC
bool "SRC component"
tristate "SRC component"
default y
help
Select for SRC component

if COMP_SRC

config COMP_SRC_LITE
bool "SRC_LITE component"
default y
Expand All @@ -17,7 +19,6 @@ config COMP_SRC_LITE
44.1 -> 16 kHz
32 -> 16 kHz
44.1 -> 48
if COMP_SRC

choice
prompt "SRC coefficient set"
Expand Down
46 changes: 46 additions & 0 deletions src/audio/src/src.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,49 @@
#endif

index = __COUNTER__

#if CONFIG_COMP_SRC_LITE
REM # SRC lite module config
[[module.entry]]
name = "SRC_LITE"
uuid = "33441051-44CD-466A-83A3-178478708AEA"
affinity_mask = "0x1"
REM #instance_count = "10"
domain_types = "0"
load_type = "0"
module_type = "0x1F"
auto_start = "0"
sched_caps = [1, 0x00008000]

REM # pin = [dir, type, sample rate, size, container, channel-cfg]
pin = [0, 0, 0xffff, 0xc, 0x8, 0x05ff,
1, 0, 0xf6c9, 0xc, 0x8, 0x05ff]

REM # mod_cfg [PAR_0 PAR_1 PAR_2 PAR_3 IS_BYTES CPS IBS OBS MOD_FLAGS CPC OBLS]
REM # identical for MTL and LNL
mod_cfg = [0, 0, 0, 0, 12832, 1365500, 0, 0, 0, 1365, 0,
1, 0, 0, 0, 12832, 2302300, 0, 0, 0, 2302, 0,
2, 0, 0, 0, 12832, 3218200, 0, 0, 0, 3218, 0,
3, 0, 0, 0, 12832, 4169700, 0, 0, 0, 4169, 0,
4, 0, 0, 0, 12832, 5095100, 0, 0, 0, 5095, 0,
5, 0, 0, 0, 12832, 6014800, 0, 0, 0, 6014, 0,
6, 0, 0, 0, 12832, 6963500, 0, 0, 0, 6963, 0,
7, 0, 0, 0, 12832, 7791000, 0, 0, 0, 7791, 0,
8, 0, 0, 0, 12832, 8843000, 0, 0, 0, 8843, 0,
9, 0, 0, 0, 12832, 9755100, 0, 0, 0, 9755, 0,
10, 0, 0, 0, 12832, 10726500, 0, 0, 0, 10726, 0,
11, 0, 0, 0, 12832, 11624100, 0, 0, 0, 11624, 0,
12, 0, 0, 0, 12832, 12518700, 0, 0, 0, 12518, 0,
13, 0, 0, 0, 12832, 13555000, 0, 0, 0, 13555, 0,
14, 0, 0, 0, 12832, 14144500, 0, 0, 0, 14144, 0,
15, 0, 0, 0, 12832, 15809800, 0, 0, 0, 15809, 0,
16, 0, 0, 0, 12832, 16749000, 0, 0, 0, 16749, 0,
17, 0, 0, 0, 12832, 18433500, 0, 0, 0, 18433, 0,
18, 0, 0, 0, 12832, 19425900, 0, 0, 0, 19425, 0,
19, 0, 0, 0, 12832, 20396900, 0, 0, 0, 20396, 0,
20, 0, 0, 0, 12832, 20881000, 0, 0, 0, 20881, 0,
21, 0, 0, 0, 12832, 23431000, 0, 0, 0, 23431, 0,
22, 0, 0, 0, 12832, 30471000, 0, 0, 0, 30471, 0]

index = __COUNTER__
#endif
42 changes: 0 additions & 42 deletions src/audio/src/src_lite.toml

This file was deleted.

4 changes: 0 additions & 4 deletions tools/rimage/config/lnl.toml.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,5 @@
#include <audio/igo_nr/igo_nr.toml>
#endif

#ifdef CONFIG_COMP_SRC_LITE
#include <audio/src/src_lite.toml>
#endif

[module]
count = __COUNTER__
4 changes: 0 additions & 4 deletions tools/rimage/config/mtl.toml.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,6 @@
#include <audio/codec/dts/dts.toml>
#endif

#ifdef CONFIG_COMP_SRC_LITE
#include <audio/src/src_lite.toml>
#endif

#ifdef CONFIG_CADENCE_CODEC
#include <audio/module_adapter/module/cadence.toml>
#endif
Expand Down

0 comments on commit 8795e0f

Please sign in to comment.