summaryrefslogtreecommitdiffstats
path: root/plugins/alsa/alsa-core-ctl.c
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2019-01-23 16:46:45 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2019-01-24 11:45:09 +0100
commitd5cc09d1ef5c58bb8d34e3a47c391a10d8b48181 (patch)
tree36b65c43fb60ae0ac22b09c832677be2f5fada1e /plugins/alsa/alsa-core-ctl.c
parent17ad00443eecdb2ed7b92da01c7be6f316e04b64 (diff)
Git submodule migration to separated libraries
- Replace controller binder functions definition with the binder ones. and remove the last used submodules to use the separated libraries. - Add liburcu as a project dependency in addition to the others ones. Bug-AGL: SPEC-2139 Change-Id: If46eed24018e28e58d1e62397f4355d2aa46a58e Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'plugins/alsa/alsa-core-ctl.c')
-rw-r--r--plugins/alsa/alsa-core-ctl.c110
1 files changed, 55 insertions, 55 deletions
diff --git a/plugins/alsa/alsa-core-ctl.c b/plugins/alsa/alsa-core-ctl.c
index e747090..8263238 100644
--- a/plugins/alsa/alsa-core-ctl.c
+++ b/plugins/alsa/alsa-core-ctl.c
@@ -47,14 +47,14 @@ PUBLIC snd_ctl_elem_id_t *AlsaCtlGetNumidElemId(SoftMixerT *mixer, AlsaSndCtlT *
snd_ctl_elem_list_alloca(&ctlList);
if ((error = snd_ctl_elem_list(sndcard->ctl, ctlList)) < 0) {
- AFB_ApiError(mixer->api,
+ AFB_API_ERROR(mixer->api,
"%s [%s] fail retrieve controls",
__func__, ALSA_CTL_UID(sndcard->ctl, string));
goto fail;
}
if ((error = snd_ctl_elem_list_alloc_space(ctlList, snd_ctl_elem_list_get_count(ctlList))) < 0) {
- AFB_ApiError(mixer->api,
+ AFB_API_ERROR(mixer->api,
"%s [%s] fail retrieve count",
__func__, ALSA_CTL_UID(sndcard->ctl, string));
goto fail;
@@ -62,7 +62,7 @@ PUBLIC snd_ctl_elem_id_t *AlsaCtlGetNumidElemId(SoftMixerT *mixer, AlsaSndCtlT *
// Fulup: do not understand why snd_ctl_elem_list should be call twice to get a valid ctlCount
if ((error = snd_ctl_elem_list(sndcard->ctl, ctlList)) < 0) {
- AFB_ApiError(mixer->api,
+ AFB_API_ERROR(mixer->api,
"%s [%s] fail retrieve controls",
__func__, ALSA_CTL_UID(sndcard->ctl, string));
goto fail_space;
@@ -80,7 +80,7 @@ PUBLIC snd_ctl_elem_id_t *AlsaCtlGetNumidElemId(SoftMixerT *mixer, AlsaSndCtlT *
}
if (index == ctlCount) {
- AFB_ApiNotice(mixer->api,
+ AFB_API_NOTICE(mixer->api,
"%s [%s] fail get numid=%i count",
__func__, ALSA_CTL_UID(sndcard->ctl, string), numid);
goto fail_space;
@@ -106,14 +106,14 @@ PUBLIC snd_ctl_elem_id_t *AlsaCtlGetNameElemId(SoftMixerT *mixer, AlsaSndCtlT *s
snd_ctl_elem_list_alloca(&ctlList);
if ((error = snd_ctl_elem_list(sndcard->ctl, ctlList)) < 0) {
- AFB_ApiError(mixer->api,
+ AFB_API_ERROR(mixer->api,
"%s cardid='%s' cardname='%s' fail retrieve controls",
__func__, sndcard->cid.cardid, sndcard->cid.name);
goto fail;
}
if ((error = snd_ctl_elem_list_alloc_space(ctlList, snd_ctl_elem_list_get_count(ctlList))) < 0) {
- AFB_ApiError(mixer->api,
+ AFB_API_ERROR(mixer->api,
"%s cardid='%s' cardname='%s' fail retrieve count",
__func__, sndcard->cid.cardid, sndcard->cid.name);
goto fail;
@@ -121,7 +121,7 @@ PUBLIC snd_ctl_elem_id_t *AlsaCtlGetNameElemId(SoftMixerT *mixer, AlsaSndCtlT *s
// Fulup: do not understand why snd_ctl_elem_list should be call twice to get a valid ctlCount
if ((error = snd_ctl_elem_list(sndcard->ctl, ctlList)) < 0) {
- AFB_ApiError(mixer->api,
+ AFB_API_ERROR(mixer->api,
"%s cardid='%s' cardname='%s' fail retrieve controls",
__func__, sndcard->cid.cardid, sndcard->cid.name);
goto fail_space;
@@ -139,7 +139,7 @@ PUBLIC snd_ctl_elem_id_t *AlsaCtlGetNameElemId(SoftMixerT *mixer, AlsaSndCtlT *s
}
if (index == ctlCount) {
- AFB_ApiNotice(mixer->api, "AlsaCtlGetNameElemId cardid='%s' cardname='%s' ctl not found name=%s", sndcard->cid.cardid, sndcard->cid.name, ctlName);
+ AFB_API_NOTICE(mixer->api, "AlsaCtlGetNameElemId cardid='%s' cardname='%s' ctl not found name=%s", sndcard->cid.cardid, sndcard->cid.name, ctlName);
goto fail_space;
}
@@ -163,7 +163,7 @@ STATIC void CtlElemIdDisplay(SoftMixerT *mixer, snd_ctl_elem_info_t *elemInfo, s
if (!elemData) {
- AFB_ApiWarning(mixer->api, "CtlElemIdDisplay: numid=%d name=%s value=unreadable", numid, name);
+ AFB_API_WARNING(mixer->api, "CtlElemIdDisplay: numid=%d name=%s value=unreadable", numid, name);
} else
for (int idx = 0; idx < count; idx++) {
long valueL;
@@ -171,27 +171,27 @@ STATIC void CtlElemIdDisplay(SoftMixerT *mixer, snd_ctl_elem_info_t *elemInfo, s
switch (elemType) {
case SND_CTL_ELEM_TYPE_BOOLEAN:
valueL = snd_ctl_elem_value_get_boolean(elemData, idx);
- AFB_ApiWarning(mixer->api, "CtlElemIdDisplay: numid=%d name=%s value=%ld", numid, name, valueL);
+ AFB_API_WARNING(mixer->api, "CtlElemIdDisplay: numid=%d name=%s value=%ld", numid, name, valueL);
break;
case SND_CTL_ELEM_TYPE_INTEGER:
valueL = snd_ctl_elem_value_get_integer(elemData, idx);
- AFB_ApiWarning(mixer->api, "CtlElemIdDisplay: numid=%d name=%s value=%ld", numid, name, valueL);
+ AFB_API_WARNING(mixer->api, "CtlElemIdDisplay: numid=%d name=%s value=%ld", numid, name, valueL);
break;
case SND_CTL_ELEM_TYPE_INTEGER64:
valueL = snd_ctl_elem_value_get_integer64(elemData, idx);
- AFB_ApiWarning(mixer->api, "CtlElemIdDisplay: numid=%d name=%s value=%ld", numid, name, valueL);
+ AFB_API_WARNING(mixer->api, "CtlElemIdDisplay: numid=%d name=%s value=%ld", numid, name, valueL);
break;
case SND_CTL_ELEM_TYPE_ENUMERATED:
valueL = snd_ctl_elem_value_get_enumerated(elemData, idx);
- AFB_ApiWarning(mixer->api, "CtlElemIdDisplay: numid=%d name=%s value=%ld", numid, name, valueL);
+ AFB_API_WARNING(mixer->api, "CtlElemIdDisplay: numid=%d name=%s value=%ld", numid, name, valueL);
break;
case SND_CTL_ELEM_TYPE_BYTES:
valueL = snd_ctl_elem_value_get_byte(elemData, idx);
- AFB_ApiWarning(mixer->api, "CtlElemIdDisplay: numid=%d name=%s value=%ld", numid, name, valueL);
+ AFB_API_WARNING(mixer->api, "CtlElemIdDisplay: numid=%d name=%s value=%ld", numid, name, valueL);
break;
case SND_CTL_ELEM_TYPE_IEC958:
default:
- AFB_ApiWarning(mixer->api, "CtlElemIdDisplay: numid=%d name=%s Unsupported type=%d", numid, name, elemType);
+ AFB_API_WARNING(mixer->api, "CtlElemIdDisplay: numid=%d name=%s Unsupported type=%d", numid, name, elemType);
break;
}
}
@@ -273,7 +273,7 @@ PUBLIC int CtlElemIdSetLong(SoftMixerT *mixer, AlsaSndCtlT *sndcard, snd_ctl_ele
OnErrorExit:
numid = snd_ctl_elem_info_get_numid(elemInfo);
name = snd_ctl_elem_info_get_name(elemInfo);
- AFB_ApiError(mixer->api, "%s: numid=%d name=%s not writable", __func__, numid, name);
+ AFB_API_ERROR(mixer->api, "%s: numid=%d name=%s not writable", __func__, numid, name);
return -1;
}
@@ -283,7 +283,7 @@ PUBLIC snd_ctl_card_info_t *AlsaCtlGetCardInfo(SoftMixerT *mixer, const char *ca
int error;
snd_ctl_t *ctl;
- AFB_ApiNotice(mixer->api, "Looking for card '%s'", cardid);
+ AFB_API_NOTICE(mixer->api, "Looking for card '%s'", cardid);
/* "bluealsa" is the name of the control external plugin
* (https://www.alsa-project.org/alsa-doc/alsa-lib/ctl_external_plugins.html)
@@ -297,7 +297,7 @@ PUBLIC snd_ctl_card_info_t *AlsaCtlGetCardInfo(SoftMixerT *mixer, const char *ca
}
}
- AFB_ApiNotice(mixer->api, "Opening card control '%s'", cardid);
+ AFB_API_NOTICE(mixer->api, "Opening card control '%s'", cardid);
if ((error = snd_ctl_open(&ctl, cardid, SND_CTL_READONLY)) < 0) {
cardid = "Not Defined";
@@ -311,7 +311,7 @@ PUBLIC snd_ctl_card_info_t *AlsaCtlGetCardInfo(SoftMixerT *mixer, const char *ca
}
if ((error = snd_ctl_card_info(ctl, cardInfo)) < 0) {
- AFB_ApiError(mixer->api, "%s fail to find sndcard by id= %s", __func__, cardid);
+ AFB_API_ERROR(mixer->api, "%s fail to find sndcard by id= %s", __func__, cardid);
goto fail_card_info;
}
@@ -323,7 +323,7 @@ fail_card_info:
fail_ctl:
snd_ctl_close(ctl);
fail:
- AFB_ApiError(mixer->api, "%s: fail to find sndcard by id= %s", __func__, cardid);
+ AFB_API_ERROR(mixer->api, "%s: fail to find sndcard by id= %s", __func__, cardid);
return NULL;
}
@@ -331,7 +331,7 @@ PUBLIC int AlsaCtlNumidSetLong(SoftMixerT *mixer, AlsaSndCtlT *sndcard, int numi
snd_ctl_elem_id_t *elemId = AlsaCtlGetNumidElemId(mixer, sndcard, numid);
if (!elemId) {
- AFB_ApiError(mixer->api,
+ AFB_API_ERROR(mixer->api,
"%s cardid=%s cardname=%s fail to find numid=%d",
__func__, sndcard->cid.cardid, sndcard->cid.longname, numid);
goto fail;
@@ -339,7 +339,7 @@ PUBLIC int AlsaCtlNumidSetLong(SoftMixerT *mixer, AlsaSndCtlT *sndcard, int numi
int error = CtlElemIdSetLong(mixer, sndcard, elemId, value);
if (error) {
- AFB_ApiError(mixer->api,
+ AFB_API_ERROR(mixer->api,
"%s cardid=%s cardname=%s fail to set numid=%d value=%ld",
__func__, sndcard->cid.cardid, sndcard->cid.longname, numid, value);
goto fail_elemId;
@@ -358,7 +358,7 @@ PUBLIC int AlsaCtlNumidGetLong(SoftMixerT *mixer, AlsaSndCtlT *sndcard, int numi
snd_ctl_elem_id_t *elemId = AlsaCtlGetNumidElemId(mixer, sndcard, numid);
if (!elemId) {
- AFB_ApiError(mixer->api,
+ AFB_API_ERROR(mixer->api,
"%s cardid=%s cardname=%s fail to find numid=%d",
__func__, sndcard->cid.cardid, sndcard->cid.longname, numid);
goto fail;
@@ -366,7 +366,7 @@ PUBLIC int AlsaCtlNumidGetLong(SoftMixerT *mixer, AlsaSndCtlT *sndcard, int numi
int error = CtlElemIdGetLong(mixer, sndcard, elemId, value);
if (error) {
- AFB_ApiError(mixer->api,
+ AFB_API_ERROR(mixer->api,
"%s cardid=%s cardname=%s fail to get numid=%d value",
__func__, sndcard->cid.cardid, sndcard->cid.longname, numid);
goto fail_elemId;
@@ -385,7 +385,7 @@ PUBLIC int AlsaCtlNameSetLong(SoftMixerT *mixer, AlsaSndCtlT *sndcard, const cha
snd_ctl_elem_id_t *elemId = AlsaCtlGetNameElemId(mixer, sndcard, ctlName);
if (!elemId) {
- AFB_ApiError(mixer->api,
+ AFB_API_ERROR(mixer->api,
"%s cardid=%s cardname=%s fail to find crlName=%s",
__func__, sndcard->cid.cardid, sndcard->cid.longname, ctlName);
goto fail;
@@ -393,7 +393,7 @@ PUBLIC int AlsaCtlNameSetLong(SoftMixerT *mixer, AlsaSndCtlT *sndcard, const cha
int error = CtlElemIdSetLong(mixer, sndcard, elemId, value);
if (error) {
- AFB_ApiError(mixer->api,
+ AFB_API_ERROR(mixer->api,
"%s cardid=%s cardname=%s fail to set crlName=%s value=%ld",
__func__, sndcard->cid.cardid, sndcard->cid.longname, ctlName, value);
goto fail_elemId;
@@ -412,7 +412,7 @@ PUBLIC int AlsaCtlNameGetLong(SoftMixerT *mixer, AlsaSndCtlT *sndcard, const cha
snd_ctl_elem_id_t *elemId = AlsaCtlGetNameElemId(mixer, sndcard, ctlName);
if (!elemId) {
- AFB_ApiError(mixer->api,
+ AFB_API_ERROR(mixer->api,
"%s cardid=%s cardname=%s fail to find crlName=%s",
__func__, sndcard->cid.cardid, sndcard->cid.longname, ctlName);
goto fail;
@@ -420,7 +420,7 @@ PUBLIC int AlsaCtlNameGetLong(SoftMixerT *mixer, AlsaSndCtlT *sndcard, const cha
int error = CtlElemIdGetLong(mixer, sndcard, elemId, value);
if (error) {
- AFB_ApiError(mixer->api,
+ AFB_API_ERROR(mixer->api,
"%s cardid=%s cardname=%s fail to get crlName=%s value",
__func__, sndcard->cid.cardid, sndcard->cid.longname, ctlName);
goto fail_elemId;
@@ -467,7 +467,7 @@ STATIC int AlsaCtlMakeControl(SoftMixerT *mixer, AlsaSndCtlT *sndcard, const cha
break;
default:
- AFB_ApiError(mixer->api,
+ AFB_API_ERROR(mixer->api,
"%s: mixer=%s cardid=%s cardname=%s fail to create %s(control)",
__func__, mixer->uid, sndcard->cid.cardid, sndcard->cid.longname, ctlName);
goto OnErrorExit;
@@ -492,7 +492,7 @@ PUBLIC int AlsaCtlCreateControl(SoftMixerT *mixer, AlsaSndCtlT *sndcard, char* c
// create or get numid control when already exist
numid = AlsaCtlMakeControl(mixer, sndcard, ctlName, ctlCount, ctlMin, ctlMax, ctlStep);
if (numid <= 0) {
- AFB_ApiError(mixer->api,
+ AFB_API_ERROR(mixer->api,
"%s cardid=%s cardname=%s fail to create ctlName=%s",
__func__, sndcard->cid.cardid, sndcard->cid.longname, ctlName);
goto fail;
@@ -503,13 +503,13 @@ PUBLIC int AlsaCtlCreateControl(SoftMixerT *mixer, AlsaSndCtlT *sndcard, char* c
int error = CtlElemIdSetLong(mixer, sndcard, elemId, value);
if (error) {
- AFB_ApiError(mixer->api,
+ AFB_API_ERROR(mixer->api,
"%s cardid=%s cardname=%s fail to set ctlName=%s Numid=%d",
__func__, sndcard->cid.cardid, sndcard->cid.longname, ctlName, numid);
goto fail;
}
- AFB_ApiNotice(mixer->api,
+ AFB_API_NOTICE(mixer->api,
"%s cardid=%s cardname=%s ctl create name=%s numid=%d value=%ld",
__func__, sndcard->cid.cardid, sndcard->cid.longname, ctlName, numid, value);
@@ -528,15 +528,15 @@ STATIC int CtlSubscribeEventCB(sd_event_source* src, int fd, uint32_t revents, v
snd_ctl_elem_id_t *elemId;
long value;
- AFB_ApiDebug(mixer->api, "%s event on card %s", __func__, sndcard->cid.cardid);
+ AFB_API_DEBUG(mixer->api, "%s event on card %s", __func__, sndcard->cid.cardid);
if ((revents & EPOLLHUP) != 0) {
- AFB_ApiNotice(mixer->api, "%s hanghup [card:%s disconnected]", __func__, sHandle->uid);
+ AFB_API_NOTICE(mixer->api, "%s hanghup [card:%s disconnected]", __func__, sHandle->uid);
goto OnSuccessExit;
}
if ((revents & EPOLLIN) == 0) {
- AFB_ApiNotice(mixer->api, "%s: no events", __func__);
+ AFB_API_NOTICE(mixer->api, "%s: no events", __func__);
goto OnSuccessExit;
}
@@ -546,13 +546,13 @@ STATIC int CtlSubscribeEventCB(sd_event_source* src, int fd, uint32_t revents, v
error = snd_ctl_read(sndcard->ctl, eventId);
if (error < 0) {
- AFB_ApiDebug(mixer->api, "%s: failed to read control", __func__);
+ AFB_API_DEBUG(mixer->api, "%s: failed to read control", __func__);
goto OnErrorExit;
}
// we only process sndctrl element
if (snd_ctl_event_get_type(eventId) != SND_CTL_EVENT_ELEM) {
- AFB_ApiDebug(mixer->api, "%s: bad event type", __func__);
+ AFB_API_DEBUG(mixer->api, "%s: bad event type", __func__);
goto OnSuccessExit;
}
@@ -566,7 +566,7 @@ STATIC int CtlSubscribeEventCB(sd_event_source* src, int fd, uint32_t revents, v
snd_ctl_event_elem_get_id(eventId, elemId);
error = CtlElemIdGetLong(mixer, sHandle->sndcard, elemId, &value);
if (error) {
- AFB_ApiDebug(mixer->api, "%s: failed to get elem id", __func__);
+ AFB_API_DEBUG(mixer->api, "%s: failed to get elem id", __func__);
goto OnErrorExit;
}
@@ -575,12 +575,12 @@ STATIC int CtlSubscribeEventCB(sd_event_source* src, int fd, uint32_t revents, v
snd_ctl_elem_info_alloca(&elemInfo);
snd_ctl_elem_info_set_id(elemInfo, elemId);
if (snd_ctl_elem_info(sndcard->ctl, elemInfo) < 0) {
- AFB_ApiDebug(mixer->api, "%s: failed to get elem info", __func__);
+ AFB_API_DEBUG(mixer->api, "%s: failed to get elem info", __func__);
goto OnErrorExit;
}
int numid = snd_ctl_elem_info_get_numid(elemInfo);
- AFB_ApiDebug(mixer->api, "%s: event on elem id %d", __func__, numid);
+ AFB_API_DEBUG(mixer->api, "%s: event on elem id %d", __func__, numid);
const char *name= snd_ctl_elem_info_get_name(elemInfo);
@@ -598,25 +598,25 @@ STATIC int CtlSubscribeEventCB(sd_event_source* src, int fd, uint32_t revents, v
case FONTEND_NUMID_RUN:
AlsaPcmCopyMuteSignal(mixer, registry->pcm, !value);
ret = snd_pcm_pause(pcm, (int) (!value));
- AFB_ApiNotice(mixer->api, "%s:%s numid=%d name=%s active=%ld ret %d",
+ AFB_API_NOTICE(mixer->api, "%s:%s numid=%d name=%s active=%ld ret %d",
__func__, sHandle->uid, numid, name, value, ret);
if (ret < 0) {
- AFB_ApiNotice(mixer->api, "%s error: %s", __func__, snd_strerror(ret));
+ AFB_API_NOTICE(mixer->api, "%s error: %s", __func__, snd_strerror(ret));
}
break;
case FONTEND_NUMID_PAUSE:
AlsaPcmCopyMuteSignal(mixer, registry->pcm, value);
ret = snd_pcm_pause(registry->pcm->handle, (int) value);
- AFB_ApiNotice(mixer->api, "%s:%s numid=%d name=%s pause=%ld ret %d",
+ AFB_API_NOTICE(mixer->api, "%s:%s numid=%d name=%s pause=%ld ret %d",
__func__, sHandle->uid, numid, name, value, ret);
if (ret < 0) {
- AFB_ApiNotice(mixer->api, "%s error %s", __func__, snd_strerror(ret));
+ AFB_API_NOTICE(mixer->api, "%s error %s", __func__, snd_strerror(ret));
}
break;
case FONTEND_NUMID_IGNORE:
default:
- AFB_ApiDebug(mixer->api,
+ AFB_API_DEBUG(mixer->api,
"%s:%s numid=%d name=%s ignored=%ld",
__func__, sHandle->uid, numid, name, value);
}
@@ -624,14 +624,14 @@ STATIC int CtlSubscribeEventCB(sd_event_source* src, int fd, uint32_t revents, v
}
}
if (!found) {
- AFB_ApiNotice(mixer->api, "%s:%s numid=%d is unknown", __func__, sHandle->uid, numid);
+ AFB_API_NOTICE(mixer->api, "%s:%s numid=%d is unknown", __func__, sHandle->uid, numid);
}
OnSuccessExit:
return 0;
OnErrorExit:
- AFB_ApiDebug(mixer->api, "%s: ignored unsupported event", __func__);
+ AFB_API_DEBUG(mixer->api, "%s: ignored unsupported event", __func__);
return 0;
}
@@ -639,7 +639,7 @@ OnErrorExit:
PUBLIC int AlsaCtlUnSubscribe(SoftMixerT *mixer, AlsaSndCtlT *sndcard) {
SubscribeHandleT * handle = sndcard->eventSubscribeHandle;
- AFB_ApiDebug(mixer->api,"%s for card %s", __func__, sndcard->cid.cardid);
+ AFB_API_DEBUG(mixer->api,"%s for card %s", __func__, sndcard->cid.cardid);
sd_event_source_unref(handle->evtsrc);
free(handle);
@@ -664,7 +664,7 @@ PUBLIC int AlsaCtlSubscribe(SoftMixerT *mixer, const char *uid, AlsaSndCtlT *snd
// subscribe for sndctl events attached to cardid
if ((error = snd_ctl_subscribe_events(handle->sndcard->ctl, 1)) < 0) {
- AFB_ApiError(mixer->api,
+ AFB_API_ERROR(mixer->api,
"%s: fail sndcard=%s to subscribe events",
__func__, ALSA_CTL_UID(handle->sndcard->ctl, string));
goto OnErrorExit;
@@ -673,7 +673,7 @@ PUBLIC int AlsaCtlSubscribe(SoftMixerT *mixer, const char *uid, AlsaSndCtlT *snd
// get pollfd attach to this sound board
int count = snd_ctl_poll_descriptors(handle->sndcard->ctl, &pfds, 1);
if (count != 1) {
- AFB_ApiError(mixer->api,
+ AFB_API_ERROR(mixer->api,
"%s: fail sndcard=%s get poll descriptors",
__func__, ALSA_CTL_UID(handle->sndcard->ctl, string));
goto OnErrorExit;
@@ -681,7 +681,7 @@ PUBLIC int AlsaCtlSubscribe(SoftMixerT *mixer, const char *uid, AlsaSndCtlT *snd
// Registry sound event to binder main loop
if ((error = sd_event_add_io(mixer->sdLoop, &handle->evtsrc, pfds.fd, EPOLLIN, CtlSubscribeEventCB, handle)) < 0) {
- AFB_ApiError(mixer->api,
+ AFB_API_ERROR(mixer->api,
"%s: Fail sndcard=%s adding mainloop",
__func__, ALSA_CTL_UID(handle->sndcard->ctl, string));
goto OnErrorExit;
@@ -697,7 +697,7 @@ PUBLIC void AlsaCtlUnregister(SoftMixerT* mixer, void * arg) {
RegistryEntryPcmT * registryEntry = (RegistryEntryPcmT*) arg;
- AFB_ApiDebug(mixer->api,"%s: card %s : Unregistering control ID %d (%ld in registry).",
+ AFB_API_DEBUG(mixer->api,"%s: card %s : Unregistering control ID %d (%ld in registry).",
__func__, registryEntry->sndcard->cid.cardid, registryEntry->numid, registryEntry->sndcard->nbRegistry);
AlsaSndCtlT * sndcard = registryEntry->sndcard;
@@ -708,16 +708,16 @@ PUBLIC void AlsaCtlUnregister(SoftMixerT* mixer, void * arg) {
AlsaCtlUnSubscribe(mixer, sndcard);
free(registryEntry);
- AFB_ApiDebug(mixer->api,"%s: DONE", __func__);
+ AFB_API_DEBUG(mixer->api,"%s: DONE", __func__);
}
PUBLIC int AlsaCtlRegister(SoftMixerT *mixer, AlsaSndCtlT *sndcard, AlsaPcmCtlT *pcmdev, RegistryNumidT type, int numid) {
- AFB_ApiDebug(mixer->api,"%s: registering control ID %d to %s", __func__, numid, sndcard->cid.cardid);
+ AFB_API_DEBUG(mixer->api,"%s: registering control ID %d to %s", __func__, numid, sndcard->cid.cardid);
if (sndcard->nbRegistry >= SMIXER_SUBDS_CTLS ) {
- AFB_ApiError(mixer->api,
+ AFB_API_ERROR(mixer->api,
"%s cardid='%s' cardname='%s' too many registered controls max=%ld",
__func__, sndcard->cid.cardid, sndcard->cid.longname, sndcard->nbRegistry);
goto fail;