Added tty fax capabilities.

This commit is contained in:
Armin Schindler 1999-07-31 13:00:02 +00:00
parent ad02444efb
commit 4c0212ad90
12 changed files with 1587 additions and 124 deletions

View File

@ -0,0 +1,33 @@
--- Configure.org Sat Jul 31 14:01:20 1999
+++ Configure.help Sat Jul 31 14:17:49 1999
@@ -9820,6 +9820,30 @@
you need to have access to a machine on the Internet that has a
program like lynx or netscape).
+Eicon.Diehl active card support
+CONFIG_ISDN_DRV_EICON
+ Say Y here if you have an Eicon active ISDN card. In order to use
+ this card, additional firmware is necessary, which has to be loaded
+ into the card using the eiconctrl utility which is part of the latest
+ isdn4k-utils package. Please read the file
+ Documentation/isdn/README.eicon for more information.
+
+Eicon old-type card support
+CONFIG_ISDN_DRV_EICON_ISA
+ Say Y here if you have an old-type Eicon active ISDN card. In order to
+ use this card, additional firmware is necessary, which has to be loaded
+ into the card using the eiconctrl utility which is part of the latest
+ isdn4k-utils package. Please read the file
+ Documentation/isdn/README.eicon for more information.
+
+Support AT-Fax Class 2 commands
+CONFIG_ISDN_TTY_FAX
+ If you say Y here, the modem-emulator will support a subset of the
+ Fax Class 2 commands. Using a getty with fax-support
+ (mgetty+sendfax, hylafax), you will be able to use your Linux box
+ as an ISDN-fax-machine. This must be supported by the lowlevel driver
+ also. See Documentation/isdn/README.fax for more information.
+
AVM-B1 with CAPI2.0 support
CONFIG_ISDN_DRV_AVMB1
This enables support for the AVM B1 ISDN networking cards. In

View File

@ -0,0 +1,36 @@
Fax with isdn4linux
===================
When enabled during kernel configuration, the tty emulator
of the ISDN subsystem is capable of the Fax Class 2 commands.
This only makes sense under the following conditions :
- You need the commands as dummy, because you are using
hylafax (with patch) for AVM capi.
- You want to use the fax capabillities of your isdn-card.
(supported cards are listed below)
NOTE: This implementation does *not* support fax with passive
ISDN-cards (known as softfax). The low-level driver of
the ISDN-card and/or the card itself must support this.
Supported ISDN-Cards
--------------------
Eicon DIVA Server BRI/PCI (will be ready soon)
Eicon DIVA Server PRI/PCI (will be ready soon)
The command set is known as Class 2 (not Class 2.0) and
can be activated by AT+FCLASS=2
Armin
mac@melware.de

View File

@ -9,6 +9,9 @@ if [ "$CONFIG_INET" != "n" ]; then
fi
fi
bool 'Support audio via ISDN' CONFIG_ISDN_AUDIO
if [ "$CONFIG_ISDN_AUDIO" != "n" ]; then
bool 'Support AT-Fax Class 2 commands' CONFIG_ISDN_TTY_FAX
fi
bool 'Support isdn diversion services' CONFIG_ISDN_DIVERSION
if [ "$CONFIG_X25" != "n" ]; then
bool 'X.25 PLP on top of ISDN (EXPERIMENTAL)' CONFIG_ISDN_X25

View File

@ -24,6 +24,9 @@ ifeq ($(CONFIG_ISDN),y)
endif
ifdef CONFIG_ISDN_AUDIO
L_OBJS += isdn_audio.o
ifdef CONFIG_ISDN_TTY_FAX
L_OBJS += isdn_ttyfax.o
endif
endif
else
ifeq ($(CONFIG_ISDN),m)
@ -41,6 +44,9 @@ else
endif
ifdef CONFIG_ISDN_AUDIO
O_OBJS += isdn_audio.o
ifdef CONFIG_ISDN_TTY_FAX
O_OBJS += isdn_ttyfax.o
endif
endif
endif
endif

View File

