summaryrefslogtreecommitdiffstats
path: root/recipes-bsp/alsa-state/alsa-state/imx-nxp-bsp/asound.conf
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2022-02-18 19:43:56 -0300
committerOtavio Salvador <otavio@ossystems.com.br>2022-02-21 20:06:28 -0300
commit30f5ce1d2168389295b4813e01898c2fb0f9bab9 (patch)
treef6f78dbf8e5eef40510739dc1db79d60f05189fb /recipes-bsp/alsa-state/alsa-state/imx-nxp-bsp/asound.conf
parenta3b102a9ed12ea03e72f713ed40968da1776c6d3 (diff)
downloadmeta-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.conf459
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 @@
1defaults.pcm.rate_converter "linear"
2
3pcm.dmix_48000{
4type dmix
5ipc_key 5678293
6ipc_key_add_uid yes
7slave{
8pcm "hw:0,0"
9period_time 40000
10format S16_LE
11rate 48000
12}
13}
14
15pcm.dmix_44100{
16type dmix
17ipc_key 5678293
18ipc_key_add_uid yes
19slave{
20pcm "hw:0,0"
21period_time 40000
22format S16_LE
23rate 44100
24}
25}
26
27pcm.dmix_32000{
28type dmix
29ipc_key 5678293
30ipc_key_add_uid yes
31slave{
32pcm "hw:0,0"
33period_time 40000
34format S16_LE
35rate 32000
36}
37}
38
39pcm.dmix_24000{
40type dmix
41ipc_key 5678293
42ipc_key_add_uid yes
43slave{
44pcm "hw:0,0"
45period_time 40000
46format S16_LE
47rate 24000
48}
49}
50
51pcm.dmix_22050{
52type dmix
53ipc_key 5678293
54ipc_key_add_uid yes
55slave{
56pcm "hw:0,0"
57period_time 40000
58format S16_LE
59rate 22050
60}
61}
62
63pcm.dmix_16000{
64type dmix
65ipc_key 5678293
66ipc_key_add_uid yes
67slave{
68pcm "hw:0,0"
69period_time 40000
70format S16_LE
71rate 16000
72}
73}
74
75pcm.dmix_12000{
76type dmix
77ipc_key 5678293
78ipc_key_add_uid yes
79slave{
80pcm "hw:0,0"
81period_time 40000
82format S16_LE
83rate 12000
84}
85}
86
87pcm.dmix_11025{
88type dmix
89ipc_key 5678293
90ipc_key_add_uid yes
91slave{
92pcm "hw:0,0"
93period_time 40000
94format S16_LE
95rate 11025
96}
97}
98
99pcm.dmix_8000{
100type dmix
101ipc_key 5678293
102ipc_key_add_uid yes
103slave{
104pcm "hw:0,0"
105period_time 40000
106format S16_LE
107rate 8000
108}
109}
110
111pcm.!dsnoop_48000{
112type dsnoop
113ipc_key 5778293
114ipc_key_add_uid yes
115slave{
116pcm "hw:0,0"
117period_time 40000
118format S16_LE
119rate 48000
120}
121}
122
123pcm.!dsnoop_44100{
124type dsnoop
125ipc_key 5778293
126ipc_key_add_uid yes
127slave{
128pcm "hw:0,0"
129period_time 40000
130format S16_LE
131rate 44100
132}
133}
134
135pcm.!dsnoop_32000{
136type dsnoop
137ipc_key 5778293
138ipc_key_add_uid yes
139slave{
140pcm "hw:0,0"
141period_time 40000
142format S16_LE
143rate 32000
144}
145}
146
147pcm.!dsnoop_24000{
148type dsnoop
149ipc_key 5778293
150ipc_key_add_uid yes
151slave{
152pcm "hw:0,0"
153period_time 40000
154format S16_LE
155rate 24000
156}
157}
158
159pcm.!dsnoop_22050{
160type dsnoop
161ipc_key 5778293
162ipc_key_add_uid yes
163slave{
164pcm "hw:0,0"
165period_time 40000
166format S16_LE
167rate 22050
168}
169}
170
171pcm.!dsnoop_16000{
172type dsnoop
173ipc_key 5778293
174ipc_key_add_uid yes
175slave{
176pcm "hw:0,0"
177period_time 40000
178format S16_LE
179rate 16000
180}
181}
182
183pcm.!dsnoop_12000{
184type dsnoop
185ipc_key 5778293
186ipc_key_add_uid yes
187slave{
188pcm "hw:0,0"
189period_time 40000
190format S16_LE
191rate 12000
192}
193}
194
195pcm.!dsnoop_11025{
196type dsnoop
197ipc_key 5778293
198ipc_key_add_uid yes
199slave{
200pcm "hw:0,0"
201period_time 40000
202format S16_LE
203rate 11025
204}
205}
206
207pcm.!dsnoop_8000{
208type dsnoop
209ipc_key 5778293
210ipc_key_add_uid yes
211slave{
212pcm "hw:0,0"
213period_time 40000
214format S16_LE
215rate 8000
216}
217}
218
219pcm.asymed{
220type asym
221playback.pcm "dmix_44100"
222capture.pcm "dsnoop_44100"
223}
224
225pcm.dsp0{
226type plug
227slave.pcm "asymed"
228}
229
230pcm.!default{
231type plug
232route_policy "average"
233slave.pcm "asymed"
234}
235
236ctl.!default{
237type hw
238card 0
239}
240
241ctl.mixer0{
242type hw
243card 0
244}
245
246pcm_slave.esai{
247 pcm "hw:0,0"
248 channels 8
249 rate 48000
250 period_time 40000
251}
252
253pcm.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
265pcm.esaich78{
266 type dshare
267 ipc_key 5778293
268 slave esai
269 bindings.0 3
270 bindings.1 7
271}
272
273pcm_slave.sai5 {
274 pcm "hw:5,0"
275 channels 8
276}
277
278pcm.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
292pcm.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
304pcm.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
314pcm_slave.sai1{
315 pcm "hw:4,0"
316 channels 16
317}
318
319pcm.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
341pcm.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
361pcm.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
379pcm.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
395pcm.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
409pcm.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
421pcm.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
431pcm.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
444pcm.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}