SOURCES: zaptel-bristuff.patch - updated again
arekm
arekm at pld-linux.org
Wed Jul 16 22:31:16 CEST 2008
Author: arekm Date: Wed Jul 16 20:31:16 2008 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- updated again
---- Files affected:
SOURCES:
zaptel-bristuff.patch (1.5 -> 1.6)
---- Diffs:
================================================================
Index: SOURCES/zaptel-bristuff.patch
diff -u SOURCES/zaptel-bristuff.patch:1.5 SOURCES/zaptel-bristuff.patch:1.6
--- SOURCES/zaptel-bristuff.patch:1.5 Wed Jul 16 21:52:03 2008
+++ SOURCES/zaptel-bristuff.patch Wed Jul 16 22:31:10 2008
@@ -1,6 +1,6 @@
-diff -urN zaptel-1.4.11.org/cwain/cwain.c zaptel-1.4.11/cwain/cwain.c
---- zaptel-1.4.11.org/cwain/cwain.c 1970-01-01 01:00:00.000000000 +0100
-+++ zaptel-1.4.11/cwain/cwain.c 2008-07-16 21:26:32.000000000 +0200
+diff -urN zaptel-1.4.11.org/kernel/cwain/cwain.c zaptel-1.4.11/kernel/cwain/cwain.c
+--- zaptel-1.4.11.org/kernel/cwain/cwain.c 1970-01-01 01:00:00.000000000 +0100
++++ zaptel-1.4.11/kernel/cwain/cwain.c 2008-07-16 22:06:17.184808735 +0200
@@ -0,0 +1,2236 @@
+/*
+ * cwain.c - Zaptel driver for the Junghanns.NET E1 card
@@ -2238,9 +2238,9 @@
+#ifdef MODULE_LICENSE
+MODULE_LICENSE("GPL");
+#endif
-diff -urN zaptel-1.4.11.org/cwain/cwain.h zaptel-1.4.11/cwain/cwain.h
---- zaptel-1.4.11.org/cwain/cwain.h 1970-01-01 01:00:00.000000000 +0100
-+++ zaptel-1.4.11/cwain/cwain.h 2008-07-16 21:26:32.000000000 +0200
+diff -urN zaptel-1.4.11.org/kernel/cwain/cwain.h zaptel-1.4.11/kernel/cwain/cwain.h
+--- zaptel-1.4.11.org/kernel/cwain/cwain.h 1970-01-01 01:00:00.000000000 +0100
++++ zaptel-1.4.11/kernel/cwain/cwain.h 2008-07-16 22:06:17.184808735 +0200
@@ -0,0 +1,252 @@
+#define cwain_FIFO_SIZE 128
+#define cwain_DFIFO_SIZE 4096
@@ -2494,9 +2494,22 @@
+#define CLKDEL_TE 0xe /* CLKDEL in TE mode */
+#define CLKDEL_NT 0xc /* CLKDEL in NT mode */
+
-diff -urN zaptel-1.4.11.org/cwain/Makefile zaptel-1.4.11/cwain/Makefile
---- zaptel-1.4.11.org/cwain/Makefile 1970-01-01 01:00:00.000000000 +0100
-+++ zaptel-1.4.11/cwain/Makefile 2008-07-16 21:26:32.000000000 +0200
+diff -urN zaptel-1.4.11.org/kernel/cwain/Kbuild zaptel-1.4.11/kernel/cwain/Kbuild
+--- zaptel-1.4.11.org/kernel/cwain/Kbuild 1970-01-01 01:00:00.000000000 +0100
++++ zaptel-1.4.11/kernel/cwain/Kbuild 2008-07-16 22:19:27.544401160 +0200
+@@ -0,0 +1,9 @@
++obj-m += cwain.o
++
++FIRM_DIR := ../../firmware
++
++EXTRA_CFLAGS := -I$(src)/.. -Wno-undef
++
++ifeq ($(HOTPLUG_FIRMWARE),yes)
++ EXTRA_CFLAGS+=-DHOTPLUG_FIRMWARE
++endif
+diff -urN zaptel-1.4.11.org/kernel/cwain/Makefile zaptel-1.4.11/kernel/cwain/Makefile
+--- zaptel-1.4.11.org/kernel/cwain/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ zaptel-1.4.11/kernel/cwain/Makefile 2008-07-16 22:06:17.187813340 +0200
@@ -0,0 +1,88 @@
+KINCLUDES = /usr/src/linux/include
+BRISTUFFBASE = $(shell dirname `pwd`)
@@ -2586,14 +2599,14 @@
+
+unload:
+ rmmod cwain zaptel
-diff -urN zaptel-1.4.11.org/cwain/TODO zaptel-1.4.11/cwain/TODO
---- zaptel-1.4.11.org/cwain/TODO 1970-01-01 01:00:00.000000000 +0100
-+++ zaptel-1.4.11/cwain/TODO 2008-07-16 21:26:32.000000000 +0200
+diff -urN zaptel-1.4.11.org/kernel/cwain/TODO zaptel-1.4.11/kernel/cwain/TODO
+--- zaptel-1.4.11.org/kernel/cwain/TODO 1970-01-01 01:00:00.000000000 +0100
++++ zaptel-1.4.11/kernel/cwain/TODO 2008-07-16 22:06:17.187813340 +0200
@@ -0,0 +1 @@
+
-diff -urN zaptel-1.4.11.org/cwain/zapata.conf zaptel-1.4.11/cwain/zapata.conf
---- zaptel-1.4.11.org/cwain/zapata.conf 1970-01-01 01:00:00.000000000 +0100
-+++ zaptel-1.4.11/cwain/zapata.conf 2008-07-16 21:26:32.000000000 +0200
+diff -urN zaptel-1.4.11.org/kernel/cwain/zapata.conf zaptel-1.4.11/kernel/cwain/zapata.conf
+--- zaptel-1.4.11.org/kernel/cwain/zapata.conf 1970-01-01 01:00:00.000000000 +0100
++++ zaptel-1.4.11/kernel/cwain/zapata.conf 2008-07-16 22:06:17.187813340 +0200
@@ -0,0 +1,32 @@
+;
+; Zapata telephony interface
@@ -2627,9 +2640,9 @@
+group = 1
+channel => 1-15,17-31
+
-diff -urN zaptel-1.4.11.org/cwain/zapata.conf.doubleE1 zaptel-1.4.11/cwain/zapata.conf.doubleE1
---- zaptel-1.4.11.org/cwain/zapata.conf.doubleE1 1970-01-01 01:00:00.000000000 +0100
-+++ zaptel-1.4.11/cwain/zapata.conf.doubleE1 2008-07-16 21:26:32.000000000 +0200
+diff -urN zaptel-1.4.11.org/kernel/cwain/zapata.conf.doubleE1 zaptel-1.4.11/kernel/cwain/zapata.conf.doubleE1
+--- zaptel-1.4.11.org/kernel/cwain/zapata.conf.doubleE1 1970-01-01 01:00:00.000000000 +0100
++++ zaptel-1.4.11/kernel/cwain/zapata.conf.doubleE1 2008-07-16 22:06:17.187813340 +0200
@@ -0,0 +1,35 @@
+;
+; Zapata telephony interface
@@ -2666,9 +2679,9 @@
+group = 2
+channel => 32-46,48-62
+
-diff -urN zaptel-1.4.11.org/cwain/zaptel.conf zaptel-1.4.11/cwain/zaptel.conf
---- zaptel-1.4.11.org/cwain/zaptel.conf 1970-01-01 01:00:00.000000000 +0100
-+++ zaptel-1.4.11/cwain/zaptel.conf 2008-07-16 21:26:32.000000000 +0200
+diff -urN zaptel-1.4.11.org/kernel/cwain/zaptel.conf zaptel-1.4.11/kernel/cwain/zaptel.conf
+--- zaptel-1.4.11.org/kernel/cwain/zaptel.conf 1970-01-01 01:00:00.000000000 +0100
++++ zaptel-1.4.11/kernel/cwain/zaptel.conf 2008-07-16 22:06:17.187813340 +0200
@@ -0,0 +1,11 @@
+loadzone=nl
+defaultzone=nl
@@ -2681,9 +2694,9 @@
+bchan=17-31
+
+
-diff -urN zaptel-1.4.11.org/cwain/zaptel.conf.doubleE1 zaptel-1.4.11/cwain/zaptel.conf.doubleE1
---- zaptel-1.4.11.org/cwain/zaptel.conf.doubleE1 1970-01-01 01:00:00.000000000 +0100
-+++ zaptel-1.4.11/cwain/zaptel.conf.doubleE1 2008-07-16 21:26:32.000000000 +0200
+diff -urN zaptel-1.4.11.org/kernel/cwain/zaptel.conf.doubleE1 zaptel-1.4.11/kernel/cwain/zaptel.conf.doubleE1
+--- zaptel-1.4.11.org/kernel/cwain/zaptel.conf.doubleE1 1970-01-01 01:00:00.000000000 +0100
++++ zaptel-1.4.11/kernel/cwain/zaptel.conf.doubleE1 2008-07-16 22:06:17.187813340 +0200
@@ -0,0 +1,14 @@
+loadzone=nl
+defaultzone=nl
@@ -2699,9 +2712,9 @@
+bchan=32-46
+dchan=47
+bchan=48-62
-diff -urN zaptel-1.4.11.org/cwain/zaptel.conf.hdlcnet zaptel-1.4.11/cwain/zaptel.conf.hdlcnet
---- zaptel-1.4.11.org/cwain/zaptel.conf.hdlcnet 1970-01-01 01:00:00.000000000 +0100
-+++ zaptel-1.4.11/cwain/zaptel.conf.hdlcnet 2008-07-16 21:26:32.000000000 +0200
+diff -urN zaptel-1.4.11.org/kernel/cwain/zaptel.conf.hdlcnet zaptel-1.4.11/kernel/cwain/zaptel.conf.hdlcnet
+--- zaptel-1.4.11.org/kernel/cwain/zaptel.conf.hdlcnet 1970-01-01 01:00:00.000000000 +0100
++++ zaptel-1.4.11/kernel/cwain/zaptel.conf.hdlcnet 2008-07-16 22:06:17.187813340 +0200
@@ -0,0 +1,8 @@
+loadzone=nl
+defaultzone=nl
@@ -2711,9 +2724,9 @@
+hdlcnet=1
+
+
-diff -urN zaptel-1.4.11.org/cwain/zaptel.conf.hdlcnet.doubleE1 zaptel-1.4.11/cwain/zaptel.conf.hdlcnet.doubleE1
---- zaptel-1.4.11.org/cwain/zaptel.conf.hdlcnet.doubleE1 1970-01-01 01:00:00.000000000 +0100
-+++ zaptel-1.4.11/cwain/zaptel.conf.hdlcnet.doubleE1 2008-07-16 21:26:32.000000000 +0200
+diff -urN zaptel-1.4.11.org/kernel/cwain/zaptel.conf.hdlcnet.doubleE1 zaptel-1.4.11/kernel/cwain/zaptel.conf.hdlcnet.doubleE1
+--- zaptel-1.4.11.org/kernel/cwain/zaptel.conf.hdlcnet.doubleE1 1970-01-01 01:00:00.000000000 +0100
++++ zaptel-1.4.11/kernel/cwain/zaptel.conf.hdlcnet.doubleE1 2008-07-16 22:06:17.191146481 +0200
@@ -0,0 +1,10 @@
+loadzone=nl
+defaultzone=nl
@@ -2726,9 +2739,9 @@
+; hdlc 1
+hdlcnet = 2
\ Brak znaku nowej linii na końcu pliku
-diff -urN zaptel-1.4.11.org/ds1x1f.c zaptel-1.4.11/ds1x1f.c
---- zaptel-1.4.11.org/ds1x1f.c 1970-01-01 01:00:00.000000000 +0100
-+++ zaptel-1.4.11/ds1x1f.c 2008-07-16 21:26:32.000000000 +0200
+diff -urN zaptel-1.4.11.org/kernel/ds1x1f.c zaptel-1.4.11/kernel/ds1x1f.c
+--- zaptel-1.4.11.org/kernel/ds1x1f.c 1970-01-01 01:00:00.000000000 +0100
++++ zaptel-1.4.11/kernel/ds1x1f.c 2008-07-16 22:06:17.191146481 +0200
@@ -0,0 +1,2089 @@
+//=======================================================================
+// T1/E1 PCI card with failover DS1x1F card Driver
@@ -4819,188 +4832,14 @@
+module_init(ds1_init);
+module_exit(ds1_cleanup);
+
-diff -urN zaptel-1.4.11.org/kernel/zaptel-base.c zaptel-1.4.11/kernel/zaptel-base.c
---- zaptel-1.4.11.org/kernel/zaptel-base.c 2008-05-11 03:57:08.000000000 +0200
-+++ zaptel-1.4.11/kernel/zaptel-base.c 2008-07-16 21:30:39.658027584 +0200
-@@ -136,6 +136,7 @@
- EXPORT_SYMBOL(zt_qevent_lock);
- EXPORT_SYMBOL(zt_hooksig);
- EXPORT_SYMBOL(zt_alarm_notify);
-+EXPORT_SYMBOL(zt_alarm_notify_no_master_change);
- EXPORT_SYMBOL(zt_set_dynamic_ioctl);
- EXPORT_SYMBOL(zt_ec_chunk);
- EXPORT_SYMBOL(zt_ec_span);
-@@ -609,6 +610,10 @@
- len += sprintf(page + len, "\tTiming slips: %d\n", spans[span]->timingslips);
- len += sprintf(page + len, "\n");
-
-+ if (spans[span]->proc_read) {
-+ len += spans[span]->proc_read(spans[span], page + len);
-+ }
-+
-
- for (x=1;x<ZT_MAX_CHANNELS;x++) {
- if (chans[x]) {
-@@ -3191,6 +3196,30 @@
- }
- }
-
-+void zt_alarm_notify_no_master_change(struct zt_span *span)
-+{
-+ int j;
-+ int x;
-+
-+ span->alarms &= ~ZT_ALARM_LOOPBACK;
-+ /* Determine maint status */
-+ if (span->maintstat || span->mainttimer)
-+ span->alarms |= ZT_ALARM_LOOPBACK;
-+ /* DON'T CHANGE THIS AGAIN. THIS WAS DONE FOR A REASON.
-+ The expression (a != b) does *NOT* do the same thing
-+ as ((!a) != (!b)) */
-+ /* if change in general state */
-+ if ((!span->alarms) != (!span->lastalarms)) {
-+ if (span->alarms)
-+ j = ZT_EVENT_ALARM;
-+ else
-+ j = ZT_EVENT_NOALARM;
-+ span->lastalarms = span->alarms;
-+ for (x=0;x < span->channels;x++)
-+ zt_qevent_lock(&span->chans[x], j);
-+ }
-+}
-+
- #define VALID_SPAN(j) do { \
- if ((j >= ZT_MAX_SPANS) || (j < 1)) \
- return -EINVAL; \
-@@ -5744,11 +5773,40 @@
- *(txb++) = fasthdlc_tx_run_nocheck(&ms->txhdlc);
- }
- bytes -= left;
-+#ifdef CONFIG_ZAPATA_BRI_DCHANS
-+ } else if (ms->flags & ZT_FLAG_BRIDCHAN) {
-+ /*
-+ * Let's get this right, we want to transmit complete frames only.
-+ * The card driver will do the dirty HDLC work for us.
-+ * txb (transmit buffer) is supposed to be big enough to store one frame
-+ * we will make this as big as the D fifo (1KB or 2KB)
-+ */
-+
-+ /* there are 'left' bytes in the user buffer left to transmit */
-+ left = ms->writen[ms->outwritebuf] - ms->writeidx[ms->outwritebuf] - 2;
-+ if (left > ms->maxbytes2transmit) {
-+ memcpy(txb, buf + ms->writeidx[ms->outwritebuf], ms->maxbytes2transmit);
-+ ms->writeidx[ms->outwritebuf] += ms->maxbytes2transmit;
-+ txb += ms->maxbytes2transmit;
-+ ms->bytes2transmit = ms->maxbytes2transmit;
-+ ms->eoftx = 0;
-+ } else {
-+ memcpy(txb, buf + ms->writeidx[ms->outwritebuf], left);
-+ ms->writeidx[ms->outwritebuf] += left + 2;
-+ txb += left + 2;
-+ ms->bytes2transmit = left;
-+ ms->eoftx = 1;
-+ }
-+ bytes = 0;
-+#endif
- } else {
- memcpy(txb, buf + ms->writeidx[ms->outwritebuf], left);
- ms->writeidx[ms->outwritebuf]+=left;
- txb += left;
- bytes -= left;
-+#if defined(CONFIG_ZAPATA_BRI_DCHANS)
-+ ms->bytes2transmit=ZT_CHUNKSIZE;
-+#endif
- }
- /* Check buffer status */
- if (ms->writeidx[ms->outwritebuf] >= ms->writen[ms->outwritebuf]) {
-@@ -5805,6 +5863,17 @@
- /* Transmit a flag if this is an HDLC channel */
- if (ms->flags & ZT_FLAG_HDLC)
- fasthdlc_tx_frame_nocheck(&ms->txhdlc);
-+#if defined(CONFIG_ZAPATA_BRI_DCHANS)
-+ if(ms->flags & ZT_FLAG_BRIDCHAN) {
-+ // if (ms->bytes2transmit > 0) {
-+ // txb += 2;
-+ // ms->bytes2transmit -= 2;
-+ bytes=0;
-+ ms->eoftx = 1;
-+// printk(KERN_CRIT "zaptel EOF(%d) bytes2transmit %d\n",ms->eoftx,ms->bytes2transmit);
-+ // }
-+ }
-+#endif
- #ifdef CONFIG_ZAPATA_NET
- if (ms->flags & ZT_FLAG_NETDEV)
- netif_wake_queue(ztchan_to_dev(ms));
-@@ -5865,6 +5934,12 @@
- memset(txb, 0xFF, bytes);
- }
- bytes = 0;
-+#if defined(CONFIG_ZAPATA_BRI_DCHANS)
-+ } else if(ms->flags & ZT_FLAG_BRIDCHAN) {
-+ ms->bytes2transmit = 0;
-+ ms->eoftx = 0;
-+ bytes = 0;
-+#endif
- } else {
- memset(txb, ZT_LIN2X(0, ms), bytes); /* Lastly we use silence on telephony channels */
- bytes = 0;
-@@ -6683,6 +6758,14 @@
- int res;
- int left, x;
-
-+#if defined(CONFIG_ZAPATA_BRI_DCHANS)
-+ if (ms->flags & ZT_FLAG_BRIDCHAN) {
-+ bytes = ms->bytes2receive;
-+ if (bytes < 1) return;
-+// printk(KERN_CRIT "bytes2receive %d\n",ms->bytes2receive);
-+ }
-+#endif
-+
- while(bytes) {
- #if defined(CONFIG_ZAPATA_NET) || defined(CONFIG_ZAPATA_PPP)
- skb = NULL;
-@@ -6740,6 +6823,19 @@
- }
- }
- }
-+#ifdef CONFIG_ZAPATA_BRI_DCHANS
-+ } else if (ms->flags & ZT_FLAG_BRIDCHAN) {
-+ memcpy(buf + ms->readidx[ms->inreadbuf], rxb, left);
-+ rxb += left;
-+ ms->readidx[ms->inreadbuf] += left;
-+ bytes -= left;
-+ if (ms->eofrx == 1) {
-+ eof=1;
-+ }
-+// printk(KERN_CRIT "receiving %d bytes\n",ms->bytes2receive);
-+ ms->bytes2receive = 0;
-+ ms->eofrx = 0;
-+#endif
- } else {
- /* Not HDLC */
- memcpy(buf + ms->readidx[ms->inreadbuf], rxb, left);
-diff -urN zaptel-1.4.11.org/kernel/zaptel-base.c.orig zaptel-1.4.11/kernel/zaptel-base.c.orig
---- zaptel-1.4.11.org/kernel/zaptel-base.c.orig 1970-01-01 01:00:00.000000000 +0100
-+++ zaptel-1.4.11/kernel/zaptel-base.c.orig 2008-05-11 03:57:08.000000000 +0200
-@@ -0,0 +1,7801 @@
+diff -urN zaptel-1.4.11.org/kernel/opvxa1200.c zaptel-1.4.11/kernel/opvxa1200.c
+--- zaptel-1.4.11.org/kernel/opvxa1200.c 1970-01-01 01:00:00.000000000 +0100
++++ zaptel-1.4.11/kernel/opvxa1200.c 2008-07-16 22:06:17.207813701 +0200
+@@ -0,0 +1,2718 @@
+/*
-+ * Zapata Telephony Interface Driver
-+ *
-+ * Written by Mark Spencer <markster at digium.com>
-+ * Based on previous works, designs, and architectures conceived and
-+ * written by Jim Dixon <jim at lambdatel.com>.
-+ *
-+ * Special thanks to Steve Underwood <steve at coppice.org>
-+ * for substantial contributions to signal processing functions
-+ * in zaptel and the zapata library.
-+ *
-+ * Yury Bokhoncovich <byg at cf1.ru>
-+ * Adaptation for 2.4.20+ kernels (HDLC API was changed)
-+ * The work has been performed as a part of our move
-+ * from Cisco 3620 to IBM x305 here in F1 Group
++ * OpenVox A1200P FXS/FXO Interface Driver for Zapata Telephony interface
+ *
-+ * Copyright (C) 2001 Jim Dixon / Zapata Telephony.
-+ * Copyright (C) 2001 -2006 Digium, Inc.
++ * Modify from wctdm.c by MiaoLin<miaolin at openvox.com.cn>
+ *
+ * All rights reserved.
+ *
@@ -5017,12157 +4856,9588 @@
+ * 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.
++ *
+ */
+
-+
-+#include "zconfig.h"
-+#include "../version.h"
++/* Rev histroy
++ *
++ * Rev 0.10 initial version
++ * Rev 0.11
++ * fixed the led light on/off bug.
++ * modify some wctdm print to opvxa1200
++ * support firmware version 1.2, faster i/o operation, and better LED control.
++ *
++ * Rev 0.12 patched to support new pci id 0x8519
++ *
++ *
++ *
++ *
++ *
++ *
++ *
++ *
++ *
++ *
++ *
++ *
++ *
++ */
+
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/module.h>
-+#include <linux/proc_fs.h>
-+#include <linux/pci.h>
+#include <linux/init.h>
-+#include <linux/version.h>
-+#include <linux/ctype.h>
-+#include <linux/kmod.h>
-+#ifdef CONFIG_DEVFS_FS
-+#include <linux/devfs_fs_kernel.h>
-+#endif /* CONFIG_DEVFS_FS */
-+#ifdef CONFIG_ZAPATA_NET
-+#include <linux/netdevice.h>
-+#endif /* CONFIG_ZAPATA_NET */
-+#include <linux/ppp_defs.h>
-+#ifdef CONFIG_ZAPATA_PPP
-+#include <linux/netdevice.h>
-+#include <linux/if.h>
-+#include <linux/if_ppp.h>
-+#endif
-+#include <asm/atomic.h>
++#include <linux/errno.h>
++#include <linux/pci.h>
++#include <linux/interrupt.h>
++#include <asm/io.h>
++#include "proslic.h"
++#include "wctdm.h"
++
++//miaolin
++#include <linux/string.h>
++#include <asm/uaccess.h> // get_fs(), set_fs(), KERNEL_DS
++#include <linux/file.h> // fput()
++//miaolin
++
+
-+#ifndef CONFIG_OLD_HDLC_API
-+#define NEW_HDLC_INTERFACE
-+#endif
++/*
++ * Define for audio vs. register based ring detection
++ *
++ */
++/* #define AUDIO_RINGCHECK */
+
-+#define __ECHO_STATE_MUTE (1 << 8)
-+#define ECHO_STATE_IDLE (0)
-+#define ECHO_STATE_PRETRAINING (1 | (__ECHO_STATE_MUTE))
-+#define ECHO_STATE_STARTTRAINING (2 | (__ECHO_STATE_MUTE))
-+#define ECHO_STATE_AWAITINGECHO (3 | (__ECHO_STATE_MUTE))
-+#define ECHO_STATE_TRAINING (4 | (__ECHO_STATE_MUTE))
-+#define ECHO_STATE_ACTIVE (5)
++/*
++ Experimental max loop current limit for the proslic
++ Loop current limit is from 20 mA to 41 mA in steps of 3
++ (according to datasheet)
++ So set the value below to:
++ 0x00 : 20mA (default)
++ 0x01 : 23mA
++ 0x02 : 26mA
++ 0x03 : 29mA
++ 0x04 : 32mA
++ 0x05 : 35mA
++ 0x06 : 37mA
++ 0x07 : 41mA
++*/
++static int loopcurrent = 20;
+
-+/* #define BUF_MUNGE */
++static int reversepolarity = 0;
+
-+/* Grab fasthdlc with tables */
-+#define FAST_HDLC_NEED_TABLES
-+#include "fasthdlc.h"
++static alpha indirect_regs[] =
++{
++{0,255,"DTMF_ROW_0_PEAK",0x55C2},
++{1,255,"DTMF_ROW_1_PEAK",0x51E6},
++{2,255,"DTMF_ROW2_PEAK",0x4B85},
++{3,255,"DTMF_ROW3_PEAK",0x4937},
++{4,255,"DTMF_COL1_PEAK",0x3333},
++{5,255,"DTMF_FWD_TWIST",0x0202},
++{6,255,"DTMF_RVS_TWIST",0x0202},
++{7,255,"DTMF_ROW_RATIO_TRES",0x0198},
++{8,255,"DTMF_COL_RATIO_TRES",0x0198},
++{9,255,"DTMF_ROW_2ND_ARM",0x0611},
++{10,255,"DTMF_COL_2ND_ARM",0x0202},
++{11,255,"DTMF_PWR_MIN_TRES",0x00E5},
++{12,255,"DTMF_OT_LIM_TRES",0x0A1C},
++{13,0,"OSC1_COEF",0x7B30},
++{14,1,"OSC1X",0x0063},
++{15,2,"OSC1Y",0x0000},
++{16,3,"OSC2_COEF",0x7870},
++{17,4,"OSC2X",0x007D},
++{18,5,"OSC2Y",0x0000},
++{19,6,"RING_V_OFF",0x0000},
++{20,7,"RING_OSC",0x7EF0},
++{21,8,"RING_X",0x0160},
++{22,9,"RING_Y",0x0000},
++{23,255,"PULSE_ENVEL",0x2000},
++{24,255,"PULSE_X",0x2000},
++{25,255,"PULSE_Y",0x0000},
++//{26,13,"RECV_DIGITAL_GAIN",0x4000}, // playback volume set lower
++{26,13,"RECV_DIGITAL_GAIN",0x2000}, // playback volume set lower
++{27,14,"XMIT_DIGITAL_GAIN",0x4000},
++//{27,14,"XMIT_DIGITAL_GAIN",0x2000},
++{28,15,"LOOP_CLOSE_TRES",0x1000},
++{29,16,"RING_TRIP_TRES",0x3600},
++{30,17,"COMMON_MIN_TRES",0x1000},
++{31,18,"COMMON_MAX_TRES",0x0200},
++{32,19,"PWR_ALARM_Q1Q2",0x07C0},
++{33,20,"PWR_ALARM_Q3Q4",0x2600},
++{34,21,"PWR_ALARM_Q5Q6",0x1B80},
++{35,22,"LOOP_CLOSURE_FILTER",0x8000},
++{36,23,"RING_TRIP_FILTER",0x0320},
++{37,24,"TERM_LP_POLE_Q1Q2",0x008C},
++{38,25,"TERM_LP_POLE_Q3Q4",0x0100},
++{39,26,"TERM_LP_POLE_Q5Q6",0x0010},
++{40,27,"CM_BIAS_RINGING",0x0C00},
++{41,64,"DCDC_MIN_V",0x0C00},
++{42,255,"DCDC_XTRA",0x1000},
++{43,66,"LOOP_CLOSE_TRES_LOW",0x1000},
++};
++
++static struct fxo_mode {
++ char *name;
++ /* FXO */
++ int ohs;
++ int ohs2;
++ int rz;
++ int rt;
++ int ilim;
++ int dcv;
++ int mini;
++ int acim;
++ int ring_osc;
++ int ring_x;
++} fxo_modes[] =
++{
++ { "FCC", 0, 0, 0, 1, 0, 0x3, 0, 0, }, /* US, Canada */
++ { "TBR21", 0, 0, 0, 0, 1, 0x3, 0, 0x2, 0x7e6c, 0x023a, },
++ /* Austria, Belgium, Denmark, Finland, France, Germany,
++ Greece, Iceland, Ireland, Italy, Luxembourg, Netherlands,
++ Norway, Portugal, Spain, Sweden, Switzerland, and UK */
++ { "ARGENTINA", 0, 0, 0, 0, 0, 0x3, 0, 0, },
++ { "AUSTRALIA", 1, 0, 0, 0, 0, 0, 0x3, 0x3, },
++ { "AUSTRIA", 0, 1, 0, 0, 1, 0x3, 0, 0x3, },
++ { "BAHRAIN", 0, 0, 0, 0, 1, 0x3, 0, 0x2, },
++ { "BELGIUM", 0, 1, 0, 0, 1, 0x3, 0, 0x2, },
++ { "BRAZIL", 0, 0, 0, 0, 0, 0, 0x3, 0, },
++ { "BULGARIA", 0, 0, 0, 0, 1, 0x3, 0x0, 0x3, },
++ { "CANADA", 0, 0, 0, 0, 0, 0x3, 0, 0, },
++ { "CHILE", 0, 0, 0, 0, 0, 0x3, 0, 0, },
++ { "CHINA", 0, 0, 0, 0, 0, 0, 0x3, 0xf, },
++ { "COLUMBIA", 0, 0, 0, 0, 0, 0x3, 0, 0, },
++ { "CROATIA", 0, 0, 0, 0, 1, 0x3, 0, 0x2, },
++ { "CYRPUS", 0, 0, 0, 0, 1, 0x3, 0, 0x2, },
++ { "CZECH", 0, 0, 0, 0, 1, 0x3, 0, 0x2, },
++ { "DENMARK", 0, 1, 0, 0, 1, 0x3, 0, 0x2, },
++ { "ECUADOR", 0, 0, 0, 0, 0, 0x3, 0, 0, },
++ { "EGYPT", 0, 0, 0, 0, 0, 0, 0x3, 0, },
++ { "ELSALVADOR", 0, 0, 0, 0, 0, 0x3, 0, 0, },
++ { "FINLAND", 0, 1, 0, 0, 1, 0x3, 0, 0x2, },
++ { "FRANCE", 0, 1, 0, 0, 1, 0x3, 0, 0x2, },
++ { "GERMANY", 0, 1, 0, 0, 1, 0x3, 0, 0x3, },
++ { "GREECE", 0, 1, 0, 0, 1, 0x3, 0, 0x2, },
++ { "GUAM", 0, 0, 0, 0, 0, 0x3, 0, 0, },
++ { "HONGKONG", 0, 0, 0, 0, 0, 0x3, 0, 0, },
++ { "HUNGARY", 0, 0, 0, 0, 0, 0x3, 0, 0, },
++ { "ICELAND", 0, 1, 0, 0, 1, 0x3, 0, 0x2, },
++ { "INDIA", 0, 0, 0, 0, 0, 0x3, 0, 0x4, },
++ { "INDONESIA", 0, 0, 0, 0, 0, 0x3, 0, 0, },
++ { "IRELAND", 0, 1, 0, 0, 1, 0x3, 0, 0x2, },
++ { "ISRAEL", 0, 0, 0, 0, 1, 0x3, 0, 0x2, },
++ { "ITALY", 0, 1, 0, 0, 1, 0x3, 0, 0x2, },
++ { "JAPAN", 0, 0, 0, 0, 0, 0, 0x3, 0, },
++ { "JORDAN", 0, 0, 0, 0, 0, 0, 0x3, 0, },
++ { "KAZAKHSTAN", 0, 0, 0, 0, 0, 0x3, 0, },
++ { "KUWAIT", 0, 0, 0, 0, 0, 0x3, 0, 0, },
++ { "LATVIA", 0, 0, 0, 0, 1, 0x3, 0, 0x2, },
++ { "LEBANON", 0, 0, 0, 0, 1, 0x3, 0, 0x2, },
++ { "LUXEMBOURG", 0, 1, 0, 0, 1, 0x3, 0, 0x2, },
++ { "MACAO", 0, 0, 0, 0, 0, 0x3, 0, 0, },
++ { "MALAYSIA", 0, 0, 0, 0, 0, 0, 0x3, 0, }, /* Current loop >= 20ma */
++ { "MALTA", 0, 0, 0, 0, 1, 0x3, 0, 0x2, },
++ { "MEXICO", 0, 0, 0, 0, 0, 0x3, 0, 0, },
++ { "MOROCCO", 0, 0, 0, 0, 1, 0x3, 0, 0x2, },
++ { "NETHERLANDS", 0, 1, 0, 0, 1, 0x3, 0, 0x2, },
++ { "NEWZEALAND", 0, 0, 0, 0, 0, 0x3, 0, 0x4, },
++ { "NIGERIA", 0, 0, 0, 0, 0x1, 0x3, 0, 0x2, },
++ { "NORWAY", 0, 1, 0, 0, 1, 0x3, 0, 0x2, },
++ { "OMAN", 0, 0, 0, 0, 0, 0, 0x3, 0, },
++ { "PAKISTAN", 0, 0, 0, 0, 0, 0, 0x3, 0, },
++ { "PERU", 0, 0, 0, 0, 0, 0x3, 0, 0, },
++ { "PHILIPPINES", 0, 0, 0, 0, 0, 0, 0x3, 0, },
++ { "POLAND", 0, 0, 1, 1, 0, 0x3, 0, 0, },
++ { "PORTUGAL", 0, 1, 0, 0, 1, 0x3, 0, 0x2, },
++ { "ROMANIA", 0, 0, 0, 0, 0, 3, 0, 0, },
++ { "RUSSIA", 0, 0, 0, 0, 0, 0, 0x3, 0, },
++ { "SAUDIARABIA", 0, 0, 0, 0, 0, 0x3, 0, 0, },
++ { "SINGAPORE", 0, 0, 0, 0, 0, 0x3, 0, 0, },
++ { "SLOVAKIA", 0, 0, 0, 0, 0, 0x3, 0, 0x3, },
++ { "SLOVENIA", 0, 0, 0, 0, 0, 0x3, 0, 0x2, },
++ { "SOUTHAFRICA", 1, 0, 1, 0, 0, 0x3, 0, 0x3, },
++ { "SOUTHKOREA", 0, 0, 0, 0, 0, 0x3, 0, 0, },
++ { "SPAIN", 0, 1, 0, 0, 1, 0x3, 0, 0x2, },
++ { "SWEDEN", 0, 1, 0, 0, 1, 0x3, 0, 0x2, },
++ { "SWITZERLAND", 0, 1, 0, 0, 1, 0x3, 0, 0x2, },
++ { "SYRIA", 0, 0, 0, 0, 0, 0, 0x3, 0, },
++ { "TAIWAN", 0, 0, 0, 0, 0, 0, 0x3, 0, },
++ { "THAILAND", 0, 0, 0, 0, 0, 0, 0x3, 0, },
++ { "UAE", 0, 0, 0, 0, 0, 0x3, 0, 0, },
++ { "UK", 0, 1, 0, 0, 1, 0x3, 0, 0x5, },
++ { "USA", 0, 0, 0, 0, 0, 0x3, 0, 0, },
++ { "YEMEN", 0, 0, 0, 0, 0, 0x3, 0, 0, },
<<Diff was trimmed, longer than 597 lines>>
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/zaptel-bristuff.patch?r1=1.5&r2=1.6&f=u
More information about the pld-cvs-commit
mailing list