Skip to content

Commit e37def6

Browse files
committed
Tools: Topology: Add channels downnmix to nocodec topologies
This patch adds to PCM0 playback pipeline the selector/micsel component to allow playback of 1-8ch content with conversion to stereo. Mono input is upmixed, multi-channel input is downmixed. Currently the topology sets for micsel a blob downmix_71_to_stereo_with_lfe.conf. If works generally fairly well for all channels counts except that mono input is copied to left playback while right remains silent, not to both. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
1 parent 4d64684 commit e37def6

File tree

2 files changed

+381
-6
lines changed

2 files changed

+381
-6
lines changed

tools/topology/topology2/cavs-nocodec.conf

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
<dai-kpb-be.conf>
2020
<wov-detect.conf>
2121
<host-copier-gain-mixin-playback.conf>
22+
<host-copier-micsel-gain-mixin-playback.conf>
2223
<host-copier-gain-src-mixin-playback.conf>
2324
<mixout-gain-dai-copier-playback.conf>
2425
<mixout-gain-smart-amp-dai-copier-playback.conf>
@@ -205,23 +206,30 @@ Object.Dai.SSP [
205206
# PCM2 ---> gain ---> SRC ---> Mixin ---> Mixout ---> gain ---> SSP2
206207
# PCM4 ---> gain ---> Mixin -------------------------->\
207208
# PCM3 ---> gain ---> Mixin ---->\ \
208-
# PCM0 ---> gain ---> Mixin ---> Mixout ---> Mixin ---> Mixout ---> gain ---> smart_amp ---> SSP0
209-
# /
210-
# /---------------------------------------------------------------------->/
211-
# SSP0 ---> PCM0
209+
# PCM0 ---> micsel ---> gain ---> Mixin ---> Mixout ---> Mixin ---> Mixout ---> gain ---> smart_amp ---> SSP0
210+
# /
211+
# /---------------------------------------------------------------------------------->/
212+
# SSP0 ---> gain ---> module-copier ---> gain ---> micsel ---> PCM0
213+
# \----> gain ---------------> PCM0.1
212214
# SSP1 ---> PCM1
213215
# SSP2 ---> SRC ---> PCM2
214216

215217
IncludeByKey.PASSTHROUGH {
216218
"false" {
217-
Object.Pipeline.host-copier-gain-mixin-playback [
219+
Object.Pipeline.host-copier-micsel-gain-mixin-playback [
218220
{
219221
index 1
220222

221223
Object.Widget.host-copier.1 {
222224
stream_name 'SSP0 Playback'
223225
pcm_id 0
224226
}
227+
Object.Widget.micsel.1 {
228+
Object.Control.bytes.1 {
229+
name 'Pre Mixer $SSP0_PCM_NAME Playback Micsel Bytes'
230+
<include/components/micsel/downmix_71_to_stereo_with_lfe.conf>
231+
}
232+
}
225233
Object.Widget.gain.1 {
226234
curve_type "windows_fade"
227235
Object.Control.mixer.1 {
@@ -1015,6 +1023,12 @@ Object.PCM.pcm [
10151023
rates '192000'
10161024
}
10171025
}
1026+
IncludeByKey.PASSTHROUGH {
1027+
"false" {
1028+
channels_min 1
1029+
channels_max 8
1030+
}
1031+
}
10181032
}
10191033

10201034
Object.PCM.pcm_caps.2 {
@@ -1236,7 +1250,7 @@ IncludeByKey.PASSTHROUGH {
12361250
}
12371251
{
12381252
source 'host-copier.0.playback'
1239-
sink 'gain.1.1'
1253+
sink 'micsel.1.1'
12401254
}
12411255
{
12421256
source 'host-copier.2.playback'

0 commit comments

Comments
 (0)