summaryrefslogtreecommitdiffstats
path: root/plugins/alsa/alsa-api-ramp.c
diff options
context:
space:
mode:
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;