Skip to content
Draft
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
3 changes: 3 additions & 0 deletions app/overlays/ptl/dts_overlay.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
CONFIG_COMP_IIR=m
CONFIG_COMP_MODULE_ADAPTER=y
CONFIG_DTS_CODEC=y
CONFIG_COMP_GOOGLE_CTC_AUDIO_PROCESSING=y
CONFIG_MINIMAL_LIBC=n
CONFIG_PICOLIBC=y
CONFIG_LLEXT_HEAP_SIZE=64
CONFIG_KCPS_DYNAMIC_CLOCK_CONTROL=n
CONFIG_SOF_STACK_SIZE=8192
10 changes: 5 additions & 5 deletions src/audio/google/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
is_zephyr(zephyr)
if(zephyr) ### Zephyr ###

set(THIRD_PARTY ${SOF_ROOT_SOURCE_DIRECTORY}/third_party)
set(THIRD_PARTY ${sof_top_dir}/third_party)
if(CONFIG_IPC_MAJOR_3)
set(ipc_suffix ipc3)
elseif(CONFIG_IPC_MAJOR_4)
Expand All @@ -29,8 +29,8 @@ if(zephyr) ### Zephyr ###
zephyr_include_directories(${THIRD_PARTY}/include)
target_link_directories(SOF INTERFACE ${THIRD_PARTY}/lib)
target_link_libraries(SOF INTERFACE google_rtc_audio_processing)
target_link_libraries(SOF INTERFACE c++)
target_link_libraries(SOF INTERFACE c++abi)
target_link_libraries(SOF INTERFACE stdc++)
target_link_libraries(SOF INTERFACE supc++)
target_link_libraries(SOF INTERFACE m)
target_link_libraries(SOF INTERFACE c)
target_link_libraries(SOF INTERFACE gcc)
Expand All @@ -54,8 +54,8 @@ if(zephyr) ### Zephyr ###
zephyr_include_directories(${THIRD_PARTY}/include)
target_link_directories(SOF INTERFACE ${THIRD_PARTY}/lib)
target_link_libraries(SOF INTERFACE google_ctc_audio_processing)
target_link_libraries(SOF INTERFACE c++)
target_link_libraries(SOF INTERFACE c++abi)
target_link_libraries(SOF INTERFACE stdc++)
target_link_libraries(SOF INTERFACE supc++)
target_link_libraries(SOF INTERFACE m)
target_link_libraries(SOF INTERFACE c)
target_link_libraries(SOF INTERFACE gcc)
Expand Down
10 changes: 8 additions & 2 deletions src/audio/module_adapter/module_adapter_ipc4.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,14 @@ int module_adapter_init_data(struct comp_dev *dev,

if (cfg == NULL)
return -EINVAL;
if (cfgsz < sizeof(cfg->base_cfg))
return -EINVAL;
if (cfgsz < sizeof(cfg->base_cfg)) {
memset(&dst->base_cfg, 0, sizeof(dst->base_cfg));
if (cfgsz > 0 && cfg)
memcpy(&dst->base_cfg, cfg, cfgsz);
dst->size = cfgsz;
dst->avail = true;
return 0;
}

dst->base_cfg = cfg->base_cfg;
dst->size = cfgsz;
Expand Down
4 changes: 4 additions & 0 deletions tools/rimage/config/ptl.toml.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,5 +174,9 @@ index = __COUNTER__
#include <audio/stft_process/stft_process.toml>
#endif

#if defined(CONFIG_COMP_GOOGLE_CTC_AUDIO_PROCESSING) || defined(LLEXT_FORCE_ALL_MODULAR)
#include <audio/google/google_ctc_audio_processing.toml>
#endif

[module]
count = __COUNTER__
2 changes: 2 additions & 0 deletions tools/topology/topology2/cavs-sdw.conf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<mixout-gain-eqiir-eqfir-drc-alh-dai-copier-playback.conf>
<mixout-gain-eqiir-eqfir-drc-micsel-eqiir-eqfir-alh-dai-copier-playback.conf>
<mixout-gain-eqiir-dts-alh-dai-copier-playback.conf>
<mixout-gain-eqiir-eqfir-drc-ctc-alh-dai-copier-playback.conf>
<dai-copier-gain-eqiir-module-copier-capture.conf>
<gain-capture.conf>
<gain-copier-capture.conf>
Expand Down Expand Up @@ -106,6 +107,7 @@ Define {
SDW_LINK_VALID_BITS 24
# Used when NUM_SDW_AMP_LINKS is 1 or more
SDW_SPK_ENHANCED_PLAYBACK true
SDW_SPK_CTC false
# Used when SDW_DMIC is 1
SDW_DMIC_ENHANCED_CAPTURE true
EFX_SPK_IIR_PARAMS "highpass_100hz_0db_48khz"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
#
# BE playback pipeline: mixout-gain-eqiir-eqfir-drc-ctc-alh-dai-copier.
#

<include/components/ctc.conf>
<include/pipelines/cavs/mixout-gain-eqiir-eqfir-drc-alh-dai-copier-playback.conf>

Class.Pipeline."mixout-gain-eqiir-eqfir-drc-ctc-alh-dai-copier-playback" {

SubTreeCopy.baseclass {
source "Class.Pipeline.mixout-gain-eqiir-eqfir-drc-alh-dai-copier-playback"

tree {
Object.Widget {
ctc."1" {
num_input_audio_formats 1
num_output_audio_formats 1

Object.Base.input_audio_format [
{
in_bit_depth 32
in_valid_bit_depth 32
}
]
Object.Base.output_audio_format [
{
out_bit_depth 32
out_valid_bit_depth 32
}
]

Object.Control {
mixer."1" {
name 'CTC Switch'
}
bytes."1" {
name 'CTC.0'
max 4160
}
}
}
}

Object.Base {
!route [
{
source gain.$index.1
sink eqiir.$index.1
}
{
source eqiir.$index.1
sink eqfir.$index.1
}
{
source eqfir.$index.1
sink drc.$index.1
}
{
source drc.$index.1
sink ctc.$index.1
}
]
}
}
}
}
116 changes: 99 additions & 17 deletions tools/topology/topology2/platform/intel/sdw-amp-generic.conf
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,9 @@ IncludeByKey.PASSTHROUGH {
}
]

IncludeByKey.SDW_SPK_ENHANCED_PLAYBACK {
"true" {
mixout-gain-eqiir-eqfir-drc-alh-dai-copier-playback [
IncludeByKey.SDW_SPK_CTC {
"true" {
mixout-gain-eqiir-eqfir-drc-ctc-alh-dai-copier-playback [
{
index 21

Expand Down Expand Up @@ -198,9 +198,74 @@ IncludeByKey.PASSTHROUGH {
}
}
}
Object.Widget.ctc.1 {}
}
]
}
}
"false" {
IncludeByKey.SDW_SPK_ENHANCED_PLAYBACK {
"true" {
mixout-gain-eqiir-eqfir-drc-alh-dai-copier-playback [
{
index 21

Object.Widget.alh-copier.1 {
stream_name $SDW_SPK_STREAM
node_type $ALH_LINK_OUTPUT_CLASS
num_input_audio_formats 3
Object.Base.input_audio_format [
{
in_bit_depth 16
in_valid_bit_depth 16
}
{
in_bit_depth 32
in_valid_bit_depth 24
}
{
in_bit_depth 32
in_valid_bit_depth 32
}
]
num_output_audio_formats 1
Object.Base.output_audio_format [
{
out_bit_depth 32
out_valid_bit_depth $SDW_LINK_VALID_BITS
out_sample_type $SAMPLE_TYPE_MSB_INTEGER
out_fmt_cfg "$[($out_channels | ($out_valid_bit_depth * 256))]"
}
]
}
Object.Widget.gain.1 {
Object.Control.mixer.1 {
name 'Post Mixer $AMP_PLAYBACK_NAME Volume'
}
}

Object.Widget.eqiir.1 {
Object.Control.bytes."1" {
name 'Post Mixer $AMP_PLAYBACK_NAME IIR Eq bytes'
}
}
Object.Widget.eqfir.1 {
Object.Control.bytes."1" {
name 'Post Mixer $AMP_PLAYBACK_NAME FIR Eq bytes'
}
}
Object.Widget.drc.1 {
Object.Control {
bytes."1" {
name 'Post Mixer $AMP_PLAYBACK_NAME DRC bytes'
}
mixer."1" {
name 'Post Mixer $AMP_PLAYBACK_NAME DRC switch'
}
}
}
}
]
}
"false" {
mixout-gain-alh-dai-copier-playback [
{
Expand Down Expand Up @@ -242,10 +307,10 @@ IncludeByKey.PASSTHROUGH {
}
]
}
}

}
}
}
}
}
"true" {
Object.Pipeline.host-gateway-playback [
{
Expand Down Expand Up @@ -658,6 +723,7 @@ IncludeByKey.NUM_SDW_AMP_LINKS {
]
}
}
}

