summaryrefslogtreecommitdiff
path: root/include/uapi
diff options
context:
space:
mode:
authorNaitik Bharadiya <bharad@codeaurora.org>2020-03-18 15:12:46 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2020-06-01 00:24:00 -0700
commitb09fd35438eae8e116cb5b3daa767ddf0b4ed5e9 (patch)
tree4809c6128c540b931cf68ad1d4b493fa36592d60 /include/uapi
parent6dbab77b6ddda309f56027f135f1eede33b76c2c (diff)
uapi: sound: move necessary sound headers under uapi
Now all uapi header are exported as per ("uapi: export all headers under uapi directories") but some header files are under "include/sound" and its not exported so userspace build is failing. move necessary sound headers under uapi to avoid build failure and make it align with base. Change-Id: I08a465a6a3837c4bcf32c5d9983ba4837d603df2 Signed-off-by: Swetha Chikkaboraiah <schikk@codeaurora.org>
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/sound/audio_slimslave.h18
-rw-r--r--include/uapi/sound/voice_params.h14
-rw-r--r--include/uapi/sound/voice_svc.h47
3 files changed, 79 insertions, 0 deletions
diff --git a/include/uapi/sound/audio_slimslave.h b/include/uapi/sound/audio_slimslave.h
new file mode 100644
index 000000000000..316a5573f5b4
--- /dev/null
+++ b/include/uapi/sound/audio_slimslave.h
@@ -0,0 +1,18 @@
+#ifndef __AUDIO_SLIMSLAVE_H__
+#define __AUDIO_SLIMSLAVE_H__
+
+#include <linux/types.h>
+#include <linux/ioctl.h>
+
+#define AUDIO_SLIMSLAVE_IOCTL_NAME "audio_slimslave"
+#define AUDIO_SLIMSLAVE_MAGIC 'S'
+
+#define AUDIO_SLIMSLAVE_IOCTL_UNVOTE _IO(AUDIO_SLIMSLAVE_MAGIC, 0x00)
+#define AUDIO_SLIMSLAVE_IOCTL_VOTE _IO(AUDIO_SLIMSLAVE_MAGIC, 0x01)
+
+enum {
+ AUDIO_SLIMSLAVE_UNVOTE,
+ AUDIO_SLIMSLAVE_VOTE
+};
+
+#endif
diff --git a/include/uapi/sound/voice_params.h b/include/uapi/sound/voice_params.h
new file mode 100644
index 000000000000..43e3b9d0aa49
--- /dev/null
+++ b/include/uapi/sound/voice_params.h
@@ -0,0 +1,14 @@
+#ifndef __VOICE_PARAMS_H__
+#define __VOICE_PARAMS_H__
+
+#include <linux/types.h>
+#include <sound/asound.h>
+
+enum voice_lch_mode {
+ VOICE_LCH_START = 1,
+ VOICE_LCH_STOP
+};
+
+#define SNDRV_VOICE_IOCTL_LCH _IOW('U', 0x00, enum voice_lch_mode)
+
+#endif
diff --git a/include/uapi/sound/voice_svc.h b/include/uapi/sound/voice_svc.h
new file mode 100644
index 000000000000..035053f091ef
--- /dev/null
+++ b/include/uapi/sound/voice_svc.h
@@ -0,0 +1,47 @@
+#ifndef __VOICE_SVC_H__
+#define __VOICE_SVC_H__
+
+#include <linux/types.h>
+#include <linux/ioctl.h>
+
+#define VOICE_SVC_DRIVER_NAME "voice_svc"
+
+#define VOICE_SVC_MVM_STR "MVM"
+#define VOICE_SVC_CVS_STR "CVS"
+#define MAX_APR_SERVICE_NAME_LEN 64
+
+#define MSG_REGISTER 0x1
+#define MSG_REQUEST 0x2
+#define MSG_RESPONSE 0x3
+
+struct voice_svc_write_msg {
+ __u32 msg_type;
+ __u8 payload[0];
+};
+
+struct voice_svc_register {
+ char svc_name[MAX_APR_SERVICE_NAME_LEN];
+ __u32 src_port;
+ __u8 reg_flag;
+};
+
+struct voice_svc_cmd_response {
+ __u32 src_port;
+ __u32 dest_port;
+ __u32 token;
+ __u32 opcode;
+ __u32 payload_size;
+ __u8 payload[0];
+};
+
+struct voice_svc_cmd_request {
+ char svc_name[MAX_APR_SERVICE_NAME_LEN];
+ __u32 src_port;
+ __u32 dest_port;
+ __u32 token;
+ __u32 opcode;
+ __u32 payload_size;
+ __u8 payload[0];
+};
+
+#endif