Skip to content

Commit 2936054

Browse files
ujfalusilgirdwood
authored andcommitted
topology2: Add compress playback pipeline definition
Add the basic building blocks for compress playback support following the way deepbuffer is defined as the compr pipeline will be used in a similar way in topology files. We support two COMPRESSED pipeline initially, the second one is used for SDW Speaker path, but the naming is generic for easier adaptation to other topologies Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
1 parent 0e9a48f commit 2936054

3 files changed

Lines changed: 828 additions & 0 deletions

File tree

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
#
2+
# FE playback pipeline: compr-playback
3+
#
4+
# All attributes defined herein are namespaced
5+
# by alsatplg to "Object.Pipeline.compr-playback.N.attribute_name"
6+
#
7+
# Usage: compr-playback pipeline object can be instantiated as:
8+
#
9+
# Object.Pipeline.compr-playback."N" {
10+
# period 1000
11+
# time_domain "timer"
12+
# }
13+
#
14+
# Where N is the unique pipeline ID within the same alsaconf node.
15+
#
16+
17+
<include/common/input_audio_format.conf>
18+
<include/common/output_audio_format.conf>
19+
<include/components/host-copier.conf>
20+
<include/components/module-copier.conf>
21+
<include/components/mixin.conf>
22+
<include/components/pipeline.conf>
23+
<include/components/gain.conf>
24+
<include/components/decoder.conf>
25+
26+
Class.Pipeline."compr-playback" {
27+
28+
<include/pipelines/pipeline-common.conf>
29+
30+
attributes {
31+
!constructor [
32+
"index"
33+
]
34+
35+
!immutable [
36+
"direction"
37+
]
38+
39+
#
40+
# compr-playback objects instantiated within the same alsaconf node must have
41+
# unique pipeline_id attribute
42+
#
43+
unique "instance"
44+
}
45+
46+
Object.Widget {
47+
host-copier."1" {
48+
type "aif_in"
49+
node_type $HDA_HOST_OUTPUT_CLASS
50+
num_output_pins 1
51+
deep_buffer_dma_ms $COMPR_DEEPBUFFER_MS
52+
}
53+
54+
decoder."1" {
55+
scheduler_domain "DP"
56+
}
57+
58+
module-copier."2" {}
59+
60+
src."1" {}
61+
62+
gain."1" {}
63+
64+
mixin."1" {}
65+
66+
pipeline."1" {
67+
priority 0
68+
# enable lp mode
69+
lp_mode 1
70+
}
71+
}
72+
73+
Object.Base.route [
74+
{
75+
source decoder.$index.1
76+
sink module-copier.$index.2
77+
}
78+
{
79+
source module-copier.$index.2
80+
sink src.$index.1
81+
}
82+
{
83+
source src.$index.1
84+
sink gain.$index.1
85+
}
86+
{
87+
source gain.$index.1
88+
sink mixin.$index.1
89+
}
90+
]
91+
92+
direction "playback"
93+
dynamic_pipeline 1
94+
time_domain "timer"
95+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# default settings for Compressed Audio Playback
2+
Define {
3+
COMPRESSED false
4+
COMPR_DEEPBUFFER_MS 100 # 100 ms copier dma size
5+
6+
COMPRESSED_1 true
7+
COMPR_PCM_NAME 'Compress Playback'
8+
COMPR_PCM_ID 50
9+
COMPR_PIPELINE_ID 90
10+
11+
12+
COMPRESSED_2 false
13+
COMPR_2_PCM_NAME 'Compress Playback 2'
14+
COMPR_2_PCM_ID 52
15+
COMPR_2_PIPELINE_ID 92
16+
}

0 commit comments

Comments
 (0)