[go: nahoru, domu]

11da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
21da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*
31da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds *
4475be4d85a274d0961593db41cf85689db1d583cJoe Perches Copyright (c) Eicon Networks, 2002.
51da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds *
6475be4d85a274d0961593db41cf85689db1d583cJoe Perches This source file is supplied for the use with
7475be4d85a274d0961593db41cf85689db1d583cJoe Perches Eicon Networks range of DIVA Server Adapters.
81da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds *
9475be4d85a274d0961593db41cf85689db1d583cJoe Perches Eicon File Revision :    2.1
101da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds *
11475be4d85a274d0961593db41cf85689db1d583cJoe Perches This program is free software; you can redistribute it and/or modify
12475be4d85a274d0961593db41cf85689db1d583cJoe Perches it under the terms of the GNU General Public License as published by
13475be4d85a274d0961593db41cf85689db1d583cJoe Perches the Free Software Foundation; either version 2, or (at your option)
14475be4d85a274d0961593db41cf85689db1d583cJoe Perches any later version.
151da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds *
16475be4d85a274d0961593db41cf85689db1d583cJoe Perches This program is distributed in the hope that it will be useful,
17475be4d85a274d0961593db41cf85689db1d583cJoe Perches but WITHOUT ANY WARRANTY OF ANY KIND WHATSOEVER INCLUDING ANY
18475be4d85a274d0961593db41cf85689db1d583cJoe Perches implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19475be4d85a274d0961593db41cf85689db1d583cJoe Perches See the GNU General Public License for more details.
201da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds *
21475be4d85a274d0961593db41cf85689db1d583cJoe Perches You should have received a copy of the GNU General Public License
22475be4d85a274d0961593db41cf85689db1d583cJoe Perches along with this program; if not, write to the Free Software
23475be4d85a274d0961593db41cf85689db1d583cJoe Perches Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
241da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds *
251da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds */
261da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
271da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*#define DEBUG */
281da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
291da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
301da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
311da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
32475be4d85a274d0961593db41cf85689db1d583cJoe Perches
33475be4d85a274d0961593db41cf85689db1d583cJoe Perches
341da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
351da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
361da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
371da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
381da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
391da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define IMPLEMENT_DTMF 1
401da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define IMPLEMENT_LINE_INTERCONNECT2 1
411da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define IMPLEMENT_ECHO_CANCELLER 1
421da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define IMPLEMENT_RTP 1
431da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define IMPLEMENT_T38 1
441da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define IMPLEMENT_FAX_SUB_SEP_PWD 1
451da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define IMPLEMENT_V18 1
461da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define IMPLEMENT_DTMF_TONE 1
471da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define IMPLEMENT_PIAFS 1
481da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define IMPLEMENT_FAX_PAPER_FORMATS 1
491da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define IMPLEMENT_VOWN 1
501da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define IMPLEMENT_CAPIDTMF 1
511da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define IMPLEMENT_FAX_NONSTANDARD 1
521da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define VSWITCH_SUPPORT 1
531da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
541da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
551da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define IMPLEMENT_LINE_INTERCONNECT 0
561da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define IMPLEMENT_MARKED_OK_AFTER_FC 1
571da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
581da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#include "capidtmf.h"
591da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
601da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*------------------------------------------------------------------*/
611da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* Common API internal definitions                                  */
621da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*------------------------------------------------------------------*/
631da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
641da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MAX_APPL 240
651da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MAX_NCCI           127
661da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
671da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MSG_IN_QUEUE_SIZE  ((4096 + 3) & 0xfffc)  /* must be multiple of 4 */
681da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
691da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
701da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MSG_IN_OVERHEAD    sizeof(APPL   *)
711da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
721da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MAX_NL_CHANNEL     255
731da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MAX_DATA_B3        8
741da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MAX_DATA_ACK       MAX_DATA_B3
751da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MAX_MULTI_IE       6
761da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MAX_MSG_SIZE       256
771da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MAX_MSG_PARMS      10
781da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MAX_CPN_MASK_SIZE  16
791da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MAX_MSN_CONFIG     10
801da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define EXT_CONTROLLER     0x80
811da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define CODEC              0x01
821da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define CODEC_PERMANENT    0x02
831da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ADV_VOICE          0x03
841da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MAX_CIP_TYPES      5  /* kind of CIP types for group optimization */
85475be4d85a274d0961593db41cf85689db1d583cJoe Perches#define C_IND_MASK_DWORDS  ((MAX_APPL + 32) >> 5)
861da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
871da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
881da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define FAX_CONNECT_INFO_BUFFER_SIZE  256
891da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define NCPI_BUFFER_SIZE              256
901da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
911da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MAX_CHANNELS_PER_PLCI         8
921da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MAX_INTERNAL_COMMAND_LEVELS   4
931da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define INTERNAL_REQ_BUFFER_SIZE      272
941da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
951da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define INTERNAL_IND_BUFFER_SIZE      768
961da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
971da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_PARAMETER_BUFFER_SIZE    12
981da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ADV_VOICE_COEF_BUFFER_SIZE    50
991da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
1001da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define LI_PLCI_B_QUEUE_ENTRIES       256
1011da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
1021da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
1031da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
1041da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldstypedef struct _APPL APPL;
1051da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldstypedef struct _PLCI PLCI;
1061da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldstypedef struct _NCCI NCCI;
1071da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldstypedef struct _DIVA_CAPI_ADAPTER DIVA_CAPI_ADAPTER;
1081da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldstypedef struct _DATA_B3_DESC DATA_B3_DESC;
1091da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldstypedef struct _DATA_ACK_DESC DATA_ACK_DESC;
1101da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldstypedef struct manufacturer_profile_s MANUFACTURER_PROFILE;
1111da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldstypedef struct fax_ncpi_s FAX_NCPI;
1121da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldstypedef struct api_parse_s API_PARSE;
1131da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldstypedef struct api_save_s API_SAVE;
1141da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldstypedef struct msn_config_s MSN_CONFIG;
1151da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldstypedef struct msn_config_max_s MSN_CONFIG_MAX;
1161da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldstypedef struct msn_ld_s MSN_LD;
1171da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
1181da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstruct manufacturer_profile_s {
119475be4d85a274d0961593db41cf85689db1d583cJoe Perches	dword private_options;
120475be4d85a274d0961593db41cf85689db1d583cJoe Perches	dword rtp_primary_payloads;
121475be4d85a274d0961593db41cf85689db1d583cJoe Perches	dword rtp_additional_payloads;
1221da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds};
1231da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
1241da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstruct fax_ncpi_s {
125475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word options;
126475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word format;
1271da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds};
1281da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
1291da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstruct msn_config_s {
130475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte msn[MAX_CPN_MASK_SIZE];
1311da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds};
1321da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
1331da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstruct msn_config_max_s {
134475be4d85a274d0961593db41cf85689db1d583cJoe Perches	MSN_CONFIG    msn_conf[MAX_MSN_CONFIG];
1351da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds};
1361da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
1371da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstruct msn_ld_s {
138475be4d85a274d0961593db41cf85689db1d583cJoe Perches	dword low;
139475be4d85a274d0961593db41cf85689db1d583cJoe Perches	dword high;
1401da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds};
1411da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
1421da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstruct api_parse_s {
143475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word          length;
144475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte *info;
1451da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds};
1461da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
1471da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstruct api_save_s {
148475be4d85a274d0961593db41cf85689db1d583cJoe Perches	API_PARSE     parms[MAX_MSG_PARMS + 1];
149475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          info[MAX_MSG_SIZE];
1501da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds};
1511da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
1521da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstruct _DATA_B3_DESC {
153475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word          Handle;
154475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word          Number;
155475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word          Flags;
156475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word          Length;
157475be4d85a274d0961593db41cf85689db1d583cJoe Perches	void *P;
1581da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds};
1591da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
1601da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstruct _DATA_ACK_DESC {
161475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word          Handle;
162475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word          Number;
1631da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds};
1641da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
165475be4d85a274d0961593db41cf85689db1d583cJoe Perchestypedef void (*t_std_internal_command)(dword Id, PLCI *plci, byte Rc);
1661da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
1671da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/************************************************************************/
1681da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* Don't forget to adapt dos.asm after changing the _APPL structure!!!! */
1691da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstruct _APPL {
170475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word          Id;
171475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word          NullCREnable;
172475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word          CDEnable;
173475be4d85a274d0961593db41cf85689db1d583cJoe Perches	dword         S_Handle;
1741da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
1751da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
1761da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
1771da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
1781da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
1791da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
180475be4d85a274d0961593db41cf85689db1d583cJoe Perches	LIST_ENTRY    s_function;
181475be4d85a274d0961593db41cf85689db1d583cJoe Perches	dword         s_context;
182475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word          s_count;
183475be4d85a274d0961593db41cf85689db1d583cJoe Perches	APPL *s_next;
184475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte *xbuffer_used;
185475be4d85a274d0961593db41cf85689db1d583cJoe Perches	void **xbuffer_internal;
186475be4d85a274d0961593db41cf85689db1d583cJoe Perches	void **xbuffer_ptr;
1871da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
1881da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
1891da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
1901da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
1911da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
1921da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
193475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte *queue;
194475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word          queue_size;
195475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word          queue_free;
196475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word          queue_read;
197475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word          queue_write;
198475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word          queue_signal;
199475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          msg_lost;
200475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          appl_flags;
201475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word          Number;
2021da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
203475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word          MaxBuffer;
204475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          MaxNCCI;
205475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          MaxNCCIData;
206475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word          MaxDataLength;
207475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word          NCCIDataFlowCtrlTimer;
208475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte *ReceiveBuffer;
209475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word *DataNCCI;
210475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word *DataFlags;
2111da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds};
2121da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
2131da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
2141da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstruct _PLCI {
215475be4d85a274d0961593db41cf85689db1d583cJoe Perches	ENTITY        Sig;
216475be4d85a274d0961593db41cf85689db1d583cJoe Perches	ENTITY        NL;
217475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word          RNum;
218475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word          RFlags;
219475be4d85a274d0961593db41cf85689db1d583cJoe Perches	BUFFERS       RData[2];
220475be4d85a274d0961593db41cf85689db1d583cJoe Perches	BUFFERS       XData[1];
221475be4d85a274d0961593db41cf85689db1d583cJoe Perches	BUFFERS       NData[2];
222475be4d85a274d0961593db41cf85689db1d583cJoe Perches
223475be4d85a274d0961593db41cf85689db1d583cJoe Perches	DIVA_CAPI_ADAPTER   *adapter;
224475be4d85a274d0961593db41cf85689db1d583cJoe Perches	APPL      *appl;
225475be4d85a274d0961593db41cf85689db1d583cJoe Perches	PLCI      *relatedPTYPLCI;
226475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          Id;
227475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          State;
228475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          sig_req;
229475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          nl_req;
230475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          SuppState;
231475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          channels;
232475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          tel;
233475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          B1_resource;
234475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          B2_prot;
235475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          B3_prot;
236475be4d85a274d0961593db41cf85689db1d583cJoe Perches
237475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word          command;
238475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word          m_command;
239475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word          internal_command;
240475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word          number;
241475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word          req_in_start;
242475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word          req_in;
243475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word          req_out;
244475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word          msg_in_write_pos;
245475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word          msg_in_read_pos;
246475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word          msg_in_wrap_pos;
247475be4d85a274d0961593db41cf85689db1d583cJoe Perches
248475be4d85a274d0961593db41cf85689db1d583cJoe Perches	void *data_sent_ptr;
249475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          data_sent;
250475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          send_disc;
251475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          sig_global_req;
252475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          sig_remove_id;
253475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          nl_global_req;
254475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          nl_remove_id;
255475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          b_channel;
256475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          adv_nl;
257475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          manufacturer;
258475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          call_dir;
259475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          hook_state;
260475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          spoofed_msg;
261475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          ptyState;
262475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          cr_enquiry;
263475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word          hangup_flow_ctrl_timer;
264475be4d85a274d0961593db41cf85689db1d583cJoe Perches
265475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word          ncci_ring_list;
266475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          inc_dis_ncci_table[MAX_CHANNELS_PER_PLCI];
267475be4d85a274d0961593db41cf85689db1d583cJoe Perches	t_std_internal_command internal_command_queue[MAX_INTERNAL_COMMAND_LEVELS];
268475be4d85a274d0961593db41cf85689db1d583cJoe Perches	dword         c_ind_mask_table[C_IND_MASK_DWORDS];
269475be4d85a274d0961593db41cf85689db1d583cJoe Perches	dword         group_optimization_mask_table[C_IND_MASK_DWORDS];
270475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          RBuffer[200];
271475be4d85a274d0961593db41cf85689db1d583cJoe Perches	dword         msg_in_queue[MSG_IN_QUEUE_SIZE/sizeof(dword)];
272475be4d85a274d0961593db41cf85689db1d583cJoe Perches	API_SAVE      saved_msg;
273475be4d85a274d0961593db41cf85689db1d583cJoe Perches	API_SAVE      B_protocol;
274475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          fax_connect_info_length;
275475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          fax_connect_info_buffer[FAX_CONNECT_INFO_BUFFER_SIZE];
276475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          fax_edata_ack_length;
277475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word          nsf_control_bits;
278475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          ncpi_state;
279475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          ncpi_buffer[NCPI_BUFFER_SIZE];
280475be4d85a274d0961593db41cf85689db1d583cJoe Perches
281475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          internal_req_buffer[INTERNAL_REQ_BUFFER_SIZE];
282475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          internal_ind_buffer[INTERNAL_IND_BUFFER_SIZE + 3];
283475be4d85a274d0961593db41cf85689db1d583cJoe Perches	dword         requested_options_conn;
284475be4d85a274d0961593db41cf85689db1d583cJoe Perches	dword         requested_options;
285475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word          B1_facilities;
286475be4d85a274d0961593db41cf85689db1d583cJoe Perches	API_SAVE   *adjust_b_parms_msg;
287475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word          adjust_b_facilities;
288475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word          adjust_b_command;
289475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word          adjust_b_ncci;
290475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word          adjust_b_mode;
291475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word          adjust_b_state;
292475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          adjust_b_restore;
293475be4d85a274d0961593db41cf85689db1d583cJoe Perches
294475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          dtmf_rec_active;
295475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word          dtmf_rec_pulse_ms;
296475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word          dtmf_rec_pause_ms;
297475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          dtmf_send_requests;
298475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word          dtmf_send_pulse_ms;
299475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word          dtmf_send_pause_ms;
300475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word          dtmf_cmd;
301475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word          dtmf_msg_number_queue[8];
302475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          dtmf_parameter_length;
303475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          dtmf_parameter_buffer[DTMF_PARAMETER_BUFFER_SIZE];
304475be4d85a274d0961593db41cf85689db1d583cJoe Perches
305475be4d85a274d0961593db41cf85689db1d583cJoe Perches
306475be4d85a274d0961593db41cf85689db1d583cJoe Perches	t_capidtmf_state capidtmf_state;
307475be4d85a274d0961593db41cf85689db1d583cJoe Perches
308475be4d85a274d0961593db41cf85689db1d583cJoe Perches
309475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          li_bchannel_id;    /* BRI: 1..2, PRI: 1..32 */
310475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          li_channel_bits;
311475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          li_notify_update;
312475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word          li_cmd;
313475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word          li_write_command;
314475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word          li_write_channel;
315475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word          li_plci_b_write_pos;
316475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word          li_plci_b_read_pos;
317475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word          li_plci_b_req_pos;
318475be4d85a274d0961593db41cf85689db1d583cJoe Perches	dword         li_plci_b_queue[LI_PLCI_B_QUEUE_ENTRIES];
319475be4d85a274d0961593db41cf85689db1d583cJoe Perches
320475be4d85a274d0961593db41cf85689db1d583cJoe Perches
321475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word          ec_cmd;
322475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word          ec_idi_options;
323475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word          ec_tail_length;
324475be4d85a274d0961593db41cf85689db1d583cJoe Perches
325475be4d85a274d0961593db41cf85689db1d583cJoe Perches
326475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          tone_last_indication_code;
327475be4d85a274d0961593db41cf85689db1d583cJoe Perches
328475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          vswitchstate;
329475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          vsprot;
330475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          vsprotdialect;
331475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          notifiedcall; /* Flag if it is a spoofed call */
332475be4d85a274d0961593db41cf85689db1d583cJoe Perches
333475be4d85a274d0961593db41cf85689db1d583cJoe Perches	int           rx_dma_descriptor;
334475be4d85a274d0961593db41cf85689db1d583cJoe Perches	dword         rx_dma_magic;
3351da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds};
3361da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
3371da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
3381da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstruct _NCCI {
339475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          data_out;
340475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          data_pending;
341475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          data_ack_out;
342475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          data_ack_pending;
343475be4d85a274d0961593db41cf85689db1d583cJoe Perches	DATA_B3_DESC  DBuffer[MAX_DATA_B3];
344475be4d85a274d0961593db41cf85689db1d583cJoe Perches	DATA_ACK_DESC DataAck[MAX_DATA_ACK];
3451da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds};
3461da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
3471da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
3481da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstruct _DIVA_CAPI_ADAPTER {
349475be4d85a274d0961593db41cf85689db1d583cJoe Perches	IDI_CALL      request;
350475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          Id;
351475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          max_plci;
352475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          max_listen;
353475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          listen_active;
354475be4d85a274d0961593db41cf85689db1d583cJoe Perches	PLCI      *plci;
355475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          ch_ncci[MAX_NL_CHANNEL + 1];
356475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          ncci_ch[MAX_NCCI + 1];
357475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          ncci_plci[MAX_NCCI + 1];
358475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          ncci_state[MAX_NCCI + 1];
359475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          ncci_next[MAX_NCCI + 1];
360475be4d85a274d0961593db41cf85689db1d583cJoe Perches	NCCI          ncci[MAX_NCCI + 1];
361475be4d85a274d0961593db41cf85689db1d583cJoe Perches
362475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          ch_flow_control[MAX_NL_CHANNEL + 1];  /* Used by XON protocol */
363475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          ch_flow_control_pending;
364475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          ch_flow_plci[MAX_NL_CHANNEL + 1];
365475be4d85a274d0961593db41cf85689db1d583cJoe Perches	int           last_flow_control_ch;
366475be4d85a274d0961593db41cf85689db1d583cJoe Perches
367475be4d85a274d0961593db41cf85689db1d583cJoe Perches	dword         Info_Mask[MAX_APPL];
368475be4d85a274d0961593db41cf85689db1d583cJoe Perches	dword         CIP_Mask[MAX_APPL];
369475be4d85a274d0961593db41cf85689db1d583cJoe Perches
370475be4d85a274d0961593db41cf85689db1d583cJoe Perches	dword         Notification_Mask[MAX_APPL];
371475be4d85a274d0961593db41cf85689db1d583cJoe Perches	PLCI      *codec_listen[MAX_APPL];
372475be4d85a274d0961593db41cf85689db1d583cJoe Perches	dword         requested_options_table[MAX_APPL];
373475be4d85a274d0961593db41cf85689db1d583cJoe Perches	API_PROFILE   profile;
374475be4d85a274d0961593db41cf85689db1d583cJoe Perches	MANUFACTURER_PROFILE man_profile;
375475be4d85a274d0961593db41cf85689db1d583cJoe Perches	dword         manufacturer_features;
376475be4d85a274d0961593db41cf85689db1d583cJoe Perches
377475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          AdvCodecFLAG;
378475be4d85a274d0961593db41cf85689db1d583cJoe Perches	PLCI      *AdvCodecPLCI;
379475be4d85a274d0961593db41cf85689db1d583cJoe Perches	PLCI      *AdvSignalPLCI;
380475be4d85a274d0961593db41cf85689db1d583cJoe Perches	APPL      *AdvSignalAppl;
381475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          TelOAD[23];
382475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          TelOSA[23];
383475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          scom_appl_disable;
384475be4d85a274d0961593db41cf85689db1d583cJoe Perches	PLCI      *automatic_lawPLCI;
385475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          automatic_law;
386475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          u_law;
387475be4d85a274d0961593db41cf85689db1d583cJoe Perches
388475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          adv_voice_coef_length;
389475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          adv_voice_coef_buffer[ADV_VOICE_COEF_BUFFER_SIZE];
390475be4d85a274d0961593db41cf85689db1d583cJoe Perches
391475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          li_pri;
392475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          li_channels;
393475be4d85a274d0961593db41cf85689db1d583cJoe Perches	word          li_base;
394475be4d85a274d0961593db41cf85689db1d583cJoe Perches
395475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte adapter_disabled;
396475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte group_optimization_enabled; /* use application groups if enabled */
397475be4d85a274d0961593db41cf85689db1d583cJoe Perches	dword sdram_bar;
398475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte flag_dynamic_l1_down; /* for hunt groups:down layer 1 if no appl present*/
399475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte FlowControlIdTable[256];
400475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte FlowControlSkipTable[256];
401475be4d85a274d0961593db41cf85689db1d583cJoe Perches	void *os_card; /* pointer to associated OS dependent adapter structure */
4021da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds};
4031da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
4041da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
4051da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*------------------------------------------------------------------*/
4061da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* Application flags                                                */
4071da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*------------------------------------------------------------------*/
4081da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
4091da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define APPL_FLAG_OLD_LI_SPEC           0x01
4101da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define APPL_FLAG_PRIV_EC_SPEC          0x02
4111da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
4121da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
4131da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*------------------------------------------------------------------*/
4141da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* API parameter definitions                                        */
4151da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*------------------------------------------------------------------*/
4161da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
4171da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define X75_TTX         1       /* x.75 for ttx                     */
4181da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define TRF             2       /* transparent with hdlc framing    */
4191da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define TRF_IN          3       /* transparent with hdlc fr. inc.   */
4201da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SDLC            4       /* sdlc, sna layer-2                */
4211da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define X75_BTX         5       /* x.75 for btx                     */
4221da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define LAPD            6       /* lapd (Q.921)                     */
4231da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define X25_L2          7       /* x.25 layer-2                     */
4241da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define V120_L2         8       /* V.120 layer-2 protocol           */
425d82603c6da7579c50ebe3fe7da6e3e267d9f6427Jorrit Schippers#define V42_IN          9       /* V.42 layer-2 protocol, incoming */
4261da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define V42            10       /* V.42 layer-2 protocol            */
4271da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MDM_ATP        11       /* AT Parser built in the L2        */
4281da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define X75_V42BIS     12       /* ISO7776 (X.75 SLP) modified to support V.42 bis compression */
429d82603c6da7579c50ebe3fe7da6e3e267d9f6427Jorrit Schippers#define RTPL2_IN       13       /* RTP layer-2 protocol, incoming  */
4301da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define RTPL2          14       /* RTP layer-2 protocol             */
4311da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define V120_V42BIS    15       /* V.120 layer-2 protocol supporting V.42 bis compression */
4321da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
4331da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T70NL           1
4341da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define X25PLP          2
4351da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T70NLX          3
4361da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define TRANSPARENT_NL  4
4371da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ISO8208         5
4381da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30             6
4391da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
4401da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
4411da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*------------------------------------------------------------------*/
4421da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* FAX interface to IDI                                             */
4431da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*------------------------------------------------------------------*/
4441da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
4451da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define CAPI_MAX_HEAD_LINE_SPACE        89
4461da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define CAPI_MAX_DATE_TIME_LENGTH       18
4471da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
4481da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_MAX_STATION_ID_LENGTH       20
4491da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_MAX_SUBADDRESS_LENGTH       20
4501da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_MAX_PASSWORD_LENGTH         20
4511da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
4521da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldstypedef struct t30_info_s T30_INFO;
4531da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstruct t30_info_s {
454475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          code;
455475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          rate_div_2400;
456475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          resolution;
457475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          data_format;
458475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          pages_low;
459475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          pages_high;
460475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          operating_mode;
461475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          control_bits_low;
462475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          control_bits_high;
463475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          feature_bits_low;
464475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          feature_bits_high;
465475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          recording_properties;
466475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          universal_6;
467475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          universal_7;
468475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          station_id_len;
469475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          head_line_len;
470475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte          station_id[T30_MAX_STATION_ID_LENGTH];
4711da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* byte          head_line[];      */
4721da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* byte          sub_sep_length;   */
4731da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* byte          sub_sep_field[];  */
4741da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* byte          pwd_length;       */
4751da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* byte          pwd_field[];      */
4761da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* byte          nsf_info_length;   */
4771da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* byte          nsf_info_field[];  */
4781da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds};
4791da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
4801da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
4811da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_RESOLUTION_R8_0385          0x00
4821da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_RESOLUTION_R8_0770_OR_200   0x01
4831da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_RESOLUTION_R8_1540          0x02
4841da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_RESOLUTION_R16_1540_OR_400  0x04
4851da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_RESOLUTION_R4_0385_OR_100   0x08
4861da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_RESOLUTION_300_300          0x10
4871da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_RESOLUTION_INCH_BASED       0x40
4881da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_RESOLUTION_METRIC_BASED     0x80
4891da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
4901da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_RECORDING_WIDTH_ISO_A4      0
4911da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_RECORDING_WIDTH_ISO_B4      1
4921da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_RECORDING_WIDTH_ISO_A3      2
4931da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_RECORDING_WIDTH_COUNT       3
4941da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
4951da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_RECORDING_LENGTH_ISO_A4     0
4961da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_RECORDING_LENGTH_ISO_B4     1
4971da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_RECORDING_LENGTH_UNLIMITED  2
4981da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_RECORDING_LENGTH_COUNT      3
4991da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
5001da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_MIN_SCANLINE_TIME_00_00_00  0
5011da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_MIN_SCANLINE_TIME_05_05_05  1
5021da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_MIN_SCANLINE_TIME_10_05_05  2
5031da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_MIN_SCANLINE_TIME_10_10_10  3
5041da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_MIN_SCANLINE_TIME_20_10_10  4
5051da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_MIN_SCANLINE_TIME_20_20_20  5
5061da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_MIN_SCANLINE_TIME_40_20_20  6
5071da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_MIN_SCANLINE_TIME_40_40_40  7
5081da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_MIN_SCANLINE_TIME_RES_8     8
5091da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_MIN_SCANLINE_TIME_RES_9     9
5101da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_MIN_SCANLINE_TIME_RES_10    10
5111da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_MIN_SCANLINE_TIME_10_10_05  11
5121da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_MIN_SCANLINE_TIME_20_10_05  12
5131da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_MIN_SCANLINE_TIME_20_20_10  13
5141da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_MIN_SCANLINE_TIME_40_20_10  14
5151da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_MIN_SCANLINE_TIME_40_40_20  15
5161da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_MIN_SCANLINE_TIME_COUNT     16
5171da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
5181da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_DATA_FORMAT_SFF             0
5191da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_DATA_FORMAT_ASCII           1
5201da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_DATA_FORMAT_NATIVE          2
5211da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_DATA_FORMAT_COUNT           3
5221da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
5231da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
5241da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_OPERATING_MODE_STANDARD     0
5251da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_OPERATING_MODE_CLASS2       1
5261da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_OPERATING_MODE_CLASS1       2
5271da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_OPERATING_MODE_CAPI         3
5281da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_OPERATING_MODE_CAPI_NEG     4
5291da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_OPERATING_MODE_COUNT        5
5301da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
531475be4d85a274d0961593db41cf85689db1d583cJoe Perches/* EDATA transmit messages */
5321da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define EDATA_T30_DIS         0x01
5331da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define EDATA_T30_FTT         0x02
5341da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define EDATA_T30_MCF         0x03
5351da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define EDATA_T30_PARAMETERS  0x04
5361da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
537475be4d85a274d0961593db41cf85689db1d583cJoe Perches/* EDATA receive messages */
5381da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define EDATA_T30_DCS         0x81
5391da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define EDATA_T30_TRAIN_OK    0x82
5401da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define EDATA_T30_EOP         0x83
5411da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define EDATA_T30_MPS         0x84
5421da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define EDATA_T30_EOM         0x85
5431da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define EDATA_T30_DTC         0x86
5441da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define EDATA_T30_PAGE_END    0x87   /* Indicates end of page data. Reserved, but not implemented ! */
5451da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define EDATA_T30_EOP_CAPI    0x88
5461da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
5471da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
5481da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_SUCCESS                        0
5491da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_ERR_NO_DIS_RECEIVED            1
5501da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_ERR_TIMEOUT_NO_RESPONSE        2
5511da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_ERR_RETRY_NO_RESPONSE          3
5521da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_ERR_TOO_MANY_REPEATS           4
5531da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_ERR_UNEXPECTED_MESSAGE         5
5541da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_ERR_UNEXPECTED_DCN             6
5551da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_ERR_DTC_UNSUPPORTED            7
5561da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_ERR_ALL_RATES_FAILED           8
5571da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_ERR_TOO_MANY_TRAINS            9
5581da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_ERR_RECEIVE_CORRUPTED          10
5591da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_ERR_UNEXPECTED_DISC            11
5601da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_ERR_APPLICATION_DISC           12
5611da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_ERR_INCOMPATIBLE_DIS           13
5621da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_ERR_INCOMPATIBLE_DCS           14
5631da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_ERR_TIMEOUT_NO_COMMAND         15
5641da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_ERR_RETRY_NO_COMMAND           16
5651da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_ERR_TIMEOUT_COMMAND_TOO_LONG   17
5661da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_ERR_TIMEOUT_RESPONSE_TOO_LONG  18
5671da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_ERR_NOT_IDENTIFIED             19
5681da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_ERR_SUPERVISORY_TIMEOUT        20
5691da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_ERR_TOO_LONG_SCAN_LINE         21
5701da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* #define T30_ERR_RETRY_NO_PAGE_AFTER_MPS    22 */
5711da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_ERR_RETRY_NO_PAGE_RECEIVED     23
5721da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_ERR_RETRY_NO_DCS_AFTER_FTT     24
5731da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_ERR_RETRY_NO_DCS_AFTER_EOM     25
5741da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_ERR_RETRY_NO_DCS_AFTER_MPS     26
5751da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_ERR_RETRY_NO_DCN_AFTER_MCF     27
5761da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_ERR_RETRY_NO_DCN_AFTER_RTN     28
5771da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_ERR_RETRY_NO_CFR               29
5781da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_ERR_RETRY_NO_MCF_AFTER_EOP     30
5791da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_ERR_RETRY_NO_MCF_AFTER_EOM     31
5801da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_ERR_RETRY_NO_MCF_AFTER_MPS     32
5811da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_ERR_SUB_SEP_UNSUPPORTED        33
5821da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_ERR_PWD_UNSUPPORTED            34
5831da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_ERR_SUB_SEP_PWD_UNSUPPORTED    35
5841da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_ERR_INVALID_COMMAND_FRAME      36
5851da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_ERR_UNSUPPORTED_PAGE_CODING    37
5861da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_ERR_INVALID_PAGE_CODING        38
5871da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_ERR_INCOMPATIBLE_PAGE_CONFIG   39
5881da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_ERR_TIMEOUT_FROM_APPLICATION   40
5891da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_ERR_V34FAX_NO_REACTION_ON_MARK 41
5901da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_ERR_V34FAX_TRAINING_TIMEOUT    42
5911da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_ERR_V34FAX_UNEXPECTED_V21      43
5921da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_ERR_V34FAX_PRIMARY_CTS_ON      44
5931da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_ERR_V34FAX_TURNAROUND_POLLING  45
5941da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_ERR_V34FAX_V8_INCOMPATIBILITY  46
5951da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
5961da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
5971da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_CONTROL_BIT_DISABLE_FINE       0x0001
5981da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_CONTROL_BIT_ENABLE_ECM         0x0002
5991da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_CONTROL_BIT_ECM_64_BYTES       0x0004
6001da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_CONTROL_BIT_ENABLE_2D_CODING   0x0008
6011da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_CONTROL_BIT_ENABLE_T6_CODING   0x0010
6021da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_CONTROL_BIT_ENABLE_UNCOMPR     0x0020
6031da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_CONTROL_BIT_ACCEPT_POLLING     0x0040
6041da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_CONTROL_BIT_REQUEST_POLLING    0x0080
6051da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_CONTROL_BIT_MORE_DOCUMENTS     0x0100
6061da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_CONTROL_BIT_ACCEPT_SUBADDRESS  0x0200
6071da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_CONTROL_BIT_ACCEPT_SEL_POLLING 0x0400
6081da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_CONTROL_BIT_ACCEPT_PASSWORD    0x0800
6091da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_CONTROL_BIT_ENABLE_V34FAX      0x1000
6101da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_CONTROL_BIT_EARLY_CONNECT      0x2000
6111da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
6121da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_CONTROL_BIT_ALL_FEATURES  (T30_CONTROL_BIT_ENABLE_ECM | T30_CONTROL_BIT_ENABLE_2D_CODING |   T30_CONTROL_BIT_ENABLE_T6_CODING | T30_CONTROL_BIT_ENABLE_UNCOMPR |   T30_CONTROL_BIT_ENABLE_V34FAX)
6131da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
6141da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_FEATURE_BIT_FINE               0x0001
6151da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_FEATURE_BIT_ECM                0x0002
6161da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_FEATURE_BIT_ECM_64_BYTES       0x0004
6171da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_FEATURE_BIT_2D_CODING          0x0008
6181da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_FEATURE_BIT_T6_CODING          0x0010
6191da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_FEATURE_BIT_UNCOMPR_ENABLED    0x0020
6201da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_FEATURE_BIT_POLLING            0x0040
6211da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_FEATURE_BIT_MORE_DOCUMENTS     0x0100
6221da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_FEATURE_BIT_V34FAX             0x1000
6231da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
6241da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
6251da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_NSF_CONTROL_BIT_ENABLE_NSF     0x0001
6261da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_NSF_CONTROL_BIT_RAW_INFO       0x0002
6271da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_NSF_CONTROL_BIT_NEGOTIATE_IND  0x0004
6281da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_NSF_CONTROL_BIT_NEGOTIATE_RESP 0x0008
6291da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
6301da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_NSF_ELEMENT_NSF_FIF            0x00
6311da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_NSF_ELEMENT_NSC_FIF            0x01
6321da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_NSF_ELEMENT_NSS_FIF            0x02
6331da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define T30_NSF_ELEMENT_COMPANY_NAME       0x03
6341da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
6351da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
6361da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*------------------------------------------------------------------*/
6371da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* Analog modem definitions                                         */
6381da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*------------------------------------------------------------------*/
6391da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
6401da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldstypedef struct async_s ASYNC_FORMAT;
6411da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstruct async_s {
642475be4d85a274d0961593db41cf85689db1d583cJoe Perches	unsigned pe:1;
643475be4d85a274d0961593db41cf85689db1d583cJoe Perches	unsigned parity:2;
644475be4d85a274d0961593db41cf85689db1d583cJoe Perches	unsigned spare:2;
645475be4d85a274d0961593db41cf85689db1d583cJoe Perches	unsigned stp:1;
646475be4d85a274d0961593db41cf85689db1d583cJoe Perches	unsigned ch_len:2;   /* 3th octett in CAI */
6471da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds};
6481da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
6491da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
6501da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*------------------------------------------------------------------*/
6511da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* PLCI/NCCI states                                                 */
6521da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*------------------------------------------------------------------*/
6531da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
6541da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define IDLE                    0
6551da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define OUTG_CON_PENDING        1
6561da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define INC_CON_PENDING         2
6571da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define INC_CON_ALERT           3
6581da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define INC_CON_ACCEPT          4
6591da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define INC_ACT_PENDING         5
6601da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define LISTENING               6
6611da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define CONNECTED               7
6621da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define OUTG_DIS_PENDING        8
6631da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define INC_DIS_PENDING         9
6641da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define LOCAL_CONNECT           10
6651da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define INC_RES_PENDING         11
6661da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define OUTG_RES_PENDING        12
6671da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SUSPENDING              13
6681da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ADVANCED_VOICE_SIG      14
6691da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ADVANCED_VOICE_NOSIG    15
6701da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define RESUMING                16
6711da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define INC_CON_CONNECTED_ALERT 17
6721da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define OUTG_REJ_PENDING        18
6731da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
6741da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
6751da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*------------------------------------------------------------------*/
67625985edcedea6396277003854657b5f3cb31a628Lucas De Marchi/* auxiliary states for supplementary services                     */
6771da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*------------------------------------------------------------------*/
6781da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
6791da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define IDLE                0
6801da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define HOLD_REQUEST        1
6811da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define HOLD_INDICATE       2
6821da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define CALL_HELD           3
6831da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define RETRIEVE_REQUEST    4
6841da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define RETRIEVE_INDICATION 5
6851da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
6861da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*------------------------------------------------------------------*/
6871da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* Capi IE + Msg types                                              */
6881da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*------------------------------------------------------------------*/
689475be4d85a274d0961593db41cf85689db1d583cJoe Perches#define ESC_CAUSE        0x800 | CAU        /* Escape cause element */
690475be4d85a274d0961593db41cf85689db1d583cJoe Perches#define ESC_MSGTYPE      0x800 | MSGTYPEIE  /* Escape message type  */
691475be4d85a274d0961593db41cf85689db1d583cJoe Perches#define ESC_CHI          0x800 | CHI        /* Escape channel id    */
692475be4d85a274d0961593db41cf85689db1d583cJoe Perches#define ESC_LAW          0x800 | BC         /* Escape law info      */
693475be4d85a274d0961593db41cf85689db1d583cJoe Perches#define ESC_CR           0x800 | CRIE       /* Escape CallReference */
694475be4d85a274d0961593db41cf85689db1d583cJoe Perches#define ESC_PROFILE      0x800 | PROFILEIE  /* Escape profile       */
695475be4d85a274d0961593db41cf85689db1d583cJoe Perches#define ESC_SSEXT        0x800 | SSEXTIE    /* Escape Supplem. Serv.*/
696475be4d85a274d0961593db41cf85689db1d583cJoe Perches#define ESC_VSWITCH      0x800 | VSWITCHIE  /* Escape VSwitch       */
6971da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define CST              0x14               /* Call State i.e.      */
6981da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define PI               0x1E               /* Progress Indicator   */
6991da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define NI               0x27               /* Notification Ind     */
7001da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define CONN_NR          0x4C               /* Connected Number     */
7011da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define CONG_RNR         0xBF               /* Congestion RNR       */
7021da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define CONG_RR          0xB0               /* Congestion RR        */
7031da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define RESERVED         0xFF               /* Res. for future use  */
7041da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ON_BOARD_CODEC   0x02               /* external controller  */
7051da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define HANDSET          0x04               /* Codec+Handset(Pro11) */
7061da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define HOOK_SUPPORT     0x01               /* activate Hook signal */
7071da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SCR              0x7a               /* unscreened number    */
7081da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
7091da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define HOOK_OFF_REQ     0x9001             /* internal conn req    */
7101da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define HOOK_ON_REQ      0x9002             /* internal disc req    */
7111da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SUSPEND_REQ      0x9003             /* internal susp req    */
7121da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define RESUME_REQ       0x9004             /* internal resume req  */
7131da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define USELAW_REQ       0x9005             /* internal law    req  */
7141da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define LISTEN_SIG_ASSIGN_PEND  0x9006
7151da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define PERM_LIST_REQ    0x900a             /* permanent conn DCE   */
7161da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define C_HOLD_REQ       0x9011
7171da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define C_RETRIEVE_REQ   0x9012
7181da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define C_NCR_FAC_REQ    0x9013
7191da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define PERM_COD_ASSIGN  0x9014
7201da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define PERM_COD_CALL    0x9015
7211da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define PERM_COD_HOOK    0x9016
7221da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define PERM_COD_CONN_PEND 0x9017           /* wait for connect_con */
7231da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define PTY_REQ_PEND     0x9018
7241da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define CD_REQ_PEND      0x9019
7251da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define CF_START_PEND    0x901a
7261da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define CF_STOP_PEND     0x901b
7271da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ECT_REQ_PEND     0x901c
7281da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define GETSERV_REQ_PEND 0x901d
7291da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define BLOCK_PLCI       0x901e
7301da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define INTERR_NUMBERS_REQ_PEND         0x901f
7311da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define INTERR_DIVERSION_REQ_PEND       0x9020
7321da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MWI_ACTIVATE_REQ_PEND           0x9021
7331da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MWI_DEACTIVATE_REQ_PEND         0x9022
7341da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SSEXT_REQ_COMMAND               0x9023
7351da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SSEXT_NC_REQ_COMMAND            0x9024
7361da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define START_L1_SIG_ASSIGN_PEND        0x9025
7371da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define REM_L1_SIG_ASSIGN_PEND          0x9026
7381da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define CONF_BEGIN_REQ_PEND             0x9027
7391da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define CONF_ADD_REQ_PEND               0x9028
7401da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define CONF_SPLIT_REQ_PEND             0x9029
7411da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define CONF_DROP_REQ_PEND              0x902a
7421da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define CONF_ISOLATE_REQ_PEND           0x902b
7431da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define CONF_REATTACH_REQ_PEND          0x902c
7441da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define VSWITCH_REQ_PEND                0x902d
7451da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define GET_MWI_STATE                   0x902e
7461da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define CCBS_REQUEST_REQ_PEND           0x902f
7471da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define CCBS_DEACTIVATE_REQ_PEND        0x9030
7481da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define CCBS_INTERROGATE_REQ_PEND       0x9031
7491da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
7501da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define NO_INTERNAL_COMMAND             0
7511da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_COMMAND_1                  1
7521da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_COMMAND_2                  2
7531da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_COMMAND_3                  3
7541da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MIXER_COMMAND_1                 4
7551da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MIXER_COMMAND_2                 5
7561da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MIXER_COMMAND_3                 6
7571da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ADV_VOICE_COMMAND_CONNECT_1     7
7581da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ADV_VOICE_COMMAND_CONNECT_2     8
7591da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ADV_VOICE_COMMAND_CONNECT_3     9
7601da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ADV_VOICE_COMMAND_DISCONNECT_1  10
7611da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ADV_VOICE_COMMAND_DISCONNECT_2  11
7621da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ADV_VOICE_COMMAND_DISCONNECT_3  12
7631da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ADJUST_B_RESTORE_1              13
7641da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ADJUST_B_RESTORE_2              14
7651da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define RESET_B3_COMMAND_1              15
7661da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SELECT_B_COMMAND_1              16
7671da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define FAX_CONNECT_INFO_COMMAND_1      17
7681da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define FAX_CONNECT_INFO_COMMAND_2      18
7691da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define FAX_ADJUST_B23_COMMAND_1        19
7701da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define FAX_ADJUST_B23_COMMAND_2        20
7711da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define EC_COMMAND_1                    21
7721da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define EC_COMMAND_2                    22
7731da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define EC_COMMAND_3                    23
7741da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define RTP_CONNECT_B3_REQ_COMMAND_1    24
7751da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define RTP_CONNECT_B3_REQ_COMMAND_2    25
7761da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define RTP_CONNECT_B3_REQ_COMMAND_3    26
7771da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define RTP_CONNECT_B3_RES_COMMAND_1    27
7781da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define RTP_CONNECT_B3_RES_COMMAND_2    28
7791da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define RTP_CONNECT_B3_RES_COMMAND_3    29
7801da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define HOLD_SAVE_COMMAND_1             30
7811da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define RETRIEVE_RESTORE_COMMAND_1      31
7821da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define FAX_DISCONNECT_COMMAND_1        32
7831da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define FAX_DISCONNECT_COMMAND_2        33
7841da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define FAX_DISCONNECT_COMMAND_3        34
7851da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define FAX_EDATA_ACK_COMMAND_1         35
7861da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define FAX_EDATA_ACK_COMMAND_2         36
7871da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define FAX_CONNECT_ACK_COMMAND_1       37
7881da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define FAX_CONNECT_ACK_COMMAND_2       38
7891da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define STD_INTERNAL_COMMAND_COUNT      39
7901da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
7911da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define UID              0x2d               /* User Id for Mgmt      */
7921da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
7931da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define CALL_DIR_OUT             0x01       /* call direction of initial call */
7941da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define CALL_DIR_IN              0x02
7951da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define CALL_DIR_ORIGINATE       0x04       /* DTE/DCE direction according to */
7961da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define CALL_DIR_ANSWER          0x08       /*   state of B-Channel Operation */
7971da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define CALL_DIR_FORCE_OUTG_NL   0x10       /* for RESET_B3 reconnect, after DISC_B3... */
7981da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
7991da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define AWAITING_MANUF_CON 0x80             /* command spoofing flags */
8001da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define SPOOFING_REQUIRED  0xff
8011da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define AWAITING_SELECT_B  0xef
8021da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
8031da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*------------------------------------------------------------------*/
8041da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* B_CTRL / DSP_CTRL                                                */
8051da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*------------------------------------------------------------------*/
8061da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
8071da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DSP_CTRL_OLD_SET_MIXER_COEFFICIENTS     0x01
8081da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DSP_CTRL_SET_BCHANNEL_PASSIVATION_BRI   0x02
8091da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DSP_CTRL_SET_DTMF_PARAMETERS            0x03
8101da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
8111da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MANUFACTURER_FEATURE_SLAVE_CODEC          0x00000001L
8121da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MANUFACTURER_FEATURE_FAX_MORE_DOCUMENTS   0x00000002L
8131da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MANUFACTURER_FEATURE_HARDDTMF             0x00000004L
8141da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MANUFACTURER_FEATURE_SOFTDTMF_SEND        0x00000008L
8151da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MANUFACTURER_FEATURE_DTMF_PARAMETERS      0x00000010L
8161da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MANUFACTURER_FEATURE_SOFTDTMF_RECEIVE     0x00000020L
8171da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MANUFACTURER_FEATURE_FAX_SUB_SEP_PWD      0x00000040L
8181da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MANUFACTURER_FEATURE_V18                  0x00000080L
8191da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MANUFACTURER_FEATURE_MIXER_CH_CH          0x00000100L
8201da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MANUFACTURER_FEATURE_MIXER_CH_PC          0x00000200L
8211da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MANUFACTURER_FEATURE_MIXER_PC_CH          0x00000400L
8221da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MANUFACTURER_FEATURE_MIXER_PC_PC          0x00000800L
8231da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MANUFACTURER_FEATURE_ECHO_CANCELLER       0x00001000L
8241da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MANUFACTURER_FEATURE_RTP                  0x00002000L
8251da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MANUFACTURER_FEATURE_T38                  0x00004000L
8261da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MANUFACTURER_FEATURE_TRANSP_DELIVERY_CONF 0x00008000L
8271da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MANUFACTURER_FEATURE_XONOFF_FLOW_CONTROL  0x00010000L
8281da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MANUFACTURER_FEATURE_OOB_CHANNEL          0x00020000L
8291da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MANUFACTURER_FEATURE_IN_BAND_CHANNEL      0x00040000L
8301da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MANUFACTURER_FEATURE_IN_BAND_FEATURE      0x00080000L
8311da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MANUFACTURER_FEATURE_PIAFS                0x00100000L
8321da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MANUFACTURER_FEATURE_DTMF_TONE            0x00200000L
8331da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MANUFACTURER_FEATURE_FAX_PAPER_FORMATS    0x00400000L
8341da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MANUFACTURER_FEATURE_OK_FC_LABEL          0x00800000L
8351da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MANUFACTURER_FEATURE_VOWN                 0x01000000L
8361da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MANUFACTURER_FEATURE_XCONNECT             0x02000000L
8371da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MANUFACTURER_FEATURE_DMACONNECT           0x04000000L
8381da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MANUFACTURER_FEATURE_AUDIO_TAP            0x08000000L
8391da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MANUFACTURER_FEATURE_FAX_NONSTANDARD      0x10000000L
8401da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
8411da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*------------------------------------------------------------------*/
8421da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* DTMF interface to IDI                                            */
8431da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*------------------------------------------------------------------*/
8441da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
8451da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
8461da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_DIGIT_TONE_LOW_GROUP_697_HZ        0x00
8471da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_DIGIT_TONE_LOW_GROUP_770_HZ        0x01
8481da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_DIGIT_TONE_LOW_GROUP_852_HZ        0x02
8491da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_DIGIT_TONE_LOW_GROUP_941_HZ        0x03
8501da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_DIGIT_TONE_LOW_GROUP_MASK          0x03
8511da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_DIGIT_TONE_HIGH_GROUP_1209_HZ      0x00
8521da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_DIGIT_TONE_HIGH_GROUP_1336_HZ      0x04
8531da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_DIGIT_TONE_HIGH_GROUP_1477_HZ      0x08
8541da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_DIGIT_TONE_HIGH_GROUP_1633_HZ      0x0c
8551da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_DIGIT_TONE_HIGH_GROUP_MASK         0x0c
8561da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_DIGIT_TONE_CODE_0                  0x07
8571da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_DIGIT_TONE_CODE_1                  0x00
8581da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_DIGIT_TONE_CODE_2                  0x04
8591da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_DIGIT_TONE_CODE_3                  0x08
8601da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_DIGIT_TONE_CODE_4                  0x01
8611da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_DIGIT_TONE_CODE_5                  0x05
8621da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_DIGIT_TONE_CODE_6                  0x09
8631da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_DIGIT_TONE_CODE_7                  0x02
8641da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_DIGIT_TONE_CODE_8                  0x06
8651da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_DIGIT_TONE_CODE_9                  0x0a
8661da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_DIGIT_TONE_CODE_STAR               0x03
8671da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_DIGIT_TONE_CODE_HASHMARK           0x0b
8681da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_DIGIT_TONE_CODE_A                  0x0c
8691da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_DIGIT_TONE_CODE_B                  0x0d
8701da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_DIGIT_TONE_CODE_C                  0x0e
8711da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_DIGIT_TONE_CODE_D                  0x0f
8721da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
8731da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_UDATA_REQUEST_SEND_DIGITS            16
8741da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_UDATA_REQUEST_ENABLE_RECEIVER        17
8751da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_UDATA_REQUEST_DISABLE_RECEIVER       18
8761da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_UDATA_INDICATION_DIGITS_SENT         16
8771da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_UDATA_INDICATION_DIGITS_RECEIVED     17
8781da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_UDATA_INDICATION_MODEM_CALLING_TONE  18
8791da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_UDATA_INDICATION_FAX_CALLING_TONE    19
8801da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_UDATA_INDICATION_ANSWER_TONE         20
8811da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
8821da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define UDATA_REQUEST_MIXER_TAP_DATA        27
8831da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define UDATA_INDICATION_MIXER_TAP_DATA     27
8841da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
8851da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_LISTEN_ACTIVE_FLAG        0x01
8861da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_SEND_DIGIT_FLAG           0x01
8871da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
8881da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
8891da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*------------------------------------------------------------------*/
8901da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* Mixer interface to IDI                                           */
8911da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*------------------------------------------------------------------*/
8921da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
8931da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
8941da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define LI2_FLAG_PCCONNECT_A_B 0x40000000
8951da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define LI2_FLAG_PCCONNECT_B_A 0x80000000
8961da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
8971da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MIXER_BCHANNELS_BRI    2
8981da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MIXER_IC_CHANNELS_BRI  MIXER_BCHANNELS_BRI
8991da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MIXER_IC_CHANNEL_BASE  MIXER_BCHANNELS_BRI
9001da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MIXER_CHANNELS_BRI     (MIXER_BCHANNELS_BRI + MIXER_IC_CHANNELS_BRI)
9011da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MIXER_CHANNELS_PRI     32
9021da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
9031da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldstypedef struct li_config_s LI_CONFIG;
9041da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
9051da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstruct xconnect_card_address_s {
906475be4d85a274d0961593db41cf85689db1d583cJoe Perches	dword low;
907475be4d85a274d0961593db41cf85689db1d583cJoe Perches	dword high;
9081da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds};
9091da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
9101da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstruct xconnect_transfer_address_s {
911475be4d85a274d0961593db41cf85689db1d583cJoe Perches	struct xconnect_card_address_s card_address;
912475be4d85a274d0961593db41cf85689db1d583cJoe Perches	dword offset;
9131da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds};
9141da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
9151da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsstruct li_config_s {
916475be4d85a274d0961593db41cf85689db1d583cJoe Perches	DIVA_CAPI_ADAPTER   *adapter;
917475be4d85a274d0961593db41cf85689db1d583cJoe Perches	PLCI   *plci;
918475be4d85a274d0961593db41cf85689db1d583cJoe Perches	struct xconnect_transfer_address_s send_b;
919475be4d85a274d0961593db41cf85689db1d583cJoe Perches	struct xconnect_transfer_address_s send_pc;
920475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte   *flag_table;  /* dword aligned and sized */
921475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte   *coef_table;  /* dword aligned and sized */
922475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte channel;
923475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte curchnl;
924475be4d85a274d0961593db41cf85689db1d583cJoe Perches	byte chflags;
9251da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds};
9261da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
9271da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsextern LI_CONFIG   *li_config_table;
9281da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvaldsextern word li_total_channels;
9291da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
9301da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define LI_CHANNEL_INVOLVED        0x01
9311da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define LI_CHANNEL_ACTIVE          0x02
9321da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define LI_CHANNEL_TX_DATA         0x04
9331da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define LI_CHANNEL_RX_DATA         0x08
9341da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define LI_CHANNEL_CONFERENCE      0x10
9351da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define LI_CHANNEL_ADDRESSES_SET   0x80
9361da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
9371da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define LI_CHFLAG_MONITOR          0x01
9381da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define LI_CHFLAG_MIX              0x02
9391da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define LI_CHFLAG_LOOP             0x04
9401da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
9411da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define LI_FLAG_INTERCONNECT       0x01
9421da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define LI_FLAG_MONITOR            0x02
9431da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define LI_FLAG_MIX                0x04
9441da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define LI_FLAG_PCCONNECT          0x08
9451da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define LI_FLAG_CONFERENCE         0x10
9461da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define LI_FLAG_ANNOUNCEMENT       0x20
9471da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
9481da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define LI_COEF_CH_CH              0x01
9491da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define LI_COEF_CH_PC              0x02
9501da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define LI_COEF_PC_CH              0x04
9511da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define LI_COEF_PC_PC              0x08
9521da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define LI_COEF_CH_CH_SET          0x10
9531da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define LI_COEF_CH_PC_SET          0x20
9541da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define LI_COEF_PC_CH_SET          0x40
9551da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define LI_COEF_PC_PC_SET          0x80
9561da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
9571da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define LI_REQ_SILENT_UPDATE       0xffff
9581da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
9591da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define LI_PLCI_B_LAST_FLAG        ((dword) 0x80000000L)
9601da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define LI_PLCI_B_DISC_FLAG        ((dword) 0x40000000L)
9611da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define LI_PLCI_B_SKIP_FLAG        ((dword) 0x20000000L)
9621da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define LI_PLCI_B_FLAG_MASK        ((dword) 0xe0000000L)
9631da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
9641da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define UDATA_REQUEST_SET_MIXER_COEFS_BRI       24
9651da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define UDATA_REQUEST_SET_MIXER_COEFS_PRI_SYNC  25
9661da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define UDATA_REQUEST_SET_MIXER_COEFS_PRI_ASYN  26
9671da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define UDATA_INDICATION_MIXER_COEFS_SET        24
9681da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
9691da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MIXER_FEATURE_ENABLE_TX_DATA        0x0001
9701da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MIXER_FEATURE_ENABLE_RX_DATA        0x0002
9711da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
9721da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MIXER_COEF_LINE_CHANNEL_MASK        0x1f
9731da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MIXER_COEF_LINE_FROM_PC_FLAG        0x20
9741da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MIXER_COEF_LINE_TO_PC_FLAG          0x40
9751da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define MIXER_COEF_LINE_ROW_FLAG            0x80
9761da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
9771da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define UDATA_REQUEST_XCONNECT_FROM         28
9781da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define UDATA_INDICATION_XCONNECT_FROM      28
9791da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define UDATA_REQUEST_XCONNECT_TO           29
9801da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define UDATA_INDICATION_XCONNECT_TO        29
9811da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
9821da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define XCONNECT_CHANNEL_PORT_B             0x0000
9831da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define XCONNECT_CHANNEL_PORT_PC            0x8000
9841da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define XCONNECT_CHANNEL_PORT_MASK          0x8000
9851da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define XCONNECT_CHANNEL_NUMBER_MASK        0x7fff
9861da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define XCONNECT_CHANNEL_PORT_COUNT         2
9871da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
9881da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define XCONNECT_SUCCESS           0x0000
9891da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define XCONNECT_ERROR             0x0001
9901da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
9911da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
9921da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*------------------------------------------------------------------*/
9931da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* Echo canceller interface to IDI                                  */
9941da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*------------------------------------------------------------------*/
9951da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
9961da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
9971da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define PRIVATE_ECHO_CANCELLER         0
9981da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
9991da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define PRIV_SELECTOR_ECHO_CANCELLER   255
10001da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
10011da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define EC_ENABLE_OPERATION            1
10021da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define EC_DISABLE_OPERATION           2
10031da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define EC_FREEZE_COEFFICIENTS         3
10041da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define EC_RESUME_COEFFICIENT_UPDATE   4
10051da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define EC_RESET_COEFFICIENTS          5
10061da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
10071da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define EC_DISABLE_NON_LINEAR_PROCESSING     0x0001
10081da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define EC_DO_NOT_REQUIRE_REVERSALS          0x0002
10091da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define EC_DETECT_DISABLE_TONE               0x0004
10101da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
10111da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define EC_SUCCESS                           0
10121da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define EC_UNSUPPORTED_OPERATION             1
10131da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
10141da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define EC_BYPASS_DUE_TO_CONTINUOUS_2100HZ   1
10151da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define EC_BYPASS_DUE_TO_REVERSED_2100HZ     2
10161da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define EC_BYPASS_RELEASED                   3
10171da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
10181da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DSP_CTRL_SET_LEC_PARAMETERS          0x05
10191da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
10201da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define LEC_ENABLE_ECHO_CANCELLER            0x0001
10211da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define LEC_ENABLE_2100HZ_DETECTOR           0x0002
10221da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define LEC_REQUIRE_2100HZ_REVERSALS         0x0004
10231da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define LEC_MANUAL_DISABLE                   0x0008
10241da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define LEC_ENABLE_NONLINEAR_PROCESSING      0x0010
10251da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define LEC_FREEZE_COEFFICIENTS              0x0020
10261da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define LEC_RESET_COEFFICIENTS               0x8000
10271da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
10281da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define LEC_MAX_SUPPORTED_TAIL_LENGTH        32
10291da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
10301da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define LEC_UDATA_INDICATION_DISABLE_DETECT  9
10311da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
10321da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define LEC_DISABLE_TYPE_CONTIGNUOUS_2100HZ  0x00
10331da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define LEC_DISABLE_TYPE_REVERSED_2100HZ     0x01
10341da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define LEC_DISABLE_RELEASED                 0x02
10351da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
10361da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
10371da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*------------------------------------------------------------------*/
10381da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* RTP interface to IDI                                             */
10391da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*------------------------------------------------------------------*/
10401da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
10411da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
10421da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define B1_RTP                  31
10431da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define B2_RTP                  31
10441da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define B3_RTP                  31
10451da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
10461da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define PRIVATE_RTP                    1
10471da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
10481da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define RTP_PRIM_PAYLOAD_PCMU_8000     0
10491da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define RTP_PRIM_PAYLOAD_1016_8000     1
10501da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define RTP_PRIM_PAYLOAD_G726_32_8000  2
10511da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define RTP_PRIM_PAYLOAD_GSM_8000      3
10521da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define RTP_PRIM_PAYLOAD_G723_8000     4
10531da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define RTP_PRIM_PAYLOAD_DVI4_8000     5
10541da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define RTP_PRIM_PAYLOAD_DVI4_16000    6
10551da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define RTP_PRIM_PAYLOAD_LPC_8000      7
10561da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define RTP_PRIM_PAYLOAD_PCMA_8000     8
10571da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define RTP_PRIM_PAYLOAD_G722_16000    9
10581da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define RTP_PRIM_PAYLOAD_QCELP_8000    12
10591da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define RTP_PRIM_PAYLOAD_G728_8000     14
10601da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define RTP_PRIM_PAYLOAD_G729_8000     18
10611da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define RTP_PRIM_PAYLOAD_GSM_HR_8000   30
10621da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define RTP_PRIM_PAYLOAD_GSM_EFR_8000  31
10631da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
10641da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define RTP_ADD_PAYLOAD_BASE           32
10651da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define RTP_ADD_PAYLOAD_RED            32
10661da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define RTP_ADD_PAYLOAD_CN_8000        33
10671da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define RTP_ADD_PAYLOAD_DTMF           34
10681da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
10691da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define RTP_SUCCESS                         0
10701da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define RTP_ERR_SSRC_OR_PAYLOAD_CHANGE      1
10711da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
10721da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define UDATA_REQUEST_RTP_RECONFIGURE       64
10731da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define UDATA_INDICATION_RTP_CHANGE         65
10741da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define BUDATA_REQUEST_QUERY_RTCP_REPORT    1
10751da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define BUDATA_INDICATION_RTCP_REPORT       1
10761da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
10771da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define RTP_CONNECT_OPTION_DISC_ON_SSRC_CHANGE    0x00000001L
10781da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define RTP_CONNECT_OPTION_DISC_ON_PT_CHANGE      0x00000002L
10791da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define RTP_CONNECT_OPTION_DISC_ON_UNKNOWN_PT     0x00000004L
10801da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define RTP_CONNECT_OPTION_NO_SILENCE_TRANSMIT    0x00010000L
10811da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
10821da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define RTP_PAYLOAD_OPTION_VOICE_ACTIVITY_DETECT  0x0001
10831da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define RTP_PAYLOAD_OPTION_DISABLE_POST_FILTER    0x0002
10841da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define RTP_PAYLOAD_OPTION_G723_LOW_CODING_RATE   0x0100
10851da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
10861da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define RTP_PACKET_FILTER_IGNORE_UNKNOWN_SSRC     0x00000001L
10871da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
10881da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define RTP_CHANGE_FLAG_SSRC_CHANGE               0x00000001L
10891da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define RTP_CHANGE_FLAG_PAYLOAD_TYPE_CHANGE       0x00000002L
10901da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define RTP_CHANGE_FLAG_UNKNOWN_PAYLOAD_TYPE      0x00000004L
10911da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
10921da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
10931da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*------------------------------------------------------------------*/
10941da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* T.38 interface to IDI                                            */
10951da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*------------------------------------------------------------------*/
10961da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
10971da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
10981da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define B1_T38                  30
10991da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define B2_T38                  30
11001da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define B3_T38                  30
11011da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
11021da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define PRIVATE_T38                    2
11031da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
11041da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
11051da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*------------------------------------------------------------------*/
11061da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* PIAFS interface to IDI                                            */
11071da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*------------------------------------------------------------------*/
11081da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
11091da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
11101da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define B1_PIAFS                29
11111da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define B2_PIAFS                29
11121da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
1113475be4d85a274d0961593db41cf85689db1d583cJoe Perches#define PRIVATE_PIAFS           29
11141da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
11151da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*
11161da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds  B2 configuration for PIAFS:
1117475be4d85a274d0961593db41cf85689db1d583cJoe Perches  +---------------------+------+-----------------------------------------+
1118475be4d85a274d0961593db41cf85689db1d583cJoe Perches  | PIAFS Protocol      | byte | Bit 1 - Protocol Speed                  |
1119475be4d85a274d0961593db41cf85689db1d583cJoe Perches  | Speed configuration |      |         0 - 32K                         |
1120475be4d85a274d0961593db41cf85689db1d583cJoe Perches  |                     |      |         1 - 64K (default)               |
1121475be4d85a274d0961593db41cf85689db1d583cJoe Perches  |                     |      | Bit 2 - Variable Protocol Speed         |
1122475be4d85a274d0961593db41cf85689db1d583cJoe Perches  |                     |      |         0 - Speed is fix                |
1123475be4d85a274d0961593db41cf85689db1d583cJoe Perches  |                     |      |         1 - Speed is variable (default) |
1124475be4d85a274d0961593db41cf85689db1d583cJoe Perches  +---------------------+------+-----------------------------------------+
1125475be4d85a274d0961593db41cf85689db1d583cJoe Perches  | Direction           | word | Enable compression/decompression for    |
1126475be4d85a274d0961593db41cf85689db1d583cJoe Perches  |                     |      | 0: All direction                        |
1127475be4d85a274d0961593db41cf85689db1d583cJoe Perches  |                     |      | 1: disable outgoing data                |
1128d82603c6da7579c50ebe3fe7da6e3e267d9f6427Jorrit Schippers  |                     |      | 2: disable incoming data               |
1129475be4d85a274d0961593db41cf85689db1d583cJoe Perches  |                     |      | 3: disable both direction (default)     |
1130475be4d85a274d0961593db41cf85689db1d583cJoe Perches  +---------------------+------+-----------------------------------------+
1131475be4d85a274d0961593db41cf85689db1d583cJoe Perches  | Number of code      | word | Parameter P1 of V.42bis in accordance   |
1132475be4d85a274d0961593db41cf85689db1d583cJoe Perches  | words               |      | with V.42bis                            |
1133475be4d85a274d0961593db41cf85689db1d583cJoe Perches  +---------------------+------+-----------------------------------------+
1134475be4d85a274d0961593db41cf85689db1d583cJoe Perches  | Maximum String      | word | Parameter P2 of V.42bis in accordance   |
1135475be4d85a274d0961593db41cf85689db1d583cJoe Perches  | Length              |      | with V.42bis                            |
1136475be4d85a274d0961593db41cf85689db1d583cJoe Perches  +---------------------+------+-----------------------------------------+
1137475be4d85a274d0961593db41cf85689db1d583cJoe Perches  | control (UDATA)     | byte | enable PIAFS control communication      |
1138475be4d85a274d0961593db41cf85689db1d583cJoe Perches  | abilities           |      |                                         |
1139475be4d85a274d0961593db41cf85689db1d583cJoe Perches  +---------------------+------+-----------------------------------------+
11401da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds*/
11411da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define PIAFS_UDATA_ABILITIES  0x80
11421da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
11431da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*------------------------------------------------------------------*/
11441da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* FAX SUB/SEP/PWD extension                                        */
11451da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*------------------------------------------------------------------*/
11461da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
11471da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
11481da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define PRIVATE_FAX_SUB_SEP_PWD        3
11491da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
11501da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
11511da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
11521da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*------------------------------------------------------------------*/
11531da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* V.18 extension                                                   */
11541da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*------------------------------------------------------------------*/
11551da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
11561da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
11571da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define PRIVATE_V18                    4
11581da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
11591da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
11601da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
11611da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*------------------------------------------------------------------*/
11621da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* DTMF TONE extension                                              */
11631da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*------------------------------------------------------------------*/
11641da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
11651da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
11661da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_GET_SUPPORTED_DETECT_CODES  0xf8
11671da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_GET_SUPPORTED_SEND_CODES    0xf9
11681da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_LISTEN_TONE_START           0xfa
11691da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_LISTEN_TONE_STOP            0xfb
11701da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_SEND_TONE                   0xfc
11711da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_LISTEN_MF_START             0xfd
11721da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_LISTEN_MF_STOP              0xfe
11731da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_SEND_MF                     0xff
11741da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
11751da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_MF_DIGIT_TONE_CODE_1               0x10
11761da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_MF_DIGIT_TONE_CODE_2               0x11
11771da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_MF_DIGIT_TONE_CODE_3               0x12
11781da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_MF_DIGIT_TONE_CODE_4               0x13
11791da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_MF_DIGIT_TONE_CODE_5               0x14
11801da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_MF_DIGIT_TONE_CODE_6               0x15
11811da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_MF_DIGIT_TONE_CODE_7               0x16
11821da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_MF_DIGIT_TONE_CODE_8               0x17
11831da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_MF_DIGIT_TONE_CODE_9               0x18
11841da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_MF_DIGIT_TONE_CODE_0               0x19
11851da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_MF_DIGIT_TONE_CODE_K1              0x1a
11861da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_MF_DIGIT_TONE_CODE_K2              0x1b
11871da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_MF_DIGIT_TONE_CODE_KP              0x1c
11881da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_MF_DIGIT_TONE_CODE_S1              0x1d
11891da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_MF_DIGIT_TONE_CODE_ST              0x1e
11901da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
11911da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_DIGIT_CODE_COUNT                   16
11921da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_MF_DIGIT_CODE_BASE                 DSP_DTMF_DIGIT_CODE_COUNT
11931da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_MF_DIGIT_CODE_COUNT                15
11941da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_TOTAL_DIGIT_CODE_COUNT             (DSP_MF_DIGIT_CODE_BASE + DSP_MF_DIGIT_CODE_COUNT)
11951da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
11961da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_TONE_DIGIT_BASE                    0x80
11971da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
11981da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_SIGNAL_NO_TONE                     (DTMF_TONE_DIGIT_BASE + 0)
11991da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_SIGNAL_UNIDENTIFIED_TONE           (DTMF_TONE_DIGIT_BASE + 1)
12001da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
12011da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_SIGNAL_DIAL_TONE                   (DTMF_TONE_DIGIT_BASE + 2)
12021da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_SIGNAL_PABX_INTERNAL_DIAL_TONE     (DTMF_TONE_DIGIT_BASE + 3)
12031da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_SIGNAL_SPECIAL_DIAL_TONE           (DTMF_TONE_DIGIT_BASE + 4)   /* stutter dial tone */
12041da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_SIGNAL_SECOND_DIAL_TONE            (DTMF_TONE_DIGIT_BASE + 5)
12051da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_SIGNAL_RINGING_TONE                (DTMF_TONE_DIGIT_BASE + 6)
12061da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_SIGNAL_SPECIAL_RINGING_TONE        (DTMF_TONE_DIGIT_BASE + 7)
12071da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_SIGNAL_BUSY_TONE                   (DTMF_TONE_DIGIT_BASE + 8)
12081da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_SIGNAL_CONGESTION_TONE             (DTMF_TONE_DIGIT_BASE + 9)   /* reorder tone */
12091da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_SIGNAL_SPECIAL_INFORMATION_TONE    (DTMF_TONE_DIGIT_BASE + 10)
12101da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_SIGNAL_COMFORT_TONE                (DTMF_TONE_DIGIT_BASE + 11)
12111da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_SIGNAL_HOLD_TONE                   (DTMF_TONE_DIGIT_BASE + 12)
12121da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_SIGNAL_RECORD_TONE                 (DTMF_TONE_DIGIT_BASE + 13)
12131da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_SIGNAL_CALLER_WAITING_TONE         (DTMF_TONE_DIGIT_BASE + 14)
12141da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_SIGNAL_CALL_WAITING_TONE           (DTMF_TONE_DIGIT_BASE + 15)
12151da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_SIGNAL_PAY_TONE                    (DTMF_TONE_DIGIT_BASE + 16)
12161da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_SIGNAL_POSITIVE_INDICATION_TONE    (DTMF_TONE_DIGIT_BASE + 17)
12171da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_SIGNAL_NEGATIVE_INDICATION_TONE    (DTMF_TONE_DIGIT_BASE + 18)
12181da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_SIGNAL_WARNING_TONE                (DTMF_TONE_DIGIT_BASE + 19)
12191da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_SIGNAL_INTRUSION_TONE              (DTMF_TONE_DIGIT_BASE + 20)
12201da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_SIGNAL_CALLING_CARD_SERVICE_TONE   (DTMF_TONE_DIGIT_BASE + 21)
12211da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_SIGNAL_PAYPHONE_RECOGNITION_TONE   (DTMF_TONE_DIGIT_BASE + 22)
12221da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_SIGNAL_CPE_ALERTING_SIGNAL         (DTMF_TONE_DIGIT_BASE + 23)
12231da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_SIGNAL_OFF_HOOK_WARNING_TONE       (DTMF_TONE_DIGIT_BASE + 24)
12241da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
12251da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_SIGNAL_INTERCEPT_TONE              (DTMF_TONE_DIGIT_BASE + 63)
12261da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
12271da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_SIGNAL_MODEM_CALLING_TONE          (DTMF_TONE_DIGIT_BASE + 64)
12281da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_SIGNAL_FAX_CALLING_TONE            (DTMF_TONE_DIGIT_BASE + 65)
12291da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_SIGNAL_ANSWER_TONE                 (DTMF_TONE_DIGIT_BASE + 66)
12301da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_SIGNAL_REVERSED_ANSWER_TONE        (DTMF_TONE_DIGIT_BASE + 67)
12311da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_SIGNAL_ANSAM_TONE                  (DTMF_TONE_DIGIT_BASE + 68)
12321da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_SIGNAL_REVERSED_ANSAM_TONE         (DTMF_TONE_DIGIT_BASE + 69)
12331da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_SIGNAL_BELL103_ANSWER_TONE         (DTMF_TONE_DIGIT_BASE + 70)
12341da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_SIGNAL_FAX_FLAGS                   (DTMF_TONE_DIGIT_BASE + 71)
12351da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_SIGNAL_G2_FAX_GROUP_ID             (DTMF_TONE_DIGIT_BASE + 72)
12361da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_SIGNAL_HUMAN_SPEECH                (DTMF_TONE_DIGIT_BASE + 73)
12371da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_SIGNAL_ANSWERING_MACHINE_390       (DTMF_TONE_DIGIT_BASE + 74)
12381da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
12391da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_MF_LISTEN_ACTIVE_FLAG     0x02
12401da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_SEND_MF_FLAG              0x02
12411da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_TONE_LISTEN_ACTIVE_FLAG   0x04
12421da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define DTMF_SEND_TONE_FLAG            0x04
12431da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
12441da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define PRIVATE_DTMF_TONE              5
12451da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
12461da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
12471da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*------------------------------------------------------------------*/
12481da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* FAX paper format extension                                       */
12491da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*------------------------------------------------------------------*/
12501da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
12511da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
12521da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define PRIVATE_FAX_PAPER_FORMATS      6
12531da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
12541da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
12551da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
12561da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*------------------------------------------------------------------*/
12571da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* V.OWN extension                                                  */
12581da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*------------------------------------------------------------------*/
12591da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
12601da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
12611da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define PRIVATE_VOWN                   7
12621da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
12631da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
12641da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
12651da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*------------------------------------------------------------------*/
12661da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* FAX non-standard facilities extension                            */
12671da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*------------------------------------------------------------------*/
12681da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
12691da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
12701da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define PRIVATE_FAX_NONSTANDARD        8
12711da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
12721da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
12731da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
12741da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*------------------------------------------------------------------*/
12751da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* Advanced voice                                                   */
12761da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*------------------------------------------------------------------*/
12771da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
12781da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ADV_VOICE_WRITE_ACTIVATION    0
12791da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ADV_VOICE_WRITE_DEACTIVATION  1
12801da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ADV_VOICE_WRITE_UPDATE        2
12811da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
12821da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ADV_VOICE_OLD_COEF_COUNT    6
12831da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ADV_VOICE_NEW_COEF_BASE     (ADV_VOICE_OLD_COEF_COUNT * sizeof(word))
12841da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
12851da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*------------------------------------------------------------------*/
12861da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* B1 resource switching                                            */
12871da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*------------------------------------------------------------------*/
12881da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
12891da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define B1_FACILITY_LOCAL  0x01
12901da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define B1_FACILITY_MIXER  0x02
12911da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define B1_FACILITY_DTMFX  0x04
12921da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define B1_FACILITY_DTMFR  0x08
12931da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define B1_FACILITY_VOICE  0x10
12941da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define B1_FACILITY_EC     0x20
12951da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
12961da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ADJUST_B_MODE_SAVE          0x0001
12971da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ADJUST_B_MODE_REMOVE_L23    0x0002
12981da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ADJUST_B_MODE_SWITCH_L1     0x0004
12991da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ADJUST_B_MODE_NO_RESOURCE   0x0008
13001da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ADJUST_B_MODE_ASSIGN_L23    0x0010
13011da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ADJUST_B_MODE_USER_CONNECT  0x0020
13021da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ADJUST_B_MODE_CONNECT       0x0040
13031da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ADJUST_B_MODE_RESTORE       0x0080
13041da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
13051da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ADJUST_B_START                     0
13061da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ADJUST_B_SAVE_MIXER_1              1
13071da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ADJUST_B_SAVE_DTMF_1               2
13081da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ADJUST_B_REMOVE_L23_1              3
13091da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ADJUST_B_REMOVE_L23_2              4
13101da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ADJUST_B_SAVE_EC_1                 5
13111da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ADJUST_B_SAVE_DTMF_PARAMETER_1     6
13121da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ADJUST_B_SAVE_VOICE_1              7
13131da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ADJUST_B_SWITCH_L1_1               8
13141da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ADJUST_B_SWITCH_L1_2               9
13151da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ADJUST_B_RESTORE_VOICE_1           10
13161da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ADJUST_B_RESTORE_VOICE_2           11
13171da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ADJUST_B_RESTORE_DTMF_PARAMETER_1  12
13181da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ADJUST_B_RESTORE_DTMF_PARAMETER_2  13
13191da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ADJUST_B_RESTORE_EC_1              14
13201da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ADJUST_B_RESTORE_EC_2              15
13211da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ADJUST_B_ASSIGN_L23_1              16
13221da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ADJUST_B_ASSIGN_L23_2              17
13231da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ADJUST_B_CONNECT_1                 18
13241da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ADJUST_B_CONNECT_2                 19
13251da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ADJUST_B_CONNECT_3                 20
13261da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ADJUST_B_CONNECT_4                 21
13271da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ADJUST_B_RESTORE_DTMF_1            22
13281da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ADJUST_B_RESTORE_DTMF_2            23
13291da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ADJUST_B_RESTORE_MIXER_1           24
13301da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ADJUST_B_RESTORE_MIXER_2           25
13311da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ADJUST_B_RESTORE_MIXER_3           26
13321da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ADJUST_B_RESTORE_MIXER_4           27
13331da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ADJUST_B_RESTORE_MIXER_5           28
13341da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ADJUST_B_RESTORE_MIXER_6           29
13351da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ADJUST_B_RESTORE_MIXER_7           30
13361da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define ADJUST_B_END                       31
13371da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
13381da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*------------------------------------------------------------------*/
13391da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* XON Protocol def's                                               */
13401da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*------------------------------------------------------------------*/
13411da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define N_CH_XOFF               0x01
13421da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define N_XON_SENT              0x02
13431da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define N_XON_REQ               0x04
13441da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define N_XON_CONNECT_IND       0x08
13451da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define N_RX_FLOW_CONTROL_MASK  0x3f
13461da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define N_OK_FC_PENDING         0x80
13471da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define N_TX_FLOW_CONTROL_MASK  0xc0
13481da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
13491da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*------------------------------------------------------------------*/
13501da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/* NCPI state                                                       */
13511da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*------------------------------------------------------------------*/
13521da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define NCPI_VALID_CONNECT_B3_IND  0x01
13531da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define NCPI_VALID_CONNECT_B3_ACT  0x02
13541da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define NCPI_VALID_DISC_B3_IND     0x04
13551da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define NCPI_CONNECT_B3_ACT_SENT   0x08
13561da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define NCPI_NEGOTIATE_B3_SENT     0x10
13571da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define NCPI_MDM_CTS_ON_RECEIVED   0x40
13581da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds#define NCPI_MDM_DCD_ON_RECEIVED   0x80
13591da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds
13601da177e4c3f41524e886b7f1b8a0c1fc7321cacLinus Torvalds/*------------------------------------------------------------------*/
1361