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 tools/topology/topology2/cavs-sdw.conf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<tokens.conf>
<virtual.conf>
<host-copier-gain-mixin-playback.conf>
<host-copier-resonance-gain-mixin-playback.conf>
<mixout-gain-dai-copier-playback.conf>
<mixout-gain-alh-dai-copier-playback.conf>
<mixout-gain-ctc-alh-dai-copier-playback.conf>
Expand Down Expand Up @@ -70,6 +71,7 @@
<compr-default.conf>
<siggen-host-copier-capture.conf>
<webrtc-aec.conf>
<resonance-audio.conf>
<input_pin_binding.conf>

Define {
Expand Down Expand Up @@ -241,6 +243,7 @@ IncludeByKey.SDW_JACK {
"dax" "platform/intel/sdw-jack-dax.conf"
"dts" "platform/intel/sdw-jack-dts.conf"
"generic" "platform/intel/sdw-jack-generic.conf"
"resonance" "platform/intel/sdw-jack-resonance.conf"
}
}
"false" {
Expand Down
200 changes: 200 additions & 0 deletions tools/topology/topology2/development/cavs-nocodec-resonance.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@
#
# cAVS nocodec topology: Google Resonance Audio spatializer playback test
#
# Pipeline:
# PCM0 playback (2ch or 5.1 48kHz) -> resonance-audio -> SSP0 TX (2ch)
#

<searchdir:include>
<searchdir:include/common>
<searchdir:include/components>
<searchdir:include/dais>
<searchdir:include/pipelines/cavs>
<searchdir:platform>
<searchdir:platform/intel>

<vendor-token.conf>
<manifest.conf>
<tokens.conf>
<virtual.conf>
<host-gateway-playback.conf>
<io-gateway.conf>
<data.conf>
<pcm.conf>
<pcm_caps.conf>
<fe_dai.conf>
<ssp.conf>
<intel/hw_config_cardinal_clk.conf>
<route.conf>
<common_definitions.conf>
<dai-copier.conf>
<module-copier.conf>
<pipeline.conf>
<dai.conf>
<host.conf>
<input_audio_format.conf>
<output_audio_format.conf>

<resonance-audio.conf>
<resonance-playback.conf>

Define {
MCLK 24576000
PLATFORM "none"
SSP0_PCM_ID 0
SSP0_PCM_NAME "Port0"
}

IncludeByKey.PLATFORM {
"tgl" "platform/intel/tgl.conf"
"adl" "platform/intel/tgl.conf"
"mtl" "platform/intel/mtl.conf"
"lnl" "platform/intel/lnl.conf"
"ptl" "platform/intel/ptl.conf"
"wcl" "platform/intel/ptl.conf"
}

Object.Dai.SSP [
{
id 0
dai_index 0
direction "playback"
name NoCodec-0
default_hw_conf_id 0
sample_bits 32
io_clk $MCLK

Object.Base.hw_config.1 {
name "SSP0"
id 0
bclk_freq 3072000
fsync_freq 48000
tdm_slot_width 32
Object.Base.link_config.1 {
clock_source 1
}
}
}
]

Object.Pipeline.host-gateway-playback [
{
index 1
Object.Widget.host-copier.1 {
stream_name 'Spatial Playback'
pcm_id 0
num_input_audio_formats 2
Object.Base.input_audio_format [
{
in_rate 48000
in_bit_depth 16
in_valid_bit_depth 16
in_channels 2
in_ch_cfg $CHANNEL_CONFIG_STEREO
in_ch_map $CHANNEL_MAP_STEREO
}
{
in_rate 48000
in_bit_depth 16
in_valid_bit_depth 16
in_channels 6
in_ch_cfg $CHANNEL_CONFIG_5_POINT_1
in_ch_map $CHANNEL_MAP_5_POINT_1
}
]
num_output_audio_formats 2
Object.Base.output_audio_format [
{
out_rate 48000
out_bit_depth 16
out_valid_bit_depth 16
out_channels 2
out_ch_cfg $CHANNEL_CONFIG_STEREO
out_ch_map $CHANNEL_MAP_STEREO
}
{
out_rate 48000
out_bit_depth 16
out_valid_bit_depth 16
out_channels 6
out_ch_cfg $CHANNEL_CONFIG_5_POINT_1
out_ch_map $CHANNEL_MAP_5_POINT_1
}
]
}
}
]

Object.Pipeline.resonance-playback [
{
index 2
}
]

Object.Pipeline.io-gateway [
{
index 3
direction playback
Object.Widget.dai-copier.1 {
dai_index 0
dai_type "SSP"
copier_type "SSP"
stream_name "NoCodec-0"
node_type $I2S_LINK_OUTPUT_CLASS
num_input_pins 1
num_input_audio_formats 1
Object.Base.input_audio_format [
{
in_rate 48000
in_bit_depth 32
in_valid_bit_depth 32
in_channels 2
in_ch_cfg $CHANNEL_CONFIG_STEREO
in_ch_map $CHANNEL_MAP_STEREO
}
]
num_output_audio_formats 1
Object.Base.output_audio_format [
{
out_rate 48000
out_bit_depth 32
out_valid_bit_depth 32
out_channels 2
out_ch_cfg $CHANNEL_CONFIG_STEREO
out_ch_map $CHANNEL_MAP_STEREO
}
]
}
}
]

Object.PCM.pcm [
{
name "$SSP0_PCM_NAME"
id $SSP0_PCM_ID
direction "playback"
Object.Base.fe_dai.1 {
name "$SSP0_PCM_NAME"
}

Object.PCM.pcm_caps.1 {
direction "playback"
name "Spatial Playback"
formats 'S16_LE'
rates '48000'
channels_min 2
channels_max 6
}
}
]

Object.Base.route [
{
source "host-copier.0.playback"
sink "module-copier.2.1"
}
{
source "module-copier.2.2"
sink "dai-copier.SSP.NoCodec-0.playback"
}
]
18 changes: 18 additions & 0 deletions tools/topology/topology2/development/tplg-targets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,12 @@ PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-ptl-dmic-ssp-lbm-webrtc-aec.bin"
"development/cavs-nocodec-webrtc-ns2\;sof-tgl-nocodec-webrtc-ns2\;PLATFORM=tgl,\
PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-tgl-nocodec-webrtc-ns2.bin"

# Google Resonance Audio spatializer (2ch/5.1 -> 2ch binaural) on PTL/WCL nocodec SSP
"development/cavs-nocodec-resonance\;sof-ptl-nocodec-resonance\;PLATFORM=ptl,\
PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-ptl-nocodec-resonance.bin"
"development/cavs-nocodec-resonance\;sof-wcl-nocodec-resonance\;PLATFORM=wcl,\
PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-wcl-nocodec-resonance.bin"

# Topology to test the USB audio offload on an HDA machine, load it with
# snd_sof.tplg_filename=sof-hda-generic-uaol.tplg
"development/sof-hda-generic-uaol\;sof-hda-generic-uaol\;HDA_CONFIG=mix,HDA_MIC_ENHANCED_CAPTURE=true,\
Expand Down Expand Up @@ -726,9 +732,21 @@ BT_PB_HOST_PIPELINE_ID=200,BT_PB_DAI_PIPELINE_ID=201,BT_CP_HOST_PIPELINE_ID=202,
PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-ptl-ssp2-bt-id10-sb4.bin,\
BT_TRANSP_CODEC=sb4"

# RT722 with PCH-DMIC and Google Resonance Audio spatializer on Jack Out (hw:0,0)
"cavs-sdw\;sof-ptl-rt722-4ch-resonance\;PLATFORM=ptl,SDW_DMIC=1,NUM_SDW_AMP_LINKS=1,NUM_DMICS=4,\
PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,DMIC0_ID=5,DMIC1_ID=6,HDMI1_ID=7,HDMI2_ID=8,HDMI3_ID=9,\
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_PIPELINE_SRC=resonance,DEEPBUFFER_FW_DMA_MS=10,\
PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-ptl-rt722-4ch-resonance.bin,DMIC0_ENHANCED_CAPTURE=true,\
EFX_DMIC0_TDFB_PARAMS=line4_pass,EFX_DMIC0_DRC_PARAMS=dmic_default,\
BT_PCM_ID=20,BT_ID=10,BT_PCM_NAME=Bluetooth,ADD_BT=true,BT_DEEP_BUFFER=true,BT_SSP_DUPLEX=true,\
BT_PB_HOST_PIPELINE_ID=200,BT_PB_DAI_PIPELINE_ID=201,BT_CP_HOST_PIPELINE_ID=202,BT_CP_DAI_PIPELINE_ID=203"

)

