Skip to content

Commit

Permalink
topology2: nocodec-multicore: test multi-stream capture
Browse files Browse the repository at this point in the history
Enable more complex pipelines for multi-core use cases.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
  • Loading branch information
yongzhi1 committed Jul 7, 2023
1 parent b267012 commit 5837f7b
Show file tree
Hide file tree
Showing 2 changed files with 250 additions and 1 deletion.
249 changes: 249 additions & 0 deletions tools/topology/topology2/cavs-nocodec-multicore.conf
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ Define {
DMIC1_PCM_CAPS 'DMIC1 WOV Capture'
DMIC0_NAME 'NoCodec-6'
DMIC1_NAME 'NoCodec-7'
DMIC0_PCM_0_NAME "DMIC SFX1"
DMIC0_PCM_1_NAME "DMIC SFX2"
DMIC0_PCM_0_PCM_ID 27
DMIC0_PCM_1_PCM_ID 28

SSP0_PCM_NAME "Port0"
SSP1_PCM_NAME "Port1"
Expand Down Expand Up @@ -294,6 +298,189 @@ Object.Pipeline.io-gateway-capture [
}
]

IncludeByKey.PASSTHROUGH {
"false" {
Object.Pipeline.gain-module-copier [
{
index 19
core_id $DMIC_CORE_ID
direction "capture"
Object.Widget.pipeline.1 {
stream_name $DMIC0_DAI_COPIER
core $DMIC_CORE_ID
}
Object.Widget.module-copier.1 {
stream_name 'Gain Capture 19'
num_input_audio_formats 2
num_output_audio_formats 2
Object.Base.audio_format.1 {
in_bit_depth 32
in_valid_bit_depth 32
out_bit_depth 32
out_valid_bit_depth 32
}
Object.Base.audio_format.2 {
in_channels 4
in_bit_depth 32
in_valid_bit_depth 32
out_channels 4
out_bit_depth 32
out_valid_bit_depth 32
in_ch_cfg $CHANNEL_CONFIG_3_POINT_1
in_ch_map $CHANNEL_MAP_3_POINT_1
out_ch_cfg $CHANNEL_CONFIG_3_POINT_1
out_ch_map $CHANNEL_MAP_3_POINT_1
}
}
Object.Widget.gain.1 {
num_input_audio_formats 2
num_output_audio_formats 2
Object.Base.audio_format.1 {
in_bit_depth 32
in_valid_bit_depth 32
out_bit_depth 32
out_valid_bit_depth 32
}
Object.Base.audio_format.2 {
in_channels 4
in_bit_depth 32
in_valid_bit_depth 32
out_channels 4
out_bit_depth 32
out_valid_bit_depth 32
in_ch_cfg $CHANNEL_CONFIG_3_POINT_1
in_ch_map $CHANNEL_MAP_3_POINT_1
out_ch_cfg $CHANNEL_CONFIG_3_POINT_1
out_ch_map $CHANNEL_MAP_3_POINT_1
}
Object.Control.mixer.1 {
name 'Pre Demux $DMIC0_PCM_0_NAME Capture Volume'
}
}
}
]

Object.Pipeline.gain-capture [
{
format $FORMAT
core_id $DMIC_CORE_ID
index 18
Object.Widget.pipeline.1 {
stream_name "$DMIC0_PCM_0_NAME"
core $DMIC_CORE_ID
}
Object.Widget.host-copier.1 {
stream_name "Gain Capture 18"
pcm_id $DMIC0_PCM_0_PCM_ID
num_input_audio_formats 2
num_output_audio_formats 2
Object.Base.audio_format.1 {
in_bit_depth 32
in_valid_bit_depth 32
out_bit_depth 32
out_valid_bit_depth 32
}
Object.Base.audio_format.2 {
in_channels 4
in_bit_depth 32
in_valid_bit_depth 32
out_channels 4
out_bit_depth 32
out_valid_bit_depth 32
in_ch_cfg $CHANNEL_CONFIG_3_POINT_1
in_ch_map $CHANNEL_MAP_3_POINT_1
out_ch_cfg $CHANNEL_CONFIG_3_POINT_1
out_ch_map $CHANNEL_MAP_3_POINT_1
}
}
Object.Widget.gain.1 {
num_input_audio_formats 2
num_output_audio_formats 2
Object.Base.audio_format.1 {
in_bit_depth 32
in_valid_bit_depth 32
out_bit_depth 32
out_valid_bit_depth 32
}
Object.Base.audio_format.2 {
in_channels 4
in_bit_depth 32
in_valid_bit_depth 32
out_channels 4
out_bit_depth 32
out_valid_bit_depth 32
in_ch_cfg $CHANNEL_CONFIG_3_POINT_1
in_ch_map $CHANNEL_MAP_3_POINT_1
out_ch_cfg $CHANNEL_CONFIG_3_POINT_1
out_ch_map $CHANNEL_MAP_3_POINT_1
}
Object.Control.mixer.1 {
name 'Post Demux $DMIC0_PCM_0_NAME Capture Volume'
}
}
}
{
format $FORMAT
index 22
core_id $DMIC_CORE_ID
Object.Widget.pipeline.1 {
stream_name "$DMIC0_PCM_1_NAME"
core $DMIC_CORE_ID
}
Object.Widget.host-copier.1 {
stream_name "Gain Capture 22"
pcm_id $DMIC0_PCM_1_PCM_ID
num_input_audio_formats 2
num_output_audio_formats 2
Object.Base.audio_format.1 {
in_bit_depth 32
in_valid_bit_depth 32
out_bit_depth 32
out_valid_bit_depth 32
}
Object.Base.audio_format.2 {
in_channels 4
in_bit_depth 32
in_valid_bit_depth 32
out_channels 4
out_bit_depth 32
out_valid_bit_depth 32
in_ch_cfg $CHANNEL_CONFIG_3_POINT_1
in_ch_map $CHANNEL_MAP_3_POINT_1
out_ch_cfg $CHANNEL_CONFIG_3_POINT_1
out_ch_map $CHANNEL_MAP_3_POINT_1
}
}
Object.Widget.gain.1 {
num_input_audio_formats 2
num_output_audio_formats 2
Object.Base.audio_format.1 {
in_bit_depth 32
in_valid_bit_depth 32
out_bit_depth 32
out_valid_bit_depth 32
}
Object.Base.audio_format.2 {
in_channels 4
in_bit_depth 32
in_valid_bit_depth 32
out_channels 4
out_bit_depth 32
out_valid_bit_depth 32
in_ch_cfg $CHANNEL_CONFIG_3_POINT_1
in_ch_map $CHANNEL_MAP_3_POINT_1
out_ch_cfg $CHANNEL_CONFIG_3_POINT_1
out_ch_map $CHANNEL_MAP_3_POINT_1
}
Object.Control.mixer.1 {
name 'Post Demux $DMIC0_PCM_1_NAME Capture Volume'
}
}
}
]
}
}

