Skip to content

Commit

Permalink
Tools: Tplg2: cavs-sdw: Enable speaker and microphone processing
Browse files Browse the repository at this point in the history
This patch enables for all SDW PC topologies speaker endpoint
post-processing with IIR, FIR, DRC. The IIR is set as default
to 100 Hz high-pass. The FIR is pass-through. The DRC is set
for a generic speaker profile.

The microphone pre-processing is enabled for devices with SDW
codec connected microphone. The IIR is set to 40 Hz high-pass,
and the DRC to a generic microphone profile.

Due to large amount of topologies built for SDW, the
enhancements are enabled by default and disabled for some
specific topologies. The explicit enable of processing for some
devices we use for test are removed. For those there is no
change in functionality.

Some topologies are excluded from this change

- Topologies for non-48 kHz sample rates, there are e.g. no 96 kHz
  blobs defined yet.
- Topology with 8ch amplifier feedback (with four speakers?)
- Chromebooks those apply post and pre-processing in closed
  components and/or sound server.
- sof-tgl-rt715-rt711-rt1308-mono.tplg, due to no "mono". No
  idea if the added processing would be compatible.

The topologies with added post-processing are (pre-processing
for PCH-DMIC is already enabled):

sof-lnl-cs42l43-l0-2ch, sof-lnl-cs42l43-l0-4ch,
sof-lnl-cs42l43-l0-cs35l56-l3-2ch, sof-lnl-rt713-l0-rt1318-l1-2ch,
sof-mtl-rt711-l0-rt1316-l3-2ch, sof-mtl-rt711-l0-rt1316-l3-4ch,
sof-mtl-rt712-l0-2ch, sof-mtl-rt712-l0-4ch, sof-ptl-rt721-4ch,
sof-ptl-rt722-4ch, sof-tgl-rt711-rt1308-4ch

The topologies with added pre- post-processing are:

sof-adl-cs42l43-l0-cs35l56-l23, sof-adl-rt711-l0-rt1308-l12-rt715-l3,
sof-adl-rt711-l0-rt1316-l12-rt714-l3,
sof-adl-rt711-l0-rt1316-l13-rt714-l2, sof-arl-cs42l43-l0-cs35l56-l2,
sof-arl-cs42l43-l0-cs35l56-l23, sof-arl-cs42l43-l0,
sof-arl-cs42l43-l2-cs35l56-l3, sof-arl-cs42l43-l2,
sof-arl-rt722-l0_rt1320-l2, sof-lnl-cs42l43-l0-cs35l56-l23,
sof-lnl-cs42l43-l0-cs35l56-l3, sof-lnl-cs42l43-l0,
sof-lnl-rt1318-l12-rt714-l0, sof-lnl-rt712-l2-rt1320-l1,
sof-lnl-rt712-l2-rt1712-l3, sof-lnl-rt713-l2-rt1320-l13,
sof-mtl-cs42l43-l0-cs35l56-l12, sof-mtl-cs42l43-l0-cs35l56-l23,
sof-mtl-cs42l43-l0, sof-mtl-cs42l43-l3-cs35l56-l01-spkagg,
sof-mtl-rt1318-l12-rt714-l0, sof-mtl-rt711-l0-rt1316-l3,
sof-mtl-rt712-l0-rt1712-l3, sof-mtl-rt712-l0, sof-mtl-rt712-vb-l0,
sof-mtl-rt713-l0-rt1316-l12-rt1713-l3,
sof-mtl-rt713-l0-rt1318-l1-rt1713-l3,
sof-mtl-rt713-l0-rt1318-l12-rt1713-l3, sof-mtl-rt722-l0,
sof-ptl-rt712-l2-rt1320-l1, sof-ptl-rt713-l2-rt1320-l13,
sof-ptl-rt721, sof-ptl-rt722, sof-rpl-cs42l43-l0,
sof-tgl-cs42l43-l3-cs35l56-l01, sof-tgl-rt711-rt1308-rt715,
sof-tgl-rt711-rt1316-rt714, sof-tgl-rt712,

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
  • Loading branch information
