aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/alsa/alsa-plug-route.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-plug-route.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-plug-route.c')
-rw-r--r--plugins/alsa/alsa-plug-route.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/plugins/alsa/alsa-plug-route.c b/plugins/alsa/alsa-plug-route.c
index a192e03..2c7851d 100644
--- a/plugins/alsa/alsa-plug-route.c
+++ b/plugins/alsa/alsa-plug-route.c
@@ -42,7 +42,7 @@ STATIC int CardChannelByUid(SoftMixerT *mixer, const char *uid, ChannelCardPortT
cds_list_for_each_entry(pcm, &mixer->sinks.list, list) {
if (pcm->nbChannels == 0) {
- AFB_ApiError(mixer->api,
+ AFB_API_ERROR(mixer->api,
"%s: No Sink card=%s [should declare channels]",
__func__, pcm->uid);
goto OnErrorExit;
@@ -66,7 +66,7 @@ STATIC int CardChannelByUid(SoftMixerT *mixer, const char *uid, ChannelCardPortT
}
if (!found) {
- AFB_ApiError(mixer->api,
+ AFB_API_ERROR(mixer->api,
"%s: No Channel with uid=%s [should declare channels]",
__func__, uid);
goto OnErrorExit;
@@ -87,10 +87,10 @@ PUBLIC AlsaPcmCtlT* AlsaCreateRoute(SoftMixerT *mixer, AlsaSndZoneT *zone, int o
char *cardid = NULL;
char *slaveUid = NULL;
- AFB_ApiDebug(mixer->api, "%s (zone %s)", __func__, zone->uid);
+ AFB_API_DEBUG(mixer->api, "%s (zone %s)", __func__, zone->uid);
if (mixer->nbSinks == 0) {
- AFB_ApiError(mixer->api, "%s: mixer=%s zone(%s)(zone) No sink found [should Registry sound card first]", __func__, mixer->uid, zone->uid);
+ AFB_API_ERROR(mixer->api, "%s: mixer=%s zone(%s)(zone) No sink found [should Registry sound card first]", __func__, mixer->uid, zone->uid);
goto fail;
}
@@ -109,7 +109,7 @@ PUBLIC AlsaPcmCtlT* AlsaCreateRoute(SoftMixerT *mixer, AlsaSndZoneT *zone, int o
pcmRoute->params = ApiSinkGetParamsByZone(mixer, zone->uid);
if (pcmRoute->params == NULL) {
- AFB_ApiError(mixer->api, "%s: Failed to retrieve zone parameters", __func__);
+ AFB_API_ERROR(mixer->api, "%s: Failed to retrieve zone parameters", __func__);
goto fail_nodump;
}
@@ -130,7 +130,7 @@ PUBLIC AlsaPcmCtlT* AlsaCreateRoute(SoftMixerT *mixer, AlsaSndZoneT *zone, int o
AlsaPcmChannelT * channel = cds_list_first_entry(&zone->sinks.list, AlsaPcmChannelT, list);
error = CardChannelByUid(mixer, channel->uid, &slave);
if (error) {
- AFB_ApiError(mixer->api, "%s:zone(%s) fail to find channel=%s", __func__, zone->uid, channel->uid);
+ AFB_API_ERROR(mixer->api, "%s:zone(%s) fail to find channel=%s", __func__, zone->uid, channel->uid);
goto fail;
}
@@ -162,16 +162,16 @@ PUBLIC AlsaPcmCtlT* AlsaCreateRoute(SoftMixerT *mixer, AlsaSndZoneT *zone, int o
cds_list_for_each_entry(channel, &zone->sinks.list, list) {
- AFB_ApiDebug(mixer->api, "%s: zone->sink channel %s ", __func__, channel->uid);
+ AFB_API_DEBUG(mixer->api, "%s: zone->sink channel %s ", __func__, channel->uid);
error = CardChannelByUid(mixer, channel->uid, &channelCardPort);
if (error) {
- AFB_ApiError(mixer->api, "%s: zone(%s) fail to find channel=%s", __func__, zone->uid, channel->uid);
+ AFB_API_ERROR(mixer->api, "%s: zone(%s) fail to find channel=%s", __func__, zone->uid, channel->uid);
goto fail;
}
if (slave.cardidx != channelCardPort.cardidx) {
- AFB_ApiError(mixer->api,
+ AFB_API_ERROR(mixer->api,
"%s: zone(%s) cannot span over multiple sound card %s != %s ",
__func__, zone->uid, slave.cardid, channelCardPort.cardid);
goto fail;
@@ -190,13 +190,13 @@ PUBLIC AlsaPcmCtlT* AlsaCreateRoute(SoftMixerT *mixer, AlsaSndZoneT *zone, int o
error = snd_config_make_compound(&cports[port], channelS, 0);
if (error) {
- AFB_ApiError(mixer->api, "%s: make_compound failed , err %s", __func__, snd_strerror(error));
+ AFB_API_ERROR(mixer->api, "%s: make_compound failed , err %s", __func__, snd_strerror(error));
goto fail;
}
error = snd_config_add(tableConfig, cports[port]);
if (error) {
- AFB_ApiError(mixer->api, "%s: add compound to table failed, err %s", __func__, snd_strerror(error));
+ AFB_API_ERROR(mixer->api, "%s: add compound to table failed, err %s", __func__, snd_strerror(error));
goto fail;
}
}
@@ -214,13 +214,13 @@ PUBLIC AlsaPcmCtlT* AlsaCreateRoute(SoftMixerT *mixer, AlsaSndZoneT *zone, int o
error = snd_config_imake_real(&elemConfig, targetS, volume);
if (error) {
- AFB_ApiError(mixer->api, "%s: Failed to interpret volume real value, err %s", __func__, snd_strerror(error));
+ AFB_API_ERROR(mixer->api, "%s: Failed to interpret volume real value, err %s", __func__, snd_strerror(error));
goto fail;
}
error = snd_config_add(cports[port], elemConfig);
if (error) {
- AFB_ApiError(mixer->api, "%s Failed to add ttable entry:err=%s", __func__, snd_strerror(error));
+ AFB_API_ERROR(mixer->api, "%s Failed to add ttable entry:err=%s", __func__, snd_strerror(error));
goto fail;
}
@@ -259,7 +259,7 @@ PUBLIC AlsaPcmCtlT* AlsaCreateRoute(SoftMixerT *mixer, AlsaSndZoneT *zone, int o
if (open) error = _snd_pcm_route_open(&pcmRoute->handle, pcmRoute->cid.cardid, snd_config, routeConfig, SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK);
if (error) {
- AFB_ApiError(mixer->api,
+ AFB_API_ERROR(mixer->api,
"%s: zone(%s) fail to create Plug=%s error=%s",
__func__, zone->uid, pcmRoute->cid.cardid, snd_strerror(error));
goto fail;
@@ -269,7 +269,7 @@ PUBLIC AlsaPcmCtlT* AlsaCreateRoute(SoftMixerT *mixer, AlsaSndZoneT *zone, int o
error += snd_config_search(snd_config, "pcm", &pcmConfig);
error += snd_config_add(pcmConfig, routeConfig);
if (error) {
- AFB_ApiError(mixer->api,
+ AFB_API_ERROR(mixer->api,
"%s: %s fail to add config route=%s error=%s",
__func__, zone->uid, pcmRoute->cid.cardid, snd_strerror(error));
goto fail;
@@ -278,15 +278,15 @@ PUBLIC AlsaPcmCtlT* AlsaCreateRoute(SoftMixerT *mixer, AlsaSndZoneT *zone, int o
zone->routeConfig = routeConfig;
// Debug config & pcm
- AFB_ApiNotice(mixer->api, "%s: zone(%s) DONE", __func__, zone->uid);
+ AFB_API_NOTICE(mixer->api, "%s: zone(%s) DONE", __func__, zone->uid);
AlsaDumpCtlConfig(mixer, "plug-route", routeConfig, 1);
return pcmRoute;
fail:
-// AFB_ApiError(mixer->api, "%s ERROR, DUMPING PCM...", __func__);
+// AFB_API_ERROR(mixer->api, "%s ERROR, DUMPING PCM...", __func__);
// AlsaDumpCtlConfig(mixer, "plug-pcm", snd_config, 1);
- AFB_ApiError(mixer->api, "%s ERROR, DUMPING ROUTE...", __func__);
+ AFB_API_ERROR(mixer->api, "%s ERROR, DUMPING ROUTE...", __func__);
AlsaDumpCtlConfig(mixer, "plug-route", routeConfig, 1);
fail_nodump:
@@ -294,6 +294,6 @@ fail_nodump:
free(cardid);
free(slaveUid);
- AFB_ApiNotice(mixer->api, "%s: zone(%s) FAIL", __func__, zone->uid);
+ AFB_API_NOTICE(mixer->api, "%s: zone(%s) FAIL", __func__, zone->uid);
return NULL;
}