msm_audio_voicememo.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. #ifndef __MSM_AUDIO_VOICEMEMO_H
  2. #define __MSM_AUDIO_VOICEMEMO_H
  3. #include <linux/msm_audio.h>
  4. #define AUDIO_GET_VOICEMEMO_CONFIG _IOW(AUDIO_IOCTL_MAGIC, \
  5. (AUDIO_MAX_COMMON_IOCTL_NUM+0), unsigned)
  6. #define AUDIO_SET_VOICEMEMO_CONFIG _IOR(AUDIO_IOCTL_MAGIC, \
  7. (AUDIO_MAX_COMMON_IOCTL_NUM+1), unsigned)
  8. /* rec_type */
  9. enum rpc_voc_rec_dir_type {
  10. RPC_VOC_REC_NONE,
  11. RPC_VOC_REC_FORWARD,
  12. RPC_VOC_REC_REVERSE,
  13. RPC_VOC_REC_BOTH,
  14. RPC_VOC_MAX_REC_TYPE
  15. };
  16. /* capability */
  17. enum rpc_voc_capability_type {
  18. RPC_VOC_CAP_IS733 = 4,
  19. RPC_VOC_CAP_IS127 = 8,
  20. RPC_VOC_CAP_AMR = 64,
  21. RPC_VOC_CAP_32BIT_DUMMY = 2147483647
  22. };
  23. /* Rate */
  24. enum rpc_voc_rate_type {
  25. RPC_VOC_0_RATE = 0,
  26. RPC_VOC_8_RATE,
  27. RPC_VOC_4_RATE,
  28. RPC_VOC_2_RATE,
  29. RPC_VOC_1_RATE,
  30. RPC_VOC_ERASURE,
  31. RPC_VOC_ERR_RATE,
  32. RPC_VOC_AMR_RATE_475 = 0,
  33. RPC_VOC_AMR_RATE_515 = 1,
  34. RPC_VOC_AMR_RATE_590 = 2,
  35. RPC_VOC_AMR_RATE_670 = 3,
  36. RPC_VOC_AMR_RATE_740 = 4,
  37. RPC_VOC_AMR_RATE_795 = 5,
  38. RPC_VOC_AMR_RATE_1020 = 6,
  39. RPC_VOC_AMR_RATE_1220 = 7,
  40. };
  41. /* frame_format */
  42. enum rpc_voc_pb_len_rate_var_type {
  43. RPC_VOC_PB_NATIVE_QCP = 3,
  44. RPC_VOC_PB_AMR,
  45. RPC_VOC_PB_EVB
  46. };
  47. struct msm_audio_voicememo_config {
  48. uint32_t rec_type;
  49. uint32_t rec_interval_ms;
  50. uint32_t auto_stop_ms;
  51. uint32_t capability;
  52. uint32_t max_rate;
  53. uint32_t min_rate;
  54. uint32_t frame_format;
  55. uint32_t dtx_enable;
  56. uint32_t data_req_ms;
  57. };
  58. #endif /* __MSM_AUDIO_VOICEMEMO_H */