summaryrefslogtreecommitdiffstats
path: root/plugins/alsa/alsa-utils-dump.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-utils-dump.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-utils-dump.c')
-rw-r--r--plugins/alsa/alsa-utils-dump.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/plugins/alsa/alsa-utils-dump.c b/plugins/alsa/alsa-utils-dump.c
index 79059ee..90e4842 100644
--- a/plugins/alsa/alsa-utils-dump.c
+++ b/plugins/alsa/alsa-utils-dump.c
@@ -80,13 +80,13 @@ PUBLIC void AlsaDumpFormats(SoftMixerT *mixer, snd_pcm_t *pcm) {
snd_pcm_hw_params_alloca(&pxmHwParams);
ret = snd_pcm_hw_params_any(pcm, pxmHwParams);
if (ret < 0) {
- AFB_ApiError(mixer->api, "FAILED to read params of PCM %s", snd_pcm_name(pcm));
+ AFB_API_ERROR(mixer->api, "FAILED to read params of PCM %s", snd_pcm_name(pcm));
}
- AFB_ApiDebug(mixer->api, "Available formats: PCM=%s", ALSA_PCM_UID(pcm, string));
+ AFB_API_DEBUG(mixer->api, "Available formats: PCM=%s", ALSA_PCM_UID(pcm, string));
for (format = 0; format <= SND_PCM_FORMAT_LAST; format++) {
if (snd_pcm_hw_params_test_format(pcm, pxmHwParams, format) == 0) {
- AFB_ApiDebug(mixer->api, "- %s", snd_pcm_format_name(format));
+ AFB_API_DEBUG(mixer->api, "- %s", snd_pcm_format_name(format));
}
}
}
@@ -109,7 +109,7 @@ PUBLIC void AlsaDumpCtlSubdev(SoftMixerT *mixer, snd_ctl_t *handle) {
while (1) {
if (snd_ctl_pcm_next_device(handle, &dev) < 0) {
- AFB_ApiError(mixer->api, "%s: fail to open subdev card id=%s name=%s", __func__, cardId, cardName);
+ AFB_API_ERROR(mixer->api, "%s: fail to open subdev card id=%s name=%s", __func__, cardId, cardName);
goto OnErrorExit;
}
@@ -119,11 +119,11 @@ PUBLIC void AlsaDumpCtlSubdev(SoftMixerT *mixer, snd_ctl_t *handle) {
// ignore empty device slot
if ((err = snd_ctl_pcm_info(handle, pcminfo)) < 0) {
if (err != -ENOENT)
- AFB_ApiError(mixer->api, "%s: control digital audio info (%s): %s", __func__, cardName, snd_strerror(err));
+ AFB_API_ERROR(mixer->api, "%s: control digital audio info (%s): %s", __func__, cardName, snd_strerror(err));
continue;
}
- AFB_ApiDebug(mixer->api,
+ AFB_API_DEBUG(mixer->api,
"%s card %d: %s [%s], device %d: %s [%s]",
__func__, cardIndex, cardId, cardName, dev, snd_pcm_info_get_id(pcminfo), snd_pcm_info_get_name(pcminfo));
@@ -134,12 +134,12 @@ PUBLIC void AlsaDumpCtlSubdev(SoftMixerT *mixer, snd_ctl_t *handle) {
for (unsigned int idx = 0; idx < subdevCount; idx++) {
snd_pcm_info_set_subdevice(pcminfo, idx);
if ((err = snd_ctl_pcm_info(handle, pcminfo)) < 0) {
- AFB_ApiError(mixer->api, "%s: control digital audio playback info %i: %s", __func__, cardIndex, snd_strerror(err));
+ AFB_API_ERROR(mixer->api, "%s: control digital audio playback info %i: %s", __func__, cardIndex, snd_strerror(err));
} else {
- AFB_ApiDebug(mixer->api, "%s: -- Subdevice #%d: %s", __func__, idx, snd_pcm_info_get_subdevice_name(pcminfo));
+ AFB_API_DEBUG(mixer->api, "%s: -- Subdevice #%d: %s", __func__, idx, snd_pcm_info_get_subdevice_name(pcminfo));
}
}
- AFB_ApiDebug(mixer->api, "%s => subdevice count=%d avaliable=%d", __func__, subdevCount, subdevAvail);
+ AFB_API_DEBUG(mixer->api, "%s => subdevice count=%d avaliable=%d", __func__, subdevCount, subdevAvail);
}
return;
@@ -154,7 +154,7 @@ PUBLIC void AlsaDumpPcmParams(SoftMixerT *mixer, snd_pcm_hw_params_t *pcmHwParam
snd_output_buffer_open(&output);
snd_pcm_hw_params_dump(pcmHwParams, output);
snd_output_buffer_string(output, &buffer);
- AFB_ApiDebug(mixer->api, "%s:\n--------------\n%s\n-------------",__func__, buffer);
+ AFB_API_DEBUG(mixer->api, "%s:\n--------------\n%s\n-------------",__func__, buffer);
snd_output_close(output);
}
@@ -169,7 +169,7 @@ PUBLIC void AlsaDumpPcmInfo(SoftMixerT *mixer, const char* info, snd_pcm_t *pcm)
snd_pcm_dump(pcm, out);
snd_output_buffer_string(out, &buffer);
- AFB_ApiDebug(mixer->api, "%s:\n%s", __func__, buffer);
+ AFB_API_DEBUG(mixer->api, "%s:\n%s", __func__, buffer);
snd_output_close(out);
}
@@ -184,7 +184,7 @@ PUBLIC void AlsaDumpCtlConfig(SoftMixerT *mixer, const char* info, snd_config_t
snd_config_iterator_t it, next;
if (!config) {
- AFB_ApiDebug(mixer->api,"%s (%s): no config", __func__, info);
+ AFB_API_DEBUG(mixer->api,"%s (%s): no config", __func__, info);
return;
}
@@ -208,28 +208,28 @@ PUBLIC void AlsaDumpCtlConfig(SoftMixerT *mixer, const char* info, snd_config_t
case SND_CONFIG_TYPE_INTEGER:
snd_config_get_integer(node, &valueI);
- AFB_ApiDebug(mixer->api, "%s: %s %s: %d (int)", info, pretty, key, (int) valueI);
+ AFB_API_DEBUG(mixer->api, "%s: %s %s: %d (int)", info, pretty, key, (int) valueI);
break;
case SND_CONFIG_TYPE_REAL:
snd_config_get_real(node, &valueD);
- AFB_ApiDebug(mixer->api, "%s: %s %s: %.2f (float)", info, pretty, key, valueD);
+ AFB_API_DEBUG(mixer->api, "%s: %s %s: %.2f (float)", info, pretty, key, valueD);
break;
case SND_CONFIG_TYPE_STRING:
snd_config_get_string(node, &valueS);
- AFB_ApiDebug(mixer->api, "%s: %s %s: %s (str)", info, pretty, key, valueS);
+ AFB_API_DEBUG(mixer->api, "%s: %s %s: %s (str)", info, pretty, key, valueS);
break;
case SND_CONFIG_TYPE_COMPOUND:
- AFB_ApiDebug(mixer->api, "%s: %s %s { ", info, pretty, key);
+ AFB_API_DEBUG(mixer->api, "%s: %s %s { ", info, pretty, key);
AlsaDumpCtlConfig(mixer, info, node, indent + 2);
- AFB_ApiDebug(mixer->api, "%s: %s } ", info, pretty);
+ AFB_API_DEBUG(mixer->api, "%s: %s } ", info, pretty);
break;
default:
snd_config_get_string(node, &valueS);
- AFB_ApiDebug(mixer->api, "%s: %s: key=%s unknown=%s", info, pretty, key, valueS);
+ AFB_API_DEBUG(mixer->api, "%s: %s: key=%s unknown=%s", info, pretty, key, valueS);
break;
}
}