diff options
author | fulup <fulup.arfoll@iot.bzh> | 2017-07-23 01:23:37 +0200 |
---|---|---|
committer | fulup <fulup.arfoll@iot.bzh> | 2017-07-23 01:23:37 +0200 |
commit | a7a6ae4be87ee9178905ab784d84a4c0a8303f9b (patch) | |
tree | e5aa96fba9c7ed59f60dd1641fc30c2eeb512e50 /ALSA-afb/Alsa-RegEvt.c | |
parent | 044828c43097362973c82088a7afee760eab06ec (diff) |
Added TLV->DBscale into HAL control
1st Working version of HAL ctl-get with TLV
Cleanup HTML5 test pages
WIP Only
Diffstat (limited to 'ALSA-afb/Alsa-RegEvt.c')
-rw-r--r-- | ALSA-afb/Alsa-RegEvt.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ALSA-afb/Alsa-RegEvt.c b/ALSA-afb/Alsa-RegEvt.c index 6344e2d..7b0a722 100644 --- a/ALSA-afb/Alsa-RegEvt.c +++ b/ALSA-afb/Alsa-RegEvt.c @@ -25,7 +25,7 @@ typedef struct { struct pollfd pfds; sd_event_source *src; snd_ctl_t *ctlDev; - int quiet; + int mode; struct afb_event afbevt; } evtHandleT; @@ -81,7 +81,7 @@ STATIC int sndCtlEventCB (sd_event_source* src, int fd, uint32_t revents, void* snd_ctl_event_elem_get_id (eventId, elemId); - err = alsaGetSingleCtl (evtHandle->ctlDev, elemId, &ctlRequest, evtHandle->quiet); + err = alsaGetSingleCtl (evtHandle->ctlDev, elemId, &ctlRequest, evtHandle->mode); if (err) goto OnErrorExit; iface = snd_ctl_event_elem_get_interface(eventId); @@ -93,7 +93,7 @@ STATIC int sndCtlEventCB (sd_event_source* src, int fd, uint32_t revents, void* ctlEventJ = json_object_new_object(); json_object_object_add(ctlEventJ, "device" ,json_object_new_int (device)); json_object_object_add(ctlEventJ, "subdev" ,json_object_new_int (subdev)); - if (evtHandle->quiet < 2) { + if (evtHandle->mode < 2) { json_object_object_add(ctlEventJ, "iface" ,json_object_new_int (iface)); json_object_object_add(ctlEventJ, "devname",json_object_new_string (devname)); } @@ -158,7 +158,7 @@ PUBLIC void alsaEvtSubcribe (afb_req request) { evtHandle = malloc (sizeof(evtHandleT)); evtHandle->ctlDev = ctlDev; - evtHandle->quiet = queryValues.quiet; + evtHandle->mode = queryValues.mode; sndHandles[idxFree].ucount = 0; sndHandles[idxFree].cardId = cardId; sndHandles[idxFree].evtHandle = evtHandle; |