list(APPEND SYMLINKS
"sof-wcl-rt722-4ch-resonance\;sof-ptl-rt722-4ch-resonance"
"sof-wcl-rt722-4ch-bt\;sof-ptl-rt722-4ch-bt"
"sof-wcl-rt722-4ch-bt-lc3\;sof-ptl-rt722-4ch-bt-lc3"
"sof-wcl-rt722-4ch-bt-msbc\;sof-ptl-rt722-4ch-bt-msbc"
Expand Down
123 changes: 123 additions & 0 deletions tools/topology/topology2/include/components/resonance-audio.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
#
# Common widget resonance-audio
#
# Google Resonance Audio spatializer (1st-order HOA + virtual surround).
# Accepts Mono, Stereo, 4-ch FOA (AmbiX), 5.1, or 7.1 input and renders
# 2-channel binaural stereo output.
#
# UUID: 12f51e05-61d9-4a96-939eca72c615d89b

<include/controls/mixer.conf>
<include/controls/bytes.conf>

Class.Widget."resonance-audio" {
DefineAttribute."index" {}
DefineAttribute."instance" {}

<include/components/widget-common.conf>

DefineAttribute."cpc" {
token_ref "comp.word"
}

DefineAttribute."stack_bytes_requirement" {
token_ref "comp.word"
}

DefineAttribute."heap_bytes_requirement" {
token_ref "comp.word"
}

attributes {
!constructor [
"index"
"instance"
]

!mandatory [
"no_pm"
"uuid"
]

!immutable [
"uuid"
"type"
"scheduler_domain"
]

!deprecated [
"preload_count"
]

unique "instance"
}

Object.Control {
mixer."1" {
Object.Base.channel.1 {
name "fc"
shift 0
}
Object.Base.ops.1 {
name "ctl"
info "volsw"
get 259
put 259
}
max 1
}
mixer."2" {
Object.Base.channel.1 {
name "fc"
shift 0
}
Object.Base.ops.1 {
name "ctl"
info "volsw"
get 259
put 259
}
max 1
}
mixer."3" {
Object.Base.channel.1 {
name "fc"
shift 0
}
Object.Base.ops.1 {
name "ctl"
info "volsw"
get 259
put 259
}
max 1
}
bytes."1" {
!access [
tlv_read
tlv_write
tlv_callback
]
Object.Base.extops.1 {
name "extctl"
get 258
put 258
}
max 256
}
}

# Format lists (Object.Base.input_audio_format / output_audio_format) are declared
# per-pipeline or per-instance because alsatplg appends Class.Widget arrays.

# UUID: 12f51e05-61d9-4a96-939eca72c615d89b
uuid "05:1e:f5:12:d9:61:96:4a:93:9e:ca:72:c6:15:d8:9b"
type "effect"
no_pm "true"
cpc 4000
scheduler_domain "DP"
stack_bytes_requirement 16384
heap_bytes_requirement 131072
num_input_pins 1
num_output_pins 1
}
Loading
Loading