Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 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 __LINUX_IXJUSER_H |
| 20 | #define __LINUX_IXJUSER_H |
| 21 | #include <linux/telephony.h> |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 22 | #define IXJCTL_DSP_RESET _IO('q', 0xC0) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 23 | #define IXJCTL_RING PHONE_RING |
| 24 | #define IXJCTL_HOOKSTATE PHONE_HOOKSTATE |
| 25 | #define IXJCTL_MAXRINGS PHONE_MAXRINGS |
| 26 | #define IXJCTL_RING_CADENCE PHONE_RING_CADENCE |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 27 | #define IXJCTL_RING_START PHONE_RING_START |
| 28 | #define IXJCTL_RING_STOP PHONE_RING_STOP |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 29 | #define IXJCTL_CARDTYPE _IOR('q', 0xC1, int) |
| 30 | #define IXJCTL_SERIAL _IOR('q', 0xC2, int) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 31 | #define IXJCTL_DSP_TYPE _IOR('q', 0xC3, int) |
| 32 | #define IXJCTL_DSP_VERSION _IOR('q', 0xC4, int) |
| 33 | #define IXJCTL_VERSION _IOR('q', 0xDA, char *) |
| 34 | #define IXJCTL_DSP_IDLE _IO('q', 0xC5) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 35 | #define IXJCTL_TESTRAM _IO('q', 0xC6) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 36 | #define IXJCTL_REC_CODEC PHONE_REC_CODEC |
| 37 | #define IXJCTL_REC_START PHONE_REC_START |
| 38 | #define IXJCTL_REC_STOP PHONE_REC_STOP |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 39 | #define IXJCTL_REC_DEPTH PHONE_REC_DEPTH |
| 40 | #define IXJCTL_FRAME PHONE_FRAME |
| 41 | #define IXJCTL_REC_VOLUME PHONE_REC_VOLUME |
| 42 | #define IXJCTL_REC_LEVEL PHONE_REC_LEVEL |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 43 | typedef enum { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 44 | f300_640 = 4, |
| 45 | f300_500, |
| 46 | f1100, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 47 | f350, |
| 48 | f400, |
| 49 | f480, |
| 50 | f440, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 51 | f620, |
| 52 | f20_50, |
| 53 | f133_200, |
| 54 | f300, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 55 | f300_420, |
| 56 | f330, |
| 57 | f300_425, |
| 58 | f330_440, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 59 | f340, |
| 60 | f350_400, |
| 61 | f350_440, |
| 62 | f350_450, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 63 | f360, |
| 64 | f380_420, |
| 65 | f392, |
| 66 | f400_425, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 67 | f400_440, |
| 68 | f400_450, |
| 69 | f420, |
| 70 | f425, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 71 | f425_450, |
| 72 | f425_475, |
| 73 | f435, |
| 74 | f440_450, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 75 | f440_480, |
| 76 | f445, |
| 77 | f450, |
| 78 | f452, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 79 | f475, |
| 80 | f480_620, |
| 81 | f494, |
| 82 | f500, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 83 | f520, |
| 84 | f523, |
| 85 | f525, |
| 86 | f540_660, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 87 | f587, |
| 88 | f590, |
| 89 | f600, |
| 90 | f660, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 91 | f700, |
| 92 | f740, |
| 93 | f750, |
| 94 | f750_1450, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 95 | f770, |
| 96 | f800, |
| 97 | f816, |
| 98 | f850, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 99 | f857_1645, |
| 100 | f900, |
| 101 | f900_1300, |
| 102 | f935_1215, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 103 | f941_1477, |
| 104 | f942, |
| 105 | f950, |
| 106 | f950_1400, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 107 | f975, |
| 108 | f1000, |
| 109 | f1020, |
| 110 | f1050, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 111 | f1100_1750, |
| 112 | f1140, |
| 113 | f1200, |
| 114 | f1209, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 115 | f1330, |
| 116 | f1336, |
| 117 | lf1366, |
| 118 | f1380, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 119 | f1400, |
| 120 | f1477, |
| 121 | f1600, |
| 122 | f1633_1638, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 123 | f1800, |
| 124 | f1860 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 125 | } IXJ_FILTER_FREQ; |
| 126 | typedef struct { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 127 | unsigned int filter; |
| 128 | IXJ_FILTER_FREQ freq; |
| 129 | char enable; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 130 | } IXJ_FILTER; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 131 | typedef struct { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 132 | char enable; |
| 133 | char en_filter; |
| 134 | unsigned int filter; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 135 | unsigned int on1; |
| 136 | unsigned int off1; |
| 137 | unsigned int on2; |
| 138 | unsigned int off2; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 139 | unsigned int on3; |
| 140 | unsigned int off3; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 141 | } IXJ_FILTER_CADENCE; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 142 | #define IXJCTL_SET_FILTER _IOW('q', 0xC7, IXJ_FILTER *) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 143 | #define IXJCTL_SET_FILTER_RAW _IOW('q', 0xDD, IXJ_FILTER_RAW *) |
| 144 | #define IXJCTL_GET_FILTER_HIST _IOW('q', 0xC8, int) |
| 145 | #define IXJCTL_FILTER_CADENCE _IOW('q', 0xD6, IXJ_FILTER_CADENCE *) |
| 146 | #define IXJCTL_PLAY_CID _IO('q', 0xD7) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 147 | typedef enum { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 148 | hz20 = 0x7ffa, |
| 149 | hz50 = 0x7fe5, |
| 150 | hz133 = 0x7f4c, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 151 | hz200 = 0x7e6b, |
| 152 | hz261 = 0x7d50, |
| 153 | hz277 = 0x7cfa, |
| 154 | hz293 = 0x7c9f, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 155 | hz300 = 0x7c75, |
| 156 | hz311 = 0x7c32, |
| 157 | hz329 = 0x7bbf, |
| 158 | hz330 = 0x7bb8, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 159 | hz340 = 0x7b75, |
| 160 | hz349 = 0x7b37, |
| 161 | hz350 = 0x7b30, |
| 162 | hz360 = 0x7ae9, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 163 | hz369 = 0x7aa8, |
| 164 | hz380 = 0x7a56, |
| 165 | hz392 = 0x79fa, |
| 166 | hz400 = 0x79bb, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 167 | hz415 = 0x7941, |
| 168 | hz420 = 0x7918, |
| 169 | hz425 = 0x78ee, |
| 170 | hz435 = 0x7899, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 171 | hz440 = 0x786d, |
| 172 | hz445 = 0x7842, |
| 173 | hz450 = 0x7815, |
| 174 | hz452 = 0x7803, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 175 | hz466 = 0x7784, |
| 176 | hz475 = 0x7731, |
| 177 | hz480 = 0x7701, |
| 178 | hz493 = 0x7685, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 179 | hz494 = 0x767b, |
| 180 | hz500 = 0x7640, |
| 181 | hz520 = 0x7578, |
| 182 | hz523 = 0x7559, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 183 | hz525 = 0x7544, |
| 184 | hz540 = 0x74a7, |
| 185 | hz554 = 0x7411, |
| 186 | hz587 = 0x72a1, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 187 | hz590 = 0x727f, |
| 188 | hz600 = 0x720b, |
| 189 | hz620 = 0x711e, |
| 190 | hz622 = 0x7106, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 191 | hz659 = 0x6f3b, |
| 192 | hz660 = 0x6f2e, |
| 193 | hz698 = 0x6d3d, |
| 194 | hz700 = 0x6d22, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 195 | hz739 = 0x6b09, |
| 196 | hz740 = 0x6afa, |
| 197 | hz750 = 0x6a6c, |
| 198 | hz770 = 0x694b, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 199 | hz783 = 0x688b, |
| 200 | hz800 = 0x678d, |
| 201 | hz816 = 0x6698, |
| 202 | hz830 = 0x65bf, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 203 | hz850 = 0x6484, |
| 204 | hz857 = 0x6414, |
| 205 | hz880 = 0x629f, |
| 206 | hz900 = 0x6154, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 207 | hz932 = 0x5f35, |
| 208 | hz935 = 0x5f01, |
| 209 | hz941 = 0x5e9a, |
| 210 | hz942 = 0x5e88, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 211 | hz950 = 0x5dfd, |
| 212 | hz975 = 0x5c44, |
| 213 | hz1000 = 0x5a81, |
| 214 | hz1020 = 0x5912, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 215 | hz1050 = 0x56e2, |
| 216 | hz1100 = 0x5320, |
| 217 | hz1140 = 0x5007, |
| 218 | hz1200 = 0x4b3b, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 219 | hz1209 = 0x4a80, |
| 220 | hz1215 = 0x4a02, |
| 221 | hz1250 = 0x471c, |
| 222 | hz1300 = 0x42e0, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 223 | hz1330 = 0x4049, |
| 224 | hz1336 = 0x3fc4, |
| 225 | hz1366 = 0x3d22, |
| 226 | hz1380 = 0x3be4, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 227 | hz1400 = 0x3a1b, |
| 228 | hz1450 = 0x3596, |
| 229 | hz1477 = 0x331c, |
| 230 | hz1500 = 0x30fb, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 231 | hz1600 = 0x278d, |
| 232 | hz1633 = 0x2462, |
| 233 | hz1638 = 0x23e7, |
| 234 | hz1645 = 0x233a, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 235 | hz1750 = 0x18f8, |
| 236 | hz1800 = 0x1405, |
| 237 | hz1860 = 0xe0b, |
| 238 | hz2100 = 0xf5f6, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 239 | hz2130 = 0xf2f5, |
| 240 | hz2450 = 0xd3b3, |
| 241 | hz2750 = 0xb8e4 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 242 | } IXJ_FREQ; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 243 | typedef enum { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 244 | C1 = hz261, |
| 245 | CS1 = hz277, |
| 246 | D1 = hz293, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 247 | DS1 = hz311, |
| 248 | E1 = hz329, |
| 249 | F1 = hz349, |
| 250 | FS1 = hz369, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 251 | G1 = hz392, |
| 252 | GS1 = hz415, |
| 253 | A1 = hz440, |
| 254 | AS1 = hz466, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 255 | B1 = hz493, |
| 256 | C2 = hz523, |
| 257 | CS2 = hz554, |
| 258 | D2 = hz587, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 259 | DS2 = hz622, |
| 260 | E2 = hz659, |
| 261 | F2 = hz698, |
| 262 | FS2 = hz739, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 263 | G2 = hz783, |
| 264 | GS2 = hz830, |
| 265 | A2 = hz880, |
| 266 | AS2 = hz932, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 267 | } IXJ_NOTE; |
| 268 | typedef struct { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 269 | int tone_index; |
| 270 | int freq0; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 271 | int gain0; |
| 272 | int freq1; |
| 273 | int gain1; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 274 | } IXJ_TONE; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 275 | #define IXJCTL_INIT_TONE _IOW('q', 0xC9, IXJ_TONE *) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 276 | typedef struct { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 277 | int index; |
| 278 | int tone_on_time; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 279 | int tone_off_time; |
| 280 | int freq0; |
| 281 | int gain0; |
| 282 | int freq1; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 283 | int gain1; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 284 | } IXJ_CADENCE_ELEMENT; |
| 285 | typedef enum { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 286 | PLAY_ONCE, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 287 | REPEAT_LAST_ELEMENT, |
| 288 | REPEAT_ALL |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 289 | } IXJ_CADENCE_TERM; |
| 290 | typedef struct { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 291 | int elements_used; |
| 292 | IXJ_CADENCE_TERM termination; |
| 293 | IXJ_CADENCE_ELEMENT __user * ce; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 294 | } IXJ_CADENCE; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 295 | #define IXJCTL_TONE_CADENCE _IOW('q', 0xCA, IXJ_CADENCE *) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 296 | #define IXJCTL_PLAY_CODEC PHONE_PLAY_CODEC |
| 297 | #define IXJCTL_PLAY_START PHONE_PLAY_START |
| 298 | #define IXJCTL_PLAY_STOP PHONE_PLAY_STOP |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 299 | #define IXJCTL_PLAY_DEPTH PHONE_PLAY_DEPTH |
| 300 | #define IXJCTL_PLAY_VOLUME PHONE_PLAY_VOLUME |
| 301 | #define IXJCTL_PLAY_LEVEL PHONE_PLAY_LEVEL |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 302 | #define IXJCTL_AEC_START _IOW('q', 0xCB, int) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 303 | #define IXJCTL_AEC_STOP _IO('q', 0xCC) |
| 304 | #define IXJCTL_AEC_GET_LEVEL _IO('q', 0xCD) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 305 | #define AEC_OFF 0 |
| 306 | #define AEC_LOW 1 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 307 | #define AEC_MED 2 |
| 308 | #define AEC_HIGH 3 |
| 309 | #define AEC_AUTO 4 |
| 310 | #define AEC_AGC 5 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 311 | #define IXJCTL_DTMF_READY PHONE_DTMF_READY |
| 312 | #define IXJCTL_GET_DTMF PHONE_GET_DTMF |
| 313 | #define IXJCTL_GET_DTMF_ASCII PHONE_GET_DTMF_ASCII |
| 314 | #define IXJCTL_DTMF_OOB PHONE_DTMF_OOB |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 315 | #define IXJCTL_EXCEPTION PHONE_EXCEPTION |
| 316 | #define IXJCTL_PLAY_TONE PHONE_PLAY_TONE |
| 317 | #define IXJCTL_SET_TONE_ON_TIME PHONE_SET_TONE_ON_TIME |
| 318 | #define IXJCTL_SET_TONE_OFF_TIME PHONE_SET_TONE_OFF_TIME |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 319 | #define IXJCTL_GET_TONE_ON_TIME PHONE_GET_TONE_ON_TIME |
| 320 | #define IXJCTL_GET_TONE_OFF_TIME PHONE_GET_TONE_OFF_TIME |
| 321 | #define IXJCTL_GET_TONE_STATE PHONE_GET_TONE_STATE |
| 322 | #define IXJCTL_BUSY PHONE_BUSY |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 323 | #define IXJCTL_RINGBACK PHONE_RINGBACK |
| 324 | #define IXJCTL_DIALTONE PHONE_DIALTONE |
| 325 | #define IXJCTL_CPT_STOP PHONE_CPT_STOP |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 326 | #define IXJCTL_SET_LED _IOW('q', 0xCE, int) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 327 | #define IXJCTL_MIXER _IOW('q', 0xCF, int) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 328 | #define MIXER_MASTER_L 0x0000 |
| 329 | #define MIXER_MASTER_R 0x0100 |
| 330 | #define ATT00DB 0x00 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 331 | #define ATT02DB 0x01 |
| 332 | #define ATT04DB 0x02 |
| 333 | #define ATT06DB 0x03 |
| 334 | #define ATT08DB 0x04 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 335 | #define ATT10DB 0x05 |
| 336 | #define ATT12DB 0x06 |
| 337 | #define ATT14DB 0x07 |
| 338 | #define ATT16DB 0x08 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 339 | #define ATT18DB 0x09 |
| 340 | #define ATT20DB 0x0A |
| 341 | #define ATT22DB 0x0B |
| 342 | #define ATT24DB 0x0C |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 343 | #define ATT26DB 0x0D |
| 344 | #define ATT28DB 0x0E |
| 345 | #define ATT30DB 0x0F |
| 346 | #define ATT32DB 0x10 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 347 | #define ATT34DB 0x11 |
| 348 | #define ATT36DB 0x12 |
| 349 | #define ATT38DB 0x13 |
| 350 | #define ATT40DB 0x14 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 351 | #define ATT42DB 0x15 |
| 352 | #define ATT44DB 0x16 |
| 353 | #define ATT46DB 0x17 |
| 354 | #define ATT48DB 0x18 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 355 | #define ATT50DB 0x19 |
| 356 | #define ATT52DB 0x1A |
| 357 | #define ATT54DB 0x1B |
| 358 | #define ATT56DB 0x1C |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 359 | #define ATT58DB 0x1D |
| 360 | #define ATT60DB 0x1E |
| 361 | #define ATT62DB 0x1F |
| 362 | #define MASTER_MUTE 0x80 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 363 | #define MIXER_PORT_CD_L 0x0600 |
| 364 | #define MIXER_PORT_CD_R 0x0700 |
| 365 | #define MIXER_PORT_LINE_IN_L 0x0800 |
| 366 | #define MIXER_PORT_LINE_IN_R 0x0900 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 367 | #define MIXER_PORT_POTS_REC 0x0C00 |
| 368 | #define MIXER_PORT_MIC 0x0E00 |
| 369 | #define GAIN12DB 0x00 |
| 370 | #define GAIN10DB 0x01 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 371 | #define GAIN08DB 0x02 |
| 372 | #define GAIN06DB 0x03 |
| 373 | #define GAIN04DB 0x04 |
| 374 | #define GAIN02DB 0x05 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 375 | #define GAIN00DB 0x06 |
| 376 | #define GAIN_02DB 0x07 |
| 377 | #define GAIN_04DB 0x08 |
| 378 | #define GAIN_06DB 0x09 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 379 | #define GAIN_08DB 0x0A |
| 380 | #define GAIN_10DB 0x0B |
| 381 | #define GAIN_12DB 0x0C |
| 382 | #define GAIN_14DB 0x0D |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 383 | #define GAIN_16DB 0x0E |
| 384 | #define GAIN_18DB 0x0F |
| 385 | #define GAIN_20DB 0x10 |
| 386 | #define GAIN_22DB 0x11 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 387 | #define GAIN_24DB 0x12 |
| 388 | #define GAIN_26DB 0x13 |
| 389 | #define GAIN_28DB 0x14 |
| 390 | #define GAIN_30DB 0x15 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 391 | #define GAIN_32DB 0x16 |
| 392 | #define GAIN_34DB 0x17 |
| 393 | #define GAIN_36DB 0x18 |
| 394 | #define GAIN_38DB 0x19 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 395 | #define GAIN_40DB 0x1A |
| 396 | #define GAIN_42DB 0x1B |
| 397 | #define GAIN_44DB 0x1C |
| 398 | #define GAIN_46DB 0x1D |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 399 | #define GAIN_48DB 0x1E |
| 400 | #define GAIN_50DB 0x1F |
| 401 | #define INPUT_MUTE 0x80 |
| 402 | #define MIXER_PORT_POTS_PLAY 0x0F00 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 403 | #define POTS_ATT_00DB 0x00 |
| 404 | #define POTS_ATT_04DB 0x01 |
| 405 | #define POTS_ATT_08DB 0x02 |
| 406 | #define POTS_ATT_12DB 0x03 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 407 | #define POTS_ATT_16DB 0x04 |
| 408 | #define POTS_ATT_20DB 0x05 |
| 409 | #define POTS_ATT_24DB 0x06 |
| 410 | #define POTS_ATT_28DB 0x07 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 411 | #define POTS_MUTE 0x80 |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 412 | #define IXJCTL_DAA_COEFF_SET _IOW('q', 0xD0, int) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 413 | #define DAA_US 1 |
| 414 | #define DAA_UK 2 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 415 | #define DAA_FRANCE 3 |
| 416 | #define DAA_GERMANY 4 |
| 417 | #define DAA_AUSTRALIA 5 |
| 418 | #define DAA_JAPAN 6 |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 419 | #define IXJCTL_PORT _IOW('q', 0xD1, int) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 420 | #define PORT_QUERY 0 |
| 421 | #define PORT_POTS 1 |
| 422 | #define PORT_PSTN 2 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 423 | #define PORT_SPEAKER 3 |
| 424 | #define PORT_HANDSET 4 |
| 425 | #define IXJCTL_PSTN_SET_STATE PHONE_PSTN_SET_STATE |
| 426 | #define IXJCTL_PSTN_GET_STATE PHONE_PSTN_GET_STATE |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 427 | #define PSTN_ON_HOOK 0 |
| 428 | #define PSTN_RINGING 1 |
| 429 | #define PSTN_OFF_HOOK 2 |
| 430 | #define PSTN_PULSE_DIAL 3 |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 431 | #define IXJCTL_DAA_AGAIN _IOW('q', 0xD2, int) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 432 | #define AGRR00DB 0x00 |
| 433 | #define AGRR3_5DB 0x10 |
| 434 | #define AGRR06DB 0x30 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 435 | #define AGX00DB 0x00 |
| 436 | #define AGX_6DB 0x04 |
| 437 | #define AGX3_5DB 0x08 |
| 438 | #define AGX_2_5B 0x0C |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 439 | #define IXJCTL_PSTN_LINETEST _IO('q', 0xD3) |
| 440 | #define IXJCTL_CID _IOR('q', 0xD4, PHONE_CID *) |
| 441 | #define IXJCTL_VMWI _IOR('q', 0xD8, int) |
| 442 | #define IXJCTL_CIDCW _IOW('q', 0xD9, PHONE_CID *) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 443 | #define IXJCTL_WINK_DURATION PHONE_WINK_DURATION |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 444 | #define IXJCTL_POTS_PSTN _IOW('q', 0xD5, int) |
| 445 | #define IXJCTL_HZ _IOW('q', 0xE0, int) |
| 446 | #define IXJCTL_RATE _IOW('q', 0xE1, int) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 447 | #define IXJCTL_FRAMES_READ _IOR('q', 0xE2, unsigned long) |
| 448 | #define IXJCTL_FRAMES_WRITTEN _IOR('q', 0xE3, unsigned long) |
| 449 | #define IXJCTL_READ_WAIT _IOR('q', 0xE4, unsigned long) |
| 450 | #define IXJCTL_WRITE_WAIT _IOR('q', 0xE5, unsigned long) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 451 | #define IXJCTL_DRYBUFFER_READ _IOR('q', 0xE6, unsigned long) |
| 452 | #define IXJCTL_DRYBUFFER_CLEAR _IO('q', 0xE7) |
| 453 | #define IXJCTL_DTMF_PRESCALE _IOW('q', 0xE8, int) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 454 | typedef enum { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 455 | SIG_DTMF_READY, |
| 456 | SIG_HOOKSTATE, |
| 457 | SIG_FLASH, |
| 458 | SIG_PSTN_RING, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 459 | SIG_CALLER_ID, |
| 460 | SIG_PSTN_WINK, |
| 461 | SIG_F0, |
| 462 | SIG_F1, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 463 | SIG_F2, |
| 464 | SIG_F3, |
| 465 | SIG_FC0, |
| 466 | SIG_FC1, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 467 | SIG_FC2, |
| 468 | SIG_FC3, |
| 469 | SIG_READ_READY = 33, |
| 470 | SIG_WRITE_READY = 34 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 471 | } IXJ_SIGEVENT; |
| 472 | typedef struct { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 473 | unsigned int event; |
| 474 | int signal; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 475 | } IXJ_SIGDEF; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 476 | #define IXJCTL_SIGCTL _IOW('q', 0xE9, IXJ_SIGDEF *) |
| 477 | #define IXJCTL_SC_RXG _IOW('q', 0xEA, int) |
| 478 | #define IXJCTL_SC_TXG _IOW('q', 0xEB, int) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 479 | #define IXJCTL_INTERCOM_START _IOW('q', 0xFD, int) |
| 480 | #define IXJCTL_INTERCOM_STOP _IOW('q', 0xFE, int) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 481 | typedef struct { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 482 | unsigned int filter; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 483 | char enable; |
| 484 | unsigned int coeff[19]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 485 | } IXJ_FILTER_RAW; |
| 486 | #endif |