summaryrefslogtreecommitdiffstats
path: root/alsa-binding/Alsa-RegEvt.c
diff options
context:
space:
mode:
authorJonathan Aillet <jonathan.aillet@iot.bzh>2018-07-19 17:22:00 +0200
committerJonathan Aillet <jonathan.aillet@iot.bzh>2018-07-20 11:39:37 +0000
commit7b20b115c4ec4b9c157d19d5154453f5c751a5d6 (patch)
tree3a56e02b4aaff0cc0bf205f27134d40a617dda59 /alsa-binding/Alsa-RegEvt.c
parent2209293bec9ce0cff772dedbec326704f5a2ca42 (diff)
Use some app-fwk macros to support v2 and v3
Use some application framework macros to support both v2 and v3 compilation. Change-Id: I3051bbeff8788ea2c71545e5d253619d4749ff41 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
Diffstat (limited to 'alsa-binding/Alsa-RegEvt.c')
-rw-r--r--alsa-binding/Alsa-RegEvt.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/alsa-binding/Alsa-RegEvt.c b/alsa-binding/Alsa-RegEvt.c
index a4f552f..974431e 100644
--- a/alsa-binding/Alsa-RegEvt.c
+++ b/alsa-binding/Alsa-RegEvt.c
@@ -31,7 +31,7 @@ typedef struct {
sd_event_source *src;
snd_ctl_t *ctlDev;
int mode;
- struct afb_event afbevt;
+ afb_event_t afbevt;
} evtHandleT;
typedef struct {
@@ -61,7 +61,7 @@ STATIC int getHalIdxFromCardid (int cardid) {
return -1;
}
-PUBLIC json_object *alsaCheckQuery(afb_req request, queryValuesT *queryValues) {
+PUBLIC json_object *alsaCheckQuery(afb_req_t request, queryValuesT *queryValues) {
json_object *tmpJ;
int done;
@@ -164,7 +164,7 @@ OnErrorExit:
// Subscribe to every Alsa CtlEvent send by a given board
-PUBLIC void alsaEvtSubcribe(afb_req request) {
+PUBLIC void alsaEvtSubcribe(afb_req_t request) {
static sndHandleT sndHandles[MAX_SND_CARD];
evtHandleT *evtHandle = NULL;
snd_ctl_t *ctlDev = NULL;
@@ -261,7 +261,7 @@ OnErrorExit:
// Subscribe to every Alsa CtlEvent send by a given board
-STATIC json_object *alsaProbeCardId(afb_req request) {
+STATIC json_object *alsaProbeCardId(afb_req_t request) {
char devid [32];
const char *ctlName, *shortname, *longname, *mixername, *drivername;
int done, mode, card, err, index, idx;
@@ -375,7 +375,7 @@ OnErrorExit:
// Make alsaProbeCardId compatible with AFB request
-PUBLIC void alsaGetCardId(afb_req request) {
+PUBLIC void alsaGetCardId(afb_req_t request) {
json_object *responseJ = alsaProbeCardId(request);
if (responseJ) afb_req_success(request, responseJ, NULL);
@@ -403,7 +403,7 @@ OnErrorExit:
// Return list of active resgistrated HAL with corresponding sndcard
-PUBLIC void alsaActiveHal(afb_req request) {
+PUBLIC void alsaActiveHal(afb_req_t request) {
json_object *responseJ = json_object_new_array();
for (int idx = 0; idx < MAX_SND_HAL; idx++) {
@@ -424,7 +424,7 @@ PUBLIC void alsaActiveHal(afb_req request) {
// Register loaded HAL with board Name and API prefix
-PUBLIC void alsaRegisterHal(afb_req request) {
+PUBLIC void alsaRegisterHal(afb_req_t request) {
static int index = 0;
json_object *responseJ;
const char *shortname, *apiPrefix;
@@ -485,7 +485,7 @@ OnErrorExit:
return;
}
-PUBLIC void alsaPcmInfo (struct afb_req request) {
+PUBLIC void alsaPcmInfo (afb_req_t request) {
int done, mode, err;
json_object *tmpJ, *responseJ = NULL;
snd_pcm_t *pcmHandle = NULL;