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 <chaithan@codeaurora.org> Signed-off-by: Revathi Uddaraju <revathiu@codeaurora.org>
This commit is contained in:
parent
dc9fbad38f
commit
4605d00310
1 changed files with 15 additions and 0 deletions
|
@ -2,6 +2,7 @@
|
|||
#define _UAPI_LSM_PARAMS_H__
|
||||
|
||||
#define LSM_POLLING_ENABLE_SUPPORT
|
||||
#define LSM_EVENT_TIMESTAMP_MODE_SUPPORT
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <sound/asound.h>
|
||||
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue