summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--conf.d/cmake/config.cmake2
-rw-r--r--conf.d/project/asoundrc-fulup4a47
2 files changed, 47 insertions, 2 deletions
diff --git a/conf.d/cmake/config.cmake b/conf.d/cmake/config.cmake
index e168060..80be11a 100644
--- a/conf.d/cmake/config.cmake
+++ b/conf.d/cmake/config.cmake
@@ -100,7 +100,7 @@ if(IS_DIRECTORY $ENV{HOME}/opt/afb-monitoring)
set(MONITORING_ALIAS "--alias=/monitoring:$ENV{HOME}/opt/afb-monitoring")
endif()
-set(CLOSING_MESSAGE "Debug: afb-daemon --name=afb-audio4a --port=1234 --ws-server=unix:/var/tmp/ahl-4a --cntxtimeout=1 ${MONITORING_ALIAS} --binding=package/lib/afb-audiohighlevel.so --ldpaths=../../alsa-4a/build/package/lib:../../hal-sample-4a/build/package/lib --workdir=. --roothttp=../htdocs --token= --verbose ")
+set(CLOSING_MESSAGE "Debug: afb-daemon --name=afb-audio4a --port=1234 --ws-server=unix:/var/tmp/ahl-4a ${MONITORING_ALIAS} --binding=package/lib/afb-audiohighlevel.so --ldpaths=../../alsa-4a/build/package/lib:../../hal-sample-4a/build/package/lib --workdir=. --roothttp=../htdocs --token= --verbose ")
# Optional location for config.xml.in
diff --git a/conf.d/project/asoundrc-fulup4a b/conf.d/project/asoundrc-fulup4a
index 599c25f..0942c0b 100644
--- a/conf.d/project/asoundrc-fulup4a
+++ b/conf.d/project/asoundrc-fulup4a
@@ -105,12 +105,13 @@ pcm.Multimedia {
# api subcall to request a role
request {
- stream_open "{'audio_role': 'entertainment', 'endpoint_type':'sink'}"
+ stream_open "{'audio_role': 'Entertainment', 'endpoint_type':'sink'}"
set_stream_state "{'state':'running'}"
}
# api subcall to request a role
release {
+ set_stream_state "{'state':'idle'}"
stream_close "{}"
}
@@ -124,3 +125,47 @@ pcm.Multimedia {
}
}
+# ----------------------------------------------------
+# Define one hooked PCM channel per Audio Roles
+# ----------------------------------------------------
+pcm.Navigation {
+ type hooks
+ slave {pcm "Guidance_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:/var/tmp/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': 'Guidance', 'endpoint_type':'sink'}"
+ set_stream_state "{'state':'running'}"
+ }
+
+ # api subcall to request a role
+ release {
+ set_stream_state "{'state':'idle'}"
+ 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}
+ }
+ }
+ }
+}