summaryrefslogtreecommitdiffstats
path: root/conf.d
diff options
context:
space:
mode:
authorFulup Ar Foll <fulup@iot.bzh>2017-08-03 21:56:01 +0200
committerFulup Ar Foll <fulup@iot.bzh>2017-08-03 21:56:01 +0200
commit33c2cd0236823d108cbb21af34b8d7843d117ac1 (patch)
treed206f292a0ec54beb0af54dbedf66da85f0f0e39 /conf.d
parent070ccac33d65c651c972dfab9c6148e43d8d5d8e (diff)
Initial version of Policy Control
Diffstat (limited to 'conf.d')
-rw-r--r--conf.d/alsa/asoundrc.sample38
1 files changed, 28 insertions, 10 deletions
diff --git a/conf.d/alsa/asoundrc.sample b/conf.d/alsa/asoundrc.sample
index 2611478..1786c46 100644
--- a/conf.d/alsa/asoundrc.sample
+++ b/conf.d/alsa/asoundrc.sample
@@ -46,7 +46,7 @@ pcm.MyMixerPCM {
# -------------------------------------------
pcm_hook_type.MyHookPlugin {
install "AlsaInstallHook"
- lib "/home/fulup/Workspace/AGL-AppFW/audio-bindings-dev/build/Alsa-Plugin/Alsa-Hook-Callback/alsa_hook_cb.so"
+ lib "/home/fulup/Workspace/AGL-AppFW/audio-bindings-dev/build/Alsa-Plugin/Alsa-Policy-Hook/policy_hook_cb.so"
}
# Define a HookedPCM that point to Hook_type sharelib
@@ -59,19 +59,37 @@ pcm.MyNavigationHook {
hooks.0 {
type "MyHookPlugin"
hook_args {
+ verbose true # print few log messages (default false);
- # Every Call should return OK in order PCM to open
+ # Every Call should return OK in order PCM to open (default timeout 100ms)
uri "ws://localhost:1234/api?token='audio-agent-token'"
request {
- CallPing {
- api "alsacore"
- verb "ping"
+ # Request autorisation to write on navigation
+ RequestNavigation {
+ api "polctl"
+ verb "navigation"
+ }
+ # subscribe to Audio Agent Event
+ SubscriveEvents {
+ api "polctl"
+ verb "monitor"
+ }
+ TestAutoStop {
+ api "polctl"
+ verb "event_test"
+ query "{'label':'stop', 'delay':10000}"
+ }
+ TestAutoStart {
+ api "polctl"
+ verb "event_test"
+ query "{'label':'stop', 'delay':20000}"
+ }
+ # start a test pause/resume not supported by every hardware
+ TestPauseResume {
+ api "polctl"
+ verb "event_test"
+ query "{'label':'pause', 'delay':3000, 'count':10}"
}
- CallUCM {
- api "alsacore"
- verb "ping"
- query "{'devid':'hw:v1340','verb':'Navigation','dev':'speakers'}"
- }
}
}
}