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) 25 enum 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 }; 30 enum 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 }; 35 enum 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 }; 42 enum LSM_PARAM_TYPE { 43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 44 LSM_ENDPOINT_DETECT_THRESHOLD = 0, 45 LSM_OPERATION_MODE, 46 LSM_GAIN, 47 LSM_MIN_CONFIDENCE_LEVELS, 48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 49 LSM_REG_SND_MODEL, 50 LSM_DEREG_SND_MODEL, 51 LSM_CUSTOM_PARAMS, 52 LSM_PARAMS_MAX, 53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 54 }; 55 struct snd_lsm_ep_det_thres { 56 __u32 epd_begin; 57 __u32 epd_end; 58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 59 }; 60 struct snd_lsm_detect_mode { 61 enum lsm_detection_mode mode; 62 bool detect_failure; 63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 64 }; 65 struct snd_lsm_gain { 66 __u16 gain; 67 }; 68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 69 struct snd_lsm_sound_model_v2 { 70 __u8 __user * data; 71 __u8 * confidence_level; 72 __u32 data_size; 73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 74 enum lsm_detection_mode detection_mode; 75 __u8 num_confidence_levels; 76 bool detect_failure; 77 }; 78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 79 struct snd_lsm_session_data { 80 enum lsm_app_id app_id; 81 }; 82 struct snd_lsm_event_status { 83 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 84 __u16 status; 85 __u16 payload_size; 86 __u8 payload[0]; 87 }; 88 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 89 struct snd_lsm_detection_params { 90 __u8 * conf_level; 91 enum lsm_detection_mode detect_mode; 92 __u8 num_confidence_levels; 93 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 94 bool detect_failure; 95 }; 96 struct lsm_params_info { 97 __u32 module_id; 98 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 99 __u32 param_id; 100 __u32 param_size; 101 __u8 __user * param_data; 102 enum LSM_PARAM_TYPE param_type; 103 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 104 }; 105 struct snd_lsm_module_params { 106 __u8 __user * params; 107 __u32 num_params; 108 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 109 __u32 data_size; 110 }; 111 #define SNDRV_LSM_DEREG_SND_MODEL _IOW('U', 0x01, int) 112 #define SNDRV_LSM_EVENT_STATUS _IOW('U', 0x02, struct snd_lsm_event_status) 113 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 114 #define SNDRV_LSM_ABORT_EVENT _IOW('U', 0x03, int) 115 #define SNDRV_LSM_START _IOW('U', 0x04, int) 116 #define SNDRV_LSM_STOP _IOW('U', 0x05, int) 117 #define SNDRV_LSM_SET_SESSION_DATA _IOW('U', 0x06, struct snd_lsm_session_data) 118 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 119 #define SNDRV_LSM_REG_SND_MODEL_V2 _IOW('U', 0x07, struct snd_lsm_sound_model_v2) 120 #define SNDRV_LSM_LAB_CONTROL _IOW('U', 0x08, uint32_t) 121 #define SNDRV_LSM_STOP_LAB _IO('U', 0x09) 122 #define SNDRV_LSM_SET_PARAMS _IOW('U', 0x0A, struct snd_lsm_detection_params) 123 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 124 #define SNDRV_LSM_SET_MODULE_PARAMS _IOW('U', 0x0B, struct snd_lsm_module_params) 125 #endif 126