Skip to content

Commit 876c06c

Browse files
committed
topology2: components: pipeline: Add direction attribute
Add 2 new tokens for pipeline direction and atttributes for the pipeline component. This change is required to implement the firmware based echo reference feature to inform the kernel of the pipeline direction in order for it to make a decision on which pipelines to set up when the echo reference capture pipeline is set up. The direction_valid attribute is required for backward-compatibility in the kernel driver for older topologies where the direction is not set. Signed-off-by: Ranjani Sridharan <[email protected]>
1 parent a8e314a commit 876c06c

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

tools/topology/topology2/include/common/tokens.conf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ Object.Base.VendorToken {
8484
lp_mode 207
8585
use_chain_dma 209
8686
kcps 210
87+
direction 211
88+
direction_valid 212
8789
}
8890

8991
"9" {

tools/topology/topology2/include/components/pipeline.conf

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,32 @@ Class.Widget."pipeline" {
102102
}
103103
}
104104

105+
DefineAttribute."direction" {
106+
type "string"
107+
token_ref "scheduler.word"
108+
constraints {
109+
!valid_values [
110+
"playback"
111+
"capture"
112+
]
113+
!tuple_values [
114+
0
115+
1
116+
]
117+
}
118+
}
119+
120+
DefineAttribute."direction_valid" {
121+
type "string"
122+
token_ref "scheduler.bool"
123+
constraints {
124+
!valid_values [
125+
"true"
126+
"false"
127+
]
128+
}
129+
}
130+
105131
# Skip setting up the pipeline in the DSP in the case of chained DMA mode
106132
DefineAttribute."use_chain_dma" {
107133
type "string"
@@ -144,4 +170,5 @@ Class.Widget."pipeline" {
144170
type "scheduler"
145171
no_pm "true"
146172
kcps $KCPS_PIPELINE_DEFAULT
173+
direction_valid "true"
147174
}

0 commit comments

Comments
 (0)