singalsu authored and kv2019i committed Dec 20, 2024
1 parent 72df5f6 commit d81feac
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 31 deletions.
17 changes: 11 additions & 6 deletions tools/topology/topology2/cavs-sdw.conf
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,17 @@ Define {
SDW_JACK_CAPTURE_CH 2
ADD_BT false
SDW_LINK_VALID_BITS 24
EFX_SPK_IIR_PARAMS passthrough
EFX_SPK_FIR_PARAMS passthrough
EFX_SPK_DRC_PARAMS passthrough
EFX_MIC_TDFB_PARAMS passthrough
EFX_MIC_DRC_PARAMS passthrough
DMIC0_DAI_EQIIR "highpass_40hz_20db"
# Used when NUM_SDW_AMP_LINKS is 1 or more
SDW_SPK_ENHANCED_PLAYBACK true
# Used when SDW_DMIC is 1
SDW_DMIC_ENHANCED_CAPTURE true
EFX_SPK_IIR_PARAMS "highpass_100hz_0db_48khz"
EFX_SPK_FIR_PARAMS "passthrough"
EFX_SPK_DRC_PARAMS "speaker_default"
EFX_MIC_IIR_PARAMS "highpass_40hz_0db_48khz"
EFX_MIC_TDFB_PARAMS "line2_generic_pm10deg"
EFX_MIC_DRC_PARAMS "dmic_default"
DMIC0_DAI_EQIIR "highpass_40hz_20db"
}

# override defaults with platform-specific config
Expand Down
9 changes: 6 additions & 3 deletions tools/topology/topology2/development/tplg-targets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,8 @@ NUM_DMICS=4,PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,DMIC0_ID=3,DMIC1_ID=4,\
DMIC1_ENABLE=passthrough,DMIC1_RATE=16000,\
BT_NAME=SSP1-BT,BT_INDEX=1,BT_PCM_ID=20,BT_ID=8,BT_PCM_NAME=Bluetooth,ADD_BT=true,\
NUM_SDW_AMP_LINKS=1,SDW_SPK_STREAM=SDW2-Playback,SDW_AMP_FEEDBACK=false,\
SDW_JACK_CAPTURE_CH=1,DEEPBUFFER_FW_DMA_MS=100,DEEPBUFFER_D0I3_COMPATIBLE=true"
SDW_JACK_CAPTURE_CH=1,DEEPBUFFER_FW_DMA_MS=100,DEEPBUFFER_D0I3_COMPATIBLE=true,\
SDW_SPK_ENHANCED_PLAYBACK=false,SDW_DMIC_ENHANCED_CAPTURE=false"

# SDW + DMIC + HDMI, with 96 kHz DMIC1
"cavs-sdw\;sof-mtl-sdw-cs42l42-l0-max98363-l2-4ch-48k-96k\;PLATFORM=mtl,\
Expand All @@ -230,15 +231,17 @@ NUM_DMICS=4,PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,DMIC0_ID=3,DMIC1_ID=4,\
DMIC1_ENABLE=passthrough,DMIC1_RATE=96000,DMIC1_PCM_ID=22,\
BT_NAME=SSP1-BT,BT_INDEX=1,BT_PCM_ID=20,BT_ID=8,BT_PCM_NAME=Bluetooth,ADD_BT=true,\
NUM_SDW_AMP_LINKS=1,SDW_SPK_STREAM=SDW2-Playback,SDW_AMP_FEEDBACK=false,\
SDW_JACK_CAPTURE_CH=1,DEEPBUFFER_FW_DMA_MS=100,DEEPBUFFER_D0I3_COMPATIBLE=true"
SDW_JACK_CAPTURE_CH=1,DEEPBUFFER_FW_DMA_MS=100,DEEPBUFFER_D0I3_COMPATIBLE=true,\
SDW_SPK_ENHANCED_PLAYBACK=false,SDW_DMIC_ENHANCED_CAPTURE=false"