Object.PCM.pcm [
{
Expand All @@ -684,11 +750,11 @@ Object.PCM.pcm [

IncludeByKey.PASSTHROUGH {
"false" {
IncludeByKey.SDW_SPK_ENHANCED_PLAYBACK {
IncludeByKey.SDW_SPK_CTC {
"true" {
Object.Base.route [
{
source "drc.21.1"
source "ctc.21.1"
sink "module-copier.21.22"
}
{
Expand All @@ -698,16 +764,32 @@ IncludeByKey.PASSTHROUGH {
]
}
"false" {
Object.Base.route [
{
source "gain.21.1"
sink "module-copier.21.22"
IncludeByKey.SDW_SPK_ENHANCED_PLAYBACK {
"true" {
Object.Base.route [
{
source "drc.21.1"
sink "module-copier.21.22"
}
{
source "module-copier.21.22"
sink "alh-copier.$SDW_SPK_STREAM.0"
}
]
}
{
source "module-copier.21.22"
sink "alh-copier.$SDW_SPK_STREAM.0"
"false" {
Object.Base.route [
{
source "gain.21.1"
sink "module-copier.21.22"
}
{
source "module-copier.21.22"
sink "alh-copier.$SDW_SPK_STREAM.0"
}
]
}
]
}
}
}
Object.Base.route [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,SDW_DMIC_STREAM=Capture-
SDW_JACK_OUT_STREAM=Playback-SimpleJack,SDW_JACK_IN_STREAM=Capture-SimpleJack,\
PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-ptl-rt721-4ch.bin,DMIC0_ENHANCED_CAPTURE=true,\
EFX_DMIC0_TDFB_PARAMS=line4_pass,EFX_DMIC0_DRC_PARAMS=dmic_default,\
DEEPBUFFER_FW_DMA_MS=10,DEEP_BUF_SPK=true"
DEEPBUFFER_FW_DMA_MS=10,DEEP_BUF_SPK=true,SDW_SPK_CTC=true"

# RT721 eval board with PCH-DMIC, sof_sdw_quirk_table with SOC_SDW_PCH_DMIC, DMIC1 with 96kHz
"cavs-sdw\;sof-ptl-rt721-4ch-dmic1-96k\;PLATFORM=ptl,SDW_DMIC=1,NUM_SDW_AMP_LINKS=1,NUM_DMICS=4,\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,27 @@ list(APPEND TPLGS

"cavs-sdw\;sof-sdw-generic\;SDW_DMIC=1,NUM_SDW_AMP_LINKS=1,\
SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,SDW_DMIC_STREAM=Capture-SmartMic,\
SDW_JACK_OUT_STREAM=Playback-SimpleJack,SDW_JACK_IN_STREAM=Capture-SimpleJack"
SDW_JACK_OUT_STREAM=Playback-SimpleJack,SDW_JACK_IN_STREAM=Capture-SimpleJack,SDW_SPK_CTC=false"

# Split topologies
"cavs-sdw\;sof-sdca-jack-id0\;SDW_JACK_OUT_STREAM=Playback-SimpleJack,\
SDW_JACK_IN_STREAM=Capture-SimpleJack,NUM_HDMIS=0"

"cavs-sdw\;sof-sdca-1amp-id2\;NUM_SDW_AMP_LINKS=1,SDW_JACK=false,\
SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,NUM_HDMIS=0,\
DEEP_BUF_SPK=true"
DEEP_BUF_SPK=true,SDW_SPK_CTC=true"

"cavs-sdw\;sof-sdca-2amp-id2\;NUM_SDW_AMP_LINKS=2,SDW_JACK=false,\
SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,NUM_HDMIS=0,\
DEEP_BUF_SPK=true"
DEEP_BUF_SPK=true,SDW_SPK_CTC=false"

"cavs-sdw\;sof-sdca-3amp-id2\;NUM_SDW_AMP_LINKS=3,SDW_JACK=false,\
SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,NUM_HDMIS=0,\
DEEP_BUF_SPK=true"
DEEP_BUF_SPK=true,SDW_SPK_CTC=false"

"cavs-sdw\;sof-sdca-4amp-id2\;NUM_SDW_AMP_LINKS=4,SDW_JACK=false,\
SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,NUM_HDMIS=0,\
DEEP_BUF_SPK=true"
DEEP_BUF_SPK=true,SDW_SPK_CTC=false"

"cavs-sdw\;sof-sdca-mic-id4\;SDW_JACK=false,SDW_DMIC=1,NUM_HDMIS=0,\
SDW_DMIC_STREAM=Capture-SmartMic"
Expand Down
Loading