Skip to content

Commit ab8db4f

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. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
1 parent e6d3486 commit ab8db4f

4 files changed

Lines changed: 181 additions & 3 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>
Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
#
2+
# SRC-Micsel-MFCC capture pipeline
3+
#
4+
# This class provides host pipeline for capture with MFCC audio features input.
5+
# All attributes defined herein are namespaced by alsatplg to
6+
# "Object.Pipeline.host-gateway-src-micsel-mfcc-capture.N.attribute_name".
7+
#
8+
# Usage: host-gateway-src-micsel-mfcc-capture pipeline object can be instantiated as:
9+
#
10+
# Object.Pipeline.host-gateway-src-micsel-mfcc-capture."N" {
11+
# period 1000
12+
# time_domain "timer"
13+
# }
14+
#
15+
# Where N is the unique pipeline ID within the same alsaconf node.
16+
#
17+
18+
<include/common/input_audio_format.conf>
19+
<include/common/output_audio_format.conf>
20+
<include/components/pipeline.conf>
21+
<include/components/host-copier.conf>
22+
<include/components/src.conf>
23+
<include/components/micsel.conf>
24+
<include/components/mfcc.conf>
25+
26+
Class.Pipeline."host-gateway-src-micsel-mfcc-capture" {
27+
28+
<include/pipelines/pipeline-common.conf>
29+
30+
attributes {
31+
!constructor [
32+
"index"
33+
]
34+
35+
#
36+
# host-gateway-src-micsel-mfcc-capture objects instantiated within the
37+
# same alsaconf node must have unique pipeline_id attribute
38+
#
39+
unique "instance"
40+
}
41+
42+
Object.Widget {
43+
src."1" {
44+
num_input_pins 1
45+
num_output_pins 1
46+
num_input_audio_formats 3
47+
num_output_audio_formats 1
48+
Object.Base.input_audio_format [
49+
{
50+
in_bit_depth 32
51+
in_valid_bit_depth 32
52+
in_rate 48000
53+
}
54+
{
55+
in_bit_depth 32
56+
in_valid_bit_depth 32
57+
in_rate 96000
58+
}
59+
{
60+
in_bit_depth 32
61+
in_valid_bit_depth 32
62+
in_rate 192000
63+
}
64+
]
65+
Object.Base.output_audio_format [
66+
{
67+
out_bit_depth 32
68+
out_valid_bit_depth 32
69+
out_rate 16000
70+
}
71+
]
72+
}
73+
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+
95+
mfcc."1" {
96+
num_input_audio_formats 1
97+
num_output_audio_formats 1
98+
Object.Base.input_audio_format [
99+
{
100+
in_bit_depth 32
101+
in_valid_bit_depth 32
102+
in_rate 16000
103+
}
104+
]
105+
Object.Base.output_audio_format [
106+
{
107+
out_bit_depth 32
108+
out_valid_bit_depth 32
109+
out_rate 16000
110+
}
111+
]
112+
}
113+
114+
host-copier."1" {
115+
type "aif_out"
116+
node_type $HDA_HOST_INPUT_CLASS
117+
num_input_pins 1
118+
num_output_pins 1
119+
num_input_audio_formats 1
120+
num_output_audio_formats 1
121+
Object.Base.input_audio_format [
122+
{
123+
in_bit_depth 32
124+
in_valid_bit_depth 32
125+
in_rate 16000
126+
}
127+
]
128+
Object.Base.output_audio_format [
129+
{
130+
out_bit_depth 32
131+
out_valid_bit_depth 32
132+
out_rate 16000
133+
}
134+
]
135+
}
136+
137+
pipeline."1" {
138+
priority 0
139+
lp_mode 0
140+
}
141+
}
142+
143+
144+
Object.Base {
145+
!route [
146+
{
147+
source src.$index.1
148+
sink micsel.$index.1
149+
}
150+
{
151+
source micsel.$index.1
152+
sink mfcc.$index.1
153+
}
154+
]
155+
}
156+
157+
direction "capture"
158+
dynamic_pipeline 1
159+
time_domain "timer"
160+
}

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)