aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFulup Ar Foll <fulup@iot.bzh>2017-11-04 15:03:58 +0100
committerFulup Ar Foll <fulup@iot.bzh>2017-11-04 15:03:58 +0100
commit665073e727623ac7228a86b003004956bf774adb (patch)
tree2557181f3d631a834fe7055893e1b42c47a7b618
parenteac54aceceb2b465340fb6beb4ef635cb46d8237 (diff)
Added PcmInfo API
Change HAL register to fallback to driver name when not direct match found
-rw-r--r--.gitmodules3
m---------afb-utilities0
-rw-r--r--alsa-binding/Alsa-ApiHat.c1
-rw-r--r--alsa-binding/Alsa-ApiHat.h12
-rw-r--r--alsa-binding/Alsa-RegEvt.c188
-rw-r--r--alsa-binding/CMakeLists.txt1
-rw-r--r--htdocs/index.html5
-rw-r--r--nbproject/configurations.xml219
-rw-r--r--nbproject/project.xml8
9 files changed, 304 insertions, 133 deletions
diff --git a/.gitmodules b/.gitmodules
index cb8ad34..b545da1 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,6 +1,3 @@
[submodule "conf.d/app-templates"]
path = conf.d/app-templates
url = https://gerrit.automotivelinux.org/gerrit/apps/app-templates
-[submodule "afb-utilities"]
- path = afb-utilities
- url = https://github.com/iotbzh/afb-utilities.git
diff --git a/afb-utilities b/afb-utilities
deleted file mode 160000
-Subproject 77c12fc3a44ce4fd1f4a83019547190d0f44549
diff --git a/alsa-binding/Alsa-ApiHat.c b/alsa-binding/Alsa-ApiHat.c
index 14ab903..a5220e2 100644
--- a/alsa-binding/Alsa-ApiHat.c
+++ b/alsa-binding/Alsa-ApiHat.c
@@ -48,6 +48,7 @@ static const struct afb_verb_v2 api_verbs[] = {
{ .verb = "cardidget", .callback = alsaGetCardId, .info="get sound card id"},
{ .verb = "halregister", .callback = alsaRegisterHal, .info="register a new HAL in alsacore"},
{ .verb = "hallist", .callback = alsaActiveHal, .info="Get list of currently active HAL"},
+ { .verb = "pcminfo", .callback = alsaPcmInfo, .info="Get Alsa Info About a given PCM"},
{ .verb = "ucmquery", .callback = alsaUseCaseQuery,.info="Use Case Manager Query"},
{ .verb = "ucmset", .callback = alsaUseCaseSet,.info="Use Case Manager set"},
{ .verb = "ucmget", .callback = alsaUseCaseGet,.info="Use Case Manager Get"},
diff --git a/alsa-binding/Alsa-ApiHat.h b/alsa-binding/Alsa-ApiHat.h
index c0e1a1a..97517f3 100644
--- a/alsa-binding/Alsa-ApiHat.h
+++ b/alsa-binding/Alsa-ApiHat.h
@@ -26,8 +26,6 @@
#define AFB_BINDING_VERSION 2
#include <afb/afb-binding.h>
#include <json-c/json.h>
-#include <filescan-utils.h>
-#include <wrap-json.h>
// Waiting for official macro from José
#define AFB_GET_VERBOSITY afb_get_verbosity_v2()
@@ -35,6 +33,15 @@
// Soft control have dynamically allocated numid
#define CTL_AUTO -1
+#ifndef PUBLIC
+ #define PUBLIC
+#endif
+#define STATIC static
+
+#ifndef CONTROL_MAXPATH_LEN
+ #define CONTROL_MAXPATH_LEN 255
+#endif
+
typedef enum {
QUERY_QUIET =0,
QUERY_COMPACT =1,
@@ -87,6 +94,7 @@ PUBLIC void alsaEvtSubcribe (struct afb_req request);
PUBLIC void alsaGetCardId (struct afb_req request);
PUBLIC void alsaRegisterHal (struct afb_req request);
PUBLIC void alsaActiveHal (struct afb_req request);
+PUBLIC void alsaPcmInfo (struct afb_req request);
#endif /* ALSALIBMAPPING_H */
diff --git a/alsa-binding/Alsa-RegEvt.c b/alsa-binding/Alsa-RegEvt.c
index ce81721..be46c17 100644
--- a/alsa-binding/Alsa-RegEvt.c
+++ b/alsa-binding/Alsa-RegEvt.c
@@ -37,8 +37,10 @@ typedef struct {
} sndHandleT;
typedef struct {
+ int cardid;
char *devid;
char *apiprefix;
+ char *drivername;
char *shortname;
char *longname;
} cardRegistryT;
@@ -247,20 +249,32 @@ OnErrorExit:
STATIC json_object *alsaProbeCardId(afb_req request) {
char devid [10];
- const char *ctlName, *shortname, *longname;
- int card, err, index, idx;
- json_object *responseJ;
+ const char *ctlName, *shortname, *longname, *mixername, *drivername;
+ int done, mode, card, err, index, idx;
+ json_object *responseJ, *tmpJ;
snd_ctl_t *ctlDev;
snd_ctl_card_info_t *cardinfo;
- const char *sndname = afb_req_value(request, "sndname");
- if (sndname == NULL) {
+ json_object* queryJ = afb_req_json(request);
+
+ done = json_object_object_get_ex(queryJ, "sndname", &tmpJ);
+ if (!done || json_object_get_type(tmpJ) != json_type_string) {
afb_req_fail_f(request, "argument-missing", "sndname=SndCardName missing");
goto OnErrorExit;
}
+ const char *sndname = json_object_get_string(tmpJ);
+
+ done = json_object_object_get_ex(queryJ, "mode", &tmpJ);
+ if (!done) {
+ mode = 0;
+ } else {
+ mode = json_object_get_int(tmpJ);
+ }
+
// loop on potential card number
snd_ctl_card_info_alloca(&cardinfo);
+ char *driverId = NULL; // when not name match use drivername as backup plan
for (card = 0; card < MAX_SND_CARD; card++) {
// build card devid and probe it
@@ -276,26 +290,60 @@ STATIC json_object *alsaProbeCardId(afb_req request) {
ctlName = snd_ctl_card_info_get_id(cardinfo);
shortname = snd_ctl_card_info_get_name(cardinfo);
longname = snd_ctl_card_info_get_longname(cardinfo);
+ mixername = snd_ctl_card_info_get_mixername(cardinfo);
+ drivername = snd_ctl_card_info_get_driver(cardinfo);
snd_ctl_close(ctlDev);
// check if short|long name match
- if (!strcmp(sndname, ctlName)) break;
- if (!strcmp(sndname, shortname)) break;
- if (!strcmp(sndname, longname)) break;
+ if (!strcasecmp(sndname, ctlName)) break;
+ if (!strcasecmp(sndname, shortname)) break;
+ if (!strcasecmp(sndname, drivername) && driverId==NULL) {
+ driverId=strdup(devid);
+ }
+ if (!strcasecmp(sndname, longname)) break;
}
if (card == MAX_SND_CARD) {
- afb_req_fail_f(request, "ctlDev-notfound", "Fail to find card with name=%s", sndname);
- goto OnErrorExit;
+ if (!driverId) {
+ afb_req_fail_f(request, "ctlDev-notfound", "Fail to find card with name=%s", sndname);
+ goto OnErrorExit;
+ }
+
+
+ err = snd_ctl_open(&ctlDev, driverId, SND_CTL_READONLY);
+ if (err < 0) {
+ afb_req_fail_f(request, "ctlDev-notfound", "Fail to find card with name=%s devid=%s", sndname, devid);
+ goto OnErrorExit;
+ }
+
+
+ // Sound not found by name, backup to driver name
+ snd_ctl_card_info(ctlDev, cardinfo);
+ index = snd_ctl_card_info_get_card(cardinfo);
+ ctlName = snd_ctl_card_info_get_id(cardinfo);
+ shortname = snd_ctl_card_info_get_name(cardinfo);
+ longname = snd_ctl_card_info_get_longname(cardinfo);
+ mixername = snd_ctl_card_info_get_mixername(cardinfo);
+ drivername = snd_ctl_card_info_get_driver(cardinfo);
+ AFB_WARNING("alsaProbeCardId Fallbak to HAL=%s ==> devid=%s name=%s long=%s\n ", drivername, driverId, shortname, longname);
+ free(driverId);
+ snd_ctl_close(ctlDev);
}
// proxy ctlevent as a binder event
responseJ = json_object_new_object();
json_object_object_add(responseJ, "index", json_object_new_int(index));
+ json_object_object_add(responseJ, "cardid", json_object_new_int(card));
json_object_object_add(responseJ, "devid", json_object_new_string(devid));
json_object_object_add(responseJ, "shortname", json_object_new_string(shortname));
- json_object_object_add(responseJ, "longname", json_object_new_string(longname));
+
+ if (mode > 0) {
+ json_object_object_add(responseJ, "longname", json_object_new_string(longname));
+ json_object_object_add(responseJ, "mixername", json_object_new_string(mixername));
+ json_object_object_add(responseJ, "drivername", json_object_new_string(drivername));
+
+ }
// search for a HAL binder card mapping name to api prefix
for (idx = 0; (idx < MAX_SND_CARD && cardRegistry[idx]); idx++) {
@@ -319,6 +367,29 @@ PUBLIC void alsaGetCardId(afb_req request) {
if (responseJ) afb_req_success(request, responseJ, NULL);
}
+
+// Return HAL information about a given sound card ID
+
+STATIC int getHalFromCardId(int cardid, json_object *responseJ) {
+
+ for (int idx = 0; idx < MAX_SND_CARD; idx++) {
+ if (!cardRegistry[idx]) goto OnErrorExit;
+
+ if (cardRegistry[idx]->cardid == cardid) {
+ json_object_object_add(responseJ, "api", json_object_new_string(cardRegistry[idx]->apiprefix));
+ if (cardRegistry[idx]->shortname)json_object_object_add(responseJ, "shortname", json_object_new_string(cardRegistry[idx]->shortname));
+ if (cardRegistry[idx]->longname) json_object_object_add(responseJ, "longname", json_object_new_string(cardRegistry[idx]->longname));
+ break;
+ }
+ }
+
+ return 0;
+
+OnErrorExit:
+ return -1;
+}
+
+
// Return list of active resgistrated HAL with corresponding sndcard
PUBLIC void alsaActiveHal(afb_req request) {
@@ -331,6 +402,7 @@ PUBLIC void alsaActiveHal(afb_req request) {
json_object_object_add(haldevJ, "api", json_object_new_string(cardRegistry[idx]->apiprefix));
if (cardRegistry[idx]->devid) json_object_object_add(haldevJ, "devid", json_object_new_string(cardRegistry[idx]->devid));
if (cardRegistry[idx]->shortname)json_object_object_add(haldevJ, "shortname", json_object_new_string(cardRegistry[idx]->shortname));
+ if (cardRegistry[idx]->drivername)json_object_object_add(haldevJ, "drivername", json_object_new_string(cardRegistry[idx]->drivername));
if (cardRegistry[idx]->longname) json_object_object_add(haldevJ, "longname", json_object_new_string(cardRegistry[idx]->longname));
json_object_array_add(responseJ, haldevJ);
}
@@ -372,11 +444,18 @@ PUBLIC void alsaRegisterHal(afb_req request) {
cardRegistry[index] = malloc(sizeof (cardRegistry));
cardRegistry[index]->apiprefix = strdup(apiPrefix);
cardRegistry[index]->shortname = strdup(shortname);
+
+ json_object_object_get_ex(responseJ, "cardid", &tmpJ);
+ cardRegistry[index]->cardid = json_object_get_int(tmpJ);
done = json_object_object_get_ex(responseJ, "devid", &tmpJ);
if (done) cardRegistry[index]->devid = strdup(json_object_get_string(tmpJ));
else cardRegistry[index]->devid = NULL;
+ done = json_object_object_get_ex(responseJ, "drivername", &tmpJ);
+ if (done) cardRegistry[index]->drivername = strdup(json_object_get_string(tmpJ));
+ else cardRegistry[index]->drivername = NULL;
+
done = json_object_object_get_ex(responseJ, "longname", &tmpJ);
if (done) cardRegistry[index]->longname = strdup(json_object_get_string(tmpJ));
else cardRegistry[index]->longname = NULL;
@@ -395,3 +474,90 @@ OnErrorExit:
return;
}
+PUBLIC void alsaPcmInfo (struct afb_req request) {
+ int done, mode, err;
+ json_object *tmpJ, *responseJ = NULL;
+ snd_pcm_t *pcmHandle = NULL;
+ snd_pcm_info_t * pcmInfo = NULL;
+
+ json_object* queryJ = afb_req_json(request);
+
+ done = json_object_object_get_ex(queryJ, "name", &tmpJ);
+ if (!done || json_object_get_type(tmpJ) != json_type_string) {
+ afb_req_fail_f(request, "name:invalid", "PCM 'name:xxx' missing or not a string query='%s'", json_object_get_string(queryJ));
+ goto OnErrorExit;
+ }
+ const char *pcmName = json_object_get_string(tmpJ);
+
+ done = json_object_object_get_ex(queryJ, "stream", &tmpJ);
+ if (done && json_object_get_type(tmpJ) != json_type_int) {
+ afb_req_fail_f(request, "stream:invalid", "PCM 'stream:SND_PCM_STREAM_PLAYBACK/SND_PCM_STREAM_CAPTURE' should be integer query='%s'", json_object_get_string(queryJ));
+ goto OnErrorExit;
+ }
+ snd_pcm_stream_t pcmStream = json_object_get_int(tmpJ);
+
+ done = json_object_object_get_ex(queryJ, "mode", &tmpJ);
+ if (!done) {
+ mode = 0;
+ } else {
+ mode = json_object_get_int(tmpJ);
+ }
+
+ // open PCM from its name
+ err= snd_pcm_open(&pcmHandle, pcmName, pcmStream, 0);
+ if (err < 0) {
+ afb_req_fail_f(request, "pcm:invalid", "PCM 'name:%s' does cannot open error=%s", pcmName, snd_strerror(err));
+ goto OnErrorExit;
+ }
+
+ // get pcm info
+ snd_pcm_info_alloca(&pcmInfo);
+ err = snd_pcm_info(pcmHandle,pcmInfo);
+ if (err < 0) {
+ afb_req_fail_f(request, "pcm:error", "PCM 'name:%s' fail to retrieve info error=%s", pcmName, snd_strerror(err));
+ goto OnErrorExit;
+ }
+
+ // get sub-device number
+ int cardId = snd_pcm_info_get_card(pcmInfo);
+ if (cardId < 0 ) {
+ afb_req_fail_f(request, "pcm:error", "PCM 'name:%s' fail to retrieve sndcard device error=%s", pcmName, snd_strerror(cardId));
+ goto OnErrorExit;
+ }
+
+ // prepare an object for response
+ responseJ = json_object_new_object();
+
+ err = getHalFromCardId (cardId, responseJ);
+ if (err < 0 ) {
+ afb_req_fail_f(request, "pcm:error", "PCM 'name:%s' snddev=hw:%d fail to retrieve hal API", pcmName, cardId);
+ goto OnErrorExit;
+ }
+
+ json_object_object_add(responseJ, "type", json_object_new_int(snd_pcm_type(pcmHandle)));
+
+ // in mode mode we return full info about PCM
+ if (mode > 0) {
+ json_object_object_add(responseJ, "stream", json_object_new_int(snd_pcm_info_get_stream (pcmInfo)));
+ json_object_object_add(responseJ, "cardid", json_object_new_int(snd_pcm_info_get_card(pcmInfo)));
+ json_object_object_add(responseJ, "devid" , json_object_new_int(snd_pcm_info_get_device (pcmInfo)));
+ json_object_object_add(responseJ, "subid" , json_object_new_int(snd_pcm_info_get_subdevice (pcmInfo)));
+ }
+
+ // in super mode we also return information about snd card
+ if (mode > 1) {
+
+ json_object_object_add(responseJ, "id" , json_object_new_string(snd_pcm_info_get_id (pcmInfo)));
+ json_object_object_add(responseJ, "name" , json_object_new_string(snd_pcm_info_get_name (pcmInfo)));
+ json_object_object_add(responseJ, "subdev" , json_object_new_string(snd_pcm_info_get_subdevice_name (pcmInfo)));
+ }
+
+ afb_req_success(request, responseJ, NULL);
+ snd_pcm_close (pcmHandle);
+ return;
+
+OnErrorExit:
+ if (responseJ) json_object_put (responseJ);
+ if (pcmHandle) snd_pcm_close (pcmHandle);
+ return;
+}
diff --git a/alsa-binding/CMakeLists.txt b/alsa-binding/CMakeLists.txt
index 9e3129c..5f683d6 100644
--- a/alsa-binding/CMakeLists.txt
+++ b/alsa-binding/CMakeLists.txt
@@ -32,7 +32,6 @@ PROJECT_TARGET_ADD(alsa-4a)
# Library dependencies (include updates automatically)
TARGET_LINK_LIBRARIES(${TARGET_NAME}
- afb-utilities
${link_libraries}
)
diff --git a/htdocs/index.html b/htdocs/index.html
index a61c28e..702d896 100644
--- a/htdocs/index.html
+++ b/htdocs/index.html
@@ -36,7 +36,10 @@
<li><button onclick="callbinder('alsacore','ctlget', {devid:sndcard, mode:mode, ctl:numid})">Get Alsa Ctls [numid]</button></li>
<li><button onclick="callbinder('alsacore','ctlget', {devid:sndcard, mode:mode, ctl:[numid,numid+1]})">Get Alsa Ctls [numid,numid+1]</button></li>
<br>
-
+
+ <br>
+ <li><button onclick="callbinder('alsacore','pcminfo', {name:'Entertainment_Main', mode: mode})">Get Entertainment_Main info (need HAL+asoundrc)</button></li>
+ <br>
<li><button onclick="callbinder('alsacore','ctlset', {devid:sndcard, mode:mode, ctl:[[9,20]]})">Set Alsa Ctl ctl:[[9,20]]</button></li>
<li><button onclick="callbinder('alsacore','ctlset', {devid:sndcard, mode:mode, ctl:[{id:9,val:50}]})">Set Alsa Ctl ctl:[{id:9,val:50}]}</button></li>
diff --git a/nbproject/configurations.xml b/nbproject/configurations.xml
index 85f3fef..4bd0c69 100644
--- a/nbproject/configurations.xml
+++ b/nbproject/configurations.xml
@@ -107,7 +107,7 @@
</sourceRootList>
<projectmakefile>Build/Makefile</projectmakefile>
<confs>
- <conf name="Local_Raw_Controller" type="0">
+ <conf name="Speaker-Test_Mumtimedia" type="0">
<toolsSet>
<compilerSet>GNU|GNU</compilerSet>
<dependencyChecking>false</dependencyChecking>
@@ -445,13 +445,22 @@
<item path="MostVolume/libmostvolume.cpp" ex="false" tool="1" flavor2="4">
</item>
<item path="afb-utilities/filescan-utils.c" ex="false" tool="0" flavor2="3">
- <cTool flags="2">
+ <cTool flags="0">
<incDir>
- <pElem>../../../opt/include/afb</pElem>
- <pElem>afb-utilities</pElem>
<pElem>/usr/include/json-c</pElem>
+ <pElem>../../../opt/include</pElem>
+ <pElem>/usr/include/p11-kit-1</pElem>
+ <pElem>../../../opt/include/alsa</pElem>
+ <pElem>afb-utilities</pElem>
<pElem>build/afb-utilities</pElem>
</incDir>
+ <preprocessorList>
+ <Elem>CONTROL_MAXPATH_LEN=255</Elem>
+ <Elem>MAX_LINEAR_DB_SCALE=24</Elem>
+ <Elem>MAX_SND_CARD=16</Elem>
+ <Elem>NATIVE_LINUX</Elem>
+ <Elem>TLV_BYTE_SIZE=256</Elem>
+ </preprocessorList>
</cTool>
</item>
<item path="afb-utilities/wrap-json.c" ex="false" tool="0" flavor2="3">
@@ -464,57 +473,61 @@
</cTool>
</item>
<item path="alsa-binding/Alsa-AddCtl.c" ex="false" tool="0" flavor2="3">
- <cTool flags="0">
+ <cTool flags="2">
+ <incDir>
+ <pElem>../../../opt/include/alsa</pElem>
+ <pElem>/usr/include/json-c</pElem>
+ <pElem>../../../opt/include</pElem>
+ <pElem>build/alsa-binding</pElem>
+ </incDir>
</cTool>
</item>
<item path="alsa-binding/Alsa-ApiHat.c" ex="false" tool="0" flavor2="3">
- <cTool flags="0">
+ <cTool flags="2">
+ <incDir>
+ <pElem>/usr/include/json-c</pElem>
+ <pElem>build/alsa-binding</pElem>
+ </incDir>
</cTool>
</item>
<item path="alsa-binding/Alsa-RegEvt.c" ex="false" tool="0" flavor2="3">
- <cTool flags="0">
+ <cTool flags="2">
+ <incDir>
+ <pElem>../../../opt/include/alsa</pElem>
+ <pElem>/usr/include/json-c</pElem>
+ <pElem>../../../opt/include</pElem>
+ <pElem>build/alsa-binding</pElem>
+ </incDir>
</cTool>
</item>
<item path="alsa-binding/Alsa-SetGet.c" ex="false" tool="0" flavor2="3">
- <cTool flags="0">
- </cTool>
- </item>
- <item path="alsa-binding/Alsa-Ucm.c" ex="false" tool="0" flavor2="3">
- <cTool flags="0">
- </cTool>
- </item>
- <item path="alsa-hook/PolicyAlsaHook.c" ex="false" tool="0" flavor2="3">
- <cTool flags="0">
+ <cTool flags="2">
<incDir>
+ <pElem>../../../opt/include/alsa</pElem>
<pElem>/usr/include/json-c</pElem>
<pElem>../../../opt/include</pElem>
- <pElem>/usr/include/p11-kit-1</pElem>
- <pElem>../../../opt/include/alsa</pElem>
- <pElem>build/alsa-hook</pElem>
+ <pElem>build/alsa-binding</pElem>
</incDir>
- <preprocessorList>
- <Elem>CONTROL_MAXPATH_LEN=255</Elem>
- <Elem>MAX_LINEAR_DB_SCALE=24</Elem>
- <Elem>MAX_SND_CARD=16</Elem>
- <Elem>NATIVE_LINUX</Elem>
- <Elem>PIC</Elem>
- <Elem>TLV_BYTE_SIZE=256</Elem>
- <Elem>policy_alsa_hook_EXPORTS</Elem>
- </preprocessorList>
</cTool>
</item>
- <item path="alsa-hook/PolicyHookTcp.c" ex="false" tool="0" flavor2="3">
+ <item path="alsa-binding/Alsa-Ucm.c" ex="false" tool="0" flavor2="3">
<cTool flags="2">
<incDir>
- <pElem>alsa-hook</pElem>
<pElem>../../../opt/include/alsa</pElem>
<pElem>/usr/include/json-c</pElem>
- <pElem>../../../opt/include/afb</pElem>
<pElem>../../../opt/include</pElem>
- <pElem>build/alsa-hook</pElem>
+ <pElem>build/alsa-binding</pElem>
</incDir>
</cTool>
</item>
+ <item path="alsa-hook/PolicyAlsaHook.c" ex="false" tool="0" flavor2="3">
+ <cTool flags="2">
+ </cTool>
+ </item>
+ <item path="alsa-hook/PolicyHookTcp.c" ex="false" tool="0" flavor2="3">
+ <cTool flags="2">
+ </cTool>
+ </item>
<folder path="0/Audio-Common">
<cTool>
<incDir>
@@ -745,25 +758,25 @@
<folder path="0/alsa-binding">
<cTool>
<incDir>
+ <pElem>../../../opt/include/afb</pElem>
+ <pElem>alsa-binding</pElem>
+ </incDir>
+ </cTool>
+ </folder>
+ <folder path="0/alsa-hook">
+ <cTool>
+ <incDir>
+ <pElem>alsa-hook</pElem>
+ <pElem>../../../opt/include/alsa</pElem>
<pElem>/usr/include/json-c</pElem>
+ <pElem>../../../opt/include/afb</pElem>
<pElem>../../../opt/include</pElem>
- <pElem>/usr/include/p11-kit-1</pElem>
- <pElem>../../../opt/include/alsa</pElem>
- <pElem>afb-utilities</pElem>
- <pElem>build/alsa-binding</pElem>
+ <pElem>build/alsa-hook</pElem>
</incDir>
- <preprocessorList>
- <Elem>CONTROL_MAXPATH_LEN=255</Elem>
- <Elem>MAX_LINEAR_DB_SCALE=24</Elem>
- <Elem>MAX_SND_CARD=16</Elem>
- <Elem>NATIVE_LINUX</Elem>
- <Elem>TLV_BYTE_SIZE=256</Elem>
- <Elem>alsa_4a_EXPORTS</Elem>
- </preprocessorList>
</cTool>
</folder>
</conf>
- <conf name="Local_Alias" type="0">
+ <conf name="Afb-Daemon_Basic" type="0">
<toolsSet>
<compilerSet>GNU|GNU</compilerSet>
<dependencyChecking>false</dependencyChecking>
@@ -783,7 +796,7 @@
<makefileType>
<makeTool>
<buildCommandWorkingDir>build</buildCommandWorkingDir>
- <buildCommand>${MAKE} -f Makefile install</buildCommand>
+ <buildCommand>${MAKE} -f Makefile populate</buildCommand>
<cleanCommand>${MAKE} -f Makefile clean</cleanCommand>
<executablePath>build/CMakeFiles/feature_tests.bin</executablePath>
<cTool flags="2">
@@ -792,6 +805,7 @@
<preBuild>
<preBuildCommandWorkingDir>build</preBuildCommandWorkingDir>
<preBuildCommand>cmake ..</preBuildCommand>
+ <preBuildFirst>true</preBuildFirst>
</preBuild>
</makefileType>
<item path="Audio-Common/audio-common.c" ex="false" tool="0" flavor2="3">
@@ -888,7 +902,6 @@
<cTool flags="2">
<incDir>
<pElem>Audio-Common</pElem>
- <pElem>../../../opt/include</pElem>
<pElem>build/HAL-afb/HAL-interface</pElem>
</incDir>
</cTool>
@@ -923,11 +936,8 @@
<incDir>
<pElem>../../../opt/include/afb</pElem>
<pElem>HAL-afb/HAL_MOST_UNICENS</pElem>
- <pElem>../../../opt/include/alsa</pElem>
- <pElem>/usr/include/json-c</pElem>
<pElem>Audio-Common</pElem>
<pElem>HAL-afb/HAL-interface</pElem>
- <pElem>../../../opt/include</pElem>
<pElem>build/HAL-afb/HAL_MOST_UNICENS</pElem>
</incDir>
</cTool>
@@ -937,10 +947,6 @@
tool="1"
flavor2="4">
<ccTool flags="1">
- <incDir>
- <pElem>HAL-afb/HAL_MOST_UNICENS/ucs2-vol/inc</pElem>
- <pElem>HAL-afb/HAL_MOST_UNICENS/ucs2-vol/src</pElem>
- </incDir>
</ccTool>
</item>
<item path="HAL-afb/HAL_MOST_UNICENS/ucs2-vol/src/device_value.cpp"
@@ -948,10 +954,6 @@
tool="1"
flavor2="4">
<ccTool flags="1">
- <incDir>
- <pElem>HAL-afb/HAL_MOST_UNICENS/ucs2-vol/src</pElem>
- <pElem>HAL-afb/HAL_MOST_UNICENS/ucs2-vol/inc</pElem>
- </incDir>
</ccTool>
</item>
<item path="HAL-afb/HAL_MOST_UNICENS/ucs2-vol/src/libmostvolume.cpp"
@@ -959,10 +961,6 @@
tool="1"
flavor2="4">
<ccTool flags="1">
- <incDir>
- <pElem>HAL-afb/HAL_MOST_UNICENS/ucs2-vol/src</pElem>
- <pElem>HAL-afb/HAL_MOST_UNICENS/ucs2-vol/inc</pElem>
- </incDir>
</ccTool>
</item>
<item path="HAL-afb/HAL_MOST_UNICENS/ucs2-vol/src/setup.cpp"
@@ -970,10 +968,6 @@
tool="1"
flavor2="4">
<ccTool flags="1">
- <incDir>
- <pElem>HAL-afb/HAL_MOST_UNICENS/ucs2-vol/inc</pElem>
- <pElem>HAL-afb/HAL_MOST_UNICENS/ucs2-vol/src</pElem>
- </incDir>
</ccTool>
</item>
<item path="HAL-afb/HAL_MOST_UNICENS/wrap-json.c"
@@ -983,7 +977,6 @@
<cTool flags="2">
<incDir>
<pElem>HAL-afb/HAL_MOST_UNICENS</pElem>
- <pElem>/usr/include/json-c</pElem>
<pElem>build/HAL-afb/HAL_MOST_UNICENS</pElem>
</incDir>
</cTool>
@@ -996,7 +989,6 @@
<incDir>
<pElem>../../../opt/include/afb</pElem>
<pElem>HAL-afb/HAL_MOST_UNICENS</pElem>
- <pElem>/usr/include/json-c</pElem>
<pElem>build/HAL-afb/HAL_MOST_UNICENS</pElem>
</incDir>
</cTool>
@@ -1115,16 +1107,16 @@
<incDir>
<pElem>../../../opt/include/alsa</pElem>
<pElem>/usr/include/json-c</pElem>
- <pElem>Audio-Common</pElem>
<pElem>../../../opt/include</pElem>
- <pElem>build/Alsa-afb</pElem>
+ <pElem>build/alsa-binding</pElem>
</incDir>
</cTool>
</item>
<item path="alsa-binding/Alsa-ApiHat.c" ex="false" tool="0" flavor2="3">
<cTool flags="2">
<incDir>
- <pElem>build/Alsa-afb</pElem>
+ <pElem>/usr/include/json-c</pElem>
+ <pElem>build/alsa-binding</pElem>
</incDir>
</cTool>
</item>
@@ -1133,9 +1125,8 @@
<incDir>
<pElem>../../../opt/include/alsa</pElem>
<pElem>/usr/include/json-c</pElem>
- <pElem>Audio-Common</pElem>
<pElem>../../../opt/include</pElem>
- <pElem>build/Alsa-afb</pElem>
+ <pElem>build/alsa-binding</pElem>
</incDir>
</cTool>
</item>
@@ -1144,9 +1135,8 @@
<incDir>
<pElem>../../../opt/include/alsa</pElem>
<pElem>/usr/include/json-c</pElem>
- <pElem>Audio-Common</pElem>
<pElem>../../../opt/include</pElem>
- <pElem>build/Alsa-afb</pElem>
+ <pElem>build/alsa-binding</pElem>
</incDir>
</cTool>
</item>
@@ -1155,12 +1145,15 @@
<incDir>
<pElem>../../../opt/include/alsa</pElem>
<pElem>/usr/include/json-c</pElem>
- <pElem>Audio-Common</pElem>
<pElem>../../../opt/include</pElem>
- <pElem>build/Alsa-afb</pElem>
+ <pElem>build/alsa-binding</pElem>
</incDir>
</cTool>
</item>
+ <item path="alsa-hook/PolicyAlsaHook.c" ex="false" tool="0" flavor2="3">
+ <cTool flags="2">
+ </cTool>
+ </item>
<folder path="0/Common">
<cTool>
<incDir>
@@ -1399,12 +1392,24 @@
<cTool>
<incDir>
<pElem>../../../opt/include/afb</pElem>
- <pElem>Alsa-afb</pElem>
+ <pElem>alsa-binding</pElem>
+ </incDir>
+ </cTool>
+ </folder>
+ <folder path="0/alsa-hook">
+ <cTool>
+ <incDir>
+ <pElem>alsa-hook</pElem>
+ <pElem>../../../opt/include/alsa</pElem>
+ <pElem>/usr/include/json-c</pElem>
+ <pElem>../../../opt/include/afb</pElem>
+ <pElem>../../../opt/include</pElem>
+ <pElem>build/alsa-hook</pElem>
</incDir>
</cTool>
</folder>
</conf>
- <conf name="Local-Ctl" type="0">
+ <conf name="Afb-Daemon__HAL_" type="0">
<toolsSet>
<compilerSet>GNU|GNU</compilerSet>
<dependencyChecking>false</dependencyChecking>
@@ -1433,6 +1438,7 @@
<preBuild>
<preBuildCommandWorkingDir>build</preBuildCommandWorkingDir>
<preBuildCommand>cmake ..</preBuildCommand>
+ <preBuildFirst>true</preBuildFirst>
</preBuild>
</makefileType>
<item path="Audio-Common/audio-common.c" ex="false" tool="0" flavor2="3">
@@ -1529,7 +1535,6 @@
<cTool flags="2">
<incDir>
<pElem>Audio-Common</pElem>
- <pElem>../../../opt/include</pElem>
<pElem>build/HAL-afb/HAL-interface</pElem>
</incDir>
</cTool>
@@ -1564,11 +1569,8 @@
<incDir>
<pElem>../../../opt/include/afb</pElem>
<pElem>HAL-afb/HAL_MOST_UNICENS</pElem>
- <pElem>../../../opt/include/alsa</pElem>
- <pElem>/usr/include/json-c</pElem>
<pElem>Audio-Common</pElem>
<pElem>HAL-afb/HAL-interface</pElem>
- <pElem>../../../opt/include</pElem>
<pElem>build/HAL-afb/HAL_MOST_UNICENS</pElem>
</incDir>
</cTool>
@@ -1578,10 +1580,6 @@
tool="1"
flavor2="4">
<ccTool flags="1">
- <incDir>
- <pElem>HAL-afb/HAL_MOST_UNICENS/ucs2-vol/inc</pElem>
- <pElem>HAL-afb/HAL_MOST_UNICENS/ucs2-vol/src</pElem>
- </incDir>
</ccTool>
</item>
<item path="HAL-afb/HAL_MOST_UNICENS/ucs2-vol/src/device_value.cpp"
@@ -1589,10 +1587,6 @@
tool="1"
flavor2="4">
<ccTool flags="1">
- <incDir>
- <pElem>HAL-afb/HAL_MOST_UNICENS/ucs2-vol/src</pElem>
- <pElem>HAL-afb/HAL_MOST_UNICENS/ucs2-vol/inc</pElem>
- </incDir>
</ccTool>
</item>
<item path="HAL-afb/HAL_MOST_UNICENS/ucs2-vol/src/libmostvolume.cpp"
@@ -1600,10 +1594,6 @@
tool="1"
flavor2="4">
<ccTool flags="1">
- <incDir>
- <pElem>HAL-afb/HAL_MOST_UNICENS/ucs2-vol/src</pElem>
- <pElem>HAL-afb/HAL_MOST_UNICENS/ucs2-vol/inc</pElem>
- </incDir>
</ccTool>
</item>
<item path="HAL-afb/HAL_MOST_UNICENS/ucs2-vol/src/setup.cpp"
@@ -1611,10 +1601,6 @@
tool="1"
flavor2="4">
<ccTool flags="1">
- <incDir>
- <pElem>HAL-afb/HAL_MOST_UNICENS/ucs2-vol/inc</pElem>
- <pElem>HAL-afb/HAL_MOST_UNICENS/ucs2-vol/src</pElem>
- </incDir>
</ccTool>
</item>
<item path="HAL-afb/HAL_MOST_UNICENS/wrap-json.c"
@@ -1624,7 +1610,6 @@
<cTool flags="2">
<incDir>
<pElem>HAL-afb/HAL_MOST_UNICENS</pElem>
- <pElem>/usr/include/json-c</pElem>
<pElem>build/HAL-afb/HAL_MOST_UNICENS</pElem>
</incDir>
</cTool>
@@ -1637,7 +1622,6 @@
<incDir>
<pElem>../../../opt/include/afb</pElem>
<pElem>HAL-afb/HAL_MOST_UNICENS</pElem>
- <pElem>/usr/include/json-c</pElem>
<pElem>build/HAL-afb/HAL_MOST_UNICENS</pElem>
</incDir>
</cTool>
@@ -1756,16 +1740,16 @@
<incDir>
<pElem>../../../opt/include/alsa</pElem>
<pElem>/usr/include/json-c</pElem>
- <pElem>Audio-Common</pElem>
<pElem>../../../opt/include</pElem>
- <pElem>build/Alsa-afb</pElem>
+ <pElem>build/alsa-binding</pElem>
</incDir>
</cTool>
</item>
<item path="alsa-binding/Alsa-ApiHat.c" ex="false" tool="0" flavor2="3">
<cTool flags="2">
<incDir>
- <pElem>build/Alsa-afb</pElem>
+ <pElem>/usr/include/json-c</pElem>
+ <pElem>build/alsa-binding</pElem>
</incDir>
</cTool>
</item>
@@ -1774,9 +1758,8 @@
<incDir>
<pElem>../../../opt/include/alsa</pElem>
<pElem>/usr/include/json-c</pElem>
- <pElem>Audio-Common</pElem>
<pElem>../../../opt/include</pElem>
- <pElem>build/Alsa-afb</pElem>
+ <pElem>build/alsa-binding</pElem>
</incDir>
</cTool>
</item>
@@ -1785,9 +1768,8 @@
<incDir>
<pElem>../../../opt/include/alsa</pElem>
<pElem>/usr/include/json-c</pElem>
- <pElem>Audio-Common</pElem>
<pElem>../../../opt/include</pElem>
- <pElem>build/Alsa-afb</pElem>
+ <pElem>build/alsa-binding</pElem>
</incDir>
</cTool>
</item>
@@ -1796,12 +1778,15 @@
<incDir>
<pElem>../../../opt/include/alsa</pElem>
<pElem>/usr/include/json-c</pElem>
- <pElem>Audio-Common</pElem>
<pElem>../../../opt/include</pElem>
- <pElem>build/Alsa-afb</pElem>
+ <pElem>build/alsa-binding</pElem>
</incDir>
</cTool>
</item>
+ <item path="alsa-hook/PolicyAlsaHook.c" ex="false" tool="0" flavor2="3">
+ <cTool flags="2">
+ </cTool>
+ </item>
<folder path="0/Common">
<cTool>
<incDir>
@@ -2040,7 +2025,19 @@
<cTool>
<incDir>
<pElem>../../../opt/include/afb</pElem>
- <pElem>Alsa-afb</pElem>
+ <pElem>alsa-binding</pElem>
+ </incDir>
+ </cTool>
+ </folder>
+ <folder path="0/alsa-hook">
+ <cTool>
+ <incDir>
+ <pElem>alsa-hook</pElem>
+ <pElem>../../../opt/include/alsa</pElem>
+ <pElem>/usr/include/json-c</pElem>
+ <pElem>../../../opt/include/afb</pElem>
+ <pElem>../../../opt/include</pElem>
+ <pElem>build/alsa-hook</pElem>
</incDir>
</cTool>
</folder>
diff --git a/nbproject/project.xml b/nbproject/project.xml
index fa21507..89a149f 100644
--- a/nbproject/project.xml
+++ b/nbproject/project.xml
@@ -6,7 +6,7 @@
<name>alsa-4a</name>
<c-extensions>c</c-extensions>
<cpp-extensions>cpp,cxx</cpp-extensions>
- <header-extensions>h,hpp</header-extensions>
+ <header-extensions>h</header-extensions>
<sourceEncoding>UTF-8</sourceEncoding>
<make-dep-projects/>
<sourceRootList>
@@ -14,15 +14,15 @@
</sourceRootList>
<confList>
<confElem>
- <name>Local_Raw_Controller</name>
+ <name>Speaker-Test_Mumtimedia</name>
<type>0</type>
</confElem>
<confElem>
- <name>Local_Alias</name>
+ <name>Afb-Daemon_Basic</name>
<type>0</type>
</confElem>
<confElem>
- <name>Local-Ctl</name>
+ <name>Afb-Daemon__HAL_</name>
<type>0</type>
</confElem>
</confList>