aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/alsa/alsa-api-loop.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-api-loop.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-api-loop.c')
-rw-r--r--plugins/alsa/alsa-api-loop.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/plugins/alsa/alsa-api-loop.c b/plugins/alsa/alsa-api-loop.c
index ffab6bc..a123bb3 100644
--- a/plugins/alsa/alsa-api-loop.c
+++ b/plugins/alsa/alsa-api-loop.c
@@ -58,7 +58,7 @@ fail:
STATIC AlsaLoopSubdevT *ProcessOneSubdev(SoftMixerT *mixer, AlsaSndLoopT *loop, json_object *subdevJ) {
- AFB_ApiDebug(mixer->api, "%s : %s", __func__, json_object_get_string(subdevJ));
+ AFB_API_DEBUG(mixer->api, "%s : %s", __func__, json_object_get_string(subdevJ));
AlsaLoopSubdevT *subdev = calloc(1, sizeof (AlsaLoopSubdevT));
if (subdev == NULL) {
@@ -72,7 +72,7 @@ STATIC AlsaLoopSubdevT *ProcessOneSubdev(SoftMixerT *mixer, AlsaSndLoopT *loop,
, "numid", &subdev->numid
);
if (error) {
- AFB_ApiError(mixer->api,
+ AFB_API_ERROR(mixer->api,
"%s: loop=%s missing (uid|subdev|numid) error=%s json=%s",
__func__, loop->uid, wrap_json_get_error_string(error), json_object_get_string(subdevJ));
goto fail_subdev;
@@ -108,7 +108,7 @@ STATIC AlsaLoopSubdevT *ProcessOneSubdev(SoftMixerT *mixer, AlsaSndLoopT *loop,
AlsaMixerTransactionObjectForget(mixer->transaction, pcmCtl);
AlsaPcmCtlDelete(mixer, pcmCtl);
- AFB_ApiDebug(mixer->api, "%s DONE", __func__);
+ AFB_API_DEBUG(mixer->api, "%s DONE", __func__);
return subdev;
@@ -131,7 +131,7 @@ STATIC AlsaSndLoopT *AttachOneLoop(SoftMixerT *mixer, const char *uid, json_obje
json_object *subdevsJ = NULL, *devicesJ = NULL;
int error;
- AFB_ApiNotice(mixer->api, "%s, uid %s", __func__, uid);
+ AFB_API_NOTICE(mixer->api, "%s, uid %s", __func__, uid);
AlsaSndLoopT *loop = calloc(1, sizeof (AlsaSndLoopT));
if (loop == NULL) {
@@ -160,7 +160,7 @@ STATIC AlsaSndLoopT *AttachOneLoop(SoftMixerT *mixer, const char *uid, json_obje
, "subdevs", &subdevsJ
);
if (error || !loop->uid || !subdevsJ || (!loop->sndcard->cid.devpath && !loop->sndcard->cid.cardid)) {
- AFB_ApiNotice(mixer->api, "%s mixer=%s hal=%s missing 'uid|path|cardid|devices|subdevs' error=%s args=%s",
+ AFB_API_NOTICE(mixer->api, "%s mixer=%s hal=%s missing 'uid|path|cardid|devices|subdevs' error=%s args=%s",
__func__, mixer->uid, uid, wrap_json_get_error_string(error),json_object_get_string(argsJ));
goto fail_snd_card;
}
@@ -168,7 +168,7 @@ STATIC AlsaSndLoopT *AttachOneLoop(SoftMixerT *mixer, const char *uid, json_obje
// try to open sound card control interface
loop->sndcard->ctl = AlsaByPathOpenCtl(mixer, loop->uid, loop->sndcard);
if (!loop->sndcard->ctl) {
- AFB_ApiError(mixer->api, "%s mixer=%s hal=%s Fail open sndcard loop=%s devpath=%s cardid=%s (please check 'modprobe snd_aloop')",
+ AFB_API_ERROR(mixer->api, "%s mixer=%s hal=%s Fail open sndcard loop=%s devpath=%s cardid=%s (please check 'modprobe snd_aloop')",
__func__, mixer->uid, uid, loop->uid, loop->sndcard->cid.devpath, loop->sndcard->cid.cardid);
goto fail_snd_card;
}
@@ -180,7 +180,7 @@ STATIC AlsaSndLoopT *AttachOneLoop(SoftMixerT *mixer, const char *uid, json_obje
} else {
error = wrap_json_unpack(devicesJ, "{si,si !}", "capture", &loop->capture, "playback", &loop->playback);
if (error) {
- AFB_ApiNotice(mixer->api, "%s mixer=%s hal=%s Loop=%s missing 'capture|playback' error=%s devices=%s",
+ AFB_API_NOTICE(mixer->api, "%s mixer=%s hal=%s Loop=%s missing 'capture|playback' error=%s devices=%s",
__func__, mixer->uid, uid, loop->uid, wrap_json_get_error_string(error),json_object_get_string(devicesJ));
goto fail_snd_card_ctl;
}
@@ -210,17 +210,17 @@ STATIC AlsaSndLoopT *AttachOneLoop(SoftMixerT *mixer, const char *uid, json_obje
break;
}
default:
- AFB_ApiError(mixer->api, "%s mixer=%s hal=%s Loop=%s invalid subdevs= %s",
+ AFB_API_ERROR(mixer->api, "%s mixer=%s hal=%s Loop=%s invalid subdevs= %s",
__func__, mixer->uid, uid, loop->uid, json_object_get_string(subdevsJ));
goto fail_snd_card_ctl;
}
- AFB_ApiNotice(mixer->api, "%s, uid %s DONE", __func__, uid);
+ AFB_API_NOTICE(mixer->api, "%s, uid %s DONE", __func__, uid);
return loop;
fail_loop_subdev: {
- AFB_ApiDebug(mixer->api, "%s cleanup", __func__);
+ AFB_API_DEBUG(mixer->api, "%s cleanup", __func__);
AlsaLoopSubdevT * subdev, *tmp;
cds_list_for_each_entry_safe(subdev, tmp, &loop->subdevs.list, list) {
cds_list_del(&subdev->list);
@@ -240,7 +240,7 @@ fail:
static void loopDestroy(SoftMixerT * mixer, void* arg) {
AlsaSndLoopT * loop = (AlsaSndLoopT*) arg;
- AFB_ApiDebug(mixer->api, "%s... %s", __func__, loop->uid);
+ AFB_API_DEBUG(mixer->api, "%s... %s", __func__, loop->uid);
AlsaLoopSubdevT * subdev, *tmp;
cds_list_for_each_entry_safe(subdev, tmp, &loop->subdevs.list, list) {
@@ -254,7 +254,7 @@ static void loopDestroy(SoftMixerT * mixer, void* arg) {
mixer->nbLoops--;
cds_list_del(&loop->list);
free(loop);
- AFB_ApiDebug(mixer->api, "DONE !");
+ AFB_API_DEBUG(mixer->api, "DONE !");
}
@@ -276,7 +276,7 @@ fail:
return newLoop;
}
-PUBLIC int ApiLoopAttach(SoftMixerT *mixer, AFB_ReqT request, const char * uid, json_object * argsJ) {
+PUBLIC int ApiLoopAttach(SoftMixerT *mixer, afb_req_t request, const char * uid, json_object * argsJ) {
AlsaSndLoopT * newLoop = NULL;
@@ -324,18 +324,18 @@ fail:
static void subdevDisplay(SoftMixerT *mixer, AlsaLoopSubdevT * subdev) {
- AFB_ApiInfo(mixer->api, "\t\tsubdev id %d, uid %s", subdev->numid, subdev->uid);
+ AFB_API_INFO(mixer->api, "\t\tsubdev id %d, uid %s", subdev->numid, subdev->uid);
}
PUBLIC void loopsDisplay(SoftMixerT *mixer) {
AlsaSndLoopT * loop;
- AFB_ApiInfo(mixer->api, "Mixer %s LOOPS:", mixer->uid);
+ AFB_API_INFO(mixer->api, "Mixer %s LOOPS:", mixer->uid);
cds_list_for_each_entry(loop, &mixer->loops.list, list) {
- AFB_ApiInfo(mixer->api, "\tLOOP %s", loop->uid);
+ AFB_API_INFO(mixer->api, "\tLOOP %s", loop->uid);
AlsaLoopSubdevT * subdev;
cds_list_for_each_entry(subdev, &loop->subdevs.list, list) {
subdevDisplay(mixer, subdev);
}
}
- AFB_ApiInfo(mixer->api, "--------------");
+ AFB_API_INFO(mixer->api, "--------------");
}