# SDW + DMIC + HDMI, with 96 kHz DMIC0
"cavs-sdw\;sof-mtl-sdw-cs42l42-l0-max98363-l2-4ch-96k\;PLATFORM=mtl,\
PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-mtl-sdw-cs42l42-l0-max98363-l2-4ch-96k.bin,\
NUM_DMICS=4,PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,DMIC0_ID=3,DMIC1_ID=4,DMIC0_RATE=96000,\
BT_NAME=SSP1-BT,BT_INDEX=1,BT_PCM_ID=20,BT_ID=8,BT_PCM_NAME=Bluetooth,ADD_BT=true,\
NUM_SDW_AMP_LINKS=1,SDW_SPK_STREAM=SDW2-Playback,SDW_AMP_FEEDBACK=false,\
SDW_JACK_CAPTURE_CH=1,DEEPBUFFER_FW_DMA_MS=100,DEEPBUFFER_D0I3_COMPATIBLE=true"
SDW_JACK_CAPTURE_CH=1,DEEPBUFFER_FW_DMA_MS=100,DEEPBUFFER_D0I3_COMPATIBLE=true,\
SDW_SPK_ENHANCED_PLAYBACK=false,SDW_DMIC_ENHANCED_CAPTURE=false"

# SDW + DMIC + HDMI, with 16 kHz DMIC1
"cavs-rt5682\;sof-mtl-max98360a-rt5682-4ch-48k-16k\;PLATFORM=mtl,\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ Define {
AMP_FEEDBACK_CH_PER_LINK 2
SDW_AMP_FEEDBACK true
AMP_PLAYBACK_NAME 'Speaker Playback'
SDW_SPK_ENHANCED_PLAYBACK false
}

