aboutsummaryrefslogtreecommitdiffstats
path: root/Alsa-afb
diff options
context:
space:
mode:
Diffstat (limited to 'Alsa-afb')
-rw-r--r--Alsa-afb/Alsa-ApiHat.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/Alsa-afb/Alsa-ApiHat.c b/Alsa-afb/Alsa-ApiHat.c
index 2c3c5c1..1e9f5ad 100644
--- a/Alsa-afb/Alsa-ApiHat.c
+++ b/Alsa-afb/Alsa-ApiHat.c
@@ -25,9 +25,18 @@
#include <math.h>
#include <sys/time.h>
#include <sys/types.h>
+#include <sys/prctl.h>
+
#include "Alsa-ApiHat.h"
+STATIC int AlsaInit(void) {
+ int rc= prctl(PR_SET_NAME, "afb-audio-agent\0",NULL,NULL,NULL);
+ if (rc) AFB_ERROR("ERROR: AlsaCore fail to rename process");
+
+ return rc;
+}
+
/*
* array of the verbs exported to afb-daemon
*/
@@ -56,4 +65,5 @@ static const struct afb_verb_v2 api_verbs[] = {
const struct afb_binding_v2 afbBindingV2 = {
.api = "alsacore",
.verbs = api_verbs,
+ .init = AlsaInit,
};