Skip to content

Commit 2a3cfc8

Browse files
committed
topology: dmic-regular: configure 2-channel stereo 48kHz capture
1 parent 6d011ef commit 2a3cfc8

1 file changed

Lines changed: 80 additions & 132 deletions

File tree

tools/topology/topology2/dmic-regular-manifest.conf

Lines changed: 80 additions & 132 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
<tokens.conf>
1212
<common_definitions.conf>
1313
<dmic-default.conf>
14+
<dmic.conf>
15+
<pdm_config.conf>
1416
<hw_config_simple.conf>
1517
<dai-copier-be.conf>
1618
<host-gateway-capture.conf>
@@ -26,121 +28,84 @@
2628
<pcm.conf>
2729
<pcm_caps.conf>
2830
<fe_dai.conf>
29-
<dmic.conf>
30-
<pdm_config.conf>
31-
<pipeline.conf>
32-
33-
<include/common/input_audio_format.conf>
34-
<include/common/output_audio_format.conf>
35-
<include/components/dai-copier.conf>
36-
<include/components/host-copier.conf>
37-
<include/components/pipeline.conf>
3831

3932
Define {
40-
DMIC_DAI_INDEX 1
41-
DMIC_PCM_ID 11
42-
DMIC_NAME "dmic16k"
43-
DMIC_PCM_CAPS "Gain Capture 11"
44-
FORMAT "s32le"
33+
DMIC_PCM_ID 10
34+
DMIC_DAI_INDEX 0
35+
DMIC_NAME "dmic01"
36+
DMIC_PCM_CAPS "Gain Capture 10"
37+
FORMAT "s32le"
4538
}
4639