Object.Dai.ALH [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ Define {
SDW_DMIC_STREAM 'SDW3-Capture'
SDW_DMIC_BE_ID 4
SDW_DMIC_PASSTHROUGH "false"
SDW_DMIC_ENHANCED_CAPTURE "false"
SDW_DMIC_HOST_PIPELINE_ID 40
}

Expand Down
12 changes: 4 additions & 8 deletions tools/topology/topology2/production/tplg-targets-ace1.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@ HDMI1_ID=4,HDMI2_ID=5,HDMI3_ID=6,DMIC0_ENHANCED_CAPTURE=true,\
EFX_DMIC0_TDFB_PARAMS=line4_pass,EFX_DMIC0_DRC_PARAMS=dmic_default"

"cavs-sdw\;sof-mtl-rt711-l0-rt1316-l23-rt714-l1\;PLATFORM=mtl,NUM_SDW_AMP_LINKS=2,SDW_DMIC=1,\
SDW_SPK_STREAM=SDW2-Playback,SDW_SPK_IN_STREAM=SDW2-Capture,SDW_DMIC_STREAM=SDW1-Capture,\
EFX_SPK_IIR_PARAMS=highpass_100hz_0db_48khz,EFX_SPK_DRC_PARAMS=speaker_default,\
EFX_MIC_TDFB_PARAMS=line2_generic_pm10deg,EFX_MIC_DRC_PARAMS=dmic_default.conf,\
SDW_SPK_ENHANCED_PLAYBACK=true,SDW_DMIC_ENHANCED_CAPTURE=true"
SDW_SPK_STREAM=SDW2-Playback,SDW_SPK_IN_STREAM=SDW2-Capture,SDW_DMIC_STREAM=SDW1-Capture"

"cavs-sdw\;sof-mtl-rt711-l0-rt1316-l3\;PLATFORM=mtl,NUM_SDW_AMP_LINKS=1,\
SDW_SPK_STREAM=SDW3-Playback,SDW_SPK_IN_STREAM=SDW3-Capture,\
Expand Down Expand Up @@ -75,8 +72,7 @@ SDW_DMIC_STREAM=SDW0-Capture"

# Jack codec + SmartAmp topology. No SDW_DMIC connection
"cavs-sdw\;sof-mtl-rt713-l0-rt1316-l12\;PLATFORM=mtl,NUM_SDW_AMP_LINKS=2,\
HDMI1_ID=4,HDMI2_ID=5,HDMI3_ID=6,SDW_SPK_ENHANCED_PLAYBACK=true,\
EFX_SPK_IIR_PARAMS=highpass_100hz_0db_48khz,EFX_SPK_DRC_PARAMS=speaker_default"
HDMI1_ID=4,HDMI2_ID=5,HDMI3_ID=6"

"cavs-sdw\;sof-mtl-rt722-l0\;PLATFORM=mtl,SDW_DMIC=1,NUM_SDW_AMP_LINKS=1,\
SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,SDW_DMIC_STREAM=Capture-SmartMic,\
Expand Down Expand Up @@ -104,7 +100,7 @@ SDW_JACK_OUT_STREAM=Playback-SimpleJack,SDW_JACK_IN_STREAM=Capture-SimpleJack"
"cavs-sdw\;sof-mtl-cs35l56-l01-fb8\;PLATFORM=mtl,NUM_SDW_AMP_LINKS=2,\
SDW_AMP_FEEDBACK=true,SDW_SPK_STREAM=Playback,SDW_SPK_IN_STREAM=Capture,\
AMP_FEEDBACK_CH=8,AMP_FEEDBACK_CH_PER_LINK=4,SDW_JACK=false,NUM_DMICS=0,\
HDMI1_ID=4,HDMI2_ID=5,HDMI3_ID=6"
HDMI1_ID=4,HDMI2_ID=5,HDMI3_ID=6,SDW_SPK_ENHANCED_PLAYBACK=false"

# ARL has the same DSP generation. So reuse the platform = mtl.
"cavs-sdw\;sof-arl-cs42l43-l0\;PLATFORM=mtl,NUM_SDW_AMP_LINKS=1,SDW_DMIC=1,\
Expand Down Expand Up @@ -222,5 +218,5 @@ PDM1_MIC_B_ENABLE=1,DMIC0_ID=3,DMIC1_ID=4,\
PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-mtl-sdw-cs42l42-l0-max98363-l2.bin,\
BT_NAME=SSP1-BT,BT_INDEX=1,BT_PCM_ID=20,BT_ID=8,BT_PCM_NAME=Bluetooth,ADD_BT=true,\
NUM_SDW_AMP_LINKS=1,SDW_SPK_STREAM=SDW2-Playback,SDW_AMP_FEEDBACK=false,\
SDW_JACK_CAPTURE_CH=1"
SDW_JACK_CAPTURE_CH=1,SDW_SPK_ENHANCED_PLAYBACK=false"
)
10 changes: 2 additions & 8 deletions tools/topology/topology2/production/tplg-targets-ace2.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,15 @@ HDMI1_ID=4,HDMI2_ID=5,HDMI3_ID=6,DMIC0_ENHANCED_CAPTURE=true,\
EFX_DMIC0_TDFB_PARAMS=line4_pass,EFX_DMIC0_DRC_PARAMS=dmic_default"

"cavs-sdw\;sof-lnl-rt711-l0-rt1316-l23-rt714-l1\;PLATFORM=lnl,NUM_SDW_AMP_LINKS=2,SDW_DMIC=1,\
SDW_SPK_STREAM=SDW2-Playback,SDW_SPK_IN_STREAM=SDW2-Capture,SDW_DMIC_STREAM=SDW1-Capture,\
EFX_SPK_IIR_PARAMS=highpass_100hz_0db_48khz,EFX_SPK_DRC_PARAMS=speaker_default,\
EFX_MIC_TDFB_PARAMS=line2_generic_pm10deg,EFX_MIC_DRC_PARAMS=dmic_default.conf,\
SDW_SPK_ENHANCED_PLAYBACK=true,SDW_DMIC_ENHANCED_CAPTURE=true"
SDW_SPK_STREAM=SDW2-Playback,SDW_SPK_IN_STREAM=SDW2-Capture,SDW_DMIC_STREAM=SDW1-Capture"

"cavs-sdw\;sof-lnl-rt712-l2-rt1712-l3\;PLATFORM=lnl,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"

