Skip to content

Commit

Permalink
topology2: cavs-mixin-mixout-ssp: Use macros for pipeline IDs
Browse files Browse the repository at this point in the history
Use macros for pipeline IDs for better maintainability.

Signed-off-by: Yong Zhi <[email protected]>
  • Loading branch information
yongzhi1 authored and kv2019i committed Nov 9, 2023
1 parent d4b27bf commit 4986e31
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
24 changes: 12 additions & 12 deletions tools/topology/topology2/cavs-mixin-mixout-ssp.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Object.Pipeline {
# playback pipelines
host-copier-gain-mixin-playback [
{
index 1
index $HEADSET_HOST_PIPELINE_ID

Object.Widget.host-copier.1 {
stream_name '$HEADSET_PLAYBACK_PCM_STREAM_NAME'
Expand All @@ -23,7 +23,7 @@ Object.Pipeline {
}
}
{
index 3
index $SPEAKER_HOST_PIPELINE_ID

Object.Widget.host-copier.1 {
stream_name '$SPEAKER_PLAYBACK_PCM_STREAM_NAME'
Expand All @@ -39,7 +39,7 @@ Object.Pipeline {

mixout-gain-dai-copier-playback [
{
index 2
index $HEADSET_DAI_PIPELINE_ID

Object.Widget.dai-copier.1 {
dai_index $HEADSET_SSP_DAI_INDEX
Expand All @@ -56,7 +56,7 @@ Object.Pipeline {
}
}
{
index 4
index $SPEAKER_DAI_PIPELINE_ID

Object.Widget.dai-copier.1 {
dai_index $SPEAKER_SSP_DAI_INDEX
Expand All @@ -77,19 +77,19 @@ Object.Pipeline {

Object.Base.route [
{
source "gain.2.1"
sink "dai-copier.SSP.$HEADSET_CODEC_NAME.playback"
source "gain.$HEADSET_DAI_PIPELINE_ID.1"
sink "dai-copier.SSP.$HEADSET_CODEC_NAME.playback"
}
{
source "mixin.1.1"
sink "mixout.2.1"
source "mixin.$HEADSET_HOST_PIPELINE_ID.1"
sink "mixout.$HEADSET_DAI_PIPELINE_ID.1"
}
{
source "gain.4.1"
sink "dai-copier.SSP.$SPEAKER_CODEC_NAME.playback"
source "gain.$SPEAKER_DAI_PIPELINE_ID.1"
sink "dai-copier.SSP.$SPEAKER_CODEC_NAME.playback"
}
{
source "mixin.3.1"
sink "mixout.4.1"
source "mixin.$SPEAKER_HOST_PIPELINE_ID.1"
sink "mixout.$SPEAKER_DAI_PIPELINE_ID.1"
}
]
4 changes: 4 additions & 0 deletions tools/topology/topology2/cavs-rt5682.conf
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ Define {
SPEAKER_PLAYBACK_PCM_STREAM_NAME 'Speaker Playback'
SPEAKER_SSP_DAI_INDEX 1
SPEAKER_HW_CONFIG_NAME 'SPEAKER HWCFG'
HEADSET_HOST_PIPELINE_ID 1
HEADSET_DAI_PIPELINE_ID 2
SPEAKER_HOST_PIPELINE_ID 3
SPEAKER_DAI_PIPELINE_ID 4
INCLUDE_ECHO_REF false
ECHO_REF_HOST_PIPELINE_ID 7
ECHO_REF_DAI_PIPELINE_ID 8
Expand Down

0 comments on commit 4986e31

Please sign in to comment.