Object.PCM.pcm [
{
name "$SSP0_PCM_NAME"
Expand Down Expand Up @@ -337,6 +524,41 @@ Object.PCM.pcm [
}
]

IncludeByKey.PASSTHROUGH {
"false" {
Object.PCM.pcm [
{
name "$DMIC0_PCM_0_NAME"
id $DMIC0_PCM_0_PCM_ID
direction "capture"
Object.Base.fe_dai."$DMIC0_PCM_0_NAME" {}

Object.PCM.pcm_caps."capture" {
name "Gain Capture 18"
# only 32-bit capture supported now
formats 'S32_LE'
channels_min $NUM_DMICS
channels_max $NUM_DMICS
}
}
{
name "$DMIC0_PCM_1_NAME"
id $DMIC0_PCM_1_PCM_ID
direction "capture"
Object.Base.fe_dai."$DMIC0_PCM_1_NAME" {}

Object.PCM.pcm_caps."capture" {
name "Gain Capture 22"
# only 32-bit capture supported now
formats 'S32_LE'
channels_min $NUM_DMICS
channels_max $NUM_DMICS
}
}
]
}
}

Object.Base.route [
{
source "gain.14.1"
Expand Down Expand Up @@ -372,6 +594,33 @@ Object.Base.route [
}
]

IncludeByKey.PASSTHROUGH {
"false" {
Object.Base.route [
{
source $DMIC0_DAI_PIPELINE_SRC
sink gain.19.1
}
{
source module-copier.19.1
sink gain.18.1
}
{
source module-copier.19.1
sink gain.22.1
}
{
source "gain.18.1"
sink "host-copier.$DMIC0_PCM_0_PCM_ID.capture"
}
{
source "gain.22.1"
sink "host-copier.$DMIC0_PCM_1_PCM_ID.capture"
}
]
}
}

# There is pinmux conflict between SSP1 and DMIC on MTL RVP,
# so include SSP1 pipelines conditionally.
IncludeByKey.SSP1_ENABLED {
Expand Down
2 changes: 1 addition & 1 deletion tools/topology/topology2/development/tplg-targets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ SSP2_CORE_ID=1,PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-mtl-nocodec-multicore-s

"cavs-nocodec-multicore\;sof-mtl-nocodec-multicore-4ch\;PLATFORM=mtl,SSP1_ENABLED=false,\
SSP0_CORE_ID=0,DMIC_CORE_ID=1,SSP2_CORE_ID=2,NUM_DMICS=4,PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,\
PASSTHROUGH=true,PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-mtl-nocodec.bin"
PASSTHROUGH=false,PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-mtl-nocodec.bin"

# SSP topology for LNL FPGA with lower DMIC IO clock of 19.2MHz, 2ch PDM1 enabled
"cavs-nocodec\;sof-lnl-nocodec-fpga-2ch-pdm1\;PLATFORM=lnl,NUM_DMICS=2,PDM1_MIC_A_ENABLE=1,\
Expand Down

0 comments on commit 5837f7b

Please sign in to comment.