"cavs-sdw\;sof-lnl-rt722-l0\;PLATFORM=lnl,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,\
EFX_SPK_IIR_PARAMS=highpass_100hz_0db_48khz,EFX_SPK_DRC_PARAMS=speaker_default,\
EFX_MIC_TDFB_PARAMS=line2_generic_pm10deg,EFX_MIC_DRC_PARAMS=dmic_default.conf,\
SDW_SPK_ENHANCED_PLAYBACK=true,SDW_DMIC_ENHANCED_CAPTURE=true"
SDW_JACK_OUT_STREAM=Playback-SimpleJack,SDW_JACK_IN_STREAM=Capture-SimpleJack"

"cavs-sdw\;sof-lnl-rt712-l2-rt1320-l1\;PLATFORM=lnl,SDW_DMIC=1,NUM_SDW_AMP_LINKS=2,\
SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,SDW_DMIC_STREAM=Capture-SmartMic,\
Expand Down
6 changes: 4 additions & 2 deletions tools/topology/topology2/production/tplg-targets-ace3.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@ SDW_JACK_OUT_STREAM=Playback-SimpleJack,SDW_JACK_IN_STREAM=Capture-SimpleJack"
"cavs-sdw\;sof-ptl-rt722-96k\;PLATFORM=ptl,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,\
JACK_RATE=96000,DEEP_BUF_JACK_RATE=96000"
JACK_RATE=96000,DEEP_BUF_JACK_RATE=96000,\
SDW_SPK_ENHANCED_PLAYBACK=false,SDW_DMIC_ENHANCED_CAPTURE=false"

"cavs-sdw\;sof-ptl-rt722-192k\;PLATFORM=ptl,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,\
JACK_RATE=192000,DEEP_BUF_JACK_RATE=192000"
JACK_RATE=192000,DEEP_BUF_JACK_RATE=192000,\
SDW_SPK_ENHANCED_PLAYBACK=false,SDW_DMIC_ENHANCED_CAPTURE=false"

"cavs-sdw\;sof-ptl-rt722-4ch\;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,\
Expand Down
5 changes: 3 additions & 2 deletions tools/topology/topology2/production/tplg-targets-cavs25.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ SDW_DMIC=1,SDW_DMIC_STREAM=SDW2-Capture"

"cavs-sdw\;sof-tgl-rt715-rt711-rt1308-mono\;NUM_SDW_AMP_LINKS=1,SDW_DMIC=1,\
SDW_JACK_OUT_STREAM=SDW1-Playback,SDW_JACK_IN_STREAM=SDW1-Capture,\
SDW_SPK_STREAM=SDW2-Playback,SDW_DMIC_STREAM=SDW0-Capture,SDW_AMP_FEEDBACK=false"
SDW_SPK_STREAM=SDW2-Playback,SDW_DMIC_STREAM=SDW0-Capture,SDW_AMP_FEEDBACK=false,\
SDW_SPK_ENHANCED_PLAYBACK=false,SDW_DMIC_ENHANCED_CAPTURE=false"

"cavs-sdw\;sof-adl-rt711-l0-rt1308-l12-rt715-l3\;NUM_SDW_AMP_LINKS=2,SDW_DMIC=1,SDW_AMP_FEEDBACK=false"

Expand All @@ -40,7 +41,7 @@ SDW_JACK_OUT_STREAM=Playback-SimpleJack,SDW_JACK_IN_STREAM=Capture-SimpleJack"
"cavs-sdw\;sof-tgl-cs35l56-l01-fb8\;NUM_SDW_AMP_LINKS=2,\
SDW_AMP_FEEDBACK=true,SDW_SPK_STREAM=Playback,SDW_SPK_IN_STREAM=Capture,\
AMP_FEEDBACK_CH=8,AMP_FEEDBACK_CH_PER_LINK=4,SDW_JACK=false,NUM_DMICS=0,\
HDMI1_ID=4,HDMI2_ID=5,HDMI3_ID=6"
HDMI1_ID=4,HDMI2_ID=5,HDMI3_ID=6,SDW_SPK_ENHANCED_PLAYBACK=false,SDW_DMIC_ENHANCED_CAPTURE=false"

# IPC4 topology for TGL rt712 Headset, Amp and DMIC
"cavs-sdw\;sof-tgl-rt712\;SDW_JACK_OUT_STREAM=Playback-SimpleJack,\
Expand Down

0 comments on commit d81feac

Please sign in to comment.