47-
# ---------------------------------------------------------------------------
48-
# Pipeline 100 — DAI Copier (Core 0)
49-
# ---------------------------------------------------------------------------
50-
Object.Pipeline.dai-copier-be [
40+
Object.Pipeline.host-gateway-capture [
5141
{
52-
format $FORMAT
53-
index 100
54-
Object.Widget.dai-copier.1 {
55-
dai_index $DMIC_DAI_INDEX
56-
type "dai_out"
57-
dai_type "DMIC"
58-
copier_type "DMIC"
59-
stream_name $DMIC_NAME
60-
direction "capture"
61-
node_type $DMIC_LINK_INPUT_CLASS
42+
format $FORMAT
43+
rate 48000
44+
rate_min 48000
45+
rate_max 48000
46+
index 1
6247

63-
num_input_audio_formats 1
48+
Object.Widget.host-copier.1 {
49+
stream_name $DMIC_PCM_CAPS
50+
pcm_id $DMIC_PCM_ID
6451
num_output_audio_formats 1
65-
66-
Object.Base.input_audio_format [
67-
{
68-
in_rate 16000
69-
in_channels 2
70-
in_ch_cfg $CHANNEL_CONFIG_STEREO
71-
in_ch_map $CHANNEL_MAP_STEREO
72-
in_bit_depth 32
73-
in_valid_bit_depth 32
74-
}
75-
]
7652
Object.Base.output_audio_format [
7753
{
78-
out_rate 16000
79-
out_channels 2
80-
out_ch_cfg $CHANNEL_CONFIG_STEREO
81-
out_ch_map $CHANNEL_MAP_STEREO
82-
out_bit_depth 32
54+
out_rate 48000
55+
out_channels 2
56+
out_ch_cfg $CHANNEL_CONFIG_STEREO
57+
out_ch_map $CHANNEL_MAP_STEREO
58+
out_bit_depth 32
8359
out_valid_bit_depth 32
8460
}
8561
]
8662
}
8763
}
8864
]
8965

90-
# ---------------------------------------------------------------------------
91-
# Pipeline 104 — Host Gateway Capture (Core 0)
92-
# ---------------------------------------------------------------------------
93-
Object.Pipeline.host-gateway-capture [
66+
Object.Pipeline.dai-copier-be [
9467
{
95-
format $FORMAT
96-
index 104
97-
Object.Widget.host-copier.1 {
98-
stream_name $DMIC_PCM_CAPS
99-
pcm_id $DMIC_PCM_ID
100-
num_input_audio_formats 1
101-
num_output_audio_formats 2
68+
direction "capture"
69+
format $FORMAT
70+
rate 48000
71+
rate_min 48000
72+
rate_max 48000
73+
index 2
10274

75+
Object.Widget.dai-copier.1 {
76+
dai_index $DMIC_DAI_INDEX
77+
type "dai_out"
78+
dai_type "DMIC"
79+
copier_type "DMIC"
80+
stream_name $DMIC_NAME
81+
direction "capture"
82+
node_type $DMIC_LINK_INPUT_CLASS
83+
num_input_audio_formats 1
84+
num_output_audio_formats 1
10385
Object.Base.input_audio_format [
10486
{
105-
in_rate 16000
106-
in_channels 2
107-
in_ch_cfg $CHANNEL_CONFIG_STEREO
108-
in_ch_map $CHANNEL_MAP_STEREO
109-
in_bit_depth 32
110-
in_valid_bit_depth 32
87+
in_rate 48000
88+
in_channels 2
89+
in_ch_cfg $CHANNEL_CONFIG_STEREO
90+
in_ch_map $CHANNEL_MAP_STEREO
91+
in_bit_depth 32
92+
in_valid_bit_depth 32
11193
}
11294
]
11395
Object.Base.output_audio_format [
11496
{
115-
out_rate 16000
116-
out_channels 2
117-
out_ch_cfg $CHANNEL_CONFIG_STEREO
118-
out_ch_map $CHANNEL_MAP_STEREO
119-
out_bit_depth 16
120-
out_valid_bit_depth 16
121-
}
122-
{
123-
out_rate 16000
124-
out_channels 2
125-
out_ch_cfg $CHANNEL_CONFIG_STEREO
126-
out_ch_map $CHANNEL_MAP_STEREO
127-
out_bit_depth 32
128-
out_valid_bit_depth 32
97+
out_rate 48000
98+
out_channels 2
99+
out_ch_cfg $CHANNEL_CONFIG_STEREO
100+
out_ch_map $CHANNEL_MAP_STEREO
101+
out_bit_depth 32
102+
out_valid_bit_depth 32
129103
}
130104
]
131105
}
132-
133-
Object.Widget.pipeline.1 {
134-
priority 0
135-
lp_mode 0
136-
core_id 0
137-
}
138106
}
139107
]
140108

141-
# ---------------------------------------------------------------------------
142-
# DAPM Virtual Widgets
143-
# ---------------------------------------------------------------------------
144109
Object.Widget.virtual [
145110
{ name "codec0_in" type input index 1 }
146111
{ name "codec1_in" type input index 2 }
@@ -162,66 +127,35 @@ Object.Widget.virtual [
162127
{ name "Alt Analog CPU Capture" type input index 8 }
163128
]
164129

165-
# ---------------------------------------------------------------------------
166-
# Routes
167-
# ---------------------------------------------------------------------------
168130
Object.Base.route [
169131
{
170132
source "dai-copier.DMIC.$DMIC_NAME.capture"
171-
sink "host-copier.$DMIC_PCM_ID.capture"
133+
sink "host-copier.$DMIC_PCM_ID.capture"
172134
}
173135
]
174136

175-
# ---------------------------------------------------------------------------
176-
# PCM
177-
# ---------------------------------------------------------------------------
178-
Object.PCM.pcm."$DMIC_PCM_ID" {
179-
name "DMIC Regular Capture"
180-
id $DMIC_PCM_ID
181-
direction "capture"
182-
capture_compatible_d0i3 1
183-
184-
Object.Base.fe_dai."$DMIC_PCM_CAPS" {}
185-
186-
Object.PCM.pcm_caps."capture" {
187-
name $DMIC_PCM_CAPS
188-
formats "S16_LE,S24_LE,S32_LE"
189-
rates "16000"
190-
channels_min 1
191-
channels_max 2
192-
}
193-
}
194-
195-
# ---------------------------------------------------------------------------
196-
# DMIC DAI
197-
# ---------------------------------------------------------------------------
198137
Object.Dai.DMIC [
199138
{
200-
name $DMIC_NAME
201-
dai_index $DMIC_DAI_INDEX
202-
id 7
203-
driver_version 1
204-
io_clk 38400000
205-
sample_rate 16000
206-
clk_min 500000
207-
clk_max 4800000
208-
unmute_ramp_time_ms 200
209-
num_pdm_active 2
139+
name $DMIC_NAME
140+
dai_index $DMIC_DAI_INDEX
141+
id 6
142+
driver_version 1
143+
io_clk 38400000
144+
sample_rate 48000
145+
clk_min 500000
146+
clk_max 4800000
147+
unmute_ramp_time_ms 200
148+
num_pdm_active 1
210149

211150
Object.Base.hw_config.1 {
212-
id 0
213-
name "DMIC1"
151+
id 0
152+
name "DMIC0"
214153
}
215154

216155
Object.Base.pdm_config.1 {
217-
ctrl_id 0
218-
mic_a_enable 1
219-
mic_b_enable 1
220-
}
221-
Object.Base.pdm_config.2 {
222-
ctrl_id 1
223-
mic_a_enable 1
224-
mic_b_enable 1
156+
ctrl_id 0
157+
mic_a_enable 1
158+
mic_b_enable 1
225159
}
226160
}
227161
]
@@ -233,3 +167,17 @@ Object.Base.manifest.1 {
233167
bytes "0x03,0x00,0x1d,0x00,0x01,0x00"
234168
}
235169
}
170+
171+
Object.PCM.pcm."$DMIC_PCM_ID" {
172+
name "DMIC 48k 2ch"
173+
id $DMIC_PCM_ID
174+
direction "capture"
175+
Object.Base.fe_dai."$DMIC_PCM_CAPS" {}
176+
Object.PCM.pcm_caps."capture" {
177+
name $DMIC_PCM_CAPS
178+
formats "S32_LE,S16_LE"
179+
rates "48000"
180+
channels_min 2
181+
channels_max 2
182+
}
183+
}

0 commit comments

Comments
 (0)