Skip to content

Commit

Permalink
[TEST] Use SubTreeCopy
Browse files Browse the repository at this point in the history
  • Loading branch information
Eddy Hsu committed Aug 14, 2024
1 parent 120ea29 commit 645b27a
Showing 1 changed file with 37 additions and 91 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#
# BE playback pipeline: mixout-gain-ctc-dai-copier.
# This pipeline is an extension of the mixout-gain-dai-copier-playback pipeline class.
#
# All attributes defined herein are namespaced
# by alsatplg to "Object.Pipeline.mixout-gain-ctc-dai-copier-playback.N.attribute_name"
Expand All @@ -21,105 +22,50 @@
<include/components/mixout.conf>
<include/components/pipeline.conf>
<include/components/ctc.conf>
<platform/intel/efx-default.conf>
<include/pipelines/cavs/mixout-gain-dai-copier-playback.conf>

Class.Pipeline."mixout-gain-ctc-dai-copier-playback" {
SubTreeCopy.baseclass {
# this class extends the mixout-gain-dai-copier-playback class definition
source "Class.Pipeline.mixout-gain-dai-copier-playback"

DefineAttribute."index" {}
# target node is not defined which means that the new subtree will be copied to
# the parent node containing the SubTreeCopy node i.e in this case the
# Class.Pipeline.mixout-gain-ctc-dai-copier-playback {} node.

<include/pipelines/pipeline-common.conf>
# default copy type is to extend the base class ie the widgets and routes
# will be added to the existing list of widgets/routes in the base class

attributes {
!constructor [
"index"
]
tree {
Object.Widget {
ctc."1" {
num_input_audio_formats 1
num_output_audio_formats 1

!immutable [
"direction"
]

#
# mixout-gain-ctc-dai-copier-playback objects instantiated within the same alsaconf node must have
# unique instance attribute
#
unique "instance"
}

Object.Widget {
mixout."1" {}
dai-copier."1" {
type dai_in
num_input_audio_formats 1
num_output_audio_formats 1
num_input_pins 1

# copier only supports one format based on mixin/mixout requirements: 32-bit 48KHz 2ch
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
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
}
]
}
]
}
gain."1" {
num_input_audio_formats 1
num_output_audio_formats 1
}

# 32-bit 48KHz 2ch
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
}
]
}
ctc."1" {
num_input_audio_formats 1
num_output_audio_formats 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
Object.Base {
! route [
{
source gain.$index.1
sink ctc.$index.1
}
]
}
}
}

Object.Base {
route.1 {
source mixout.$index.1
sink gain.$index.1
}
route.2 {
source gain.$index.1
sink ctc.$index.1
}
}

direction "playback"
dynamic_pipeline 1
time_domain "timer"
}

0 comments on commit 645b27a

Please sign in to comment.