diff options
author | Otavio Salvador <otavio@ossystems.com.br> | 2022-02-18 19:43:56 -0300 |
---|---|---|
committer | Otavio Salvador <otavio@ossystems.com.br> | 2022-02-21 20:06:28 -0300 |
commit | 30f5ce1d2168389295b4813e01898c2fb0f9bab9 (patch) | |
tree | f6f78dbf8e5eef40510739dc1db79d60f05189fb /recipes-bsp/alsa-state/alsa-state/imx-nxp-bsp/asound.conf | |
parent | a3b102a9ed12ea03e72f713ed40968da1776c6d3 (diff) | |
download | meta-freescale-30f5ce1d2168389295b4813e01898c2fb0f9bab9.tar.gz |
Generalize overrides subsystem for NXP and Mainline support
Essentially, we extend the overrides to a generic-bsp, nxp-bsp, and
mainline-bsp.
So, for example, the mx8mq override is split into:
- imx-generic-bsp: compatible with every i.MX SoC and both BSP variants
- imx-nxp-bsp: compatible with every i.MX SoC but specific to NXP BSP
- imx-mainline-bsp: compatible with every i.MX SoC but specific to Mainline BSP
- mx8-generic-bsp: compatible with every i.MX8 SoC and both BSP variants
- mx8-nxp-bsp: compatible with every i.MX8 SoC but specific to NXP BSP
- mx8-mainline-bsp: compatible with every i.MX8 SoC but specific to Mainline BSP
- mx8m-generic-bsp: compatible with every i.MX8M SoC and both BSP variants
- mx8m-nxp-bsp: compatible with every i.MX8M SoC but specific to NXP BSP
- mx8m-mainline-bsp: compatible with every i.MX8M SoC but specific to Mainline BSP
- mx8mq-generic-bsp: compatible with every i.MX8MQ SoC and both BSP variants
- mx8mq-nxp-bsp: compatible with every i.MX8MQ SoC8 but specific to NXP BSP
- mx8mq-mainline-bsp: compatible with every i.MX8MQ SoC but specific to Mainline BSP
The extender mechanism is responsible for extending the override list to
include the generic overrides. We can then use the three different
variants to handle the metadata correctly.
Generically speaking, the conversion mainly was automated (with a lot of
back and forth until getting it right).
To convert an existing layer, the following script can be used:
```sh
git ls-files classes recipes-* \
| xargs sed -i \
-e 's,:\(mx[6-8]\w*\),:\1-nxp-bsp,g' \
-e 's,(\(mx[6-8]\w*\)),(\1-nxp-bsp),g' \
-e 's,\(mx[6-8]\w*\)|,\1-nxp-bsp|,g' \
-e 's,|\(mx[6-8]\w*\)),|\1-nxp-bsp),g' \
\
-e 's,:\(mx[5s]\w*\),:\1-generic-bsp,g' \
-e 's,(\(mx[5s]\w*\)),(\1-generic-bsp),g' \
-e 's,\(mx[5s]\w*\)|,\1-generic-bsp|,g' \
-e 's,|\(mx[5s]\w*\)),|\1-generic-bsp),g' \
\
-e 's,:\(vf\w*\),:\1-generic-bsp,g' \
-e 's,:\(vf[56]0\w*\),:\1-generic-bsp,g' \
-e 's,\(vf\w*\)|,\1-generic-bsp|,g' \
-e 's,|\(vf\w*\)),|\1-generic-bsp),g' \
-e 's,\(vf[56]0\w*\)|,\1-generic-bsp|,g' \
-e 's,|\(vf[56]0\w*\)),|\1-generic-bsp),g' \
\
-e 's,:\(imx\) ,:\1-nxp-bsp ,g' \
-e 's,(\(imx\)),(\1-nxp-bsp),g' \
-e 's,\(imx\)|,\1-nxp-bsp|,g' \
-e 's,|\(imx\)),|\1-nxp-bsp),g'
for d in $(find -type d | egrep '/mx[6-8]w*'); do
git mv $d $d-nxp-bsp
done
for d in $(find -type d | egrep '/imx$'); do
git mv $d $d-nxp-bsp
done
for d in $(find -type d | egrep '/mx[5s]w*'); do
git mv $d $d-generic-bsp
done
```
Fixes: #791.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Diffstat (limited to 'recipes-bsp/alsa-state/alsa-state/imx-nxp-bsp/asound.conf')
-rw-r--r-- | recipes-bsp/alsa-state/alsa-state/imx-nxp-bsp/asound.conf | 459 |
1 files changed, 459 insertions, 0 deletions
diff --git a/recipes-bsp/alsa-state/alsa-state/imx-nxp-bsp/asound.conf b/recipes-bsp/alsa-state/alsa-state/imx-nxp-bsp/asound.conf new file mode 100644 index 00000000..c511018e --- /dev/null +++ b/recipes-bsp/alsa-state/alsa-state/imx-nxp-bsp/asound.conf | |||
@@ -0,0 +1,459 @@ | |||
1 | defaults.pcm.rate_converter "linear" | ||
2 | |||
3 | pcm.dmix_48000{ | ||
4 | type dmix | ||
5 | ipc_key 5678293 | ||
6 | ipc_key_add_uid yes | ||
7 | slave{ | ||
8 | pcm "hw:0,0" | ||
9 | period_time 40000 | ||
10 | format S16_LE | ||
11 | rate 48000 | ||
12 | } | ||
13 | } | ||
14 | |||
15 | pcm.dmix_44100{ | ||
16 | type dmix | ||
17 | ipc_key 5678293 | ||
18 | ipc_key_add_uid yes | ||
19 | slave{ | ||
20 | pcm "hw:0,0" | ||
21 | period_time 40000 | ||
22 | format S16_LE | ||
23 | rate 44100 | ||
24 | } | ||
25 | } | ||
26 | |||
27 | pcm.dmix_32000{ | ||
28 | type dmix | ||
29 | ipc_key 5678293 | ||
30 | ipc_key_add_uid yes | ||
31 | slave{ | ||
32 | pcm "hw:0,0" | ||
33 | period_time 40000 | ||
34 | format S16_LE | ||
35 | rate 32000 | ||
36 | } | ||
37 | } | ||
38 | |||
39 | pcm.dmix_24000{ | ||
40 | type dmix | ||
41 | ipc_key 5678293 | ||
42 | ipc_key_add_uid yes | ||
43 | slave{ | ||
44 | pcm "hw:0,0" | ||
45 | period_time 40000 | ||
46 | format S16_LE | ||
47 | rate 24000 | ||
48 | } | ||
49 | } | ||
50 | |||
51 | pcm.dmix_22050{ | ||
52 | type dmix | ||
53 | ipc_key 5678293 | ||
54 | ipc_key_add_uid yes | ||
55 | slave{ | ||
56 | pcm "hw:0,0" | ||
57 | period_time 40000 | ||
58 | format S16_LE | ||
59 | rate 22050 | ||
60 | } | ||
61 | } | ||
62 | |||
63 | pcm.dmix_16000{ | ||
64 | type dmix | ||
65 | ipc_key 5678293 | ||
66 | ipc_key_add_uid yes | ||
67 | slave{ | ||
68 | pcm "hw:0,0" | ||
69 | period_time 40000 | ||
70 | format S16_LE | ||
71 | rate 16000 | ||
72 | } | ||
73 | } | ||
74 | |||
75 | pcm.dmix_12000{ | ||
76 | type dmix | ||
77 | ipc_key 5678293 | ||
78 | ipc_key_add_uid yes | ||
79 | slave{ | ||
80 | pcm "hw:0,0" | ||
81 | period_time 40000 | ||
82 | format S16_LE | ||
83 | rate 12000 | ||
84 | } | ||
85 | } | ||
86 | |||
87 | pcm.dmix_11025{ | ||
88 | type dmix | ||
89 | ipc_key 5678293 | ||
90 | ipc_key_add_uid yes | ||
91 | slave{ | ||
92 | pcm "hw:0,0" | ||
93 | period_time 40000 | ||
94 | format S16_LE | ||
95 | rate 11025 | ||
96 | } | ||
97 | } | ||
98 | |||
99 | pcm.dmix_8000{ | ||
100 | type dmix | ||
101 | ipc_key 5678293 | ||
102 | ipc_key_add_uid yes | ||
103 | slave{ | ||
104 | pcm "hw:0,0" | ||
105 | period_time 40000 | ||
106 | format S16_LE | ||
107 | rate 8000 | ||
108 | } | ||
109 | } | ||
110 | |||
111 | pcm.!dsnoop_48000{ | ||
112 | type dsnoop | ||
113 | ipc_key 5778293 | ||
114 | ipc_key_add_uid yes | ||
115 | slave{ | ||
116 | pcm "hw:0,0" | ||
117 | period_time 40000 | ||
118 | format S16_LE | ||
119 | rate 48000 | ||
120 | } | ||
121 | } | ||
122 | |||
123 | pcm.!dsnoop_44100{ | ||
124 | type dsnoop | ||
125 | ipc_key 5778293 | ||
126 | ipc_key_add_uid yes | ||
127 | slave{ | ||
128 | pcm "hw:0,0" | ||
129 | period_time 40000 | ||
130 | format S16_LE | ||
131 | rate 44100 | ||
132 | } | ||
133 | } | ||
134 | |||
135 | pcm.!dsnoop_32000{ | ||
136 | type dsnoop | ||
137 | ipc_key 5778293 | ||
138 | ipc_key_add_uid yes | ||
139 | slave{ | ||
140 | pcm "hw:0,0" | ||
141 | period_time 40000 | ||
142 | format S16_LE | ||
143 | rate 32000 | ||
144 | } | ||
145 | } | ||
146 | |||
147 | pcm.!dsnoop_24000{ | ||
148 | type dsnoop | ||
149 | ipc_key 5778293 | ||
150 | ipc_key_add_uid yes | ||
151 | slave{ | ||
152 | pcm "hw:0,0" | ||
153 | period_time 40000 | ||
154 | format S16_LE | ||
155 | rate 24000 | ||
156 | } | ||
157 | } | ||
158 | |||
159 | pcm.!dsnoop_22050{ | ||
160 | type dsnoop | ||
161 | ipc_key 5778293 | ||
162 | ipc_key_add_uid yes | ||
163 | slave{ | ||
164 | pcm "hw:0,0" | ||
165 | period_time 40000 | ||
166 | format S16_LE | ||
167 | rate 22050 | ||
168 | } | ||
169 | } | ||
170 | |||
171 | pcm.!dsnoop_16000{ | ||
172 | type dsnoop | ||
173 | ipc_key 5778293 | ||
174 | ipc_key_add_uid yes | ||
175 | slave{ | ||
176 | pcm "hw:0,0" | ||
177 | period_time 40000 | ||
178 | format S16_LE | ||
179 | rate 16000 | ||
180 | } | ||
181 | } | ||
182 | |||
183 | pcm.!dsnoop_12000{ | ||
184 | type dsnoop | ||
185 | ipc_key 5778293 | ||
186 | ipc_key_add_uid yes | ||
187 | slave{ | ||
188 | pcm "hw:0,0" | ||
189 | period_time 40000 | ||
190 | format S16_LE | ||
191 | rate 12000 | ||
192 | } | ||
193 | } | ||
194 | |||
195 | pcm.!dsnoop_11025{ | ||
196 | type dsnoop | ||
197 | ipc_key 5778293 | ||
198 | ipc_key_add_uid yes | ||
199 | slave{ | ||
200 | pcm "hw:0,0" | ||
201 | period_time 40000 | ||
202 | format S16_LE | ||
203 | rate 11025 | ||
204 | } | ||
205 | } | ||
206 | |||
207 | pcm.!dsnoop_8000{ | ||
208 | type dsnoop | ||
209 | ipc_key 5778293 | ||
210 | ipc_key_add_uid yes | ||
211 | slave{ | ||
212 | pcm "hw:0,0" | ||
213 | period_time 40000 | ||
214 | format S16_LE | ||
215 | rate 8000 | ||
216 | } | ||
217 | } | ||
218 | |||
219 | pcm.asymed{ | ||
220 | type asym | ||
221 | playback.pcm "dmix_44100" | ||
222 | capture.pcm "dsnoop_44100" | ||
223 | } | ||
224 | |||
225 | pcm.dsp0{ | ||
226 | type plug | ||
227 | slave.pcm "asymed" | ||
228 | } | ||
229 | |||
230 | pcm.!default{ | ||
231 | type plug | ||
232 | route_policy "average" | ||
233 | slave.pcm "asymed" | ||
234 | } | ||
235 | |||
236 | ctl.!default{ | ||
237 | type hw | ||
238 | card 0 | ||
239 | } | ||
240 | |||
241 | ctl.mixer0{ | ||
242 | type hw | ||
243 | card 0 | ||
244 | } | ||
245 | |||
246 | pcm_slave.esai{ | ||
247 | pcm "hw:0,0" | ||
248 | channels 8 | ||
249 | rate 48000 | ||
250 | period_time 40000 | ||
251 | } | ||
252 | |||
253 | pcm.esaich1to6{ | ||
254 | type dshare | ||
255 | ipc_key 5778293 | ||
256 | slave esai | ||
257 | bindings.0 0 | ||
258 | bindings.1 4 | ||
259 | bindings.2 1 | ||
260 | bindings.3 5 | ||
261 | bindings.4 2 | ||
262 | bindings.5 6 | ||
263 | } | ||
264 | |||
265 | pcm.esaich78{ | ||
266 | type dshare | ||
267 | ipc_key 5778293 | ||
268 | slave esai | ||
269 | bindings.0 3 | ||
270 | bindings.1 7 | ||
271 | } | ||
272 | |||
273 | pcm_slave.sai5 { | ||
274 | pcm "hw:5,0" | ||
275 | channels 8 | ||
276 | } | ||
277 | |||
278 | pcm.sai5_ch1to8 { | ||
279 | type dsnoop | ||
280 | ipc_key 5185558 | ||
281 | slave sai5 | ||
282 | bindings.0 0 | ||
283 | bindings.1 4 | ||
284 | bindings.2 1 | ||
285 | bindings.3 5 | ||
286 | bindings.4 2 | ||
287 | bindings.5 6 | ||
288 | bindings.6 3 | ||
289 | bindings.7 7 | ||
290 | } | ||
291 | |||
292 | pcm.sai5_ch1to6 { | ||
293 | type dsnoop | ||
294 | ipc_key 5165558 | ||
295 | slave sai5 | ||
296 | bindings.0 0 | ||
297 | bindings.1 4 | ||
298 | bindings.2 1 | ||
299 | bindings.3 5 | ||
300 | bindings.4 2 | ||
301 | bindings.5 6 | ||
302 | } | ||
303 | |||
304 | pcm.sai5_ch1to4 { | ||
305 | type dsnoop | ||
306 | ipc_key 5145558 | ||
307 | slave sai5 | ||
308 | bindings.0 0 | ||
309 | bindings.1 4 | ||
310 | bindings.2 1 | ||
311 | bindings.3 5 | ||
312 | } | ||
313 | |||
314 | pcm_slave.sai1{ | ||
315 | pcm "hw:4,0" | ||
316 | channels 16 | ||
317 | } | ||
318 | |||
319 | pcm.sai1to16{ | ||
320 | type dshare | ||
321 | slave sai1 | ||
322 | ipc_key 5144458 | ||
323 | bindings.0 0 | ||
324 | bindings.1 8 | ||
325 | bindings.2 1 | ||
326 | bindings.3 9 | ||
327 | bindings.4 2 | ||
328 | bindings.5 10 | ||
329 | bindings.6 3 | ||
330 | bindings.7 11 | ||
331 | bindings.8 4 | ||
332 | bindings.9 12 | ||
333 | bindings.10 5 | ||
334 | bindings.11 13 | ||
335 | bindings.12 6 | ||
336 | bindings.13 14 | ||
337 | bindings.14 7 | ||
338 | bindings.15 15 | ||
339 | } | ||
340 | |||
341 | pcm.sai1to14{ | ||
342 | type dshare | ||
343 | slave sai1 | ||
344 | ipc_key 5144458 | ||
345 | bindings.0 0 | ||
346 | bindings.1 8 | ||
347 | bindings.2 1 | ||
348 | bindings.3 9 | ||
349 | bindings.4 2 | ||
350 | bindings.5 10 | ||
351 | bindings.6 3 | ||
352 | bindings.7 11 | ||
353 | bindings.8 4 | ||
354 | bindings.9 12 | ||
355 | bindings.10 5 | ||
356 | bindings.11 13 | ||
357 | bindings.12 6 | ||
358 | bindings.13 14 | ||
359 | } | ||
360 | |||
361 | pcm.sai1to12{ | ||
362 | type dshare | ||
363 | slave sai1 | ||
364 | ipc_key 5144458 | ||
365 | bindings.0 0 | ||
366 | bindings.1 8 | ||
367 | bindings.2 1 | ||
368 | bindings.3 9 | ||
369 | bindings.4 2 | ||
370 | bindings.5 10 | ||
371 | bindings.6 3 | ||
372 | bindings.7 11 | ||
373 | bindings.8 4 | ||
374 | bindings.9 12 | ||
375 | bindings.10 5 | ||
376 | bindings.11 13 | ||
377 | } | ||
378 | |||
379 | pcm.sai1to10{ | ||
380 | type dshare | ||
381 | slave sai1 | ||
382 | ipc_key 5144458 | ||
383 | bindings.0 0 | ||
384 | bindings.1 8 | ||
385 | bindings.2 1 | ||
386 | bindings.3 9 | ||
387 | bindings.4 2 | ||
388 | bindings.5 10 | ||
389 | bindings.6 3 | ||
390 | bindings.7 11 | ||
391 | bindings.8 4 | ||
392 | bindings.9 12 | ||
393 | } | ||
394 | |||
395 | pcm.sai1to8{ | ||
396 | type dshare | ||
397 | slave sai1 | ||
398 | ipc_key 5144458 | ||
399 | bindings.0 0 | ||
400 | bindings.1 8 | ||
401 | bindings.2 1 | ||
402 | bindings.3 9 | ||
403 | bindings.4 2 | ||
404 | bindings.5 10 | ||
405 | bindings.6 3 | ||
406 | bindings.7 11 | ||
407 | } | ||
408 | |||
409 | pcm.sai1to6{ | ||
410 | type dshare | ||
411 | slave sai1 | ||
412 | ipc_key 5144458 | ||
413 | bindings.0 0 | ||
414 | bindings.1 8 | ||
415 | bindings.2 1 | ||
416 | bindings.3 9 | ||
417 | bindings.4 2 | ||
418 | bindings.5 10 | ||
419 | } | ||
420 | |||
421 | pcm.sai1to4{ | ||
422 | type dshare | ||
423 | slave sai1 | ||
424 | ipc_key 5144458 | ||
425 | bindings.0 0 | ||
426 | bindings.1 8 | ||
427 | bindings.2 1 | ||
428 | bindings.3 9 | ||
429 | } | ||
430 | |||
431 | pcm.cdnhdmi4ch { | ||
432 | type dshare | ||
433 | slave { | ||
434 | pcm "hw:3,0" | ||
435 | channels 4 | ||
436 | } | ||
437 | ipc_key 5144458 | ||
438 | bindings.0 0 | ||
439 | bindings.1 2 | ||
440 | bindings.2 1 | ||
441 | bindings.3 3 | ||
442 | } | ||
443 | |||
444 | pcm.cdnhdmi8ch { | ||
445 | type dshare | ||
446 | slave { | ||
447 | pcm "hw:3,0" | ||
448 | channels 8 | ||
449 | } | ||
450 | ipc_key 5144458 | ||
451 | bindings.0 0 | ||
452 | bindings.1 4 | ||
453 | bindings.2 1 | ||
454 | bindings.3 5 | ||
455 | bindings.4 2 | ||
456 | bindings.5 6 | ||
457 | bindings.6 3 | ||
458 | bindings.7 7 | ||
459 | } | ||