diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2019-01-23 16:46:45 +0100 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2019-01-24 11:45:09 +0100 |
commit | d5cc09d1ef5c58bb8d34e3a47c391a10d8b48181 (patch) | |
tree | 36b65c43fb60ae0ac22b09c832677be2f5fada1e /plugins/alsa/alsa-api-sink.c | |
parent | 17ad00443eecdb2ed7b92da01c7be6f316e04b64 (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-sink.c')
-rw-r--r-- | plugins/alsa/alsa-api-sink.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/plugins/alsa/alsa-api-sink.c b/plugins/alsa/alsa-api-sink.c index a1137c5..e00f9d1 100644 --- a/plugins/alsa/alsa-api-sink.c +++ b/plugins/alsa/alsa-api-sink.c @@ -26,11 +26,11 @@ PUBLIC AlsaPcmHwInfoT *ApiSinkGetParamsByZone(SoftMixerT *mixer, const char *tar AlsaSndZoneT *zone = ApiZoneGetByUid(mixer, target); if (!zone) { - AFB_ApiError(mixer->api, "%s: Unable to find zone %s", __func__, target); + AFB_API_ERROR(mixer->api, "%s: Unable to find zone %s", __func__, target); goto fail; } if (zone->nbSinks == 0) { - AFB_ApiError(mixer->api, "%s: Zone %s has no sinks", __func__, target); + AFB_API_ERROR(mixer->api, "%s: Zone %s has no sinks", __func__, target); goto fail; } @@ -38,7 +38,7 @@ PUBLIC AlsaPcmHwInfoT *ApiSinkGetParamsByZone(SoftMixerT *mixer, const char *tar AlsaPcmChannelT * pcmChannel = cds_list_first_entry(&zone->sinks.list, AlsaPcmChannelT , list); const char *channel = pcmChannel->uid; - AFB_ApiDebug(mixer->api, "%s: first channel uid is %s, zone has %d sinks", __func__, channel, zone->nbSinks); + AFB_API_DEBUG(mixer->api, "%s: first channel uid is %s, zone has %d sinks", __func__, channel, zone->nbSinks); AlsaSndPcmT * sink = NULL; @@ -46,7 +46,7 @@ PUBLIC AlsaPcmHwInfoT *ApiSinkGetParamsByZone(SoftMixerT *mixer, const char *tar AlsaPcmChannelT * pcmChannel; cds_list_for_each_entry(pcmChannel, &sink->channels.list, list) { if (pcmChannel->uid && !strcasecmp(channel, pcmChannel->uid)) { - AFB_ApiDebug(mixer->api, "%s: found %s, return", __func__, pcmChannel->uid); + AFB_API_DEBUG(mixer->api, "%s: found %s, return", __func__, pcmChannel->uid); return sink->sndcard->params; } } @@ -69,14 +69,14 @@ PUBLIC AlsaSndPcmT *ApiSinkGetByUid(SoftMixerT *mixer, const char *target) { static void sinkDestroy(SoftMixerT* mixer, void * arg) { AlsaSndPcmT * sink = (AlsaSndPcmT*) arg; - AFB_ApiDebug(mixer->api, "%s... %s", __func__, sink->uid); + AFB_API_DEBUG(mixer->api, "%s... %s", __func__, sink->uid); cds_list_del(&sink->list); mixer->nbSinks--; ApiPcmDelete(mixer, sink); } -AlsaSndPcmT * sinkCreate(SoftMixerT * mixer, AFB_ReqT request, const char * uid, json_object * argsJ) { +AlsaSndPcmT * sinkCreate(SoftMixerT * mixer, afb_req_t request, const char * uid, json_object * argsJ) { AlsaPcmCtlT* dmixConfig = NULL; char *dmixUid = NULL; AlsaSndPcmT * newSink = ApiPcmAttachOne(mixer, uid, SND_PCM_STREAM_PLAYBACK, argsJ); @@ -92,7 +92,7 @@ AlsaSndPcmT * sinkCreate(SoftMixerT * mixer, AFB_ReqT request, const char * uid, } dmixConfig = AlsaCreateDmix(mixer, dmixUid, newSink, 0); if (!dmixConfig) { - AFB_ReqFailF(request, "internal-error", "mixer=%s sink=%s fail to create DMIX config", mixer->uid, newSink->uid); + afb_req_fail_f(request, "internal-error", "mixer=%s sink=%s fail to create DMIX config", mixer->uid, newSink->uid); goto fail_dmix; } } @@ -111,10 +111,10 @@ fail_dmix: } -PUBLIC int ApiSinkAttach(SoftMixerT *mixer, AFB_ReqT request, const char * uid, json_object * argsJ) { +PUBLIC int ApiSinkAttach(SoftMixerT *mixer, afb_req_t request, const char * uid, json_object * argsJ) { if (mixer->nbSinks >= mixer->max.sinks) { - AFB_ReqFailF(request, "too-small", "mixer=%s max sink=%d", mixer->uid, mixer->max.sinks); + afb_req_fail_f(request, "too-small", "mixer=%s max sink=%d", mixer->uid, mixer->max.sinks); goto fail; } @@ -124,7 +124,7 @@ PUBLIC int ApiSinkAttach(SoftMixerT *mixer, AFB_ReqT request, const char * uid, case json_type_object: { AlsaSndPcmT * newSink = sinkCreate(mixer, request, uid, argsJ); if (!newSink) { - AFB_ReqFailF(request, "bad-pcm", "mixer=%s invalid sink= %s", mixer->uid, json_object_get_string(argsJ)); + afb_req_fail_f(request, "bad-pcm", "mixer=%s invalid sink= %s", mixer->uid, json_object_get_string(argsJ)); goto fail; } break; @@ -132,7 +132,7 @@ PUBLIC int ApiSinkAttach(SoftMixerT *mixer, AFB_ReqT request, const char * uid, case json_type_array: { count = json_object_array_length(argsJ); if (count > (mixer->max.sinks - mixer->nbSinks)) { - AFB_ReqFailF(request, "too-small", "mixer=%s max sink=%d", mixer->uid, mixer->max.sinks); + afb_req_fail_f(request, "too-small", "mixer=%s max sink=%d", mixer->uid, mixer->max.sinks); goto fail; } @@ -140,14 +140,14 @@ PUBLIC int ApiSinkAttach(SoftMixerT *mixer, AFB_ReqT request, const char * uid, json_object *sinkJ = json_object_array_get_idx(argsJ, idx); AlsaSndPcmT * newSink = sinkCreate(mixer, request, uid, sinkJ); if (!newSink) { - AFB_ReqFailF(request, "bad-pcm", "mixer=%s invalid sink= %s", mixer->uid, json_object_get_string(sinkJ)); + afb_req_fail_f(request, "bad-pcm", "mixer=%s invalid sink= %s", mixer->uid, json_object_get_string(sinkJ)); goto fail; } } break; } default: - AFB_ReqFailF(request, "invalid-syntax", "mixer=%s sinks invalid argsJ= %s", mixer->uid, json_object_get_string(argsJ)); + afb_req_fail_f(request, "invalid-syntax", "mixer=%s sinks invalid argsJ= %s", mixer->uid, json_object_get_string(argsJ)); goto fail; } |