1/****************************************************************************
2 ****************************************************************************
3 ***
4 ***   This header was automatically generated from a Linux kernel header
5 ***   of the same name, to make information necessary for userspace to
6 ***   call into the kernel available to libc.  It contains only constants,
7 ***   structures, and macros generated from the original header, and thus,
8 ***   contains no copyrightable information.
9 ***
10 ***   To edit the content of this header, modify the corresponding
11 ***   source file (e.g. under external/kernel-headers/original/) then
12 ***   run bionic/libc/kernel/tools/update_all.py
13 ***
14 ***   Any manual change here will be lost the next time this script will
15 ***   be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _UAPI_MSM_AUDIO_MVS_H
20#define _UAPI_MSM_AUDIO_MVS_H
21#include <linux/msm_audio.h>
22#define AUDIO_GET_MVS_CONFIG _IOW(AUDIO_IOCTL_MAGIC, (AUDIO_MAX_COMMON_IOCTL_NUM + 0), unsigned)
23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24#define AUDIO_SET_MVS_CONFIG _IOR(AUDIO_IOCTL_MAGIC, (AUDIO_MAX_COMMON_IOCTL_NUM + 1), unsigned)
25#define MVS_MODE_IS733 0x1
26#define MVS_MODE_IS127 0x2
27#define MVS_MODE_4GV_NB 0x3
28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29#define MVS_MODE_4GV_WB 0x4
30#define MVS_MODE_AMR 0x5
31#define MVS_MODE_EFR 0x6
32#define MVS_MODE_FR 0x7
33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34#define MVS_MODE_HR 0x8
35#define MVS_MODE_LINEAR_PCM 0x9
36#define MVS_MODE_G711 0xA
37#define MVS_MODE_PCM 0xC
38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39#define MVS_MODE_AMR_WB 0xD
40#define MVS_MODE_G729A 0xE
41#define MVS_MODE_G711A 0xF
42#define MVS_MODE_G722 0x10
43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44#define MVS_MODE_PCM_WB 0x12
45enum msm_audio_amr_mode {
46  MVS_AMR_MODE_0475,
47  MVS_AMR_MODE_0515,
48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49  MVS_AMR_MODE_0590,
50  MVS_AMR_MODE_0670,
51  MVS_AMR_MODE_0740,
52  MVS_AMR_MODE_0795,
53/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54  MVS_AMR_MODE_1020,
55  MVS_AMR_MODE_1220,
56  MVS_AMR_MODE_0660,
57  MVS_AMR_MODE_0885,
58/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59  MVS_AMR_MODE_1265,
60  MVS_AMR_MODE_1425,
61  MVS_AMR_MODE_1585,
62  MVS_AMR_MODE_1825,
63/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64  MVS_AMR_MODE_1985,
65  MVS_AMR_MODE_2305,
66  MVS_AMR_MODE_2385,
67  MVS_AMR_MODE_UNDEF
68/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69};
70enum msm_audio_voc_rate {
71  MVS_VOC_0_RATE,
72  MVS_VOC_8_RATE,
73/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74  MVS_VOC_4_RATE,
75  MVS_VOC_2_RATE,
76  MVS_VOC_1_RATE,
77  MVS_VOC_ERASURE,
78/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79  MVS_VOC_RATE_MAX,
80  MVS_VOC_RATE_UNDEF = MVS_VOC_RATE_MAX
81};
82enum msm_audio_amr_frame_type {
83/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84  MVS_AMR_SPEECH_GOOD,
85  MVS_AMR_SPEECH_DEGRADED,
86  MVS_AMR_ONSET,
87  MVS_AMR_SPEECH_BAD,
88/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89  MVS_AMR_SID_FIRST,
90  MVS_AMR_SID_UPDATE,
91  MVS_AMR_SID_BAD,
92  MVS_AMR_NO_DATA,
93/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94  MVS_AMR_SPEECH_LOST
95};
96enum msm_audio_g711a_mode {
97  MVS_G711A_MODE_MULAW,
98/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99  MVS_G711A_MODE_ALAW
100};
101enum msm_audio_g711_mode {
102  MVS_G711_MODE_MULAW,
103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104  MVS_G711_MODE_ALAW
105};
106enum mvs_g722_mode_type {
107  MVS_G722_MODE_01,
108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
109  MVS_G722_MODE_02,
110  MVS_G722_MODE_03,
111  MVS_G722_MODE_MAX,
112  MVS_G722_MODE_UNDEF
113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114};
115enum msm_audio_g711a_frame_type {
116  MVS_G711A_SPEECH_GOOD,
117  MVS_G711A_SID,
118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
119  MVS_G711A_NO_DATA,
120  MVS_G711A_ERASURE
121};
122enum msm_audio_g729a_frame_type {
123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
124  MVS_G729A_NO_DATA,
125  MVS_G729A_SPEECH_GOOD,
126  MVS_G729A_SID,
127  MVS_G729A_ERASURE
128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
129};
130struct min_max_rate {
131  uint32_t min_rate;
132  uint32_t max_rate;
133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
134};
135struct msm_audio_mvs_config {
136  uint32_t mvs_mode;
137  uint32_t rate_type;
138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
139  struct min_max_rate min_max_rate;
140  uint32_t dtx_mode;
141};
142#define MVS_MAX_VOC_PKT_SIZE 640
143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
144struct gsm_header {
145  uint8_t bfi;
146  uint8_t sid;
147  uint8_t taf;
148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
149  uint8_t ufi;
150};
151struct q6_msm_audio_mvs_frame {
152  union {
153/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
154    uint32_t frame_type;
155    uint32_t packet_rate;
156    struct gsm_header gsm_frame_type;
157  } header;
158/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
159  uint32_t len;
160  uint8_t voc_pkt[MVS_MAX_VOC_PKT_SIZE];
161};
162struct msm_audio_mvs_frame {
163/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
164  uint32_t frame_type;
165  uint32_t len;
166  uint8_t voc_pkt[MVS_MAX_VOC_PKT_SIZE];
167};
168/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
169#define Q5V2_MVS_MAX_VOC_PKT_SIZE 320
170struct q5v2_msm_audio_mvs_frame {
171  uint32_t frame_type;
172  uint32_t len;
173/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
174  uint8_t voc_pkt[Q5V2_MVS_MAX_VOC_PKT_SIZE];
175};
176#endif
177
178