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 #define LSM_OUT_FORMAT_PCM (0) 26 #define LSM_OUT_FORMAT_ADPCM (1 << 0) 27 #define LSM_OUT_DATA_RAW (0) 28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 29 #define LSM_OUT_DATA_PACKED (1) 30 #define LSM_OUT_DATA_EVENTS_DISABLED (0) 31 #define LSM_OUT_DATA_EVENTS_ENABLED (1) 32 #define LSM_OUT_TRANSFER_MODE_RT (0) 33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 34 #define LSM_OUT_TRANSFER_MODE_FTRT (1) 35 enum lsm_app_id { 36 LSM_VOICE_WAKEUP_APP_ID = 1, 37 LSM_VOICE_WAKEUP_APP_ID_V2 = 2, 38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 39 }; 40 enum lsm_detection_mode { 41 LSM_MODE_KEYWORD_ONLY_DETECTION = 1, 42 LSM_MODE_USER_KEYWORD_DETECTION 43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 44 }; 45 enum lsm_vw_status { 46 LSM_VOICE_WAKEUP_STATUS_RUNNING = 1, 47 LSM_VOICE_WAKEUP_STATUS_DETECTED, 48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 49 LSM_VOICE_WAKEUP_STATUS_END_SPEECH, 50 LSM_VOICE_WAKEUP_STATUS_REJECTED 51 }; 52 enum LSM_PARAM_TYPE { 53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 54 LSM_ENDPOINT_DETECT_THRESHOLD = 0, 55 LSM_OPERATION_MODE, 56 LSM_GAIN, 57 LSM_MIN_CONFIDENCE_LEVELS, 58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 59 LSM_REG_SND_MODEL, 60 LSM_DEREG_SND_MODEL, 61 LSM_CUSTOM_PARAMS, 62 LSM_PARAMS_MAX, 63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 64 }; 65 struct snd_lsm_ep_det_thres { 66 __u32 epd_begin; 67 __u32 epd_end; 68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 69 }; 70 struct snd_lsm_detect_mode { 71 enum lsm_detection_mode mode; 72 bool detect_failure; 73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 74 }; 75 struct snd_lsm_gain { 76 __u16 gain; 77 }; 78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 79 struct snd_lsm_sound_model_v2 { 80 __u8 __user * data; 81 __u8 * confidence_level; 82 __u32 data_size; 83 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 84 enum lsm_detection_mode detection_mode; 85 __u8 num_confidence_levels; 86 bool detect_failure; 87 }; 88 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 89 struct snd_lsm_session_data { 90 enum lsm_app_id app_id; 91 }; 92 struct snd_lsm_event_status { 93 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 94 __u16 status; 95 __u16 payload_size; 96 __u8 payload[0]; 97 }; 98 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 99 struct snd_lsm_detection_params { 100 __u8 * conf_level; 101 enum lsm_detection_mode detect_mode; 102 __u8 num_confidence_levels; 103 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 104 bool detect_failure; 105 }; 106 struct lsm_params_info { 107 __u32 module_id; 108 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 109 __u32 param_id; 110 __u32 param_size; 111 __u8 __user * param_data; 112 enum LSM_PARAM_TYPE param_type; 113 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 114 }; 115 struct snd_lsm_module_params { 116 __u8 __user * params; 117 __u32 num_params; 118 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 119 __u32 data_size; 120 }; 121 struct snd_lsm_output_format_cfg { 122 __u8 format; 123 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 124 __u8 packing; 125 __u8 events; 126 __u8 mode; 127 }; 128 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 129 #define SNDRV_LSM_DEREG_SND_MODEL _IOW('U', 0x01, int) 130 #define SNDRV_LSM_EVENT_STATUS _IOW('U', 0x02, struct snd_lsm_event_status) 131 #define SNDRV_LSM_ABORT_EVENT _IOW('U', 0x03, int) 132 #define SNDRV_LSM_START _IOW('U', 0x04, int) 133 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 134 #define SNDRV_LSM_STOP _IOW('U', 0x05, int) 135 #define SNDRV_LSM_SET_SESSION_DATA _IOW('U', 0x06, struct snd_lsm_session_data) 136 #define SNDRV_LSM_REG_SND_MODEL_V2 _IOW('U', 0x07, struct snd_lsm_sound_model_v2) 137 #define SNDRV_LSM_LAB_CONTROL _IOW('U', 0x08, uint32_t) 138 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 139 #define SNDRV_LSM_STOP_LAB _IO('U', 0x09) 140 #define SNDRV_LSM_SET_PARAMS _IOW('U', 0x0A, struct snd_lsm_detection_params) 141 #define SNDRV_LSM_SET_MODULE_PARAMS _IOW('U', 0x0B, struct snd_lsm_module_params) 142 #define SNDRV_LSM_OUT_FORMAT_CFG _IOW('U', 0x0C, struct snd_lsm_output_format_cfg) 143 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 144 #endif 145 146