@ -21,6 +21,9 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log$
* Revision 1.85 1999/07/29 16:58:35 armin
* Bugfix: DLE handling in isdn_readbchan()
*
* Revision 1.84 1999/07/25 16:21:10 keil
* fix number matching
*
@ -1046,6 +1049,11 @@ isdn_status_callback(isdn_ctrl * c)
break;
case CAPI_PUT_MESSAGE:
return(isdn_capi_rec_hl_msg(&c->parm.cmsg));
#ifdef CONFIG_ISDN_TTY_FAX
case ISDN_STAT_FAXIND:
isdn_tty_stat_callback(i, c);
break;
#endif
#ifdef CONFIG_ISDN_AUDIO
case ISDN_STAT_AUDIO:
isdn_tty_stat_callback(i, c);
@ -2610,6 +2618,9 @@ cleanup_module(void)
for (i = 0; i < ISDN_MAX_CHANNELS; i++) {
isdn_tty_cleanup_xmit(&dev->mdm.info[i]);
kfree(dev->mdm.info[i].xmit_buf - 4);
#ifdef CONFIG_ISDN_TTY_FAX
kfree(dev->mdm.info[i].fax);
#endif
}
if (unregister_chrdev(ISDN_MAJOR, "isdn") != 0) {
printk(KERN_WARNING "isdn: controldevice busy, remove cancelled\n");

View File

@ -20,6 +20,9 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log$
* Revision 1.71 1999/07/27 10:34:34 armin
* Fixed last change. Did not compile with AUDIO support off.
*
* Revision 1.70 1999/07/25 16:17:58 keil
* Fix Suspend/Resume
*
@ -542,6 +545,15 @@ isdn_tty_rcv_skb(int i, int di, int channel, struct sk_buff *skb)
ISDN_AUDIO_SKB_DLECOUNT(skb) =
isdn_tty_countDLE(skb->data, skb->len);
}
#ifdef CONFIG_ISDN_TTY_FAX
else {
if (info->faxonline & 2) {
isdn_tty_fax_bitorder(info, skb);
ISDN_AUDIO_SKB_DLECOUNT(skb) =
isdn_tty_countDLE(skb->data, skb->len);
}
}
#endif
#endif
/* Try to deliver directly via tty-flip-buf if queue is empty */
save_flags(flags);
@ -871,6 +883,35 @@ isdn_tty_modem_ncarrier(modem_info * info)
}
}
/*
* return the usage calculated by si and layer 2 protocol
*/
int
isdn_calc_usage(int si, int l2)
{
int usg = ISDN_USAGE_MODEM;
#ifdef CONFIG_ISDN_AUDIO
if (si == 1) {
switch(l2) {
case ISDN_PROTO_L2_MODEM:
usg = ISDN_USAGE_MODEM;
break;
#ifdef CONFIG_ISDN_TTY_FAX
case ISDN_PROTO_L2_FAX:
usg = ISDN_USAGE_FAX;
break;
#endif
case ISDN_PROTO_L2_TRANS:
default:
usg = ISDN_USAGE_VOICE;
break;
}
}
#endif
return(usg);
}
/* isdn_tty_dial() performs dialing of a tty an the necessary
* setup of the lower levels before that.
*/
@ -890,8 +931,14 @@ isdn_tty_dial(char *n, modem_info * info, atemu * m)
si = bit2si[j];
break;
}
usg = isdn_calc_usage(si, l2);
#ifdef CONFIG_ISDN_AUDIO
if ((si == 1) && (l2 != ISDN_PROTO_L2_MODEM)) {
if ((si == 1) &&
(l2 != ISDN_PROTO_L2_MODEM)
#ifdef CONFIG_ISDN_TTY_FAX
&& (l2 != ISDN_PROTO_L2_FAX)
#endif
) {
l2 = ISDN_PROTO_L2_TRANS;
usg = ISDN_USAGE_VOICE;
}
@ -929,6 +976,12 @@ isdn_tty_dial(char *n, modem_info * info, atemu * m)
cmd.driver = info->isdn_driver;
cmd.command = ISDN_CMD_SETL3;
cmd.arg = info->isdn_channel + (m->mdmreg[REG_L3PROT] << 8);
#ifdef CONFIG_ISDN_TTY_FAX
if (l2 == ISDN_PROTO_L2_FAX) {
cmd.parm.fax = info->fax;
info->fax->direction = ISDN_TTY_FAX_CONN_OUT;
}
#endif
isdn_command(&cmd);
cmd.driver = info->isdn_driver;
cmd.arg = info->isdn_channel;
@ -951,7 +1004,7 @@ isdn_tty_dial(char *n, modem_info * info, atemu * m)
* ISDN-line (hangup). The usage-status is cleared
* and some cleanup is done also.
*/
static void
void
isdn_tty_modem_hup(modem_info * info, int local)
{
isdn_ctrl cmd;
@ -972,6 +1025,10 @@ isdn_tty_modem_hup(modem_info * info, int local)
}
#ifdef CONFIG_ISDN_AUDIO
info->vonline = 0;
#ifdef CONFIG_ISDN_TTY_FAX
info->faxonline = 0;
info->fax->phase = ISDN_FAX_PHASE_IDLE;
#endif
info->emu.vpar[4] = 0;
info->emu.vpar[5] = 8;
if (info->dtmf_state) {
@ -1005,9 +1062,8 @@ isdn_tty_modem_hup(modem_info * info, int local)
}
isdn_all_eaz(info->isdn_driver, info->isdn_channel);
info->emu.mdmreg[REG_RINGCNT] = 0;
usage = ((info->emu.mdmreg[REG_SI1I] != 1) ||
(info->emu.mdmreg[REG_L2PROT] == ISDN_PROTO_L2_MODEM)) ?
ISDN_USAGE_MODEM : ISDN_USAGE_VOICE;
usage = isdn_calc_usage(info->emu.mdmreg[REG_SI1I],
info->emu.mdmreg[REG_L2PROT]);
isdn_free_channel(info->isdn_driver, info->isdn_channel,
usage);
}
@ -1094,8 +1150,14 @@ isdn_tty_resume(char *id, modem_info * info, atemu * m)
si = bit2si[j];
break;
}
usg = isdn_calc_usage(si, l2);
#ifdef CONFIG_ISDN_AUDIO
if ((si == 1) && (l2 != ISDN_PROTO_L2_MODEM)) {
if ((si == 1) &&
(l2 != ISDN_PROTO_L2_MODEM)
#ifdef CONFIG_ISDN_TTY_FAX
&& (l2 != ISDN_PROTO_L2_FAX)
#endif
) {
l2 = ISDN_PROTO_L2_TRANS;
usg = ISDN_USAGE_VOICE;
}
@ -1182,8 +1244,14 @@ isdn_tty_send_msg(modem_info * info, atemu * m, char *msg)
si = bit2si[j];
break;
}
usg = isdn_calc_usage(si, l2);
#ifdef CONFIG_ISDN_AUDIO
if ((si == 1) && (l2 != ISDN_PROTO_L2_MODEM)) {
if ((si == 1) &&
(l2 != ISDN_PROTO_L2_MODEM)
#ifdef CONFIG_ISDN_TTY_FAX
&& (l2 != ISDN_PROTO_L2_FAX)
#endif
) {
l2 = ISDN_PROTO_L2_TRANS;
usg = ISDN_USAGE_VOICE;
}
@ -2168,8 +2236,42 @@ isdn_tty_modem_reset_vpar(atemu * m)
m->vpar[1] = 0; /* Silence detection level (0 = none ) */
m->vpar[2] = 70; /* Silence interval (7 sec. ) */
m->vpar[3] = 2; /* Compression type (1 = ADPCM-2 ) */
m->vpar[4] = 0; /* DTMF detection level (0 = softcode ) */
m->vpar[5] = 8; /* DTMF interval (8 * 5 ms. ) */
m->vpar[4] = 0; /* DTMF detection level (0 = softcode ) */
m->vpar[5] = 8; /* DTMF interval (8 * 5 ms. ) */
}
#endif
#ifdef CONFIG_ISDN_TTY_FAX
static void
isdn_tty_modem_reset_faxpar(modem_info * info)
{
T30_s *f = info->fax;
f->code = 0;
f->phase = ISDN_FAX_PHASE_IDLE;
f->direction = 0;
f->resolution = 1; /* fine */
f->rate = 5; /* 14400 bit/s */
f->width = 0;
f->length = 0;
f->compression = 0;
f->ecm = 0;
f->binary = 0;
f->scantime = 0;
memset(&f->id[0], 32, FAXIDLEN - 1);
f->id[FAXIDLEN - 1] = 0;
f->badlin = 0;
f->badmul = 0;
f->bor = 0;
f->nbc = 0;
f->cq = 0;
f->cr = 0;
f->ctcrty = 0;
f->minsp = 0;
f->phcto = 30;
f->rel = 0;
memset(&f->pollid[0], 32, FAXIDLEN - 1);
f->pollid[FAXIDLEN - 1] = 0;
}
#endif
@ -2185,6 +2287,9 @@ isdn_tty_modem_reset_regs(modem_info * info, int force)
}
#ifdef CONFIG_ISDN_AUDIO
isdn_tty_modem_reset_vpar(m);
#endif
#ifdef CONFIG_ISDN_TTY_FAX
isdn_tty_modem_reset_faxpar(info);
#endif
m->mdmcmdl = 0;
}
@ -2258,6 +2363,12 @@ isdn_tty_modem_init(void)
}
for (i = 0; i < ISDN_MAX_CHANNELS; i++) {
info = &m->info[i];
#ifdef CONFIG_ISDN_TTY_FAX
if (!(info->fax = kmalloc(sizeof(T30_s), GFP_KERNEL))) {
printk(KERN_ERR "Could not allocate fax t30-buffer\n");
return -3;
}
#endif
#ifdef COMPAT_HAS_NEW_WAITQ
init_MUTEX(&info->write_sem);
#else
@ -2420,8 +2531,7 @@ isdn_tty_find_icall(int di, int ch, setup_parm setup)
info->drv_index = idx;
dev->m_idx[idx] = info->line;
dev->usage[idx] &= ISDN_USAGE_EXCLUSIVE;
dev->usage[idx] |= ((si1 != 1) || (info->emu.mdmreg[REG_L2PROT] == ISDN_PROTO_L2_MODEM)) ?
ISDN_USAGE_MODEM : ISDN_USAGE_VOICE;
dev->usage[idx] |= isdn_calc_usage(si1, info->emu.mdmreg[REG_L2PROT]);
strcpy(dev->num[idx], nr);
strcpy(info->emu.cpn, eaz);
info->emu.mdmreg[REG_SI1I] = si2bit[si1];
@ -2599,6 +2709,13 @@ isdn_tty_stat_callback(int i, isdn_ctrl * c)
}
}
return 1;
#ifdef CONFIG_ISDN_TTY_FAX
case ISDN_STAT_FAXIND:
if (TTY_IS_ACTIVE(info)) {
isdn_tty_fax_command(info);
}
break;
#endif
#ifdef CONFIG_ISDN_AUDIO
case ISDN_STAT_AUDIO:
if (TTY_IS_ACTIVE(info)) {
@ -3383,7 +3500,7 @@ isdn_tty_cmd_ATA(modem_info * info)
/* If more than one bit set in reg18, autoselect Layer2 */
if ((m->mdmreg[REG_SI1] & m->mdmreg[REG_SI1I]) != m->mdmreg[REG_SI1]) {
if (m->mdmreg[REG_SI1I] == 1) {
if (l2 != ISDN_PROTO_L2_MODEM)
if ((l2 != ISDN_PROTO_L2_MODEM) && (l2 != ISDN_PROTO_L2_FAX))
l2 = ISDN_PROTO_L2_TRANS;
} else
l2 = ISDN_PROTO_L2_X75I;
@ -3397,6 +3514,12 @@ isdn_tty_cmd_ATA(modem_info * info)
cmd.driver = info->isdn_driver;
cmd.command = ISDN_CMD_SETL3;
cmd.arg = info->isdn_channel + (m->mdmreg[REG_L3PROT] << 8);
#ifdef CONFIG_ISDN_TTY_FAX
if (l2 == ISDN_PROTO_L2_FAX) {
cmd.parm.fax = info->fax;
info->fax->direction = ISDN_TTY_FAX_CONN_IN;
}
#endif
isdn_command(&cmd);
cmd.driver = info->isdn_driver;
cmd.arg = info->isdn_channel;
@ -3417,7 +3540,6 @@ static int
isdn_tty_cmd_PLUSF(char **p, modem_info * info)
{
atemu *m = &info->emu;
int par;
char rs[20];
if (!strncmp(p[0], "CLASS", 5)) {
@ -3427,6 +3549,10 @@ isdn_tty_cmd_PLUSF(char **p, modem_info * info)
p[0]++;
sprintf(rs, "\r\n%d",
(m->mdmreg[REG_SI1] & 1) ? 8 : 0);
#ifdef CONFIG_ISDN_TTY_FAX
if (m->mdmreg[REG_L2PROT] == ISDN_PROTO_L2_FAX)
sprintf(rs, "\r\n2");
#endif
isdn_tty_at_cout(rs, info);
break;
case '=':
@ -3434,23 +3560,37 @@ isdn_tty_cmd_PLUSF(char **p, modem_info * info)
switch (*p[0]) {
case '0':
p[0]++;
m->mdmreg[REG_L2PROT] = ISDN_PROTO_L2_X75I;
m->mdmreg[REG_L3PROT] = ISDN_PROTO_L3_TRANS;
m->mdmreg[REG_SI1] = 4;
info->xmit_size =
m->mdmreg[REG_PSIZE] * 16;
break;
#ifdef CONFIG_ISDN_TTY_FAX
case '2':
printk(KERN_DEBUG "isdn_tty: FCLASS=2\n");
p[0]++;
m->mdmreg[REG_SI1] = 1;
m->mdmreg[REG_L2PROT] = ISDN_PROTO_L2_FAX;
m->mdmreg[REG_L3PROT] = ISDN_PROTO_L3_FAX;
info->xmit_size =
m->mdmreg[REG_PSIZE] * 16;
break;
#endif
case '8':
p[0]++;
/* L2 will change on dialout with si=1 */
m->mdmreg[REG_L2PROT] = ISDN_PROTO_L2_X75I;
m->mdmreg[REG_L3PROT] = ISDN_PROTO_L3_TRANS;
m->mdmreg[REG_SI1] = 5;
info->xmit_size = VBUF;
break;
case '?':
p[0]++;
isdn_tty_at_cout("\r\n0,2,8",
info);
#ifdef CONFIG_ISDN_TTY_FAX
isdn_tty_at_cout("\r\n0,2,8", info);
#else
isdn_tty_at_cout("\r\n0,8", info);
#endif
break;
default:
PARSE_ERROR1;
@ -3461,115 +3601,11 @@ isdn_tty_cmd_PLUSF(char **p, modem_info * info)
}
return 0;
}
if (!strncmp(p[0], "AA", 2)) {
p[0] += 2;
switch (*p[0]) {
case '?':
p[0]++;
sprintf(rs, "\r\n%d",
m->mdmreg[REG_RINGATA]);
isdn_tty_at_cout(rs, info);
break;
case '=':
p[0]++;
par = isdn_getnum(p);
if ((par < 0) || (par > 255))
PARSE_ERROR1;
m->mdmreg[REG_RINGATA] = par;
break;
default:
PARSE_ERROR1;
}
return 0;
}
if (!strncmp(p[0], "TBC=", 4)) { /* UNKLAR !! */
p[0] += 4;
printk(KERN_DEBUG "isdn_tty: Fax FTBC=%c\n", *p[0]);
switch (*p[0]) {
case '0':
p[0]++;
break;
default:
PARSE_ERROR1;
}
return 0;
}
if (!strncmp(p[0], "BOR=", 4)) { /* UNKLAR !! */
p[0] += 4;
printk(KERN_DEBUG "isdn_tty: Fax FBOR=%c\n", *p[0]);
switch (*p[0]) {
case '0':
p[0]++;
break;
default:
PARSE_ERROR1;
}
return 0;
}
if (!strncmp(p[0], "DCC=", 4)) { /* SETUP irgendwie !! */
int i, val[]={0,0,0,0,0,0,0,0};
p[0] += 4;
if (*p[0] == '?') {
isdn_tty_at_cout("\r\n(0,1),(0-5),(0-2),(0-2),(0,1),(0),(0),(0-7)",info);
p[0]++;
} else {
for (i=0; (*p[0]>='0') && (*p[0]<='9'); i++) {
val[i] = *p[0] - 48;
p[0]++;
if (*p[0] == ',')
p[0]++;
}
printk(KERN_DEBUG "isdn_tty: Fax Setup values=%d,%d,%d,%d,%d,%d,%d,%d\n",
val[0], val[1], val[2], val[3], val[4], val[5], val[6], val[7]);
}
return 0;
}
if (!strncmp(p[0], "LID=", 4)) { /* set sender ID !! */
char senderID[80];
int i;
p[0] += 4;
if (*p[0] =='"')
p[0]++;
for(i=0; (*p[0]) && (*p[0] != '"'); i++)
senderID[i] = *p[0]++;
senderID[i] = 0;
if (*p[0] =='"')
p[0]++;
printk(KERN_DEBUG "isdn_tty: Fax sender=>%s<\n", senderID);
return 0;
}
if (!strncmp(p[0], "MFR?", 4)) {
p[0] += 4;
printk(KERN_DEBUG "isdn_tty: FMFR?\n");
isdn_tty_at_cout("\r\nISDNfax", info);
return 0;
}
if (!strncmp(p[0], "MDL?", 4)) {
p[0] += 4;
printk(KERN_DEBUG "isdn_tty: FMDL?\n");
isdn_tty_at_cout("\r\nAVM-B1", info);
return 0;
}
if (!strncmp(p[0], "AP=?", 4)) {
p[0] += 4;
printk(KERN_DEBUG "isdn_tty: FAP=?\n");
return 0;
}
if (!strncmp(p[0], "PHCTO=", 6)) {
/* beim trace mit dem zyxel folgt der wert 30 ;*/
p[0] += 6;
printk(KERN_DEBUG "isdn_tty: FPHCTO=%s\n", p[0]);
return 0;
}
if (!strncmp(p[0], "CR=", 3)) {
p[0] += 3;
printk(KERN_DEBUG "isdn_tty: FCR=%s\n", p[0]);
return 0;
}
printk(KERN_DEBUG "isdn_tty: unknown token=>AT+F%s<\n", p[0]);
#ifdef CONFIG_ISDN_TTY_FAX
return (isdn_tty_cmd_PLUSF_FAX(p, info));
#else
PARSE_ERROR1;
#endif
}
/*

View File

@ -20,6 +20,17 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log$
* Revision 1.14 1999/07/11 17:14:15 armin
* Added new layer 2 and 3 protocols for Fax and DSP functions.
* Moved "Add CPN to RING message" to new register S23,
* "Display message" is now correct on register S13 bit 7.
* New audio command AT+VDD implemented (deactivate DTMF decoder and
* activate possible existing hardware/DSP decoder).
* Moved some tty defines to .h file.
* Made whitespace possible in AT command line.
* Some AT-emulator output bugfixes.
* First Fax G3 implementations.
*
* Revision 1.13 1999/04/12 12:33:46 fritz
* Changes from 2.0 tree.
*
@ -146,3 +157,9 @@ extern int isdn_tty_stat_callback(int, isdn_ctrl *);
extern int isdn_tty_rcv_skb(int, int, int, struct sk_buff *);
extern int isdn_tty_capi_facility(capi_msg *cm);
extern void isdn_tty_at_cout(char *, modem_info *);
extern void isdn_tty_modem_hup(modem_info *, int);
#ifdef CONFIG_ISDN_TTY_FAX
extern int isdn_tty_cmd_PLUSF_FAX(char **, modem_info *);
extern int isdn_tty_fax_command(modem_info *);
extern void isdn_tty_fax_bitorder(modem_info *, struct sk_buff *);
#endif

1194
drivers/isdn/isdn_ttyfax.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,30 @@
/* $Id$
* header for Linux ISDN subsystem, tty_fax related functions (linklevel).
*
* Copyright 1999 by Armin Schindler (mac@melware.de)
* Copyright 1999 by Ralf Spachmann (mel@melware.de)
* Copyright 1999 by Cytronics & Melware
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log$
*
*/
#define XON 0x11
#define XOFF 0x13
#define DC2 0x12

View File

@ -21,6 +21,9 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log$
* Revision 1.69 1999/07/13 20:47:53 werner
* added channel bit ISDN_USAGE_DISABLED for limiting b-channel access.
*
* Revision 1.68 1999/07/11 17:07:37 armin
* Added tty modem register S23.
* Added new layer 2 and 3 protocols for Fax and DSP functions.
@ -728,6 +731,10 @@ typedef struct modem_info {
void *adpcmr; /* state for adpcm compression */
void *dtmf_state; /* state for dtmf decoder */
void *silence_state; /* state for silence detection */
#endif
#ifdef CONFIG_ISDN_TTY_FAX
struct T30_s *fax; /* T30 Fax Group 3 data/interface */
int faxonline; /* Fax-channel status */
#endif
struct tty_struct *tty; /* Pointer to corresponding tty */
atemu emu; /* AT-emulator data */

View File

@ -22,6 +22,9 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log$
* Revision 1.28 1999/07/13 20:57:48 werner
* added callback ISDN_STAT_DISCH for limiting b-channel resources.
*
* Revision 1.27 1999/07/11 17:07:39 armin
* Added tty modem register S23.
* Added new layer 2 and 3 protocols for Fax and DSP functions.
@ -370,6 +373,84 @@ typedef struct setup_parm {
unsigned char screen; /* Screening info */
} setup_parm;
#ifdef CONFIG_ISDN_TTY_FAX
/* T.30 Fax G3 */
#define FAXIDLEN 21
typedef struct T30_s {
/* session parameters */
__u8 resolution __attribute__ ((packed));
__u8 rate __attribute__ ((packed));
__u8 width __attribute__ ((packed));
__u8 length __attribute__ ((packed));
__u8 compression __attribute__ ((packed));
__u8 ecm __attribute__ ((packed));
__u8 binary __attribute__ ((packed));
__u8 scantime __attribute__ ((packed));
__u8 id[FAXIDLEN] __attribute__ ((packed));
/* additional parameters */
__u8 phase __attribute__ ((packed));
__u8 direction __attribute__ ((packed));
__u8 code __attribute__ ((packed));
__u8 badlin __attribute__ ((packed));
__u8 badmul __attribute__ ((packed));
__u8 bor __attribute__ ((packed));
__u8 fet __attribute__ ((packed));
__u8 pollid[FAXIDLEN] __attribute__ ((packed));
__u8 cq __attribute__ ((packed));
__u8 cr __attribute__ ((packed));
__u8 ctcrty __attribute__ ((packed));
__u8 minsp __attribute__ ((packed));
__u8 phcto __attribute__ ((packed));
__u8 rel __attribute__ ((packed));
__u8 nbc __attribute__ ((packed));
/* remote station parameters */
__u8 r_resolution __attribute__ ((packed));
__u8 r_rate __attribute__ ((packed));
__u8 r_width __attribute__ ((packed));
__u8 r_length __attribute__ ((packed));
__u8 r_compression __attribute__ ((packed));
__u8 r_ecm __attribute__ ((packed));
__u8 r_binary __attribute__ ((packed));
__u8 r_scantime __attribute__ ((packed));
__u8 r_id[FAXIDLEN] __attribute__ ((packed));
__u8 r_code __attribute__ ((packed));
} T30_s;
#define ISDN_TTY_FAX_CONN_IN 0
#define ISDN_TTY_FAX_CONN_OUT 1
#define ISDN_TTY_FAX_FCON 0
#define ISDN_TTY_FAX_DIS 1
#define ISDN_TTY_FAX_FTT 2
#define ISDN_TTY_FAX_MCF 3
#define ISDN_TTY_FAX_DCS 4
#define ISDN_TTY_FAX_TRAIN_OK 5
#define ISDN_TTY_FAX_EOP 6
#define ISDN_TTY_FAX_EOM 7
#define ISDN_TTY_FAX_MPS 8
#define ISDN_TTY_FAX_DTC 9
#define ISDN_TTY_FAX_RID 10
#define ISDN_TTY_FAX_HNG 11
#define ISDN_TTY_FAX_DT 12
#define ISDN_TTY_FAX_FCON_I 13
#define ISDN_TTY_FAX_DR 14
#define ISDN_TTY_FAX_ET 15
#define ISDN_TTY_FAX_CFR 16
#define ISDN_TTY_FAX_PTS 17
#define ISDN_TTY_FAX_SENT 18
#define ISDN_FAX_PHASE_IDLE 0
#define ISDN_FAX_PHASE_A 1
#define ISDN_FAX_PHASE_B 2
#define ISDN_FAX_PHASE_C 3
#define ISDN_FAX_PHASE_D 4
#define ISDN_FAX_PHASE_E 5
#endif /* TTY_FAX */
/* CAPI structs */
/* this is compatible to the old union size */
@ -408,6 +489,9 @@ typedef struct {
capi_msg cmsg; /* For CAPI like messages */
char display[85];/* display message data */
dss1_cmd_stat dss1_io; /* DSS1 IO-parameter/result */
#ifdef CONFIG_ISDN_TTY_FAX
T30_s *fax; /* Pointer to ttys fax struct */
#endif
} parm;
} isdn_ctrl;

View File

@ -124,6 +124,12 @@ else
patch -d $KERNELDIR/Documentation < Documentation/Configure.help.divert.diff
fi
fi
if [ -f $KERNELDIR/Documentation/Configure.help ] ; then
grep -q CONFIG_ISDN_DRV_EICON $KERNELDIR/Documentation/Configure.help
if [ $? != 0 ] ; then
patch -d $KERNELDIR/Documentation < Documentation/Configure.help.eicon.diff
fi
fi
mkdir -p -m 755 $KERNELDIR/drivers/isdn/eicon
for i in drivers/isdn/eicon/*.[ch] ; do
$DOCP $i $KERNELDIR/$i