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