From 4605d00310b66c46f047c03535c5b32c1918ceb1 Mon Sep 17 00:00:00 2001 From: Chaithanya Krishna Bacharaju Date: Mon, 8 Aug 2016 09:50:03 +0530 Subject: [PATCH] uapi: lsm_params: Add timestamp support for lsm detection event Add interface to set lsm framework mode configuration and capture lsm detection event timestamp. Change-Id: Ib911ee44620799b02756f6e03b19d1408f7d816c Signed-off-by: Chaithanya Krishna Bacharaju Signed-off-by: Revathi Uddaraju --- include/uapi/sound/lsm_params.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/include/uapi/sound/lsm_params.h b/include/uapi/sound/lsm_params.h index fa28028948a9..9ca5930475ba 100644 --- a/include/uapi/sound/lsm_params.h +++ b/include/uapi/sound/lsm_params.h @@ -2,6 +2,7 @@ #define _UAPI_LSM_PARAMS_H__ #define LSM_POLLING_ENABLE_SUPPORT +#define LSM_EVENT_TIMESTAMP_MODE_SUPPORT #include #include @@ -30,6 +31,9 @@ #define LSM_POLLING_ENABLE (7) #define LSM_PARAMS_MAX (LSM_POLLING_ENABLE + 1) +#define LSM_EVENT_NON_TIME_STAMP_MODE (0) +#define LSM_EVENT_TIME_STAMP_MODE (1) + enum lsm_app_id { LSM_VOICE_WAKEUP_APP_ID = 1, LSM_VOICE_WAKEUP_APP_ID_V2 = 2, @@ -103,6 +107,14 @@ struct snd_lsm_event_status { __u8 payload[0]; }; +struct snd_lsm_event_status_v3 { + __u32 timestamp_lsw; + __u32 timestamp_msw; + __u16 status; + __u16 payload_size; + __u8 payload[0]; +}; + struct snd_lsm_detection_params { __u8 *conf_level; enum lsm_detection_mode detect_mode; @@ -181,5 +193,8 @@ struct snd_lsm_output_format_cfg { #define SNDRV_LSM_OUT_FORMAT_CFG _IOW('U', 0x0C, \ struct snd_lsm_output_format_cfg) #define SNDRV_LSM_SET_PORT _IO('U', 0x0D) +#define SNDRV_LSM_SET_FWK_MODE_CONFIG _IOW('U', 0x0E, uint32_t) +#define SNDRV_LSM_EVENT_STATUS_V3 _IOW('U', 0x0F, \ + struct snd_lsm_event_status_v3) #endif