forked from thesofproject/sof
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdeep-buffer.conf
More file actions
193 lines (180 loc) · 3.98 KB
/
deep-buffer.conf
File metadata and controls
193 lines (180 loc) · 3.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
Define {
DEEP_BUF_SPK false
DEEP_BUF_JACK_RATE 48000
}
Object.Pipeline.deepbuffer-playback [
{
index $DEEP_BUFFER_PIPELINE_ID
Object.Widget.host-copier.1 {
stream_name $DEEP_BUFFER_PCM_NAME
pcm_id $DEEP_BUFFER_PCM_ID
Object.Base.input_audio_format [
{
in_rate $DEEP_BUF_JACK_RATE
in_bit_depth 16
in_valid_bit_depth 16
}
{
in_rate $DEEP_BUF_JACK_RATE
in_bit_depth 32
in_valid_bit_depth 24
}
{
in_rate $DEEP_BUF_JACK_RATE
in_bit_depth 32
in_valid_bit_depth 32
}
]
Object.Base.output_audio_format [
{
out_rate $DEEP_BUF_JACK_RATE
out_bit_depth 32
out_valid_bit_depth 32
}
]
}
Object.Widget.gain.1 {
Object.Control.mixer.1 {
name 'Pre Mixer $DEEP_BUFFER_PCM_NAME Volume'
}
Object.Base.input_audio_format [
{
in_rate $DEEP_BUF_JACK_RATE
in_bit_depth 32
in_valid_bit_depth 32
}
]
Object.Base.output_audio_format [
{
out_rate $DEEP_BUF_JACK_RATE
out_bit_depth 32
out_valid_bit_depth 32
}
]
}
Object.Widget.mixin.1 {
Object.Base.input_audio_format [
{
in_rate $DEEP_BUF_JACK_RATE
in_bit_depth 32
in_valid_bit_depth 32
}
]
Object.Base.output_audio_format [
{
out_rate $DEEP_BUF_JACK_RATE
out_bit_depth 32
out_valid_bit_depth 32
}
]
}
}
]
Object.PCM.pcm [
{
name $DEEP_BUFFER_PCM_NAME
id $DEEP_BUFFER_PCM_ID
direction playback
playback_compatible_d0i3 $DEEPBUFFER_D0I3_COMPATIBLE
Object.Base.fe_dai.1 {
name "$DEEP_BUFFER_PCM_NAME"
}
Object.PCM.pcm_caps.1 {
name $DEEP_BUFFER_PCM_NAME
formats 'S16_LE,S24_LE,S32_LE'
# To avoid DMA spinning on a buffer we need bigger
# buffer than the host buffer size, let's say twice as
# big
# (S16_LE, Stereo, 48KHz, DEEPBUFFER_FW_DMA_MS) * 2
#
# Note: The lower limit for the buffer size is rate
# dependent
buffer_size_min "$[(((2 * $channels_min) * 48) * $DEEPBUFFER_FW_DMA_MS) * 2]"
IncludeByKey.DEEP_BUF_JACK_RATE {
"48000" {
rates '48000'
}
"96000" {
rates '96000'
}
"192000" {
rates '192000'
}
}
}
}
]
Object.Base.route [
{
source $DEEP_BUFFER_PIPELINE_SRC
sink $DEEP_BUFFER_PIPELINE_SINK
}
{
source host-copier.$DEEP_BUFFER_PCM_ID.playback
sink gain.$DEEP_BUFFER_PIPELINE_ID.1
}
]
# Spawn another instance
IncludeByKey.DEEP_BUF_SPK {
"true" {
Define {
DEEP_BUFFER_PIPELINE_ID_2 16
DEEP_BUFFER_PCM_ID_2 35
DEEP_BUFFER_PIPELINE_SRC_2 'mixin.16.1'
DEEP_BUFFER_PIPELINE_SINK_2 'mixout.21.1'
DEEP_BUFFER_PCM_NAME_2 'Deepbuffer Amps'
SPEAKER_PCM_CORE_ID 0
}
Object.Pipeline.deepbuffer-playback [
{
index $DEEP_BUFFER_PIPELINE_ID_2
core_id $SPEAKER_PCM_CORE_ID
Object.Widget.host-copier.1 {
stream_name $DEEP_BUFFER_PCM_NAME_2
pcm_id $DEEP_BUFFER_PCM_ID_2
}
Object.Widget.gain.1 {
Object.Control.mixer.1 {
name 'Pre Mixer $DEEP_BUFFER_PCM_NAME_2 Volume'
}
}
Object.Widget.pipeline.1 {
core $SPEAKER_PCM_CORE_ID
}
}
]
Object.PCM.pcm [
{
name $DEEP_BUFFER_PCM_NAME_2
id $DEEP_BUFFER_PCM_ID_2
direction playback
playback_compatible_d0i3 $DEEPBUFFER_D0I3_COMPATIBLE
Object.Base.fe_dai.1 {
name "$DEEP_BUFFER_PCM_NAME_2"
}
Object.PCM.pcm_caps.1 {
name $DEEP_BUFFER_PCM_NAME_2
formats 'S16_LE,S24_LE,S32_LE'
# To avoid DMA spinning on a buffer we need bigger
# buffer than the host buffer size, let's say twice as
# big
# (S16_LE, Stereo, 48KHz, DEEPBUFFER_FW_DMA_MS) * 2
#
# Note: The lower limit for the buffer size is rate
# dependent
buffer_size_min "$[(((2 * $channels_min) * 48) * $DEEPBUFFER_FW_DMA_MS) * 2]"
}
}
]
Object.Base.route [
{
source $DEEP_BUFFER_PIPELINE_SRC_2
sink $DEEP_BUFFER_PIPELINE_SINK_2
}
{
source host-copier.$DEEP_BUFFER_PCM_ID_2.playback
sink gain.$DEEP_BUFFER_PIPELINE_ID_2.1
}
]
}
}