Skip to content
Merged
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
129 changes: 129 additions & 0 deletions tools/topology/topology2/cavs-mixin-mixout-eqiir-dts-ssp.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
#
# Pipeline definitions
#
# PCM0 ---> gain ----> Mixin ----> Mixout ----> gain ----> EQ IIR ----> DTS ----> SSP0
# PCM1 ---> gain ----> Mixin ----> Mixout ----> gain ----> EQ IIR ----> DTS ----> SSP1

# Pipeline ID:1 PCM ID: 0
Object.Pipeline {
# playback pipelines
host-copier-gain-mixin-playback [
{
index 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jsarha @bardliao @plbossart do we still need index, IIRC we were (planning?) removing index from topology to be automatic.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lgirdwood yes it is still needed. There's no plan to make it automatic right now because widgets are identified with the index for top-level routes.


Object.Widget.host-copier.1 {
stream_name '$HEADSET_PLAYBACK_PCM_STREAM_NAME'
pcm_id $HEADSET_PCM_ID
}
Object.Widget.gain.1 {
Object.Control.mixer.1 {
name 'Pre Mixer $HEADSET_PCM_NAME Playback Volume'
}
}
}
{
index 3

Object.Widget.host-copier.1 {
stream_name '$SPEAKER_PLAYBACK_PCM_STREAM_NAME'
pcm_id $SPEAKER_PCM_ID
}
Object.Widget.gain.1 {
Object.Control.mixer.1 {
name 'Pre Mixer $SPEAKER_PCM_NAME Playback Volume'
}
}
}
]

mixout-gain-eqiir-dts-dai-copier-playback [
{
index 2

Object.Widget.dai-copier.1 {
dai_index $HEADSET_SSP_DAI_INDEX
dai_type "SSP"
copier_type "SSP"
stream_name "$HEADSET_CODEC_NAME"
node_type $I2S_LINK_OUTPUT_CLASS
}

Object.Widget.gain.1 {
Object.Control.mixer.1 {
name 'Post Mixer $HEADSET_PCM_NAME Playback Volume'
}
}

Object.Widget.eqiir.1 {
Object.Control.bytes."1" {
name 'EQIIR2.0 eqiir_coef_2'
}
}

Object.Widget.dts.1 {
Object.Control.bytes."1" {
max 2048
name 'CODEC_ADAPTER2.0 DTS Codec Setup 2'
}
}
}
{
index 4

Object.Widget.dai-copier.1 {
dai_index $SPEAKER_SSP_DAI_INDEX
dai_type "SSP"
copier_type "SSP"
stream_name "$SPEAKER_CODEC_NAME"
node_type $I2S_LINK_OUTPUT_CLASS
}

Object.Widget.gain.1 {
Object.Control.mixer.1 {
name 'Post Mixer $SPEAKER_PCM_NAME Playback Volume'
}
}

Object.Widget.eqiir.1 {
Object.Control.bytes."1" {
name 'EQIIR1.0 eqiir_coef_1'
}
}

Object.Widget.dts.1 {
Object.Control.bytes."1" {
max 2048
name 'CODEC_ADAPTER1.0 DTS Codec Setup 1'
}
}

}
]
}

Object.Base.route [
{
source "gain.2.1"
sink "eqiir.2.1"
}
{
source "dts.2.1"
sink "dai-copier.SSP.$HEADSET_CODEC_NAME.playback"
}
{
source "mixin.1.1"
sink "mixout.2.1"
}
{
source "gain.4.1"
sink "eqiir.4.1"
}
{
source "dts.4.1"
sink "dai-copier.SSP.$SPEAKER_CODEC_NAME.playback"
}
{
source "mixin.3.1"
sink "mixout.4.1"
}
]
95 changes: 95 additions & 0 deletions tools/topology/topology2/cavs-mixin-mixout-ssp.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
#
# Pipeline definitions
#
# PCM0 ---> gain ----> Mixin ----> Mixout ----> gain ----> SSP0
# PCM1 ---> gain ----> Mixin ----> Mixout ----> gain ----> SSP1
#

# Pipeline ID:1 PCM ID: 0
Object.Pipeline {
# playback pipelines
host-copier-gain-mixin-playback [
{
index 1

Object.Widget.host-copier.1 {
stream_name '$HEADSET_PLAYBACK_PCM_STREAM_NAME'
pcm_id $HEADSET_PCM_ID
}
Object.Widget.gain.1 {
Object.Control.mixer.1 {
name 'Pre Mixer $HEADSET_PCM_NAME Playback Volume'
}
}
}
{
index 3

Object.Widget.host-copier.1 {
stream_name '$SPEAKER_PLAYBACK_PCM_STREAM_NAME'
pcm_id $SPEAKER_PCM_ID
}
Object.Widget.gain.1 {
Object.Control.mixer.1 {
name 'Pre Mixer $SPEAKER_PCM_NAME Playback Volume'
}
}
}
]

mixout-gain-dai-copier-playback [
Copy link
Collaborator

@ranj063 ranj063 Oct 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems a bit too much duplication. Can we simplify this by moving the mixout-gain to a separate pipeline and connecting to the DAI copier at the top-level first? And then add a new pipeline with just the eq-iir->dts and insert it only when needed along with the new routes at the top-level?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have one question. For "insert" you mentioned, do you mean using IncludeByKey to choose different pipeline or route at the top-level?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack, I think @ranj063 was referring to IncludeByKey here.

{
index 2

Object.Widget.dai-copier.1 {
dai_index $HEADSET_SSP_DAI_INDEX
dai_type "SSP"
copier_type "SSP"
stream_name "$HEADSET_CODEC_NAME"
node_type $I2S_LINK_OUTPUT_CLASS
}

Object.Widget.gain.1 {
Object.Control.mixer.1 {
name 'Post Mixer $HEADSET_PCM_NAME Playback Volume'
}
}
}
{
index 4

Object.Widget.dai-copier.1 {
dai_index $SPEAKER_SSP_DAI_INDEX
dai_type "SSP"
copier_type "SSP"
stream_name "$SPEAKER_CODEC_NAME"
node_type $I2S_LINK_OUTPUT_CLASS
}

Object.Widget.gain.1 {
Object.Control.mixer.1 {
name 'Post Mixer $SPEAKER_PCM_NAME Playback Volume'
}
}
}
]
}

