Skip to content
3 changes: 1 addition & 2 deletions tools/topology/topology2/cavs-mixin-mixout-efx-hda.conf
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,9 @@ Object.Pipeline {
}
]

passthrough-be [
passthrough-capture-be [
{
index 4
direction capture

Object.Widget.copier."1" {
dai_type "HDA"
Expand Down
8 changes: 2 additions & 6 deletions tools/topology/topology2/cavs-nocodec-bt.conf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<virtual.conf>
<passthrough-playback.conf>
<passthrough-capture.conf>
<passthrough-be.conf>
<passthrough-playback-be.conf>
<passthrough-capture-be.conf>
<data.conf>
<pcm.conf>
Expand Down Expand Up @@ -113,10 +113,9 @@ Object.Dai.SSP [
# Pipeline ID:1 PCM ID: 0
Object.Pipeline {
# playback pipelines
passthrough-be [
passthrough-playback-be [
{
index 2
direction playback
Object.Widget.pipeline.1 {
stream_name 'NoCodec-0'
}
Expand All @@ -131,7 +130,6 @@ Object.Pipeline {
}
{
index 4
direction playback
Object.Widget.pipeline.1 {
stream_name 'NoCodec-1'
}
Expand Down Expand Up @@ -192,7 +190,6 @@ Object.Pipeline {
passthrough-capture-be [
{
index 6
direction capture
Object.Widget.pipeline.1 {
stream_name 'NoCodec-0'
}
Expand All @@ -215,7 +212,6 @@ Object.Pipeline {
}
{
index 10
direction capture
Object.Widget.pipeline.1 {
stream_name 'NoCodec-1'
}
Expand Down
2 changes: 0 additions & 2 deletions tools/topology/topology2/cavs-nocodec.conf
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,6 @@ Object.Pipeline.passthrough-capture [
Object.Pipeline.passthrough-capture-be [
{
index 10
direction capture

Object.Widget.copier."1" {
dai_index 1
Expand All @@ -456,7 +455,6 @@ Object.Pipeline.passthrough-capture-be [
}
{
index 12
direction capture

Object.Widget.copier."1" {
dai_index 2
Expand Down
3 changes: 1 addition & 2 deletions tools/topology/topology2/cavs-rt5682.conf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<virtual.conf>
<passthrough-playback.conf>
<passthrough-capture.conf>
<passthrough-be.conf>
<passthrough-playback-be.conf>
<passthrough-capture-be.conf>
<host-copier-gain-mixin-playback.conf>
<mixout-gain-dai-copier-playback.conf>
Expand Down Expand Up @@ -261,7 +261,6 @@ Object.Pipeline {
passthrough-capture-be [
{
index 6
direction capture

Object.Widget.copier."1" {
dai_index $HEADSET_SSP_DAI_INDEX
Expand Down
1 change: 0 additions & 1 deletion tools/topology/topology2/cavs-sdw-src-gain-mixin.conf
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ Object.Pipeline {

passthrough-capture-be [
{
direction "capture"
index 3
copier_type "ALH"
Object.Widget.copier.1 {
Expand Down
2 changes: 1 addition & 1 deletion tools/topology/topology2/cavs-sdw.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<deepbuffer-playback.conf>
<passthrough-playback.conf>
<passthrough-capture.conf>
<passthrough-be.conf>
<passthrough-playback-be.conf>
<passthrough-capture-be.conf>
<highpass-capture-be.conf>
<data.conf>
Expand Down
3 changes: 1 addition & 2 deletions tools/topology/topology2/cavs-src-mixin-mixout-hda.conf
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,9 @@ Object.Pipeline {
}
]

passthrough-be [
passthrough-capture-be [
{
index 4
direction capture

Object.Widget.copier."1" {
dai_type "HDA"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Class.Pipeline."dai-copier-eqiir-module-copier-capture" {

Object.Widget {
copier."1" {
type dai_out
type dai_in
period_sink_count 2
period_source_count 0
num_audio_formats 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Class.Pipeline."dai-copier-gain-mixin-capture" {

Object.Widget {
copier."1" {
type dai_out
type dai_in
period_sink_count 2
period_source_count 0
node_type $HDA_LINK_INPUT_CLASS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Class.Pipeline."dai-copier-gain-module-copier-capture" {

Object.Widget {
copier."1" {
type dai_out
type dai_in
period_sink_count 2
period_source_count 0
num_audio_formats 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Class.Pipeline."deepbuffer-playback" {
copier_type "host"
type "aif_in"
node_type $HDA_HOST_OUTPUT_CLASS

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

spurious change

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

no, this is intentional.

this was to make sure all uses of the copier_type, type and node_type are well isolated to make sure we can detect any differences.

num_audio_formats 3
num_input_audio_formats 3
num_output_audio_formats 3
Expand All @@ -67,7 +68,7 @@ Class.Pipeline."deepbuffer-playback" {
out_bit_depth 32
out_valid_bit_depth 32
# 100ms buffer
dma_buffer_size "$[$obs * $DEEPBUFFER_FW_DMA_MS]"
dma_buffer_size "$[$ibs * $DEEPBUFFER_FW_DMA_MS]"
}
# 32-bit 48KHz 2ch
Object.Base.audio_format.3 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ Class.Pipeline."gain-capture" {
copier."1" {
copier_type "host"
type "aif_out"
node_type $HDA_HOST_INPUT_CLASS

num_audio_formats 3
num_input_audio_formats 3
num_output_audio_formats 3
Expand All @@ -73,7 +75,6 @@ Class.Pipeline."gain-capture" {
out_valid_bit_depth 32
dma_buffer_size "$[$obs * 2]"
}
node_type $HDA_HOST_INPUT_CLASS
}

gain."1" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ Class.Pipeline."gain-copier-capture" {
copier."1" {
copier_type "host"
type "aif_out"
node_type $HDA_HOST_INPUT_CLASS

num_audio_formats 3
num_input_audio_formats 3
num_output_audio_formats 3
Expand All @@ -74,7 +76,6 @@ Class.Pipeline."gain-copier-capture" {
out_valid_bit_depth 32
dma_buffer_size "$[$obs * 2]"
}
node_type $HDA_HOST_INPUT_CLASS
}

gain."1" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ Class.Pipeline."gain-playback" {
copier."1" {
copier_type "host"
type "aif_in"
node_type $HDA_HOST_OUTPUT_CLASS

num_audio_formats 3
num_input_audio_formats 3
num_output_audio_formats 3
Expand All @@ -72,7 +74,6 @@ Class.Pipeline."gain-playback" {
out_valid_bit_depth 32
dma_buffer_size "$[$ibs * 2]"
}
node_type $HDA_HOST_OUTPUT_CLASS
}

gain."1" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Class.Pipeline."host-copier-gain-mixin-playback" {
copier_type "host"
type "aif_in"
node_type $HDA_HOST_OUTPUT_CLASS

num_audio_formats 3
num_input_audio_formats 3
num_output_audio_formats 3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Class.Pipeline."mixout-gain-dai-copier-playback" {
Object.Widget {
mixout."1" {}
copier."1" {
type dai_in
type dai_out

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I am not sure about this one @plbossart . I think you made too many changes in this PR that are not correct and you've got failures left, right & center. It might be a good idea to go step by step and separate the clean ups one by one

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I asked about the conventions, and playback meant dai_out. If this is not correct, I don't know what the rules are any longer.

node_type $HDA_LINK_OUTPUT_CLASS
period_sink_count 0
period_source_count 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Class.Pipeline."mixout-gain-efx-dai-copier-playback" {
Object.Widget {
mixout."1" {}
copier."1" {
type dai_in
type dai_out
node_type $HDA_LINK_OUTPUT_CLASS
period_sink_count 0
period_source_count 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ Class.Pipeline."mixout-gain-host-copier-capture" {
copier_type "host"
type "aif_out"
node_type $HDA_HOST_INPUT_CLASS

num_audio_formats 4
num_input_audio_formats 4
num_output_audio_formats 4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Class.Pipeline."mixout-gain-smart-amp-dai-copier-playback" {
Object.Widget {
mixout."1" {}
copier."1" {
type dai_in
type dai_out
node_type $HDA_LINK_OUTPUT_CLASS
num_audio_formats 2
num_input_audio_formats 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
# BE DAI passthrough pipeline for capture
#
# All attributes defined herein are namespaced by alsatplg to
# "Object.Pipeline.passthrough-be-capture.N.attribute_name"
# "Object.Pipeline.passthrough-capture-be.N.attribute_name"
#
# Usage: mixin-playback pipeline object can be instantiated as:
# Usage: passthrough-capture-be pipeline object can be instantiated as:
#
# Object.Pipeline.dai-pipeline."N" {
# Object.Pipeline.passthrough-capture-be."N" {
# direction "capture"
# period 1000
# time_domain "timer"
Expand All @@ -32,6 +32,10 @@ Class.Pipeline."passthrough-capture-be" {
"index"
]

!immutable [
"direction"
]

unique "instance"
}

Expand All @@ -57,6 +61,7 @@ Class.Pipeline."passthrough-capture-be" {
}
}

direction "capture"
time_domain "timer"
dynamic_pipeline 1
channels 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
# Where N is the unique pipeline ID within the same alsaconf node.
#

<include/common/audio_format.conf>
<include/components/copier.conf>
<include/components/pipeline.conf>
<include/common/audio_format.conf>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

is this an unrelated change? the original order is in alphabetical order no?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

it's to align passthrough-capture and passthrough-playback. One of them doesn't follow the convention. I don't care what the convention is, I just want the two files to be aligned.


Class.Pipeline."passthrough-capture" {

Expand Down Expand Up @@ -47,6 +47,7 @@ Class.Pipeline."passthrough-capture" {
copier_type "host"
type "aif_out"
node_type $HDA_HOST_INPUT_CLASS

num_audio_formats 6
num_input_audio_formats 6
num_output_audio_formats 6
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
# BE DAI passthrough pipeline
#
# All attributes defined herein are namespaced by alsatplg to
# "Object.Pipeline.passthrough-be.N.attribute_name"
# "Object.Pipeline.passthrough-playback-be.N.attribute_name"
#
# Usage: mixin-playback pipeline object can be instantiated as:
# Usage: passthrough-playback-be pipeline object can be instantiated as:
#
# Object.Pipeline.dai-pipeline."N" {
# Object.Pipeline.passthrough-playback-be."N" {
# direction "playback"
# period 1000
# time_domain "timer"
Expand All @@ -21,7 +21,7 @@
<include/components/copier.conf>
<include/components/pipeline.conf>

Class.Pipeline."passthrough-be" {
Class.Pipeline."passthrough-playback-be" {

DefineAttribute."index" {}

Expand All @@ -32,17 +32,16 @@ Class.Pipeline."passthrough-be" {
"index"
]

#
# mixin-playback objects instantiated within the same alsaconf node must have
# unique pipeline_id attribute
#
!immutable [
"direction"
]

unique "instance"
}

Object.Widget {
copier."1" {
type dai_in
node_type $HDA_LINK_OUTPUT_CLASS

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

if you remove the default node_type, I think we should make sure it is set in all top-level conf files first. I think we avoid setting it for HDA

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I don't know how to progress. This is wrong in general. It should never have been set this way, if there is an attribute that is not valid by default across all uses, then it cannot be initialized by default in the base class.

type dai_out
num_audio_formats 3
num_input_audio_formats 3
num_output_audio_formats 3
Expand Down Expand Up @@ -84,6 +83,7 @@ Class.Pipeline."passthrough-be" {
}
}

direction "playback"
time_domain "timer"
dynamic_pipeline 1
channels 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ Class.Pipeline."passthrough-playback" {
Object.Widget {
copier."1" {
copier_type "host"
node_type $HDA_HOST_OUTPUT_CLASS
type "aif_in"
node_type $HDA_HOST_OUTPUT_CLASS

num_audio_formats 3
num_input_audio_formats 3
num_output_audio_formats 3
Expand All @@ -62,7 +63,7 @@ Class.Pipeline."passthrough-playback" {
in_valid_bit_depth 24
out_bit_depth 32
out_valid_bit_depth 32
dma_buffer_size "$[$obs * 2]"
dma_buffer_size "$[$ibs * 2]"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

and oh I forgot t mention, we need to remove dma_buffer_size altogether. This is no longer used by the kernel and it computed based on ibs/obs and stream direction

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

goodness. That just proves my point that these files are not properly maintained. We need to collectively revisit all this, it's just not acceptable to be sloppy at this stage.

}
# 32-bit 48KHz 2ch
Object.Base.audio_format.3 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,9 @@ Class.Pipeline."src-gain-mixin-playback" {
copier."1" {
copier_type "host"
type "aif_in"
node_type $HDA_HOST_OUTPUT_CLASS

<include/components/src_passthrough_format.conf>

node_type $HDA_HOST_OUTPUT_CLASS
}

src."1" {
Expand Down
Loading