lsm_params.h 892 B

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