Skip to content

Commit 56bb5ca

Browse files
committed
Tools: Topology: Add Micsel module to MFCC capture pipeline
This patch adds the Micsel (or Selector) module with a configuration blob for stereo to double mono to source of MFCC. The Micsel module has better input select capabilities than bare MFCC module. The sum of L+R provides a slightly better SNR than the single (left) channel pick with MFCC for it's mono processing. It will reduce a bit noise in the audio features and possibly improve speech recognition quality. The previous pipeline class host-gateway-src-mfcc-capture.conf is removed because there is no other use for it. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
1 parent e6d3486 commit 56bb5ca

4 files changed

Lines changed: 54 additions & 10 deletions

File tree

tools/topology/topology2/cavs-sdw.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
<host-gateway-playback.conf>
2828
<host-gateway-capture.conf>
2929
<host-gateway-tdfb-drc-capture.conf>
30-
<host-gateway-src-mfcc-capture.conf>
30+
<host-gateway-src-micsel-mfcc-capture.conf>
3131
<src.conf>
3232
<io-gateway.conf>
3333
<io-gateway-capture.conf>

tools/topology/topology2/include/pipelines/cavs/host-gateway-src-mfcc-capture.conf renamed to tools/topology/topology2/include/pipelines/cavs/host-gateway-src-micsel-mfcc-capture.conf

Lines changed: 33 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#
2-
# SRC-MFCC capture pipeline
2+
# SRC-Micsel-MFCC capture pipeline
33
#
44
# This class provides host pipeline for capture with MFCC audio features input.
55
# All attributes defined herein are namespaced by alsatplg to
6-
# "Object.Pipeline.host-gateway-src-mfcc-capture.N.attribute_name".
6+
# "Object.Pipeline.host-gateway-src-micsel-mfcc-capture.N.attribute_name".
77
#
8-
# Usage: host-gateway-src-mfcc-capture pipeline object can be instantiated as:
8+
# Usage: host-gateway-src-micsel-mfcc-capture pipeline object can be instantiated as:
99
#
10-
# Object.Pipeline.host-gateway-src-mfcc-capture."N" {
10+
# Object.Pipeline.host-gateway-src-micsel-mfcc-capture."N" {
1111
# period 1000
1212
# time_domain "timer"
1313
# }
@@ -20,9 +20,10 @@
2020
<include/components/pipeline.conf>
2121
<include/components/host-copier.conf>
2222
<include/components/src.conf>
23+
<include/components/micsel.conf>
2324
<include/components/mfcc.conf>
2425

25-
Class.Pipeline."host-gateway-src-mfcc-capture" {
26+
Class.Pipeline."host-gateway-src-micsel-mfcc-capture" {
2627

2728
<include/pipelines/pipeline-common.conf>
2829

@@ -32,8 +33,8 @@ Class.Pipeline."host-gateway-src-mfcc-capture" {
3233
]
3334

3435
#
35-
# host-gateway-src-mfcc-capture objects instantiated within the same alsaconf
36-
# node must have unique pipeline_id attribute
36+
# host-gateway-src-micsel-mfcc-capture objects instantiated within the
37+
# same alsaconf node must have unique pipeline_id attribute
3738
#
3839
unique "instance"
3940
}
@@ -70,6 +71,27 @@ Class.Pipeline."host-gateway-src-mfcc-capture" {
7071
]
7172
}
7273

74+
micsel."1" {
75+
num_input_audio_formats 1
76+
num_output_audio_formats 1
77+
Object.Base.input_audio_format [
78+
{
79+
in_bit_depth 32
80+
in_valid_bit_depth 32
81+
in_rate 16000
82+
}
83+
]
84+
Object.Base.output_audio_format [
85+
{
86+
out_bit_depth 32
87+
out_valid_bit_depth 32
88+
out_rate 16000
89+
out_channels 2
90+
out_ch_cfg $CHANNEL_CONFIG_DUAL_MONO
91+
}
92+
]
93+
}
94+
7395
mfcc."1" {
7496
num_input_audio_formats 1
7597
num_output_audio_formats 1
@@ -123,6 +145,10 @@ Class.Pipeline."host-gateway-src-mfcc-capture" {
123145
!route [
124146
{
125147
source src.$index.1
148+
sink micsel.$index.1
149+
}
150+
{
151+
source micsel.$index.1
126152
sink mfcc.$index.1
127153
}
128154
]

tools/topology/topology2/platform/intel/sdw-dmic-audio-feature.conf

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Define {
66
SDW_DMIC_AUDIO_FEATURE_CAPTURE_PIPELINE_ID 131
77
}
88

9-
Object.Pipeline.host-gateway-src-mfcc-capture [
9+
Object.Pipeline.host-gateway-src-micsel-mfcc-capture [
1010
{
1111
index $SDW_DMIC_AUDIO_FEATURE_CAPTURE_PIPELINE_ID
1212

@@ -15,6 +15,15 @@ Object.Pipeline.host-gateway-src-mfcc-capture [
1515
pcm_id $SDW_DMIC_AUDIO_FEATURE_CAPTURE_PCM_ID
1616
}
1717

18+
Object.Widget.micsel.1 {
19+
Object.Control {
20+
bytes."1" {
21+
name "$SDW_DMIC_AUDIO_FEATURE_CAPTURE_PCM_NAME Micsel bytes"
22+
<include/components/micsel/downmix_stereo_to_doublemono.conf>
23+
}
24+
}
25+
}
26+
1827
Object.Widget.mfcc.1 {
1928
Object.Control {
2029
bytes."1" {

tools/topology/topology2/platform/intel/sdw-jack-audio-feature.conf

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Define {
66
SDW_JACK_AUDIO_FEATURE_CAPTURE_PIPELINE_ID 130
77
}
88

9-
Object.Pipeline.host-gateway-src-mfcc-capture [
9+
Object.Pipeline.host-gateway-src-micsel-mfcc-capture [
1010
{
1111
index $SDW_JACK_AUDIO_FEATURE_CAPTURE_PIPELINE_ID
1212

@@ -15,6 +15,15 @@ Object.Pipeline.host-gateway-src-mfcc-capture [
1515
pcm_id $SDW_JACK_AUDIO_FEATURE_CAPTURE_PCM_ID
1616
}
1717

18+
Object.Widget.micsel.1 {
19+
Object.Control {
20+
bytes."1" {
21+
name "$SDW_JACK_AUDIO_FEATURE_CAPTURE_PCM_NAME Micsel bytes"
22+
<include/components/micsel/downmix_stereo_to_doublemono.conf>
23+
}
24+
}
25+
}
26+
1827
Object.Widget.mfcc.1 {
1928
Object.Control {
2029
bytes."1" {

0 commit comments

Comments
 (0)