Home | History | Annotate | Download | only in linux
      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  ****************************************************************************
     11  ****************************************************************************/
     12 #ifndef TELEPHONY_H
     13 #define TELEPHONY_H
     14 
     15 #define TELEPHONY_VERSION 3013
     16 
     17 #define PHONE_VENDOR_IXJ 1
     18 #define PHONE_VENDOR_QUICKNET PHONE_VENDOR_IXJ
     19 #define PHONE_VENDOR_VOICETRONIX 2
     20 #define PHONE_VENDOR_ACULAB 3
     21 #define PHONE_VENDOR_DIGI 4
     22 #define PHONE_VENDOR_FRANKLIN 5
     23 
     24 #define QTI_PHONEJACK 100
     25 #define QTI_LINEJACK 300
     26 #define QTI_PHONEJACK_LITE 400
     27 #define QTI_PHONEJACK_PCI 500
     28 #define QTI_PHONECARD 600
     29 
     30 typedef enum {
     31  vendor = 0,
     32  device,
     33  port,
     34  codec,
     35  dsp
     36 } phone_cap;
     37 
     38 struct phone_capability {
     39  char desc[80];
     40  phone_cap captype;
     41  int cap;
     42  int handle;
     43 };
     44 
     45 typedef enum {
     46  pots = 0,
     47  pstn,
     48  handset,
     49  speaker
     50 } phone_ports;
     51 
     52 #define PHONE_CAPABILITIES _IO ('q', 0x80)
     53 #define PHONE_CAPABILITIES_LIST _IOR ('q', 0x81, struct phone_capability *)
     54 #define PHONE_CAPABILITIES_CHECK _IOW ('q', 0x82, struct phone_capability *)
     55 
     56 typedef struct {
     57  char month[3];
     58  char day[3];
     59  char hour[3];
     60  char min[3];
     61  int numlen;
     62  char number[11];
     63  int namelen;
     64  char name[80];
     65 } PHONE_CID;
     66 
     67 #define PHONE_RING _IO ('q', 0x83)
     68 #define PHONE_HOOKSTATE _IO ('q', 0x84)
     69 #define PHONE_MAXRINGS _IOW ('q', 0x85, char)
     70 #define PHONE_RING_CADENCE _IOW ('q', 0x86, short)
     71 #define OLD_PHONE_RING_START _IO ('q', 0x87)
     72 #define PHONE_RING_START _IOW ('q', 0x87, PHONE_CID *)
     73 #define PHONE_RING_STOP _IO ('q', 0x88)
     74 
     75 #define USA_RING_CADENCE 0xC0C0
     76 
     77 #define PHONE_REC_CODEC _IOW ('q', 0x89, int)
     78 #define PHONE_REC_START _IO ('q', 0x8A)
     79 #define PHONE_REC_STOP _IO ('q', 0x8B)
     80 #define PHONE_REC_DEPTH _IOW ('q', 0x8C, int)
     81 #define PHONE_FRAME _IOW ('q', 0x8D, int)
     82 #define PHONE_REC_VOLUME _IOW ('q', 0x8E, int)
     83 #define PHONE_REC_VOLUME_LINEAR _IOW ('q', 0xDB, int)
     84 #define PHONE_REC_LEVEL _IO ('q', 0x8F)
     85 
     86 #define PHONE_PLAY_CODEC _IOW ('q', 0x90, int)
     87 #define PHONE_PLAY_START _IO ('q', 0x91)
     88 #define PHONE_PLAY_STOP _IO ('q', 0x92)
     89 #define PHONE_PLAY_DEPTH _IOW ('q', 0x93, int)
     90 #define PHONE_PLAY_VOLUME _IOW ('q', 0x94, int)
     91 #define PHONE_PLAY_VOLUME_LINEAR _IOW ('q', 0xDC, int)
     92 #define PHONE_PLAY_LEVEL _IO ('q', 0x95)
     93 #define PHONE_DTMF_READY _IOR ('q', 0x96, int)
     94 #define PHONE_GET_DTMF _IOR ('q', 0x97, int)
     95 #define PHONE_GET_DTMF_ASCII _IOR ('q', 0x98, int)
     96 #define PHONE_DTMF_OOB _IOW ('q', 0x99, int)
     97 #define PHONE_EXCEPTION _IOR ('q', 0x9A, int)
     98 #define PHONE_PLAY_TONE _IOW ('q', 0x9B, char)
     99 #define PHONE_SET_TONE_ON_TIME _IOW ('q', 0x9C, int)
    100 #define PHONE_SET_TONE_OFF_TIME _IOW ('q', 0x9D, int)
    101 #define PHONE_GET_TONE_ON_TIME _IO ('q', 0x9E)
    102 #define PHONE_GET_TONE_OFF_TIME _IO ('q', 0x9F)
    103 #define PHONE_GET_TONE_STATE _IO ('q', 0xA0)
    104 #define PHONE_BUSY _IO ('q', 0xA1)
    105 #define PHONE_RINGBACK _IO ('q', 0xA2)
    106 #define PHONE_DIALTONE _IO ('q', 0xA3)
    107 #define PHONE_CPT_STOP _IO ('q', 0xA4)
    108 
    109 #define PHONE_PSTN_SET_STATE _IOW ('q', 0xA4, int)
    110 #define PHONE_PSTN_GET_STATE _IO ('q', 0xA5)
    111 
    112 #define PSTN_ON_HOOK 0
    113 #define PSTN_RINGING 1
    114 #define PSTN_OFF_HOOK 2
    115 #define PSTN_PULSE_DIAL 3
    116 
    117 #define PHONE_WINK_DURATION _IOW ('q', 0xA6, int)
    118 #define PHONE_WINK _IOW ('q', 0xAA, int)
    119 
    120 typedef enum {
    121  G723_63 = 1,
    122  G723_53 = 2,
    123  TS85 = 3,
    124  TS48 = 4,
    125  TS41 = 5,
    126  G728 = 6,
    127  G729 = 7,
    128  ULAW = 8,
    129  ALAW = 9,
    130  LINEAR16 = 10,
    131  LINEAR8 = 11,
    132  WSS = 12,
    133  G729B = 13
    134 } phone_codec;
    135 
    136 struct phone_codec_data
    137 {
    138  phone_codec type;
    139  unsigned short buf_min, buf_opt, buf_max;
    140 };
    141 
    142 #define PHONE_QUERY_CODEC _IOWR ('q', 0xA7, struct phone_codec_data *)
    143 #define PHONE_PSTN_LINETEST _IO ('q', 0xA8)
    144 
    145 #define PHONE_VAD _IOW ('q', 0xA9, int)
    146 
    147 struct phone_except
    148 {
    149  unsigned int dtmf_ready:1;
    150  unsigned int hookstate:1;
    151  unsigned int pstn_ring:1;
    152  unsigned int caller_id:1;
    153  unsigned int pstn_wink:1;
    154  unsigned int f0:1;
    155  unsigned int f1:1;
    156  unsigned int f2:1;
    157  unsigned int f3:1;
    158  unsigned int flash:1;
    159  unsigned int fc0:1;
    160  unsigned int fc1:1;
    161  unsigned int fc2:1;
    162  unsigned int fc3:1;
    163  unsigned int reserved:18;
    164 };
    165 
    166 union telephony_exception {
    167  struct phone_except bits;
    168  unsigned int bytes;
    169 };
    170 
    171 #endif
    172 
    173