Skip to content

Commit e811834

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 035336b commit e811834

6 files changed

Lines changed: 74 additions & 12 deletions

File tree

tools/topology/topology2/cavs-sdw.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
<host-gateway-playback.conf>
3131
<host-gateway-capture.conf>
3232
<host-gateway-tdfb-drc-capture.conf>
33-
<host-gateway-src-mfcc-capture.conf>
33+
<host-gateway-src-micsel-mfcc-capture.conf>
3434
<src.conf>
3535
<io-gateway.conf>
3636
<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,6 +20,7 @@
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

2526
Define {
@@ -28,7 +29,7 @@ Define {
2829
MFCC_FRAME_BYTES 344
2930
}
3031

31-
Class.Pipeline."host-gateway-src-mfcc-capture" {
32+
Class.Pipeline."host-gateway-src-micsel-mfcc-capture" {
3233

3334
<include/pipelines/pipeline-common.conf>
3435

@@ -38,8 +39,8 @@ Class.Pipeline."host-gateway-src-mfcc-capture" {
3839
]
3940

4041
#
41-
# host-gateway-src-mfcc-capture objects instantiated within the same alsaconf
42-
# node must have unique pipeline_id attribute
42+
# host-gateway-src-micsel-mfcc-capture objects instantiated within the
43+
# same alsaconf node must have unique pipeline_id attribute
4344
#
4445
unique "instance"
4546
}
@@ -76,6 +77,27 @@ Class.Pipeline."host-gateway-src-mfcc-capture" {
7677
]
7778
}
7879

80+
micsel."1" {
81+
num_input_audio_formats 1
82+
num_output_audio_formats 1
83+
Object.Base.input_audio_format [
84+
{
85+
in_bit_depth 32
86+
in_valid_bit_depth 32
87+
in_rate 16000
88+
}
89+
]
90+
Object.Base.output_audio_format [
91+
{
92+
out_bit_depth 32
93+
out_valid_bit_depth 32
94+
out_rate 16000
95+
out_channels 2
96+
out_ch_cfg $CHANNEL_CONFIG_DUAL_MONO
97+
}
98+
]
99+
}
100+
79101
mfcc."1" {
80102
num_input_audio_formats 1
81103
num_output_audio_formats 1
@@ -135,6 +157,10 @@ Class.Pipeline."host-gateway-src-mfcc-capture" {
135157
!route [
136158
{
137159
source src.$index.1
160+
sink micsel.$index.1
161+
}
162+
{
163+
source micsel.$index.1
138164
sink mfcc.$index.1
139165
}
140166
]

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Define {
1212
MFCC_BLOB mel
1313
}
1414

15-
Object.Pipeline.host-gateway-src-mfcc-capture [
15+
Object.Pipeline.host-gateway-src-micsel-mfcc-capture [
1616
{
1717
index $SDW_DMIC_COMPR_AUDIO_FEATURE_CAPTURE_PIPELINE_ID
1818

@@ -21,6 +21,15 @@ Object.Pipeline.host-gateway-src-mfcc-capture [
2121
pcm_id $SDW_DMIC_COMPR_AUDIO_FEATURE_CAPTURE_PCM_ID
2222
}
2323

24+
Object.Widget.micsel.1 {
25+
Object.Control {
26+
bytes."1" {
27+
name "$SDW_DMIC_COMPR_AUDIO_FEATURE_CAPTURE_PCM_NAME Micsel bytes"
28+
<include/components/micsel/downmix_stereo_to_doublemono.conf>
29+
}
30+
}
31+
}
32+
2433
Object.Widget.mfcc.1 {
2534
type "encoder"
2635
Object.Control {

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Define {
99
MFCC_FRAME_BYTES 344
1010
}
1111

12-
Object.Pipeline.host-gateway-src-mfcc-capture [
12+
Object.Pipeline.host-gateway-src-micsel-mfcc-capture [
1313
{
1414
index $SDW_DMIC_AUDIO_FEATURE_CAPTURE_PIPELINE_ID
1515

@@ -18,6 +18,15 @@ Object.Pipeline.host-gateway-src-mfcc-capture [
1818
pcm_id $SDW_DMIC_AUDIO_FEATURE_CAPTURE_PCM_ID
1919
}
2020

21+
Object.Widget.micsel.1 {
22+
Object.Control {
23+
bytes."1" {
24+
name "$SDW_DMIC_AUDIO_FEATURE_CAPTURE_PCM_NAME Micsel bytes"
25+
<include/components/micsel/downmix_stereo_to_doublemono.conf>
26+
}
27+
}
28+
}
29+
2130
Object.Widget.mfcc.1 {
2231
Object.Control {
2332
bytes."1" {

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Define {
1212
MFCC_BLOB mel
1313
}
1414

15-
Object.Pipeline.host-gateway-src-mfcc-capture [
15+
Object.Pipeline.host-gateway-src-micsel-mfcc-capture [
1616
{
1717
index $SDW_JACK_COMPR_AUDIO_FEATURE_CAPTURE_PIPELINE_ID
1818

@@ -21,6 +21,15 @@ Object.Pipeline.host-gateway-src-mfcc-capture [
2121
pcm_id $SDW_JACK_COMPR_AUDIO_FEATURE_CAPTURE_PCM_ID
2222
}
2323

24+
Object.Widget.micsel.1 {
25+
Object.Control {
26+
bytes."1" {
27+
name "$SDW_JACK_COMPR_AUDIO_FEATURE_CAPTURE_PCM_NAME Micsel bytes"
28+
<include/components/micsel/downmix_stereo_to_doublemono.conf>
29+
}
30+
}
31+
}
32+
2433
Object.Widget.mfcc.1 {
2534
type "encoder"
2635
Object.Control {

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Define {
99
MFCC_FRAME_BYTES 344
1010
}
1111

12-
Object.Pipeline.host-gateway-src-mfcc-capture [
12+
Object.Pipeline.host-gateway-src-micsel-mfcc-capture [
1313
{
1414
index $SDW_JACK_AUDIO_FEATURE_CAPTURE_PIPELINE_ID
1515

@@ -18,6 +18,15 @@ Object.Pipeline.host-gateway-src-mfcc-capture [
1818
pcm_id $SDW_JACK_AUDIO_FEATURE_CAPTURE_PCM_ID
1919
}
2020

21+
Object.Widget.micsel.1 {
22+
Object.Control {
23+
bytes."1" {
24+
name "$SDW_JACK_AUDIO_FEATURE_CAPTURE_PCM_NAME Micsel bytes"
25+
<include/components/micsel/downmix_stereo_to_doublemono.conf>
26+
}
27+
}
28+
}
29+
2130
Object.Widget.mfcc.1 {
2231
Object.Control {
2332
bytes."1" {

0 commit comments

Comments
 (0)