summaryrefslogtreecommitdiffstats
path: root/meta-audio-4a-framework/recipes-multimedia/4a-hal-config/files/asound.conf.template
diff options
context:
space:
mode:
Diffstat (limited to 'meta-audio-4a-framework/recipes-multimedia/4a-hal-config/files/asound.conf.template')
-rw-r--r--meta-audio-4a-framework/recipes-multimedia/4a-hal-config/files/asound.conf.template496
1 files changed, 470 insertions, 26 deletions
diff --git a/meta-audio-4a-framework/recipes-multimedia/4a-hal-config/files/asound.conf.template b/meta-audio-4a-framework/recipes-multimedia/4a-hal-config/files/asound.conf.template
index fba7953f..aa97a39c 100644
--- a/meta-audio-4a-framework/recipes-multimedia/4a-hal-config/files/asound.conf.template
+++ b/meta-audio-4a-framework/recipes-multimedia/4a-hal-config/files/asound.conf.template
@@ -2,6 +2,9 @@
#This define 2 sounds card with 8 audio roles each
#The alsa soft volume control name must match with the HAL Control Name
+# ----------------------------------------------------
+#
+# ----------------------------------------------------
pcm.@AUDIO_DEV_NAME@ {
type dmix
slave {pcm "hw:@AUDIO_DEV_NAME_ID@"}
@@ -16,76 +19,111 @@ pcm_hook_type.CtlHookPlugin {
lib "@INSTALL_PREFIX@/lib/policy_alsa_hook.so"
}
-pcm.Entertainment_Main {
+# ----------------------------------------------------
+#
+# ----------------------------------------------------
+pcm.Emergency_Main {
type softvol
slave.pcm "@AUDIO_DEV_NAME@"
control{
- name "Entertainment_Volume"
+ name "Emergency_Volume"
}
}
-pcm.Guidance_Main {
+pcm.Warning_Main {
type softvol
slave.pcm "@AUDIO_DEV_NAME@"
control{
- name "Guidance_Volume"
+ name "Warning_Volume"
}
}
-pcm.Communications_Main {
+pcm.CustomHigh_Main {
type softvol
slave.pcm "@AUDIO_DEV_NAME@"
control{
- name "Communications_Volume"
+ name "CustomHigh_Volume"
}
}
-pcm.Notification_Main {
+pcm.Phone_Main {
type softvol
slave.pcm "@AUDIO_DEV_NAME@"
control{
- name "Notification_Volume"
+ name "Phone_Volume"
}
}
-pcm.Warning_Main {
+pcm.Navigation_Main {
type softvol
slave.pcm "@AUDIO_DEV_NAME@"
control{
- name "Warning_Volume"
+ name "Navigation_Volume"
+ }
+}
+
+pcm.CustomMedium_Main {
+ type softvol
+ slave.pcm "@AUDIO_DEV_NAME@"
+ control{
+ name "CustomMedium_Volume"
}
}
-pcm.System_Main {
+pcm.Video_Main {
type softvol
slave.pcm "@AUDIO_DEV_NAME@"
control{
- name "System_Volume"
+ name "Video_Volume"
}
}
-pcm.Startup_Main {
+pcm.Streaming_Main {
type softvol
slave.pcm "@AUDIO_DEV_NAME@"
control{
- name "Startup_Volume"
+ name "Streaming_Volume"
}
}
-pcm.Shutdown_Main {
+pcm.Multimedia_Main {
type softvol
slave.pcm "@AUDIO_DEV_NAME@"
control{
- name "Shutdown_Volume"
+ name "Multimedia_Volume"
+ }
+}
+
+pcm.Radio_Main {
+ type softvol
+ slave.pcm "@AUDIO_DEV_NAME@"
+ control{
+ name "Radio_Volume"
+ }
+}
+
+pcm.CustomLow_Main {
+ type softvol
+ slave.pcm "@AUDIO_DEV_NAME@"
+ control{
+ name "CustomLow_Volume"
+ }
+}
+
+pcm.Fallback_Main {
+ type softvol
+ slave.pcm "@AUDIO_DEV_NAME@"
+ control{
+ name "Fallback_Volume"
}
}
# ----------------------------------------------------
# Define one hooked PCM channel per Audio Roles
# ----------------------------------------------------
-pcm.Multimedia {
+pcm.Emergency {
type hooks
- slave {pcm "Entertainment_Main"}
+ slave {pcm "Emergency_Main"}
hooks.0 {
comment "Defined used hook sharelib and provide arguments/config to install func"
type "CtlHookPlugin"
@@ -105,13 +143,135 @@ pcm.Multimedia {
# api subcall to request a role
request {
- stream_open "{'audio_role': 'Entertainment', 'endpoint_type':'sink'}"
+ stream_open "{'audio_role': 'Emergency', 'endpoint_type':'sink'}"
+ set_stream_state "{'state':'running'}"
+ }
+
+ # api subcall to request a role
+ release {
+ stream_close "{}"
+ }
+
+ # map AGL event on Unix signal. Search in event for json key=value
+ events {
+ sig-02 {search state_event, value 1}
+ sig-31 {search state_event, value 2}
+ sig-32 {search state_event, value 3}
+ }
+ }
+ }
+}
+
+pcm.Warning {
+ type hooks
+ slave {pcm "Warning_Main"}
+ hooks.0 {
+ comment "Defined used hook sharelib and provide arguments/config to install func"
+ type "CtlHookPlugin"
+ hook_args {
+
+ # print few log messages (default false)
+ verbose true
+
+ # uri to audio-4a policy engine
+ uri="unix:/run/user/0/apis/ws/ahl-4a"
+
+ # timeout in ms (default 500)
+ timeout 5000
+
+ # force API synchronous mode
+ synchronous true
+
+ # api subcall to request a role
+ request {
+ stream_open "{'audio_role': 'Warning', 'endpoint_type':'sink'}"
+ set_stream_state "{'state':'running'}"
+ }
+
+ # api subcall to request a role
+ release {
+ stream_close "{}"
+ }
+
+ # map AGL event on Unix signal. Search in event for json key=value
+ events {
+ sig-02 {search state_event, value 1}
+ sig-31 {search state_event, value 2}
+ sig-32 {search state_event, value 3}
+ }
+ }
+ }
+}
+
+pcm.CustomHigh {
+ type hooks
+ slave {pcm "CustomHigh_Main"}
+ hooks.0 {
+ comment "Defined used hook sharelib and provide arguments/config to install func"
+ type "CtlHookPlugin"
+ hook_args {
+
+ # print few log messages (default false)
+ verbose true
+
+ # uri to audio-4a policy engine
+ uri="unix:/run/user/0/apis/ws/ahl-4a"
+
+ # timeout in ms (default 500)
+ timeout 5000
+
+ # force API synchronous mode
+ synchronous true
+
+ # api subcall to request a role
+ request {
+ stream_open "{'audio_role': 'CustomHigh', 'endpoint_type':'sink'}"
+ set_stream_state "{'state':'running'}"
+ }
+
+ # api subcall to request a role
+ release {
+ stream_close "{}"
+ }
+
+ # map AGL event on Unix signal. Search in event for json key=value
+ events {
+ sig-02 {search state_event, value 1}
+ sig-31 {search state_event, value 2}
+ sig-32 {search state_event, value 3}
+ }
+ }
+ }
+}
+
+pcm.Phone {
+ type hooks
+ slave {pcm "Phone_Main"}
+ hooks.0 {
+ comment "Defined used hook sharelib and provide arguments/config to install func"
+ type "CtlHookPlugin"
+ hook_args {
+
+ # print few log messages (default false)
+ verbose true
+
+ # uri to audio-4a policy engine
+ uri="unix:/run/user/0/apis/ws/ahl-4a"
+
+ # timeout in ms (default 500)
+ timeout 5000
+
+ # force API synchronous mode
+ synchronous true
+
+ # api subcall to request a role
+ request {
+ stream_open "{'audio_role': 'Phone', 'endpoint_type':'sink'}"
set_stream_state "{'state':'running'}"
}
# api subcall to request a role
release {
- set_stream_state "{'state':'idle'}"
stream_close "{}"
}
@@ -125,12 +285,297 @@ pcm.Multimedia {
}
}
-# ----------------------------------------------------
-# Define one hooked PCM channel per Audio Roles
-# ----------------------------------------------------
pcm.Navigation {
type hooks
- slave {pcm "Guidance_Main"}
+ slave {pcm "Navigation_Main"}
+ hooks.0 {
+ comment "Defined used hook sharelib and provide arguments/config to install func"
+ type "CtlHookPlugin"
+ hook_args {
+
+ # print few log messages (default false)
+ verbose true
+
+ # uri to audio-4a policy engine
+ uri="unix:/run/user/0/apis/ws/ahl-4a"
+
+ # timeout in ms (default 500)
+ timeout 5000
+
+ # force API synchronous mode
+ synchronous true
+
+ # api subcall to request a role
+ request {
+ stream_open "{'audio_role': 'Navigation', 'endpoint_type':'sink'}"
+ set_stream_state "{'state':'running'}"
+ }
+
+ # api subcall to request a role
+ release {
+ stream_close "{}"
+ }
+
+ # map AGL event on Unix signal. Search in event for json key=value
+ events {
+ sig-02 {search state_event, value 1}
+ sig-31 {search state_event, value 2}
+ sig-32 {search state_event, value 3}
+ }
+ }
+ }
+}
+
+pcm.CustomMedium {
+ type hooks
+ slave {pcm "CustomMedium_Main"}
+ hooks.0 {
+ comment "Defined used hook sharelib and provide arguments/config to install func"
+ type "CtlHookPlugin"
+ hook_args {
+
+ # print few log messages (default false)
+ verbose true
+
+ # uri to audio-4a policy engine
+ uri="unix:/run/user/0/apis/ws/ahl-4a"
+
+ # timeout in ms (default 500)
+ timeout 5000
+
+ # force API synchronous mode
+ synchronous true
+
+ # api subcall to request a role
+ request {
+ stream_open "{'audio_role': 'CustomMedium', 'endpoint_type':'sink'}"
+ set_stream_state "{'state':'running'}"
+ }
+
+ # api subcall to request a role
+ release {
+ stream_close "{}"
+ }
+
+ # map AGL event on Unix signal. Search in event for json key=value
+ events {
+ sig-02 {search state_event, value 1}
+ sig-31 {search state_event, value 2}
+ sig-32 {search state_event, value 3}
+ }
+ }
+ }
+}
+
+pcm.Video {
+ type hooks
+ slave {pcm "Video_Main"}
+ hooks.0 {
+ comment "Defined used hook sharelib and provide arguments/config to install func"
+ type "CtlHookPlugin"
+ hook_args {
+
+ # print few log messages (default false)
+ verbose true
+
+ # uri to audio-4a policy engine
+ uri="unix:/run/user/0/apis/ws/ahl-4a"
+
+ # timeout in ms (default 500)
+ timeout 5000
+
+ # force API synchronous mode
+ synchronous true
+
+ # api subcall to request a role
+ request {
+ stream_open "{'audio_role': 'Video', 'endpoint_type':'sink'}"
+ set_stream_state "{'state':'running'}"
+ }
+
+ # api subcall to request a role
+ release {
+ stream_close "{}"
+ }
+
+ # map AGL event on Unix signal. Search in event for json key=value
+ events {
+ sig-02 {search state_event, value 1}
+ sig-31 {search state_event, value 2}
+ sig-32 {search state_event, value 3}
+ }
+ }
+ }
+}
+
+pcm.Streaming {
+ type hooks
+ slave {pcm "Streaming_Main"}
+ hooks.0 {
+ comment "Defined used hook sharelib and provide arguments/config to install func"
+ type "CtlHookPlugin"
+ hook_args {
+
+ # print few log messages (default false)
+ verbose true
+
+ # uri to audio-4a policy engine
+ uri="unix:/run/user/0/apis/ws/ahl-4a"
+
+ # timeout in ms (default 500)
+ timeout 5000
+
+
+ # force API synchronous mode
+ synchronous true
+
+ # api subcall to request a role
+ request {
+ stream_open "{'audio_role': 'Streaming', 'endpoint_type':'sink'}"
+ set_stream_state "{'state':'running'}"
+ }
+
+ # api subcall to request a role
+ release {
+ stream_close "{}"
+ }
+
+ # map AGL event on Unix signal. Search in event for json key=value
+ events {
+ sig-02 {search state_event, value 1}
+ sig-31 {search state_event, value 2}
+ sig-32 {search state_event, value 3}
+ }
+ }
+ }
+}
+
+pcm.Multimedia {
+ type hooks
+ slave {pcm "Multimedia_Main"}
+ hooks.0 {
+ comment "Defined used hook sharelib and provide arguments/config to install func"
+ type "CtlHookPlugin"
+ hook_args {
+
+ # print few log messages (default false)
+ verbose true
+
+ # uri to audio-4a policy engine
+ uri="unix:/run/user/0/apis/ws/ahl-4a"
+
+ # timeout in ms (default 500)
+ timeout 5000
+
+ # force API synchronous mode
+ synchronous true
+
+ # api subcall to request a role
+ request {
+ stream_open "{'audio_role': 'Multimedia', 'endpoint_type':'sink'}"
+ set_stream_state "{'state':'running'}"
+ }
+
+ # api subcall to request a role
+ release {
+ stream_close "{}"
+ }
+
+ # map AGL event on Unix signal. Search in event for json key=value
+ events {
+ sig-02 {search state_event, value 1}
+ sig-31 {search state_event, value 2}
+ sig-32 {search state_event, value 3}
+ }
+ }
+ }
+}
+
+pcm.Radio {
+ type hooks
+ slave {pcm "Radio_Main"}
+ hooks.0 {
+ comment "Defined used hook sharelib and provide arguments/config to install func"
+ type "CtlHookPlugin"
+ hook_args {
+
+ # print few log messages (default false)
+ verbose true
+
+ # uri to audio-4a policy engine
+ uri="unix:/run/user/0/apis/ws/ahl-4a"
+
+ # timeout in ms (default 500)
+ timeout 5000
+
+ # force API synchronous mode
+ synchronous true
+
+ # api subcall to request a role
+ request {
+ stream_open "{'audio_role': 'Radio', 'endpoint_type':'sink'}"
+ set_stream_state "{'state':'running'}"
+ }
+
+ # api subcall to request a role
+ release {
+ stream_close "{}"
+ }
+
+ # map AGL event on Unix signal. Search in event for json key=value
+ events {
+ sig-02 {search state_event, value 1}
+ sig-31 {search state_event, value 2}
+ sig-32 {search state_event, value 3}
+ }
+ }
+ }
+}
+
+pcm.CustomLow {
+ type hooks
+ slave {pcm "CustomLow_Main"}
+ hooks.0 {
+ comment "Defined used hook sharelib and provide arguments/config to install func"
+ type "CtlHookPlugin"
+ hook_args {
+
+ # print few log messages (default false)
+ verbose true
+
+ # uri to audio-4a policy engine
+ uri="unix:/run/user/0/apis/ws/ahl-4a"
+
+ # timeout in ms (default 500)
+ timeout 5000
+
+ # force API synchronous mode
+ synchronous true
+
+ # api subcall to request a role
+ request {
+ stream_open "{'audio_role': 'CustomLow', 'endpoint_type':'sink'}"
+ set_stream_state "{'state':'running'}"
+ }
+
+ # api subcall to request a role
+ release {
+ stream_close "{}"
+ }
+
+ # map AGL event on Unix signal. Search in event for json key=value
+ events {
+ sig-02 {search state_event, value 1}
+ sig-31 {search state_event, value 2}
+ sig-32 {search state_event, value 3}
+ }
+ }
+ }
+}
+
+pcm.Fallback {
+ type hooks
+ slave {pcm "Fallback_Main"}
hooks.0 {
comment "Defined used hook sharelib and provide arguments/config to install func"
type "CtlHookPlugin"
@@ -150,13 +595,12 @@ pcm.Navigation {
# api subcall to request a role
request {
- stream_open "{'audio_role': 'Guidance', 'endpoint_type':'sink'}"
+ stream_open "{'audio_role': 'Fallback', 'endpoint_type':'sink'}"
set_stream_state "{'state':'running'}"
}
# api subcall to request a role
release {
- set_stream_state "{'state':'idle'}"
stream_close "{}"
}