1/****************************************************************************
2 ****************************************************************************
3 ***
4 ***   This header was automatically generated from a Linux kernel header
5 ***   of the same name, to make information necessary for userspace to
6 ***   call into the kernel available to libc.  It contains only constants,
7 ***   structures, and macros generated from the original header, and thus,
8 ***   contains no copyrightable information.
9 ***
10 ***   To edit the content of this header, modify the corresponding
11 ***   source file (e.g. under external/kernel-headers/original/) then
12 ***   run bionic/libc/kernel/tools/update_all.py
13 ***
14 ***   Any manual change here will be lost the next time this script will
15 ***   be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _UAPI_LSM_PARAMS_H__
20#define _UAPI_LSM_PARAMS_H__
21#include <linux/types.h>
22#include <sound/asound.h>
23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24#define SNDRV_LSM_VERSION SNDRV_PROTOCOL_VERSION(0, 1, 0)
25enum lsm_app_id {
26 LSM_VOICE_WAKEUP_APP_ID = 1,
27 LSM_VOICE_WAKEUP_APP_ID_V2 = 2,
28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29};
30enum lsm_detection_mode {
31 LSM_MODE_KEYWORD_ONLY_DETECTION = 1,
32 LSM_MODE_USER_KEYWORD_DETECTION
33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34};
35enum lsm_vw_status {
36 LSM_VOICE_WAKEUP_STATUS_RUNNING = 1,
37 LSM_VOICE_WAKEUP_STATUS_DETECTED,
38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39 LSM_VOICE_WAKEUP_STATUS_END_SPEECH,
40 LSM_VOICE_WAKEUP_STATUS_REJECTED
41};
42struct snd_lsm_sound_model {
43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44 __u8 __user *data;
45 __u32 data_size;
46 enum lsm_detection_mode detection_mode;
47 __u16 min_keyw_confidence;
48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49 __u16 min_user_confidence;
50 bool detect_failure;
51};
52struct snd_lsm_sound_model_v2 {
53/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54 __u8 __user *data;
55 __u8 *confidence_level;
56 __u32 data_size;
57 enum lsm_detection_mode detection_mode;
58/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59 __u8 num_confidence_levels;
60 bool detect_failure;
61};
62struct snd_lsm_session_data {
63/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64 enum lsm_app_id app_id;
65};
66struct snd_lsm_event_status {
67 __u16 status;
68/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69 __u16 payload_size;
70 __u8 payload[0];
71};
72struct snd_lsm_detection_params {
73/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74 __u8 *conf_level;
75 enum lsm_detection_mode detect_mode;
76 __u8 num_confidence_levels;
77 bool detect_failure;
78/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79};
80#define SNDRV_LSM_REG_SND_MODEL _IOW('U', 0x00, struct snd_lsm_sound_model)
81#define SNDRV_LSM_DEREG_SND_MODEL _IOW('U', 0x01, int)
82#define SNDRV_LSM_EVENT_STATUS _IOW('U', 0x02, struct snd_lsm_event_status)
83/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84#define SNDRV_LSM_ABORT_EVENT _IOW('U', 0x03, int)
85#define SNDRV_LSM_START _IOW('U', 0x04, int)
86#define SNDRV_LSM_STOP _IOW('U', 0x05, int)
87#define SNDRV_LSM_SET_SESSION_DATA _IOW('U', 0x06, struct snd_lsm_session_data)
88/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89#define SNDRV_LSM_REG_SND_MODEL_V2 _IOW('U', 0x07,  struct snd_lsm_sound_model_v2)
90#define SNDRV_LSM_LAB_CONTROL _IOW('U', 0x08, uint32_t)
91#define SNDRV_LSM_STOP_LAB _IO('U', 0x09)
92#define SNDRV_LSM_SET_PARAMS _IOW('U', 0x0A,   struct snd_lsm_detection_params)
93/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94#endif
95
96