blob: 0edd8b5f7099a007afc06b69de2aba598efe31e1 [file] [log] [blame]
Joonwoo Parkb91e48e2013-02-21 10:24:56 -08001#ifndef __LSM_PARAMS_H__
2#define __LSM_PARAMS_H__
3
4#include <linux/types.h>
5#include <sound/asound.h>
6
7#define SNDRV_LSM_VERSION SNDRV_PROTOCOL_VERSION(0, 1, 0)
8
9enum lsm_detection_mode {
10 LSM_MODE_KEYWORD_ONLY_DETECTION = 1,
11 LSM_MODE_USER_KEYWORD_DETECTION
12};
13
14struct snd_lsm_sound_model {
15 __u8 *data;
16 __u32 data_size;
17 enum lsm_detection_mode detection_mode;
18 __u16 min_keyw_confidence;
19 __u16 min_user_confidence;
20 bool detect_failure;
21};
22
23struct snd_lsm_event_status {
24 __u16 status;
25 __u16 payload_size;
26 __u8 payload[0];
27};
28
29#define SNDRV_LSM_REG_SND_MODEL _IOW('U', 0x00, struct snd_lsm_sound_model)
30#define SNDRV_LSM_DEREG_SND_MODEL _IOW('U', 0x01, int)
31#define SNDRV_LSM_EVENT_STATUS _IOW('U', 0x02, struct snd_lsm_event_status)
32#define SNDRV_LSM_ABORT_EVENT _IOW('U', 0x03, int)
33#define SNDRV_LSM_START _IOW('U', 0x04, int)
34#define SNDRV_LSM_STOP _IOW('U', 0x05, int)
35
36#endif