summaryrefslogtreecommitdiffstats
path: root/plugins/alsa/alsa-api-ramp.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-ramp.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-ramp.c')
-rw-r--r--plugins/alsa/alsa-api-ramp.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/alsa/alsa-api-ramp.c b/plugins/alsa/alsa-api-ramp.c
index 060c917..53c3fe3 100644
--- a/plugins/alsa/alsa-api-ramp.c
+++ b/plugins/alsa/alsa-api-ramp.c
@@ -52,7 +52,7 @@ STATIC AlsaVolRampT *AttachOneRamp(SoftMixerT *mixer, const char *uid, json_obje
, "down", &ramp->stepDown
);
if (error) {
- AFB_ApiError(mixer->api,
+ AFB_API_ERROR(mixer->api,
"%s mixer=%s hal=%s error=%s json=%s",
__func__, mixer->uid, uid, wrap_json_get_error_string(error), json_object_get_string(rampJ));
goto fail_ramp;
@@ -76,7 +76,7 @@ fail:
static void rampDestroy(SoftMixerT * mixer, void * arg) {
AlsaVolRampT * ramp = (AlsaVolRampT*) arg;
- AFB_ApiDebug(mixer->api, "%s... %s not implemented", __func__, ramp->uid);
+ AFB_API_DEBUG(mixer->api, "%s... %s not implemented", __func__, ramp->uid);
}
static AlsaVolRampT * rampCreate(SoftMixerT * mixer, const char * uid, json_object *argsJ) {
@@ -91,10 +91,10 @@ fail:
return newRamp;
}
-PUBLIC int ApiRampAttach(SoftMixerT *mixer, AFB_ReqT request, const char * uid, json_object *argsJ) {
+PUBLIC int ApiRampAttach(SoftMixerT *mixer, afb_req_t request, const char * uid, json_object *argsJ) {
if (mixer->nbRamps >= mixer->max.ramps) {
- AFB_ReqFailF(request, "too-small", "mixer=%s hal=%s max ramp=%d", mixer->uid, uid, mixer->max.ramps);
+ afb_req_fail_f(request, "too-small", "mixer=%s hal=%s max ramp=%d", mixer->uid, uid, mixer->max.ramps);
goto fail;
}
@@ -106,7 +106,7 @@ PUBLIC int ApiRampAttach(SoftMixerT *mixer, AFB_ReqT request, const char * uid,
case json_type_object:
newRamp = rampCreate(mixer, uid, argsJ);
if (!newRamp) {
- AFB_ReqFailF(request, "bad-ramp", "mixer=%s hal=%s invalid ramp= %s", mixer->uid, uid, json_object_get_string(argsJ));
+ afb_req_fail_f(request, "bad-ramp", "mixer=%s hal=%s invalid ramp= %s", mixer->uid, uid, json_object_get_string(argsJ));
goto fail;
}
break;
@@ -114,7 +114,7 @@ PUBLIC int ApiRampAttach(SoftMixerT *mixer, AFB_ReqT request, const char * uid,
case json_type_array:
count = json_object_array_length(argsJ);
if (count > (mixer->max.ramps - mixer->nbRamps)) {
- AFB_ReqFailF(request, "too-small", "mixer=%s hal=%s max ramp=%d", mixer->uid, uid, mixer->max.ramps);
+ afb_req_fail_f(request, "too-small", "mixer=%s hal=%s max ramp=%d", mixer->uid, uid, mixer->max.ramps);
goto fail;
}
@@ -122,13 +122,13 @@ PUBLIC int ApiRampAttach(SoftMixerT *mixer, AFB_ReqT request, const char * uid,
json_object *streamAudioJ = json_object_array_get_idx(argsJ, idx);
newRamp = rampCreate(mixer, uid, streamAudioJ);
if (!newRamp) {
- AFB_ReqFailF(request, "bad-ramp", "mixer=%s hal=%s invalid ramp= %s", mixer->uid, uid, json_object_get_string(argsJ));
+ afb_req_fail_f(request, "bad-ramp", "mixer=%s hal=%s invalid ramp= %s", mixer->uid, uid, json_object_get_string(argsJ));
goto fail;
}
}
break;
default:
- AFB_ReqFailF(request, "invalid-syntax", "mixer=%s hal=%s ramps invalid argsJ= %s", mixer->uid, uid, json_object_get_string(argsJ));
+ afb_req_fail_f(request, "invalid-syntax", "mixer=%s hal=%s ramps invalid argsJ= %s", mixer->uid, uid, json_object_get_string(argsJ));
goto fail;
}
return 0;