Skip to content

Commit

Permalink
Topology2: cavs-rt5682: use passthrough
Browse files Browse the repository at this point in the history
For test only

Signed-off-by: Bard Liao <[email protected]>
  • Loading branch information
bardliao committed Mar 8, 2024
1 parent 18d1042 commit 97a897c
Show file tree
Hide file tree
Showing 4 changed files with 93 additions and 111 deletions.
132 changes: 24 additions & 108 deletions tools/topology/topology2/cavs-mixin-mixout-ssp.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,28 @@
# Pipeline ID:1 PCM ID: 0
Object.Pipeline {
# playback pipelines
host-copier-gain-mixin-playback [
host-gateway-playback [
{
index $HEADSET_HOST_PIPELINE_ID

Object.Widget.host-copier.1 {
stream_name '$HEADSET_PLAYBACK_PCM_STREAM_NAME'
pcm_id $HEADSET_PCM_ID
num_input_audio_formats 1
num_output_audio_formats 1
num_input_pins 1
Object.Base.input_audio_format [
{
in_bit_depth 32
in_valid_bit_depth 32
in_rate 96000
}
]
Object.Base.output_audio_format [
{
out_rate 96000
}
]
}
Object.Widget.gain.1 {
Object.Control.mixer.1 {
name 'Pre Mixer $HEADSET_PCM_NAME Playback Volume'
}
Object.Base.input_audio_format [
{
in_rate 96000
}
]
Object.Base.output_audio_format [
{
out_rate 96000
out_bit_depth 32
out_valid_bit_depth 32
out_rate 96000,
}
]
}
Expand All @@ -48,48 +40,28 @@ Object.Pipeline {
Object.Widget.host-copier.1 {
stream_name '$SPEAKER_PLAYBACK_PCM_STREAM_NAME'
pcm_id $SPEAKER_PCM_ID
num_input_audio_formats 1
num_output_audio_formats 1
num_input_pins 1
Object.Base.input_audio_format [
{
in_bit_depth 32
in_valid_bit_depth 32
in_rate 96000
}
]
Object.Base.output_audio_format [
{
out_rate 96000
}
]
}
Object.Widget.gain.1 {
Object.Control.mixer.1 {
name 'Pre Mixer $SPEAKER_PCM_NAME Playback Volume'
}
Object.Base.input_audio_format [
{
in_rate 96000
}
]
Object.Base.output_audio_format [
{
out_rate 96000
}
]
}
Object.Widget.mixin.1 {
Object.Base.input_audio_format [
{
in_rate 96000
}
]
Object.Base.output_audio_format [
{
out_rate 96000
out_rate 96000,
out_bit_depth 32
out_valid_bit_depth 32
}
]
}
}
]

mixout-gain-dai-copier-playback [
io-gateway-playback [
{
index $HEADSET_DAI_PIPELINE_ID

Expand All @@ -99,22 +71,9 @@ Object.Pipeline {
copier_type "SSP"
stream_name "$HEADSET_CODEC_NAME"
node_type $I2S_LINK_OUTPUT_CLASS
Object.Base.input_audio_format [
{
in_rate 96000
}
]
Object.Base.output_audio_format [
{
out_rate 96000
}
]
}

Object.Widget.gain.1 {
Object.Control.mixer.1 {
name 'Post Mixer $HEADSET_PCM_NAME Playback Volume'
}
num_input_audio_formats 1
num_output_audio_formats 1
num_input_pins 1
Object.Base.input_audio_format [
{
in_rate 96000
Expand All @@ -136,6 +95,9 @@ Object.Pipeline {
copier_type "SSP"
stream_name "$SPEAKER_CODEC_NAME"
node_type $I2S_LINK_OUTPUT_CLASS
num_input_audio_formats 1
num_output_audio_formats 1
num_input_pins 1
Object.Base.input_audio_format [
{
in_rate 96000
Expand All @@ -147,53 +109,7 @@ Object.Pipeline {
}
]
}

Object.Widget.gain.1 {
Object.Control.mixer.1 {
name 'Post Mixer $SPEAKER_PCM_NAME Playback Volume'
}
Object.Base.input_audio_format [
{
in_rate 96000
}
]
Object.Base.output_audio_format [
{
out_rate 96000
}
]
}
Object.Widget.mixout.1 {
Object.Base.input_audio_format [
{
in_rate 96000
}
]
Object.Base.output_audio_format [
{
out_rate 96000
}
]
}
}
]
}

Object.Base.route [
{
source "gain.$HEADSET_DAI_PIPELINE_ID.1"
sink "dai-copier.SSP.$HEADSET_CODEC_NAME.playback"
}
{
source "mixin.$HEADSET_HOST_PIPELINE_ID.1"
sink "mixout.$HEADSET_DAI_PIPELINE_ID.1"
}
{
source "gain.$SPEAKER_DAI_PIPELINE_ID.1"
sink "dai-copier.SSP.$SPEAKER_CODEC_NAME.playback"
}
{
source "mixin.$SPEAKER_HOST_PIPELINE_ID.1"
sink "mixout.$SPEAKER_DAI_PIPELINE_ID.1"
}
]
5 changes: 3 additions & 2 deletions tools/topology/topology2/cavs-rt5682.conf
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<host-gateway-capture.conf>
<io-gateway.conf>
<io-gateway-capture.conf>
<io-gateway-playback.conf>
<host-copier-gain-mixin-playback.conf>
<mixout-gain-dai-copier-playback.conf>
<mixout-gain-eqiir-dts-dai-copier-playback.conf>
Expand Down Expand Up @@ -320,10 +321,10 @@ Object.Base.route [
}
{
source "host-copier.$HEADSET_PCM_ID.playback"
sink "gain.1.1"
sink "dai-copier.SSP.$HEADSET_CODEC_NAME.playback"
}
{
source "host-copier.$SPEAKER_PCM_ID.playback"
sink "gain.3.1"
sink "dai-copier.SSP.$SPEAKER_CODEC_NAME.playback"
}
]
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 @@ -28,7 +28,7 @@ PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-adl-nocodec.bin,PLATFORM=adl"
# SSP topology for MTL
"cavs-rt5682\;sof-mtl-nocodec\;PLATFORM=mtl,NUM_DMICS=4,PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,\
HEADSET_CODEC_NAME=NoCodec-0,SPEAKER_CODEC_NAME=NoCodec-2,INCLUDE_BT_OFFLOAD=false,NUM_DMICS=0,NUM_HDMIS=0,\
SPK_ID=2,SPEAKER_SSP_DAI_INDEX=2,\
SPK_ID=2,SPEAKER_SSP_DAI_INDEX=2,DEEPBUFFER_FW_DMA_MS=false,\
PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-mtl-nocodec.bin"

"cavs-nocodec\;sof-mtl-nocodec-ssp0-ssp2\;PLATFORM=mtl,NUM_DMICS=2,SSP1_ENABLED=false,\
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#
# BE DAI passthrough pipeline for playback
#
# All attributes defined herein are namespaced by alsatplg to
# "Object.Pipeline.passthrough-be-playback.N.attribute_name"
#
# Usage: io-gateway-playback pipeline object can be instantiated as:
#
# Object.Pipeline.io-gateway-playback."N" {
# direction "playback"
# period 1000
# time_domain "timer"
# }
#
# Where N is the unique pipeline ID within the same alsaconf node.
#

<include/common/input_audio_format.conf>
<include/common/output_audio_format.conf>
<include/components/dai-copier.conf>
<include/components/pipeline.conf>

Class.Pipeline."io-gateway-playback" {

<include/pipelines/pipeline-common.conf>

attributes {
!constructor [
"index"
]

unique "instance"
}

Object.Widget {
dai-copier."1" {
type dai_in
num_input_audio_formats 1
num_output_audio_formats 1
num_output_pins 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
}
]
}

pipeline."1" {
priority 0
lp_mode 0
}
}

time_domain "timer"
direction "playback"
dynamic_pipeline 1
}

0 comments on commit 97a897c

Please sign in to comment.