aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/alsa/alsa-plug-route.c
diff options
context:
space:
mode:
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;
}