From a7d41a6fa1e29d800ce8ac9e95e8f943814463e8 Mon Sep 17 00:00:00 2001 From: Fulup Ar Foll Date: Fri, 18 Aug 2017 01:09:56 +0200 Subject: Integration with Alsa HookPlugin is now working. --- HAL-afb/HAL-interface/hal-interface.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'HAL-afb') diff --git a/HAL-afb/HAL-interface/hal-interface.c b/HAL-afb/HAL-interface/hal-interface.c index 4d86504..0abe67e 100644 --- a/HAL-afb/HAL-interface/hal-interface.c +++ b/HAL-afb/HAL-interface/hal-interface.c @@ -44,7 +44,7 @@ STATIC int halCtlStringToIndex(const char* label) { alsaHalMapT *halCtls = halSndCard->ctls; for (int idx = 0; halCtls[idx].tag != EndHalCrlTag; idx++) { - if (halCtls[idx].label && !strcmp(halCtls[idx].label, label)) return idx; + if (halCtls[idx].label && !strcasecmp(halCtls[idx].label, label)) return idx; } // not found @@ -502,11 +502,12 @@ PUBLIC int halServiceInit(const char *apiPrefix, alsaHalSndCardT *alsaHalSndCard json_object *ctlJ; // Try to find best equivalent label for tag - if (halCtls[idx].tag >StartHalCrlTag && halCtls[idx].tag < EndHalCrlTag && halCtls[idx].label != NULL) { + if (halCtls[idx].tag >StartHalCrlTag && halCtls[idx].tag < EndHalCrlTag && halCtlsLabels[halCtls[idx].tag] != NULL) { halCtls[idx].label = halCtlsLabels[halCtls[idx].tag]; } else { if (halCtls[idx].ctl.name) halCtls[idx].label=halCtls[idx].ctl.name; else if (halCtls[idx].info) halCtls[idx].label=halCtls[idx].info; + else halCtls[idx].label="NoHalCttNameSet"; } ctlJ = json_object_new_object(); @@ -617,9 +618,9 @@ PUBLIC void halServiceEvent(const char *evtname, json_object *eventJ) { PUBLIC afb_verb_v2 halServiceApi[] = { /* VERB'S NAME FUNCTION TO CALL SHORT DESCRIPTION */ { .verb = "ping", .callback = pingtest, .info = "ping test for API"}, - { .verb = "ctl-list", .callback = halListCtls, .info = "List AGL normalised Sound Controls"}, - { .verb = "ctl-get", .callback = halGetCtls, .info = "Get one/many sound controls"}, - { .verb = "ctl-set", .callback = halSetCtls, .info = "Set one/many sound controls"}, - { .verb = "evt-sub", .callback = halSubscribe, .info = "Subscribe to HAL events"}, + { .verb = "ctllist", .callback = halListCtls, .info = "List AGL normalised Sound Controls"}, + { .verb = "ctlget", .callback = halGetCtls, .info = "Get one/many sound controls"}, + { .verb = "ctlset", .callback = halSetCtls, .info = "Set one/many sound controls"}, + { .verb = "evtsub", .callback = halSubscribe, .info = "Subscribe to HAL events"}, { .verb = NULL} /* marker for end of the array */ }; -- cgit From c07477e28bcb5e4d1a2774a51aaa0877059e7f11 Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Fri, 18 Aug 2017 16:43:12 +0200 Subject: Remove BINDING_INSTALL_PREFIX/DIR variable Use CMAKE_INSTALL_PREFIX by default. Change-Id: I16f8018779b624842026ff401857e198c6436ddd Signed-off-by: Romain Forlot --- HAL-afb/HDA-intel/CMakeLists.txt | 2 +- HAL-afb/Jabra-Solemate/CMakeLists.txt | 2 +- HAL-afb/Scarlett-Focusrite/CMakeLists.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'HAL-afb') diff --git a/HAL-afb/HDA-intel/CMakeLists.txt b/HAL-afb/HDA-intel/CMakeLists.txt index 37e277b..aa67e0b 100644 --- a/HAL-afb/HDA-intel/CMakeLists.txt +++ b/HAL-afb/HDA-intel/CMakeLists.txt @@ -39,4 +39,4 @@ PROJECT_TARGET_ADD(hal-intel-hda) # installation directory INSTALL(TARGETS ${TARGET_NAME} - LIBRARY DESTINATION ${BINDINGS_INSTALL_DIR}) \ No newline at end of file + LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}) diff --git a/HAL-afb/Jabra-Solemate/CMakeLists.txt b/HAL-afb/Jabra-Solemate/CMakeLists.txt index 973e95d..bf61dad 100644 --- a/HAL-afb/Jabra-Solemate/CMakeLists.txt +++ b/HAL-afb/Jabra-Solemate/CMakeLists.txt @@ -39,4 +39,4 @@ PROJECT_TARGET_ADD(hal-jabra-usb) # installation directory INSTALL(TARGETS ${TARGET_NAME} - LIBRARY DESTINATION ${BINDINGS_INSTALL_DIR}) \ No newline at end of file + LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}) diff --git a/HAL-afb/Scarlett-Focusrite/CMakeLists.txt b/HAL-afb/Scarlett-Focusrite/CMakeLists.txt index 48d5964..1cc83e6 100644 --- a/HAL-afb/Scarlett-Focusrite/CMakeLists.txt +++ b/HAL-afb/Scarlett-Focusrite/CMakeLists.txt @@ -39,4 +39,4 @@ PROJECT_TARGET_ADD(hal-scalett-usb) # installation directory INSTALL(TARGETS ${TARGET_NAME} - LIBRARY DESTINATION ${BINDINGS_INSTALL_DIR}) \ No newline at end of file + LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}) -- cgit From d51d083be8e34000cd00ce979445eacb45a16e97 Mon Sep 17 00:00:00 2001 From: Fulup Ar Foll Date: Sun, 20 Aug 2017 17:16:28 +0200 Subject: Updated to latest App Template --- HAL-afb/HDA-intel/CMakeLists.txt | 3 --- HAL-afb/Jabra-Solemate/CMakeLists.txt | 4 ---- HAL-afb/Scarlett-Focusrite/CMakeLists.txt | 4 ---- 3 files changed, 11 deletions(-) (limited to 'HAL-afb') diff --git a/HAL-afb/HDA-intel/CMakeLists.txt b/HAL-afb/HDA-intel/CMakeLists.txt index aa67e0b..380e493 100644 --- a/HAL-afb/HDA-intel/CMakeLists.txt +++ b/HAL-afb/HDA-intel/CMakeLists.txt @@ -37,6 +37,3 @@ PROJECT_TARGET_ADD(hal-intel-hda) audio-common ) - # installation directory - INSTALL(TARGETS ${TARGET_NAME} - LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}) diff --git a/HAL-afb/Jabra-Solemate/CMakeLists.txt b/HAL-afb/Jabra-Solemate/CMakeLists.txt index bf61dad..41d6915 100644 --- a/HAL-afb/Jabra-Solemate/CMakeLists.txt +++ b/HAL-afb/Jabra-Solemate/CMakeLists.txt @@ -36,7 +36,3 @@ PROJECT_TARGET_ADD(hal-jabra-usb) hal-interface audio-common ) - - # installation directory - INSTALL(TARGETS ${TARGET_NAME} - LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}) diff --git a/HAL-afb/Scarlett-Focusrite/CMakeLists.txt b/HAL-afb/Scarlett-Focusrite/CMakeLists.txt index 1cc83e6..90ee92a 100644 --- a/HAL-afb/Scarlett-Focusrite/CMakeLists.txt +++ b/HAL-afb/Scarlett-Focusrite/CMakeLists.txt @@ -36,7 +36,3 @@ PROJECT_TARGET_ADD(hal-scalett-usb) hal-interface audio-common ) - - # installation directory - INSTALL(TARGETS ${TARGET_NAME} - LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}) -- cgit