Merge "Delete HMI Framework individual correspondence"
[AGL/meta-agl-devel.git] / meta-audio-4a-framework / recipes-multimedia / 4a-hal-config / files / asound.conf.template
1 #AGL Audio High Level ALSA configuration
2 #This define 2 sounds card with 8 audio roles each
3 #The alsa soft volume control name must match with the HAL Control Name
4
5 # ----------------------------------------------------
6 #
7 # ----------------------------------------------------
8 pcm.@AUDIO_DEV_NAME@ {
9     type dmix
10     slave {pcm "hw:@AUDIO_DEV_NAME_ID@"}
11     ipc_key 1001          # ipc_key should be unique to each dmix
12 }
13
14 # -----------------------------------------------------
15 #  Register ControllerHookPlugin (ToiBeFix fullpath)
16 # -----------------------------------------------------
17 pcm_hook_type.CtlHookPlugin {
18     install "AlsaInstallHook"
19     lib "@INSTALL_PREFIX@/lib/policy_alsa_hook.so"
20 }
21
22 # ----------------------------------------------------
23 #
24 # ----------------------------------------------------
25 pcm.Emergency_Main {
26  type softvol
27  slave.pcm "@AUDIO_DEV_NAME@"
28  control{
29    name "Emergency_Volume"
30  }
31 }
32
33 pcm.Warning_Main {
34  type softvol
35  slave.pcm "@AUDIO_DEV_NAME@"
36  control{
37    name "Warning_Volume"
38  }
39 }
40
41 pcm.CustomHigh_Main {
42  type softvol
43  slave.pcm "@AUDIO_DEV_NAME@"
44  control{
45    name "CustomHigh_Volume"
46  }
47 }
48
49 pcm.Phone_Main {
50  type softvol
51  slave.pcm "@AUDIO_DEV_NAME@"
52  control{
53    name "Phone_Volume"
54  }
55 }
56
57 pcm.Navigation_Main {
58  type softvol
59  slave.pcm "@AUDIO_DEV_NAME@"
60  control{
61    name "Navigation_Volume"
62  }
63 }
64
65 pcm.CustomMedium_Main {
66  type softvol
67  slave.pcm "@AUDIO_DEV_NAME@"
68  control{
69    name "CustomMedium_Volume"
70  }
71 }
72
73 pcm.Video_Main {
74  type softvol
75  slave.pcm "@AUDIO_DEV_NAME@"
76  control{
77    name "Video_Volume"
78  }
79 }
80
81 pcm.Streaming_Main {
82  type softvol
83  slave.pcm "@AUDIO_DEV_NAME@"
84  control{
85    name "Streaming_Volume"
86  }
87 }
88
89 pcm.Multimedia_Main {
90  type softvol
91  slave.pcm "@AUDIO_DEV_NAME@"
92  control{
93    name "Multimedia_Volume"
94  }
95 }
96
97 pcm.Radio_Main {
98  type softvol
99  slave.pcm "@AUDIO_DEV_NAME@"
100  control{
101    name "Radio_Volume"
102  }
103 }
104
105 pcm.CustomLow_Main {
106  type softvol
107  slave.pcm "@AUDIO_DEV_NAME@"
108  control{
109    name "CustomLow_Volume"
110  }
111 }
112
113 pcm.Fallback_Main {
114  type softvol
115  slave.pcm "@AUDIO_DEV_NAME@"
116  control{
117    name "Fallback_Volume"
118  }
119 }
120
121 # ----------------------------------------------------
122 # Define one hooked PCM channel per Audio Roles
123 # ----------------------------------------------------
124 pcm.Emergency {
125     type hooks
126     slave {pcm "Emergency_Main"}
127     hooks.0 {
128         comment "Defined used hook sharelib and provide arguments/config to install func"
129         type "CtlHookPlugin"
130         hook_args {
131
132             # print few log messages (default false)
133             verbose true
134
135             # uri to audio-4a policy engine
136             uri="unix:/run/user/0/apis/ws/ahl-4a"
137
138             # timeout in ms (default 500)
139             timeout 5000
140
141             # force API synchronous mode
142             synchronous true
143
144             # api subcall to request a role
145             request {
146                 stream_open "{'audio_role': 'Emergency', 'endpoint_type':'sink'}"
147                 set_stream_state "{'state':'running'}"
148             }
149
150             # api subcall to request a role
151             release {
152                 stream_close "{}"
153             }
154         }
155     }
156 }
157
158 pcm.Warning {
159     type hooks
160     slave {pcm "Warning_Main"}
161     hooks.0 {
162         comment "Defined used hook sharelib and provide arguments/config to install func"
163         type "CtlHookPlugin"
164         hook_args {
165
166             # print few log messages (default false)
167             verbose true
168
169             # uri to audio-4a policy engine
170             uri="unix:/run/user/0/apis/ws/ahl-4a"
171
172             # timeout in ms (default 500)
173             timeout 5000
174
175             # force API synchronous mode
176             synchronous true
177
178             # api subcall to request a role
179             request {
180                 stream_open "{'audio_role': 'Warning', 'endpoint_type':'sink'}"
181                 set_stream_state "{'state':'running'}"
182             }
183
184             # api subcall to request a role
185             release {
186                 stream_close "{}"
187             }
188         }
189     }
190 }
191
192 pcm.CustomHigh {
193     type hooks
194     slave {pcm "CustomHigh_Main"}
195     hooks.0 {
196         comment "Defined used hook sharelib and provide arguments/config to install func"
197         type "CtlHookPlugin"
198         hook_args {
199
200             # print few log messages (default false)
201             verbose true
202
203             # uri to audio-4a policy engine
204             uri="unix:/run/user/0/apis/ws/ahl-4a"
205
206             # timeout in ms (default 500)
207             timeout 5000
208
209             # force API synchronous mode
210             synchronous true
211
212             # api subcall to request a role
213             request {
214                 stream_open "{'audio_role': 'CustomHigh', 'endpoint_type':'sink'}"
215                 set_stream_state "{'state':'running'}"
216             }
217
218             # api subcall to request a role
219             release {
220                 stream_close "{}"
221             }
222         }
223     }
224 }
225
226 pcm.Phone {
227     type hooks
228     slave {pcm "Phone_Main"}
229     hooks.0 {
230         comment "Defined used hook sharelib and provide arguments/config to install func"
231         type "CtlHookPlugin"
232         hook_args {
233
234             # print few log messages (default false)
235             verbose true
236
237             # uri to audio-4a policy engine
238             uri="unix:/run/user/0/apis/ws/ahl-4a"
239
240             # timeout in ms (default 500)
241             timeout 5000
242
243             # force API synchronous mode
244             synchronous true
245
246             # api subcall to request a role
247             request {
248                 stream_open "{'audio_role': 'Phone', 'endpoint_type':'sink'}"
249                 set_stream_state "{'state':'running'}"
250             }
251
252             # api subcall to request a role
253             release {
254                 stream_close "{}"
255             }
256         }
257     }
258 }
259
260 pcm.Navigation {
261     type hooks
262     slave {pcm "Navigation_Main"}
263     hooks.0 {
264         comment "Defined used hook sharelib and provide arguments/config to install func"
265         type "CtlHookPlugin"
266         hook_args {
267
268             # print few log messages (default false)
269             verbose true
270
271             # uri to audio-4a policy engine
272             uri="unix:/run/user/0/apis/ws/ahl-4a"
273
274             # timeout in ms (default 500)
275             timeout 5000
276
277             # force API synchronous mode
278             synchronous true
279
280             # api subcall to request a role
281             request {
282                 stream_open "{'audio_role': 'Navigation', 'endpoint_type':'sink'}"
283                 set_stream_state "{'state':'running'}"
284             }
285
286             # api subcall to request a role
287             release {
288                 stream_close "{}"
289             }
290         }
291     }
292 }
293
294 pcm.CustomMedium {
295     type hooks
296     slave {pcm "CustomMedium_Main"}
297     hooks.0 {
298         comment "Defined used hook sharelib and provide arguments/config to install func"
299         type "CtlHookPlugin"
300         hook_args {
301
302             # print few log messages (default false)
303             verbose true
304
305             # uri to audio-4a policy engine
306             uri="unix:/run/user/0/apis/ws/ahl-4a"
307
308             # timeout in ms (default 500)
309             timeout 5000
310
311             # force API synchronous mode
312             synchronous true
313
314             # api subcall to request a role
315             request {
316                 stream_open "{'audio_role': 'CustomMedium', 'endpoint_type':'sink'}"
317                 set_stream_state "{'state':'running'}"
318             }
319
320             # api subcall to request a role
321             release {
322                 stream_close "{}"
323             }
324         }
325     }
326 }
327
328 pcm.Video {
329     type hooks
330     slave {pcm "Video_Main"}
331     hooks.0 {
332         comment "Defined used hook sharelib and provide arguments/config to install func"
333         type "CtlHookPlugin"
334         hook_args {
335
336             # print few log messages (default false)
337             verbose true
338
339             # uri to audio-4a policy engine
340             uri="unix:/run/user/0/apis/ws/ahl-4a"
341
342             # timeout in ms (default 500)
343             timeout 5000
344
345             # force API synchronous mode
346             synchronous true
347
348             # api subcall to request a role
349             request {
350                 stream_open "{'audio_role': 'Video', 'endpoint_type':'sink'}"
351                 set_stream_state "{'state':'running'}"
352             }
353
354             # api subcall to request a role
355             release {
356                 stream_close "{}"
357             }
358         }
359     }
360 }
361
362 pcm.Streaming {
363     type hooks
364     slave {pcm "Streaming_Main"}
365     hooks.0 {
366         comment "Defined used hook sharelib and provide arguments/config to install func"
367         type "CtlHookPlugin"
368         hook_args {
369
370             # print few log messages (default false)
371             verbose true
372
373             # uri to audio-4a policy engine
374             uri="unix:/run/user/0/apis/ws/ahl-4a"
375
376             # timeout in ms (default 500)
377             timeout 5000
378
379
380             # force API synchronous mode
381             synchronous true
382
383             # api subcall to request a role
384             request {
385                 stream_open "{'audio_role': 'Streaming', 'endpoint_type':'sink'}"
386                 set_stream_state "{'state':'running'}"
387             }
388
389             # api subcall to request a role
390             release {
391                 stream_close "{}"
392             }
393         }
394     }
395 }
396
397 pcm.Multimedia {
398     type hooks
399     slave {pcm "Multimedia_Main"}
400     hooks.0 {
401         comment "Defined used hook sharelib and provide arguments/config to install func"
402         type "CtlHookPlugin"
403         hook_args {
404
405             # print few log messages (default false)
406             verbose true
407
408             # uri to audio-4a policy engine
409             uri="unix:/run/user/0/apis/ws/ahl-4a"
410
411             # timeout in ms (default 500)
412             timeout 5000
413
414             # force API synchronous mode
415             synchronous true
416
417             # api subcall to request a role
418             request {
419                 stream_open "{'audio_role': 'Multimedia', 'endpoint_type':'sink'}"
420                 set_stream_state "{'state':'running'}"
421             }
422
423             # api subcall to request a role
424             release {
425                 stream_close "{}"
426             }
427         }
428     }
429 }
430
431 pcm.Radio {
432     type hooks
433     slave {pcm "Radio_Main"}
434     hooks.0 {
435         comment "Defined used hook sharelib and provide arguments/config to install func"
436         type "CtlHookPlugin"
437         hook_args {
438
439             # print few log messages (default false)
440             verbose true
441
442             # uri to audio-4a policy engine
443             uri="unix:/run/user/0/apis/ws/ahl-4a"
444
445             # timeout in ms (default 500)
446             timeout 5000
447
448             # force API synchronous mode
449             synchronous true
450
451             # api subcall to request a role
452             request {
453                 stream_open "{'audio_role': 'Radio', 'endpoint_type':'sink'}"
454                 set_stream_state "{'state':'running'}"
455             }
456
457             # api subcall to request a role
458             release {
459                 stream_close "{}"
460             }
461         }
462     }
463 }
464
465 pcm.CustomLow {
466     type hooks
467     slave {pcm "CustomLow_Main"}
468     hooks.0 {
469         comment "Defined used hook sharelib and provide arguments/config to install func"
470         type "CtlHookPlugin"
471         hook_args {
472
473             # print few log messages (default false)
474             verbose true
475
476             # uri to audio-4a policy engine
477             uri="unix:/run/user/0/apis/ws/ahl-4a"
478
479             # timeout in ms (default 500)
480             timeout 5000
481
482             # force API synchronous mode
483             synchronous true
484
485             # api subcall to request a role
486             request {
487                 stream_open "{'audio_role': 'CustomLow', 'endpoint_type':'sink'}"
488                 set_stream_state "{'state':'running'}"
489             }
490
491             # api subcall to request a role
492             release {
493                 stream_close "{}"
494             }
495         }
496     }
497 }
498
499 pcm.Fallback {
500     type hooks
501     slave {pcm "Fallback_Main"}
502     hooks.0 {
503         comment "Defined used hook sharelib and provide arguments/config to install func"
504         type "CtlHookPlugin"
505         hook_args {
506
507             # print few log messages (default false)
508             verbose true
509
510             # uri to audio-4a policy engine
511             uri="unix:/run/user/0/apis/ws/ahl-4a"
512
513             # timeout in ms (default 500)
514             timeout 5000
515
516             # force API synchronous mode
517             synchronous true
518
519             # api subcall to request a role
520             request {
521                 stream_open "{'audio_role': 'Fallback', 'endpoint_type':'sink'}"
522                 set_stream_state "{'state':'running'}"
523             }
524
525             # api subcall to request a role
526             release {
527                 stream_close "{}"
528             }
529         }
530     }
531 }