Home | History | Annotate | Download | only in sound
      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 _LSM_PARAMS_H__
     20 #define _LSM_PARAMS_H__
     21 #define LSM_POLLING_ENABLE_SUPPORT
     22 #define LSM_EVENT_TIMESTAMP_MODE_SUPPORT
     23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     24 #include <linux/types.h>
     25 #include <sound/asound.h>
     26 #define SNDRV_LSM_VERSION SNDRV_PROTOCOL_VERSION(0, 1, 0)
     27 #define LSM_OUT_FORMAT_PCM (0)
     28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     29 #define LSM_OUT_FORMAT_ADPCM (1 << 0)
     30 #define LSM_OUT_DATA_RAW (0)
     31 #define LSM_OUT_DATA_PACKED (1)
     32 #define LSM_OUT_DATA_EVENTS_DISABLED (0)
     33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     34 #define LSM_OUT_DATA_EVENTS_ENABLED (1)
     35 #define LSM_OUT_TRANSFER_MODE_RT (0)
     36 #define LSM_OUT_TRANSFER_MODE_FTRT (1)
     37 #define LSM_ENDPOINT_DETECT_THRESHOLD (0)
     38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     39 #define LSM_OPERATION_MODE (1)
     40 #define LSM_GAIN (2)
     41 #define LSM_MIN_CONFIDENCE_LEVELS (3)
     42 #define LSM_REG_SND_MODEL (4)
     43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     44 #define LSM_DEREG_SND_MODEL (5)
     45 #define LSM_CUSTOM_PARAMS (6)
     46 #define LSM_POLLING_ENABLE (7)
     47 #define LSM_PARAMS_MAX (LSM_POLLING_ENABLE + 1)
     48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     49 #define LSM_EVENT_NON_TIME_STAMP_MODE (0)
     50 #define LSM_EVENT_TIME_STAMP_MODE (1)
     51 enum lsm_app_id {
     52   LSM_VOICE_WAKEUP_APP_ID = 1,
     53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     54   LSM_VOICE_WAKEUP_APP_ID_V2 = 2,
     55 };
     56 enum lsm_detection_mode {
     57   LSM_MODE_KEYWORD_ONLY_DETECTION = 1,
     58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     59   LSM_MODE_USER_KEYWORD_DETECTION
     60 };
     61 enum lsm_vw_status {
     62   LSM_VOICE_WAKEUP_STATUS_RUNNING = 1,
     63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     64   LSM_VOICE_WAKEUP_STATUS_DETECTED,
     65   LSM_VOICE_WAKEUP_STATUS_END_SPEECH,
     66   LSM_VOICE_WAKEUP_STATUS_REJECTED
     67 };
     68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     69 struct snd_lsm_ep_det_thres {
     70   __u32 epd_begin;
     71   __u32 epd_end;
     72 };
     73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     74 struct snd_lsm_detect_mode {
     75   enum lsm_detection_mode mode;
     76   bool detect_failure;
     77 };
     78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     79 struct snd_lsm_gain {
     80   __u16 gain;
     81 };
     82 struct snd_lsm_poll_enable {
     83 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     84   bool poll_en;
     85 };
     86 struct snd_lsm_sound_model_v2 {
     87   __u8 * data;
     88 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     89   __u8 * confidence_level;
     90   __u32 data_size;
     91   enum lsm_detection_mode detection_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 snd_lsm_session_data {
     97   enum lsm_app_id app_id;
     98 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     99 };
    100 struct snd_lsm_event_status {
    101   __u16 status;
    102   __u16 payload_size;
    103 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    104   __u8 payload[0];
    105 };
    106 struct snd_lsm_event_status_v3 {
    107   __u32 timestamp_lsw;
    108 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    109   __u32 timestamp_msw;
    110   __u16 status;
    111   __u16 payload_size;
    112   __u8 payload[0];
    113 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    114 };
    115 struct snd_lsm_detection_params {
    116   __u8 * conf_level;
    117   enum lsm_detection_mode detect_mode;
    118 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    119   __u8 num_confidence_levels;
    120   bool detect_failure;
    121   bool poll_enable;
    122 };
    123 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    124 struct lsm_params_info {
    125   __u32 module_id;
    126   __u32 param_id;
    127   __u32 param_size;
    128 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    129   __u8 * param_data;
    130   uint32_t param_type;
    131 };
    132 struct snd_lsm_module_params {
    133 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    134   __u8 * params;
    135   __u32 num_params;
    136   __u32 data_size;
    137 };
    138 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    139 struct snd_lsm_output_format_cfg {
    140   __u8 format;
    141   __u8 packing;
    142   __u8 events;
    143 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    144   __u8 mode;
    145 };
    146 #define SNDRV_LSM_DEREG_SND_MODEL _IOW('U', 0x01, int)
    147 #define SNDRV_LSM_EVENT_STATUS _IOW('U', 0x02, struct snd_lsm_event_status)
    148 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    149 #define SNDRV_LSM_ABORT_EVENT _IOW('U', 0x03, int)
    150 #define SNDRV_LSM_START _IOW('U', 0x04, int)
    151 #define SNDRV_LSM_STOP _IOW('U', 0x05, int)
    152 #define SNDRV_LSM_SET_SESSION_DATA _IOW('U', 0x06, struct snd_lsm_session_data)
    153 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    154 #define SNDRV_LSM_REG_SND_MODEL_V2 _IOW('U', 0x07, struct snd_lsm_sound_model_v2)
    155 #define SNDRV_LSM_LAB_CONTROL _IOW('U', 0x08, uint32_t)
    156 #define SNDRV_LSM_STOP_LAB _IO('U', 0x09)
    157 #define SNDRV_LSM_SET_PARAMS _IOW('U', 0x0A, struct snd_lsm_detection_params)
    158 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    159 #define SNDRV_LSM_SET_MODULE_PARAMS _IOW('U', 0x0B, struct snd_lsm_module_params)
    160 #define SNDRV_LSM_OUT_FORMAT_CFG _IOW('U', 0x0C, struct snd_lsm_output_format_cfg)
    161 #define SNDRV_LSM_SET_PORT _IO('U', 0x0D)
    162 #define SNDRV_LSM_SET_FWK_MODE_CONFIG _IOW('U', 0x0E, uint32_t)
    163 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
    164 #define SNDRV_LSM_EVENT_STATUS_V3 _IOW('U', 0x0F, struct snd_lsm_event_status_v3)
    165 #endif
    166 
    167