Object.Base.route [
{
source "gain.2.1"
sink "dai-copier.SSP.$HEADSET_CODEC_NAME.playback"
}
{
source "mixin.1.1"
sink "mixout.2.1"
}
{
source "gain.4.1"
sink "dai-copier.SSP.$SPEAKER_CODEC_NAME.playback"
}
{
source "mixin.3.1"
sink "mixout.4.1"
}
]
96 changes: 9 additions & 87 deletions tools/topology/topology2/cavs-rt5682.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<io-gateway-capture.conf>
<host-copier-gain-mixin-playback.conf>
<mixout-gain-dai-copier-playback.conf>
<mixout-gain-eqiir-dts-dai-copier-playback.conf>
<deepbuffer-playback.conf>
<dai-copier-be.conf>
<dai-copier-eqiir-module-copier-capture.conf>
Expand Down Expand Up @@ -105,6 +106,7 @@ Define {
GOOGLE_AEC_PIPELINE_PRIORITY 2
DMIC_PIPELINE_PRIORITY 1
ECHO_REF_PIPELINE_PRIORITY 0
PLAYBACK_PIPELINE_SRC "volume"
}

# override defaults with platform-specific config
Expand Down Expand Up @@ -140,6 +142,12 @@ IncludeByKey.INCLUDE_BT_OFFLOAD {
"true" "platform/intel/bt-generic.conf"
}

IncludeByKey.PLAYBACK_PIPELINE_SRC {
"volume" "cavs-mixin-mixout-ssp.conf"
"dts" "cavs-mixin-mixout-eqiir-dts-ssp.conf"
}


#
# List of all DAIs
#
Expand Down Expand Up @@ -198,81 +206,11 @@ Object.Dai.SSP [
#
# Pipeline definitions
#
# PCM0 ---> gain ----> Mixin ----> Mixout ----> gain ----> SSP0
# PCM1 ---> gain ----> Mixin ----> Mixout ----> gain ----> SSP1
#
# SSP0 ----> PCM0
# SSP1 ----> PCM1

# Pipeline ID:1 PCM ID: 0
Object.Pipeline {
# playback pipelines
host-copier-gain-mixin-playback [
{
index 1

Object.Widget.host-copier.1 {
stream_name '$HEADSET_PLAYBACK_PCM_STREAM_NAME'
pcm_id $HEADSET_PCM_ID
}
Object.Widget.gain.1 {
Object.Control.mixer.1 {
name 'Pre Mixer $HEADSET_PCM_NAME Playback Volume'
}
}
}
{
index 3

Object.Widget.host-copier.1 {
stream_name '$SPEAKER_PLAYBACK_PCM_STREAM_NAME'
pcm_id $SPEAKER_PCM_ID
}
Object.Widget.gain.1 {
Object.Control.mixer.1 {
name 'Pre Mixer $SPEAKER_PCM_NAME Playback Volume'
}
}
}
]

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

Object.Widget.dai-copier.1 {
dai_index $HEADSET_SSP_DAI_INDEX
dai_type "SSP"
copier_type "SSP"
stream_name "$HEADSET_CODEC_NAME"
node_type $I2S_LINK_OUTPUT_CLASS
}

Object.Widget.gain.1 {
Object.Control.mixer.1 {
name 'Post Mixer $HEADSET_PCM_NAME Playback Volume'
}
}
}
{
index 4

Object.Widget.dai-copier.1 {
dai_index $SPEAKER_SSP_DAI_INDEX
dai_type "SSP"
copier_type "SSP"
stream_name "$SPEAKER_CODEC_NAME"
node_type $I2S_LINK_OUTPUT_CLASS
}

Object.Widget.gain.1 {
Object.Control.mixer.1 {
name 'Post Mixer $SPEAKER_PCM_NAME Playback Volume'
}
}
}
]

host-gateway-capture [
{
index 5
Expand Down Expand Up @@ -350,22 +288,6 @@ Object.PCM.pcm [
]

Object.Base.route [
{
source "gain.2.1"
sink "dai-copier.SSP.$HEADSET_CODEC_NAME.playback"
}
{
source "mixin.1.1"
sink "mixout.2.1"
}
{
source "gain.4.1"
sink "dai-copier.SSP.$SPEAKER_CODEC_NAME.playback"
}
{
source "mixin.3.1"
sink "mixout.4.1"
}
{
source "dai-copier.SSP.$HEADSET_CODEC_NAME.capture"
sink "host-copier.$HEADSET_PCM_ID.capture"
Expand All @@ -374,7 +296,7 @@ Object.Base.route [
source "host-copier.$HEADSET_PCM_ID.playback"
sink "gain.1.1"
}
{
{
source "host-copier.$SPEAKER_PCM_ID.playback"
sink "gain.3.1"
}
Expand Down
Loading