aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Bultel <thierry.bultel@iot.bzh>2018-05-28 15:05:43 +0200
committerThierry Bultel <thierry.bultel@iot.bzh>2018-05-28 15:05:43 +0200
commit38cb29840307ee49c4623d4ea6d86f5bd9620c0a (patch)
tree996d636f89a08fcb9c550097fea09f77c961ce3b
parent2caa91a841feb8549db8028a8d2dc4143d7a125b (diff)
plugins: fixed some typos & compilation warnings
Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
-rw-r--r--plugins/alsa/alsa-plug-multi.c4
-rw-r--r--plugins/alsa/alsa-plug-route.c7
-rw-r--r--plugins/alsa/alsa-softmixer.c4
3 files changed, 8 insertions, 7 deletions
diff --git a/plugins/alsa/alsa-plug-multi.c b/plugins/alsa/alsa-plug-multi.c
index c28508c..37c5be1 100644
--- a/plugins/alsa/alsa-plug-multi.c
+++ b/plugins/alsa/alsa-plug-multi.c
@@ -90,7 +90,7 @@ PUBLIC AlsaPcmInfoT* AlsaCreateMulti(CtlSourceT *source, const char *pcmUid, int
error += snd_config_search(snd_config, "pcm", &pcmConfig);
error += snd_config_add(pcmConfig, multiConfig);
if (error) {
- AFB_ApiError(source->api, "AlsaCreateDmix: fail to add configDMIX=%s", pcmPlug->cardid);
+ AFB_ApiError(source->api, "%s: fail to add configDMIX=%s", __func__, pcmPlug->cardid);
goto OnErrorExit;
}
@@ -103,4 +103,4 @@ OnErrorExit:
AlsaDumpCtlConfig(source, "plug-multi", multiConfig, 1);
AFB_ApiNotice(source->api, "AlsaCreateMulti: OnErrorExit\n");
return NULL;
-} \ No newline at end of file
+}
diff --git a/plugins/alsa/alsa-plug-route.c b/plugins/alsa/alsa-plug-route.c
index f254c68..d076047 100644
--- a/plugins/alsa/alsa-plug-route.c
+++ b/plugins/alsa/alsa-plug-route.c
@@ -19,6 +19,7 @@
#define _GNU_SOURCE // needed for vasprintf
#include "alsa-softmixer.h"
+#include "afb-helpers-utils.h"
ALSA_PLUG_PROTO(route);
@@ -81,7 +82,7 @@ PUBLIC AlsaPcmInfoT* AlsaCreateRoute(CtlSourceT *source, AlsaSndZoneT *zone, int
error += snd_config_add(routeConfig, tableConfig);
if (error) goto OnErrorExit;
- // tempry store to unable multiple channel to route to the same port
+ // temporary store to unable multiple channel to route to the same port
snd_config_t **cports;
cports = alloca(sizeof (snd_config_t*)*(pcmSlave->ccount + 1));
memset(cports, 0, (sizeof (snd_config_t*)*(pcmSlave->ccount + 1)));
@@ -108,7 +109,7 @@ PUBLIC AlsaPcmInfoT* AlsaCreateRoute(CtlSourceT *source, AlsaSndZoneT *zone, int
}
// ttable require target port as a table and volume as a value
- char targetS[4];
+ char targetS[INT_STR_MAX]; // max size of printed int is 10 chars
snprintf(targetS, sizeof (targetS), "%d", target);
error += snd_config_imake_real(&elemConfig, targetS, volume);
error += snd_config_add(cports[channel], elemConfig);
@@ -140,4 +141,4 @@ OnErrorExit:
AlsaDumpCtlConfig(source, "plug-route", routeConfig, 1);
AFB_ApiNotice(source->api, "AlsaCreateRoute:zone(%s) OnErrorExit\n", zone->uid);
return NULL;
-} \ No newline at end of file
+}
diff --git a/plugins/alsa/alsa-softmixer.c b/plugins/alsa/alsa-softmixer.c
index 11d611d..415760c 100644
--- a/plugins/alsa/alsa-softmixer.c
+++ b/plugins/alsa/alsa-softmixer.c
@@ -24,9 +24,9 @@
CTLP_LUA_REGISTER("alsa-softmixer")
-// Call at initialisation time
+// Call at initialization time
CTLP_ONLOAD(plugin, callbacks) {
- AFB_ApiDebug(plugin->api, "SoftMixer Plugin Registryed: uid='%s' 'info='%s'", plugin->uid, plugin->info);
+ AFB_ApiDebug(plugin->api, "SoftMixer Plugin Registered: uid='%s' 'info='%s'", plugin->uid, plugin->info);
return 0;
}