aboutsummaryrefslogtreecommitdiffstats
path: root/Alsa/core-binding
diff options
context:
space:
mode:
authorFulup Ar Foll <fulup@iot.bzh>2017-03-08 00:24:41 +0100
committerFulup Ar Foll <fulup@iot.bzh>2017-03-08 00:24:41 +0100
commit0964e7da8576b8761e8d3d16b50cc842406c7e67 (patch)
treeb8e3ba7cb0b46cee9a12e4d77f74f34b897d8b1e /Alsa/core-binding
parent49533399810630031541b25407cd88498a72f6c3 (diff)
Added High Level Logic Template
Diffstat (limited to 'Alsa/core-binding')
-rw-r--r--Alsa/core-binding/AlsaLibMapping.c4
-rw-r--r--Alsa/core-binding/README.md8
2 files changed, 5 insertions, 7 deletions
diff --git a/Alsa/core-binding/AlsaLibMapping.c b/Alsa/core-binding/AlsaLibMapping.c
index 8d85f11..797f9ba 100644
--- a/Alsa/core-binding/AlsaLibMapping.c
+++ b/Alsa/core-binding/AlsaLibMapping.c
@@ -697,7 +697,7 @@ PUBLIC void alsaSubCtl (struct afb_req request) {
// create binder event attached to devid name
evtHandle->afbevt = afb_daemon_make_event (binderIface->daemon, devid);
- if (!evtHandle->afbevt.closure) {
+ if (!afb_event_is_valid (evtHandle->afbevt)) {
afb_req_fail_f (request, "register-event", "Cannot register new binder event name=%s", devid);
snd_ctl_close(ctlHandle);
goto ExitOnError;
@@ -710,7 +710,7 @@ PUBLIC void alsaSubCtl (struct afb_req request) {
// subscribe to binder event
err = afb_req_subscribe(request, evtHandle->afbevt);
if (err != 0) {
- afb_req_fail_f (request, "register-eventname", "Cannot subscribe binder event name=%s need WS", devid, err);
+ afb_req_fail_f (request, "register-eventname", "Cannot subscribe binder event name=%s [invalid channel]", devid, err);
goto ExitOnError;
}
diff --git a/Alsa/core-binding/README.md b/Alsa/core-binding/README.md
index 7f8c87a..4cce341 100644
--- a/Alsa/core-binding/README.md
+++ b/Alsa/core-binding/README.md
@@ -2,9 +2,9 @@
AlsaCore Low level binding maps AlsaLib APIs
------------------------------------------------------------------------
-Testing: (from Build dir with Binder install in $HOME/opt=
- * start binder: ~/opt/bin/afb-daemon --ldpaths=./Alsa/src/low-level-binding
- * connect browser on http://localhost:1234/api/alsacore/????
+Testing: (from project directory bindings)
+ * start binder: ~/opt/bin/afb-daemon --ldpaths=./Alsa/src/low-level-binding:./BusinessLogic/audiologic-afb.so --roothttp=htdocs
+ * connect browser on http://localhost:1234
# List Avaliable Sound cards
http://localhost:1234/api/alsacore/getinfo
@@ -18,5 +18,3 @@ Testing: (from Build dir with Binder install in $HOME/opt=
# Get detail on a given control (optional quiet=0=verbose,1,2)
http://localhost:1234/api/alsacore/getctl?devid=hw:0&numid=1&quiet=0
- # Subscribe to event from a given sound card (warning fail if not WS)
- http://localhost:1234/api/alsacore/subctl?devid=hw:0 \ No newline at end of file