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
5 # ----------------------------------------------------
7 # ----------------------------------------------------
10 slave {pcm "hw:@AUDIO_DEV_NAME_ID@"}
11 ipc_key 1001 # ipc_key should be unique to each dmix
14 # -----------------------------------------------------
15 # Register ControllerHookPlugin (ToiBeFix fullpath)
16 # -----------------------------------------------------
17 pcm_hook_type.CtlHookPlugin {
18 install "AlsaInstallHook"
19 lib "@INSTALL_PREFIX@/lib/policy_alsa_hook.so"
22 # ----------------------------------------------------
24 # ----------------------------------------------------
27 slave.pcm "@AUDIO_DEV_NAME@"
29 name "Emergency_Volume"
35 slave.pcm "@AUDIO_DEV_NAME@"
43 slave.pcm "@AUDIO_DEV_NAME@"
45 name "CustomHigh_Volume"
51 slave.pcm "@AUDIO_DEV_NAME@"
59 slave.pcm "@AUDIO_DEV_NAME@"
61 name "Navigation_Volume"
65 pcm.CustomMedium_Main {
67 slave.pcm "@AUDIO_DEV_NAME@"
69 name "CustomMedium_Volume"
75 slave.pcm "@AUDIO_DEV_NAME@"
83 slave.pcm "@AUDIO_DEV_NAME@"
85 name "Streaming_Volume"
91 slave.pcm "@AUDIO_DEV_NAME@"
93 name "Multimedia_Volume"
99 slave.pcm "@AUDIO_DEV_NAME@"
107 slave.pcm "@AUDIO_DEV_NAME@"
109 name "CustomLow_Volume"
115 slave.pcm "@AUDIO_DEV_NAME@"
117 name "Fallback_Volume"
121 # ----------------------------------------------------
122 # Define one hooked PCM channel per Audio Roles
123 # ----------------------------------------------------
126 slave {pcm "Emergency_Main"}
128 comment "Defined used hook sharelib and provide arguments/config to install func"
132 # print few log messages (default false)
135 # uri to audio-4a policy engine
136 uri="unix:/run/user/0/apis/ws/ahl-4a"
138 # timeout in ms (default 500)
141 # force API synchronous mode
144 # api subcall to request a role
146 stream_open "{'audio_role': 'Emergency', 'endpoint_type':'sink'}"
147 set_stream_state "{'state':'running'}"
150 # api subcall to request a role
155 # map AGL event on Unix signal. Search in event for json key=value
157 sig-02 {search state_event, value 1}
158 sig-31 {search state_event, value 2}
159 sig-32 {search state_event, value 3}
167 slave {pcm "Warning_Main"}
169 comment "Defined used hook sharelib and provide arguments/config to install func"
173 # print few log messages (default false)
176 # uri to audio-4a policy engine
177 uri="unix:/run/user/0/apis/ws/ahl-4a"
179 # timeout in ms (default 500)
182 # force API synchronous mode
185 # api subcall to request a role
187 stream_open "{'audio_role': 'Warning', 'endpoint_type':'sink'}"
188 set_stream_state "{'state':'running'}"
191 # api subcall to request a role
196 # map AGL event on Unix signal. Search in event for json key=value
198 sig-02 {search state_event, value 1}
199 sig-31 {search state_event, value 2}
200 sig-32 {search state_event, value 3}
208 slave {pcm "CustomHigh_Main"}
210 comment "Defined used hook sharelib and provide arguments/config to install func"
214 # print few log messages (default false)
217 # uri to audio-4a policy engine
218 uri="unix:/run/user/0/apis/ws/ahl-4a"
220 # timeout in ms (default 500)
223 # force API synchronous mode
226 # api subcall to request a role
228 stream_open "{'audio_role': 'CustomHigh', 'endpoint_type':'sink'}"
229 set_stream_state "{'state':'running'}"
232 # api subcall to request a role
237 # map AGL event on Unix signal. Search in event for json key=value
239 sig-02 {search state_event, value 1}
240 sig-31 {search state_event, value 2}
241 sig-32 {search state_event, value 3}
249 slave {pcm "Phone_Main"}
251 comment "Defined used hook sharelib and provide arguments/config to install func"
255 # print few log messages (default false)
258 # uri to audio-4a policy engine
259 uri="unix:/run/user/0/apis/ws/ahl-4a"
261 # timeout in ms (default 500)
264 # force API synchronous mode
267 # api subcall to request a role
269 stream_open "{'audio_role': 'Phone', 'endpoint_type':'sink'}"
270 set_stream_state "{'state':'running'}"
273 # api subcall to request a role
278 # map AGL event on Unix signal. Search in event for json key=value
280 sig-02 {search state_event, value 1}
281 sig-31 {search state_event, value 2}
282 sig-32 {search state_event, value 3}
290 slave {pcm "Navigation_Main"}
292 comment "Defined used hook sharelib and provide arguments/config to install func"
296 # print few log messages (default false)
299 # uri to audio-4a policy engine
300 uri="unix:/run/user/0/apis/ws/ahl-4a"
302 # timeout in ms (default 500)
305 # force API synchronous mode
308 # api subcall to request a role
310 stream_open "{'audio_role': 'Navigation', 'endpoint_type':'sink'}"
311 set_stream_state "{'state':'running'}"
314 # api subcall to request a role
319 # map AGL event on Unix signal. Search in event for json key=value
321 sig-02 {search state_event, value 1}
322 sig-31 {search state_event, value 2}
323 sig-32 {search state_event, value 3}
331 slave {pcm "CustomMedium_Main"}
333 comment "Defined used hook sharelib and provide arguments/config to install func"
337 # print few log messages (default false)
340 # uri to audio-4a policy engine
341 uri="unix:/run/user/0/apis/ws/ahl-4a"
343 # timeout in ms (default 500)
346 # force API synchronous mode
349 # api subcall to request a role
351 stream_open "{'audio_role': 'CustomMedium', 'endpoint_type':'sink'}"
352 set_stream_state "{'state':'running'}"
355 # api subcall to request a role
360 # map AGL event on Unix signal. Search in event for json key=value
362 sig-02 {search state_event, value 1}
363 sig-31 {search state_event, value 2}
364 sig-32 {search state_event, value 3}
372 slave {pcm "Video_Main"}
374 comment "Defined used hook sharelib and provide arguments/config to install func"
378 # print few log messages (default false)
381 # uri to audio-4a policy engine
382 uri="unix:/run/user/0/apis/ws/ahl-4a"
384 # timeout in ms (default 500)
387 # force API synchronous mode
390 # api subcall to request a role
392 stream_open "{'audio_role': 'Video', 'endpoint_type':'sink'}"
393 set_stream_state "{'state':'running'}"
396 # api subcall to request a role
401 # map AGL event on Unix signal. Search in event for json key=value
403 sig-02 {search state_event, value 1}
404 sig-31 {search state_event, value 2}
405 sig-32 {search state_event, value 3}
413 slave {pcm "Streaming_Main"}
415 comment "Defined used hook sharelib and provide arguments/config to install func"
419 # print few log messages (default false)
422 # uri to audio-4a policy engine
423 uri="unix:/run/user/0/apis/ws/ahl-4a"
425 # timeout in ms (default 500)
429 # force API synchronous mode
432 # api subcall to request a role
434 stream_open "{'audio_role': 'Streaming', 'endpoint_type':'sink'}"
435 set_stream_state "{'state':'running'}"
438 # api subcall to request a role
443 # map AGL event on Unix signal. Search in event for json key=value
445 sig-02 {search state_event, value 1}
446 sig-31 {search state_event, value 2}
447 sig-32 {search state_event, value 3}
455 slave {pcm "Multimedia_Main"}
457 comment "Defined used hook sharelib and provide arguments/config to install func"
461 # print few log messages (default false)
464 # uri to audio-4a policy engine
465 uri="unix:/run/user/0/apis/ws/ahl-4a"
467 # timeout in ms (default 500)
470 # force API synchronous mode
473 # api subcall to request a role
475 stream_open "{'audio_role': 'Multimedia', 'endpoint_type':'sink'}"
476 set_stream_state "{'state':'running'}"
479 # api subcall to request a role
484 # map AGL event on Unix signal. Search in event for json key=value
486 sig-02 {search state_event, value 1}
487 sig-31 {search state_event, value 2}
488 sig-32 {search state_event, value 3}
496 slave {pcm "Radio_Main"}
498 comment "Defined used hook sharelib and provide arguments/config to install func"
502 # print few log messages (default false)
505 # uri to audio-4a policy engine
506 uri="unix:/run/user/0/apis/ws/ahl-4a"
508 # timeout in ms (default 500)
511 # force API synchronous mode
514 # api subcall to request a role
516 stream_open "{'audio_role': 'Radio', 'endpoint_type':'sink'}"
517 set_stream_state "{'state':'running'}"
520 # api subcall to request a role
525 # map AGL event on Unix signal. Search in event for json key=value
527 sig-02 {search state_event, value 1}
528 sig-31 {search state_event, value 2}
529 sig-32 {search state_event, value 3}
537 slave {pcm "CustomLow_Main"}
539 comment "Defined used hook sharelib and provide arguments/config to install func"
543 # print few log messages (default false)
546 # uri to audio-4a policy engine
547 uri="unix:/run/user/0/apis/ws/ahl-4a"
549 # timeout in ms (default 500)
552 # force API synchronous mode
555 # api subcall to request a role
557 stream_open "{'audio_role': 'CustomLow', 'endpoint_type':'sink'}"
558 set_stream_state "{'state':'running'}"
561 # api subcall to request a role
566 # map AGL event on Unix signal. Search in event for json key=value
568 sig-02 {search state_event, value 1}
569 sig-31 {search state_event, value 2}
570 sig-32 {search state_event, value 3}
578 slave {pcm "Fallback_Main"}
580 comment "Defined used hook sharelib and provide arguments/config to install func"
584 # print few log messages (default false)
587 # uri to audio-4a policy engine
588 uri="unix:/run/user/0/apis/ws/ahl-4a"
590 # timeout in ms (default 500)
593 # force API synchronous mode
596 # api subcall to request a role
598 stream_open "{'audio_role': 'Fallback', 'endpoint_type':'sink'}"
599 set_stream_state "{'state':'running'}"
602 # api subcall to request a role
607 # map AGL event on Unix signal. Search in event for json key=value
609 sig-02 {search state_event, value 1}
610 sig-31 {search state_event, value 2}
611 sig-32 {search state_event, value 3}