[svn-commits] branch mogorman/zaptel-gain r1007 - in
/team/mogorman/zaptel-gain: ./ build_t...
svn-commits at lists.digium.com
svn-commits at lists.digium.com
Wed Apr 26 12:41:26 MST 2006
Author: mogorman
Date: Wed Apr 26 14:41:24 2006
New Revision: 1007
URL: http://svn.digium.com/view/zaptel?rev=1007&view=rev
Log:
updated and automerge back on.
Added:
team/mogorman/zaptel-gain/README.Astribank
- copied unchanged from r1006, trunk/README.Astribank
team/mogorman/zaptel-gain/datamods/
- copied from r1006, trunk/datamods/
team/mogorman/zaptel-gain/datamods/Makefile
- copied unchanged from r1006, trunk/datamods/Makefile
team/mogorman/zaptel-gain/datamods/hdlc_cisco.c
- copied unchanged from r1006, trunk/datamods/hdlc_cisco.c
team/mogorman/zaptel-gain/datamods/hdlc_fr.c
- copied unchanged from r1006, trunk/datamods/hdlc_fr.c
team/mogorman/zaptel-gain/datamods/hdlc_generic.c
- copied unchanged from r1006, trunk/datamods/hdlc_generic.c
team/mogorman/zaptel-gain/datamods/hdlc_ppp.c
- copied unchanged from r1006, trunk/datamods/hdlc_ppp.c
team/mogorman/zaptel-gain/datamods/hdlc_raw.c
- copied unchanged from r1006, trunk/datamods/hdlc_raw.c
team/mogorman/zaptel-gain/datamods/hdlc_raw_eth.c
- copied unchanged from r1006, trunk/datamods/hdlc_raw_eth.c
team/mogorman/zaptel-gain/datamods/syncppp.c
- copied unchanged from r1006, trunk/datamods/syncppp.c
team/mogorman/zaptel-gain/xpp/ (props changed)
- copied from r1006, trunk/xpp/
team/mogorman/zaptel-gain/xpp/FPGA_XPD.hex
- copied unchanged from r1006, trunk/xpp/FPGA_XPD.hex
team/mogorman/zaptel-gain/xpp/Makefile
- copied unchanged from r1006, trunk/xpp/Makefile
team/mogorman/zaptel-gain/xpp/README.Astribank
- copied unchanged from r1006, trunk/xpp/README.Astribank
team/mogorman/zaptel-gain/xpp/card_fxs.c
- copied unchanged from r1006, trunk/xpp/card_fxs.c
team/mogorman/zaptel-gain/xpp/card_fxs.h
- copied unchanged from r1006, trunk/xpp/card_fxs.h
team/mogorman/zaptel-gain/xpp/card_global.c
- copied unchanged from r1006, trunk/xpp/card_global.c
team/mogorman/zaptel-gain/xpp/card_global.h
- copied unchanged from r1006, trunk/xpp/card_global.h
team/mogorman/zaptel-gain/xpp/cards.c
- copied unchanged from r1006, trunk/xpp/cards.c
team/mogorman/zaptel-gain/xpp/cards.h
- copied unchanged from r1006, trunk/xpp/cards.h
team/mogorman/zaptel-gain/xpp/gen_slic_init
- copied unchanged from r1006, trunk/xpp/gen_slic_init
team/mogorman/zaptel-gain/xpp/genzaptelconf
- copied unchanged from r1006, trunk/xpp/genzaptelconf
team/mogorman/zaptel-gain/xpp/genzaptelconf.8
- copied unchanged from r1006, trunk/xpp/genzaptelconf.8
team/mogorman/zaptel-gain/xpp/slic.c
- copied unchanged from r1006, trunk/xpp/slic.c
team/mogorman/zaptel-gain/xpp/slic.h
- copied unchanged from r1006, trunk/xpp/slic.h
team/mogorman/zaptel-gain/xpp/slic_init.inc
- copied unchanged from r1006, trunk/xpp/slic_init.inc
team/mogorman/zaptel-gain/xpp/sync.sh
- copied unchanged from r1006, trunk/xpp/sync.sh
team/mogorman/zaptel-gain/xpp/xdefs.h
- copied unchanged from r1006, trunk/xpp/xdefs.h
team/mogorman/zaptel-gain/xpp/xpd.h
- copied unchanged from r1006, trunk/xpp/xpd.h
team/mogorman/zaptel-gain/xpp/xpp_fxloader
- copied unchanged from r1006, trunk/xpp/xpp_fxloader
team/mogorman/zaptel-gain/xpp/xpp_fxloader.usermap
- copied unchanged from r1006, trunk/xpp/xpp_fxloader.usermap
team/mogorman/zaptel-gain/xpp/xpp_modprobe
- copied unchanged from r1006, trunk/xpp/xpp_modprobe
team/mogorman/zaptel-gain/xpp/xpp_proto.c
- copied unchanged from r1006, trunk/xpp/xpp_proto.c
team/mogorman/zaptel-gain/xpp/xpp_proto.h
- copied unchanged from r1006, trunk/xpp/xpp_proto.h
team/mogorman/zaptel-gain/xpp/xpp_usb.c
- copied unchanged from r1006, trunk/xpp/xpp_usb.c
team/mogorman/zaptel-gain/xpp/xpp_zap.c
- copied unchanged from r1006, trunk/xpp/xpp_zap.c
team/mogorman/zaptel-gain/xpp/xpp_zap.h
- copied unchanged from r1006, trunk/xpp/xpp_zap.h
team/mogorman/zaptel-gain/xpp/xproto.c
- copied unchanged from r1006, trunk/xpp/xproto.c
team/mogorman/zaptel-gain/xpp/xproto.h
- copied unchanged from r1006, trunk/xpp/xproto.h
team/mogorman/zaptel-gain/xpp/zap_debug.c
- copied unchanged from r1006, trunk/xpp/zap_debug.c
team/mogorman/zaptel-gain/xpp/zap_debug.h
- copied unchanged from r1006, trunk/xpp/zap_debug.h
Modified:
team/mogorman/zaptel-gain/ (props changed)
team/mogorman/zaptel-gain/LICENSE (props changed)
team/mogorman/zaptel-gain/Makefile (contents, props changed)
team/mogorman/zaptel-gain/README (props changed)
team/mogorman/zaptel-gain/README.Linux26 (props changed)
team/mogorman/zaptel-gain/README.fxotune (props changed)
team/mogorman/zaptel-gain/README.fxsusb (props changed)
team/mogorman/zaptel-gain/README.udev (props changed)
team/mogorman/zaptel-gain/arith.h (contents, props changed)
team/mogorman/zaptel-gain/biquad.h (props changed)
team/mogorman/zaptel-gain/bittest.h (props changed)
team/mogorman/zaptel-gain/build_tools/make_svn_branch_name (props changed)
team/mogorman/zaptel-gain/build_tools/make_version_h (props changed)
team/mogorman/zaptel-gain/checkstack (props changed)
team/mogorman/zaptel-gain/complex.cc (props changed)
team/mogorman/zaptel-gain/complex.h (props changed)
team/mogorman/zaptel-gain/digits.h (props changed)
team/mogorman/zaptel-gain/doc/fxotune.8 (props changed)
team/mogorman/zaptel-gain/doc/torisatool.8 (props changed)
team/mogorman/zaptel-gain/doc/ztcfg.8 (props changed)
team/mogorman/zaptel-gain/doc/ztmonitor.8 (props changed)
team/mogorman/zaptel-gain/doc/ztspeed.8 (props changed)
team/mogorman/zaptel-gain/doc/zttest.8 (props changed)
team/mogorman/zaptel-gain/doc/zttool.8 (props changed)
team/mogorman/zaptel-gain/ecdis.h (props changed)
team/mogorman/zaptel-gain/fasthdlc.h (props changed)
team/mogorman/zaptel-gain/fir.h (props changed)
team/mogorman/zaptel-gain/fxotune.c (props changed)
team/mogorman/zaptel-gain/fxotune.h (props changed)
team/mogorman/zaptel-gain/fxsdump.c (props changed)
team/mogorman/zaptel-gain/fxstest.c (props changed)
team/mogorman/zaptel-gain/genconst.c (props changed)
team/mogorman/zaptel-gain/gendigits.c (props changed)
team/mogorman/zaptel-gain/hdlcgen.c (props changed)
team/mogorman/zaptel-gain/hdlcstress.c (props changed)
team/mogorman/zaptel-gain/hdlctest.c (props changed)
team/mogorman/zaptel-gain/hdlcverify.c (props changed)
team/mogorman/zaptel-gain/ifcfg-hdlc0 (props changed)
team/mogorman/zaptel-gain/ifup-hdlc (props changed)
team/mogorman/zaptel-gain/kb1ec.h (props changed)
team/mogorman/zaptel-gain/kb1ec_const.h (props changed)
team/mogorman/zaptel-gain/makefw.c (props changed)
team/mogorman/zaptel-gain/mec.h (props changed)
team/mogorman/zaptel-gain/mec2.h (props changed)
team/mogorman/zaptel-gain/mec2_const.h (props changed)
team/mogorman/zaptel-gain/mec3-float.h (props changed)
team/mogorman/zaptel-gain/mec3.h (props changed)
team/mogorman/zaptel-gain/mg2ec.h (contents, props changed)
team/mogorman/zaptel-gain/mg2ec_const.h (contents, props changed)
team/mogorman/zaptel-gain/mkfilter.h (props changed)
team/mogorman/zaptel-gain/mknotch.cc (props changed)
team/mogorman/zaptel-gain/patgen.c (props changed)
team/mogorman/zaptel-gain/patlooptest.c (props changed)
team/mogorman/zaptel-gain/pattest.c (props changed)
team/mogorman/zaptel-gain/pciradio.c (props changed)
team/mogorman/zaptel-gain/pciradio.rbt (props changed)
team/mogorman/zaptel-gain/pciradio_vhdl.tar.gz (props changed)
team/mogorman/zaptel-gain/proslic.h (props changed)
team/mogorman/zaptel-gain/raddiag.tar.gz (props changed)
team/mogorman/zaptel-gain/sec-2.h (props changed)
team/mogorman/zaptel-gain/sec.h (props changed)
team/mogorman/zaptel-gain/sethdlc-new.c (props changed)
team/mogorman/zaptel-gain/sethdlc.c (props changed)
team/mogorman/zaptel-gain/timertest.c (props changed)
team/mogorman/zaptel-gain/tonezone.c (props changed)
team/mogorman/zaptel-gain/tonezone.h (props changed)
team/mogorman/zaptel-gain/tor2-hw.h (props changed)
team/mogorman/zaptel-gain/tor2.c (props changed)
team/mogorman/zaptel-gain/tor2ee.c (props changed)
team/mogorman/zaptel-gain/torisa.c (props changed)
team/mogorman/zaptel-gain/torisa.h (props changed)
team/mogorman/zaptel-gain/torisatool.c (props changed)
team/mogorman/zaptel-gain/tormenta2.rbt (props changed)
team/mogorman/zaptel-gain/tormenta2.ucf (props changed)
team/mogorman/zaptel-gain/tormenta2.vhd (props changed)
team/mogorman/zaptel-gain/udev/zaptel.permissions (props changed)
team/mogorman/zaptel-gain/udev/zaptel.rules (props changed)
team/mogorman/zaptel-gain/udev/zaptel.rules-combined (props changed)
team/mogorman/zaptel-gain/usbfxstest.c (props changed)
team/mogorman/zaptel-gain/wcfxo.c (props changed)
team/mogorman/zaptel-gain/wcfxsusb.c (props changed)
team/mogorman/zaptel-gain/wcfxsusb.h (props changed)
team/mogorman/zaptel-gain/wct1xxp.c (props changed)
team/mogorman/zaptel-gain/wct4xxp-diag.c (props changed)
team/mogorman/zaptel-gain/wct4xxp.c (contents, props changed)
team/mogorman/zaptel-gain/wct4xxp.h (props changed)
team/mogorman/zaptel-gain/wctdm.c (contents, props changed)
team/mogorman/zaptel-gain/wctdm.h (props changed)
team/mogorman/zaptel-gain/wctdm24xxp.c (contents, props changed)
team/mogorman/zaptel-gain/wcte11xp.c (contents, props changed)
team/mogorman/zaptel-gain/wcusb.c (props changed)
team/mogorman/zaptel-gain/wcusb.h (props changed)
team/mogorman/zaptel-gain/zaptel.c (contents, props changed)
team/mogorman/zaptel-gain/zaptel.conf.sample (props changed)
team/mogorman/zaptel-gain/zaptel.h (contents, props changed)
team/mogorman/zaptel-gain/zaptel.init (props changed)
team/mogorman/zaptel-gain/zaptel.sysconfig (props changed)
team/mogorman/zaptel-gain/zconfig.h (props changed)
team/mogorman/zaptel-gain/zonedata.c (contents, props changed)
team/mogorman/zaptel-gain/ztcfg-dude.c (props changed)
team/mogorman/zaptel-gain/ztcfg.c (props changed)
team/mogorman/zaptel-gain/ztcfg.h (props changed)
team/mogorman/zaptel-gain/ztd-eth.c (props changed)
team/mogorman/zaptel-gain/ztd-loc.c (props changed)
team/mogorman/zaptel-gain/ztdiag.c (props changed)
team/mogorman/zaptel-gain/ztdummy.c (props changed)
team/mogorman/zaptel-gain/ztdummy.h (props changed)
team/mogorman/zaptel-gain/ztdynamic.c (props changed)
team/mogorman/zaptel-gain/ztmonitor.c (props changed)
team/mogorman/zaptel-gain/ztspeed.c (props changed)
team/mogorman/zaptel-gain/zttest.c (props changed)
team/mogorman/zaptel-gain/zttool.c (props changed)
Propchange: team/mogorman/zaptel-gain/
------------------------------------------------------------------------------
automerge = backon
Propchange: team/mogorman/zaptel-gain/
------------------------------------------------------------------------------
branch-1.2-blocked = /branches/1.2:917,937
Propchange: team/mogorman/zaptel-gain/
------------------------------------------------------------------------------
branch-1.2-merged = /branches/1.2:1-916,918-936,938-949,958,962,970,990,1004
Propchange: team/mogorman/zaptel-gain/
('svnmerge-blocked' removed)
Propchange: team/mogorman/zaptel-gain/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Apr 26 14:41:24 2006
@@ -1,1 +1,1 @@
-/trunk:1-941
+/trunk:1-1006
Propchange: team/mogorman/zaptel-gain/LICENSE
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: team/mogorman/zaptel-gain/Makefile
URL: http://svn.digium.com/view/zaptel/team/mogorman/zaptel-gain/Makefile?rev=1007&r1=1006&r2=1007&view=diff
==============================================================================
--- team/mogorman/zaptel-gain/Makefile (original)
+++ team/mogorman/zaptel-gain/Makefile Wed Apr 26 14:41:24 2006
@@ -1,9 +1,11 @@
#
# Makefile for Zaptel driver modules and utilities
#
-# Copyright (C) 2001-2005 Digium, Inc.
+# Copyright (C) 2001-2006 Digium, Inc.
#
#
+.EXPORT_ALL_VARIABLES:
+
BASEADDR=0xd0000
HOSTCC=gcc
@@ -104,7 +106,7 @@
# version that we runs. If we build for 2.4 using 2.4 headers on a 2.6
# system with udev mounted on /dev , no point in installing files to /dev
# because they'll be wiped at next reboot.
-DYNFS=$(shell ps ax | grep -v grep | grep -qw 'devfsd\|udevd' && echo "yes")
+DYNFS:=$(shell ps ax | grep -v grep | grep -qw 'devfsd\|udevd' && echo "yes")
# Check for udev permissions directories
ifneq (,$(wildcard $(ROOT_PREFIX)/etc/udev/rules.d))
@@ -138,6 +140,7 @@
LIBTONEZONE_SO:=libtonezone.so
LIBTONEZONE_SO_MAJOR_VER:=1
LIBTONEZONE_SO_MINOR_VER:=0
+
MODULES:=zaptel tor2 torisa wcusb wcfxo wctdm wctdm24xxp \
ztdynamic ztd-eth wct1xxp wct4xxp wcte11xp pciradio \
ztd-loc # ztdummy
@@ -146,6 +149,7 @@
ifeq (${BUILDVER},linux26)
MODULES+=ztdummy
endif
+
MODULESO:=$(MODULES:%=%.o)
MODULESKO:=$(MODULES:%=%.ko)
ifeq ($(BUILDVER),linux26)
@@ -159,10 +163,18 @@
INC_DIR:=$(INSTALL_PREFIX)/usr/include
MOD_DIR:=$(INSTALL_PREFIX)/lib/modules/$(KVERS)/misc
+MOD_DESTDIR:=zaptel
+
+obj-m:=$(MODULESO) ${XPPMOD}
+
+ifneq ($(filter xpp,${MAKECMDGOALS}),)
+XPPMOD=xpp/
+endif
+
ifneq (,$(wildcard /usr/include/newt.h))
ZTTOOL:=zttool
endif
-BINS:=ztcfg sethdlc-new ztmonitor ztspeed $(ZTTOOL) zttest fxotune
+BINS:=ztcfg ztmonitor ztspeed $(ZTTOOL) zttest fxotune
UTILS:=tor2ee ztspeed zttool ztmonitor sethdlc-new \
usbfxstest fxstest fxotune fxsdump ztdiag
UTILSO:=$(UTILS:%=%.o)
@@ -178,20 +190,18 @@
modules: $(BUILDVER)
-linux24: $(MODULESO) $(BINS)
+linux24: prereq $(MODULESO) $(BINS)
linux26: prereq $(BINS)
@echo $(KSRC)
@if [ -z "$(KSRC)" -o ! -d "$(KSRC)" ]; then echo "You do not appear to have the sources for the $(KVERS) kernel installed."; exit 1 ; fi
- $(KMAKE) modules
-
-obj-m += $(MODULESO)
+ $(KMAKE) XPPMOD=$(XPPMOD) modules
+
+xpp: linux26
#ifneq ($(TOPDIR),)
#include $(TOPDIR)/Rules.make
#endif
-
-MOD_DESTDIR:=zaptel
version.h: FORCE
ZAPTELVERSION="${ZAPTELVERSION}" build_tools/make_version_h > $@.tmp
@@ -211,15 +221,15 @@
torisa.o: torisa.h
wcusb.o: wcusb.h
-
+
wcfxsusb.o: wcfxsusb.h
-
+
wctdm.o: wctdm.h
-
+
wctdm24xxp.o: wctdm.h
-
+
pciradio.o: radfw.h
-
+
ztdummy.o: ztdummy.h
$(MODULESO): %.o: %.c zaptel.h
@@ -274,6 +284,9 @@
ztcfg-shared: ztcfg.o $(LIBTONEZONE_SO)
$(CC) -o $@ $^ -lm
+
+data:
+ $(MAKE) -C datamods datamods
ztcfg: ztcfg.o libtonezone.a
$(CC) -o $@ $^ -lm
@@ -349,6 +362,11 @@
rm -f $(INSTALL_PREFIX)/lib/modules/$(KVERS)/extra/$$x ; \
done; \
$(KMAKE_INST); \
+ if [ -f datamods/syncppp.ko ]; then \
+ $(MAKE) -C datamods install; \
+ else \
+ rm -f $(INSTALL_PREFIX)/lib/modules/$(KVERS)/misc/{hdlc_*,syncppp}.ko; \
+ fi; \
if ! [ -f wcfxsusb.ko ]; then \
rm -f $(INSTALL_PREFIX)/lib/modules/$(KVERS)/misc/wcfxsusb.ko; \
fi; \
@@ -488,7 +506,10 @@
rm -f $(TZOBJS) $(LIBTONEZONE_SO) *.lo
ifeq (${BUILDVER},linux26)
$(KMAKE) clean
-endif
+ $(MAKE) -C datamods clean
+endif
+ rm -f xpp/*.ko xpp/*.mod.c xpp/.*o.cmd
+ rm -f xpp/*.o xpp/*.mod.o
rm -rf .tmp_versions
rm -f gendigits tones.h
rm -f libtonezone*
Propchange: team/mogorman/zaptel-gain/Makefile
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/README
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/README.Linux26
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/README.fxotune
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/README.fxsusb
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/README.udev
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: team/mogorman/zaptel-gain/arith.h
URL: http://svn.digium.com/view/zaptel/team/mogorman/zaptel-gain/arith.h?rev=1007&r1=1006&r2=1007&view=diff
==============================================================================
--- team/mogorman/zaptel-gain/arith.h (original)
+++ team/mogorman/zaptel-gain/arith.h Wed Apr 26 14:41:24 2006
@@ -22,7 +22,7 @@
: "=r" (dst)
: "r" (src), "0" (dst)
: "memory"
-#if CLOBBERMMX
+#ifdef CLOBBERMMX
, "%mm0", "%mm1", "%mm2", "%mm3"
#endif
);
@@ -42,7 +42,7 @@
: "=r" (dst)
: "r" (src), "0" (dst)
: "memory"
-#if CLOBBERMMX
+#ifdef CLOBBERMMX
, "%mm0", "%mm1", "%mm2", "%mm3"
#endif
);
Propchange: team/mogorman/zaptel-gain/arith.h
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/biquad.h
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/bittest.h
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/build_tools/make_svn_branch_name
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: team/mogorman/zaptel-gain/build_tools/make_svn_branch_name
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/build_tools/make_version_h
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: team/mogorman/zaptel-gain/build_tools/make_version_h
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/checkstack
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/complex.cc
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/complex.h
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/digits.h
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/doc/fxotune.8
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/doc/torisatool.8
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/doc/ztcfg.8
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/doc/ztmonitor.8
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/doc/ztspeed.8
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/doc/zttest.8
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/doc/zttool.8
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/ecdis.h
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/fasthdlc.h
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/fir.h
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/fxotune.c
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/fxotune.h
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/fxsdump.c
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/fxstest.c
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/genconst.c
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/gendigits.c
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/hdlcgen.c
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/hdlcstress.c
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/hdlctest.c
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/hdlcverify.c
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/ifcfg-hdlc0
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/ifup-hdlc
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/kb1ec.h
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/kb1ec_const.h
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/makefw.c
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/mec.h
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/mec2.h
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/mec2_const.h
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/mec3-float.h
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/mec3.h
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: team/mogorman/zaptel-gain/mg2ec.h
URL: http://svn.digium.com/view/zaptel/team/mogorman/zaptel-gain/mg2ec.h?rev=1007&r1=1006&r2=1007&view=diff
==============================================================================
--- team/mogorman/zaptel-gain/mg2ec.h (original)
+++ team/mogorman/zaptel-gain/mg2ec.h Wed Apr 26 14:41:24 2006
@@ -41,6 +41,7 @@
#define FREE(a) free(a)
#endif
+
#define ABS(a) abs(a!=-32768?a:-32767)
#define RESTORE_COEFFS {\
@@ -58,11 +59,16 @@
/* Uncomment to generate per-sample statistics - this will severely degrade system performance and audio quality */
/* #define MEC2_STATS_DETAILED */
+/* Uncomment to generate per-call DC bias offset messages */
+/* #define MEC2_DCBIAS_MESSAGE */
+
/* Get optimized routines for math */
#include "arith.h"
/* Bring in definitions for the various constants and thresholds */
#include "mg2ec_const.h"
+
+#define DC_NORMALIZE
#ifndef NULL
#define NULL 0
@@ -155,6 +161,9 @@
short lastsig[256];
int lastpos;
int backup;
+#ifdef DC_NORMALIZE
+ int dc_estimate;
+#endif
};
@@ -257,8 +266,19 @@
static inline void echo_can_free(struct echo_can_state *ec)
{
+#if defined(DC_NORMALIZE) && defined(MEC2_DCBIAS_MESSAGE)
+ printk("EC: DC bias calculated: %d V\n", ec->dc_estimate >> 15);
+#endif
FREE(ec);
}
+
+#ifdef DC_NORMALIZE
+short inline dc_removal(int *dc_estimate, short samp)
+{
+ *dc_estimate += ((((int)samp << 15) - *dc_estimate) >> 9);
+ return samp - (*dc_estimate >> 15);
+}
+#endif
static inline short echo_can_update(struct echo_can_state *ec, short iref, short isig)
{
@@ -274,6 +294,10 @@
int Py_i;
/* ... */
int two_beta_i;
+
+#ifdef DC_NORMALIZE
+ isig = dc_removal(&ec->dc_estimate, isig);
+#endif
/* flow A on pg. 428 */
/* eq. (16): high-pass filter the input to generate the next value;
@@ -646,7 +670,7 @@
2 * sizeof(short) * (1 << DEFAULT_ALPHA_ST_I) + /* s_s */
2 * sizeof(short) * (maxu) + /* u_s */
2 * sizeof(short) * len); /* y_tilde_s */
- init_cc(ec, len, maxy, maxu);
+ init_cc(ec, len, maxy, maxu);
}
return ec;
}
Propchange: team/mogorman/zaptel-gain/mg2ec.h
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: team/mogorman/zaptel-gain/mg2ec_const.h
URL: http://svn.digium.com/view/zaptel/team/mogorman/zaptel-gain/mg2ec_const.h?rev=1007&r1=1006&r2=1007&view=diff
==============================================================================
--- team/mogorman/zaptel-gain/mg2ec_const.h (original)
+++ team/mogorman/zaptel-gain/mg2ec_const.h Wed Apr 26 14:41:24 2006
@@ -29,7 +29,7 @@
* If this is too low then background noise will cause the filter
* coefficients to constantly be updated.
*/
-#define MIN_UPDATE_THRESH_I 4096
+#define MIN_UPDATE_THRESH_I 2048
/* The number of samples used to update coefficients using the
* the block update method (M). It should be related back to the
Propchange: team/mogorman/zaptel-gain/mg2ec_const.h
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/mkfilter.h
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/mknotch.cc
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/patgen.c
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/patlooptest.c
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/pattest.c
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/pciradio.c
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/pciradio.rbt
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/pciradio_vhdl.tar.gz
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Propchange: team/mogorman/zaptel-gain/proslic.h
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/raddiag.tar.gz
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Propchange: team/mogorman/zaptel-gain/sec-2.h
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/sec.h
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/sethdlc-new.c
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/sethdlc.c
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/timertest.c
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/tonezone.c
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/tonezone.h
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/tor2-hw.h
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/tor2.c
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/tor2ee.c
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/torisa.c
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/torisa.h
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/torisatool.c
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/tormenta2.rbt
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/tormenta2.ucf
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/tormenta2.vhd
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/udev/zaptel.permissions
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/udev/zaptel.rules
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/udev/zaptel.rules-combined
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: team/mogorman/zaptel-gain/udev/zaptel.rules-combined
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/usbfxstest.c
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/wcfxo.c
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/wcfxsusb.c
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/wcfxsusb.h
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/wct1xxp.c
------------------------------------------------------------------------------
svn:mime-type = text/plain
Propchange: team/mogorman/zaptel-gain/wct4xxp-diag.c
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: team/mogorman/zaptel-gain/wct4xxp.c
URL: http://svn.digium.com/view/zaptel/team/mogorman/zaptel-gain/wct4xxp.c?rev=1007&r1=1006&r2=1007&view=diff
==============================================================================
--- team/mogorman/zaptel-gain/wct4xxp.c (original)
+++ team/mogorman/zaptel-gain/wct4xxp.c Wed Apr 26 14:41:24 2006
@@ -168,7 +168,7 @@
#endif
static int debug=0;
-static int timingcable;
+static int timingcable = 0;
static int highestorder;
static int t1e1override = -1;
static int j1mode = 0;
@@ -299,6 +299,7 @@
int flags; /* Device flags */
int master; /* Are we master */
int ledreg; /* LED Register */
+ int stopdma; /* Set to stop DMA */
unsigned int dmactrl;
int e1recover; /* E1 recovery timer */
dma_addr_t readdma;
@@ -350,7 +351,7 @@
static int t4_ioctl(struct zt_chan *chan, unsigned int cmd, unsigned long data);
static void t4_tsi_assign(struct t4 *wc, int fromspan, int fromchan, int tospan, int tochan);
static void t4_tsi_unassign(struct t4 *wc, int tospan, int tochan);
-static void __t4_set_timing_source(struct t4 *wc, int unit);
+static void __t4_set_timing_source(struct t4 *wc, int unit, int master, int slave);
static void __t4_check_alarms(struct t4 *wc, int span);
static void __t4_check_sigbits(struct t4 *wc, int span);
@@ -398,7 +399,10 @@
{
unsigned int tmp;
wc->membase[addr] = cpu_to_le32(value);
-#if 1
+ tmp = __t4_pci_in(wc, WC_VERSION);
+ if ((tmp & 0xffff0000) != 0xc01a0000)
+ printk("TE4XXP: Version Synchronization Error!\n");
+#if 0
tmp = __t4_pci_in(wc, addr);
if ((value != tmp) && (addr != WC_LEDS) && (addr != WC_LDATA) &&
(addr != WC_GPIO) && (addr != WC_INTR))
@@ -446,6 +450,7 @@
unit &= 0x3;
__t4_pci_out(wc, WC_LADDR, (unit << 8) | (addr & 0xff));
__t4_pci_out(wc, WC_LADDR, (unit << 8) | (addr & 0xff) | WC_LFRMR_CS | WC_LREAD);
+ __t4_pci_out(wc, WC_VERSION, 0);
ret = __t4_pci_in(wc, WC_LDATA);
__t4_pci_out(wc, WC_LADDR, (unit << 8) | (addr & 0xff));
return ret & 0xff;
@@ -1145,11 +1150,7 @@
(!(wc->tspans[1]->span.flags & ZT_FLAG_RUNNING)))) {
/* No longer in use, disable interrupts */
printk("TE%dXXP: Disabling interrupts since there are no active spans\n", wc->numspans);
- wc->dmactrl = 0x0;
- __t4_pci_out(wc, WC_DMACTRL, 0x00000000);
- /* Acknowledge any pending interrupts */
- __t4_pci_out(wc, WC_INTR, 0x00000000);
- __t4_set_timing_source(wc,4);
+ wc->stopdma = 1;
} else wc->checktiming = 1;
spin_unlock_irqrestore(&wc->reglock, flags);
if (debug & DEBUG_MAIN)
@@ -1386,7 +1387,16 @@
printk("Successfully initialized serial bus for unit %d\n", unit);
}
-static void __t4_set_timing_source(struct t4 *wc, int unit)
+static int syncsrc = 0;
+static int syncnum = 0 /* -1 */;
+static int syncspan = 0;
+#ifdef DEFINE_SPINLOCK
+static DEFINE_SPINLOCK(synclock);
+#else
+static spinlock_t synclock = SPIN_LOCK_UNLOCKED;
+#endif
+
+static void __t4_set_timing_source(struct t4 *wc, int unit, int master, int slave)
{
unsigned int timing;
int x;
@@ -1397,20 +1407,30 @@
for (x=0;x<wc->numspans;x++) /* set all 4 receive reference clocks to unit */
__t4_framer_out(wc, x, 0x44, timing);
wc->dmactrl |= (1 << 29);
- __t4_pci_out(wc, WC_DMACTRL, wc->dmactrl);
} else {
for (x=0;x<wc->numspans;x++) /* set each receive reference clock to itself */
__t4_framer_out(wc, x, 0x44, timing | (x << 6));
wc->dmactrl &= ~(1 << 29);
- __t4_pci_out(wc, WC_DMACTRL, wc->dmactrl);
- }
- wc->syncsrc = unit;
+ }
+ if (slave)
+ wc->dmactrl |= (1 << 25);
+ else
+ wc->dmactrl &= ~(1 << 25);
+ if (master)
+ wc->dmactrl |= (1 << 24);
+ else
+ wc->dmactrl &= ~(1 << 24);
+ __t4_pci_out(wc, WC_DMACTRL, wc->dmactrl);
+ if (!master && !slave)
+ wc->syncsrc = unit;
if ((unit < 0) || (unit > 3))
unit = 0;
else
unit++;
- for (x=0;x<wc->numspans;x++)
- wc->tspans[x]->span.syncsrc = unit;
+ if (!master && !slave) {
+ for (x=0;x<wc->numspans;x++)
+ wc->tspans[x]->span.syncsrc = unit;
+ }
} else {
if (debug & DEBUG_MAIN)
printk("TE%dXXP: Timing source already set to %d\n", wc->numspans, unit);
@@ -1420,21 +1440,104 @@
#endif
}
+static inline void __t4_update_timing(struct t4 *wc)
+{
+ int i;
+ /* update sync src info */
+ if (wc->syncsrc != syncsrc) {
+ printk("Swapping card %d from %d to %d\n", wc->num, wc->syncsrc, syncsrc);
+ wc->syncsrc = syncsrc;
+ /* Update sync sources */
+ for (i = 0; i < wc->numspans; i++) {
+ wc->tspans[i]->span.syncsrc = wc->syncsrc;
+ }
+ if (syncnum == wc->num) {
+ __t4_set_timing_source(wc, syncspan-1, 1, 0);
+ if (debug) printk("Card %d, using sync span %d, master\n", wc->num, syncspan);
+ } else {
+ __t4_set_timing_source(wc, syncspan-1, 0, 1);
+ if (debug) printk("Card %d, using Timing Bus, NOT master\n", wc->num);
+ }
+ }
+}
+
+static int __t4_findsync(struct t4 *wc)
+{
+ int i;
+ int x;
+ unsigned long flags;
+ int p;
+ int nonzero;
+ int newsyncsrc = 0; /* Zaptel span number */
+ int newsyncnum = 0; /* wct4xxp card number */
+ int newsyncspan = 0; /* span on given wct4xxp card */
+ spin_lock_irqsave(&synclock, flags);
+#if 1
+ if (!wc->num) {
+ /* If we're the first card, go through all the motions, up to 8 levels
+ of sync source */
+ p = 1;
+ while (p < 8) {
+ nonzero = 0;
+ for (x=0;cards[x];x++) {
+ for (i = 0; i < wc->numspans; i++) {
+ if (cards[x]->tspans[i]->syncpos) {
+ nonzero = 1;
+ if ((cards[x]->tspans[i]->syncpos == p) &&
+ !(cards[x]->tspans[i]->span.alarms & (ZT_ALARM_RED | ZT_ALARM_BLUE | ZT_ALARM_LOOPBACK)) &&
+ (cards[x]->tspans[i]->span.flags & ZT_FLAG_RUNNING)) {
+ /* This makes a good sync source */
+ newsyncsrc = cards[x]->tspans[i]->span.spanno;
+ newsyncnum = x;
+ newsyncspan = i + 1;
+ /* Jump out */
+ goto found;
+ }
+ }
+ }
+ }
+ if (nonzero)
+ p++;
+ else
+ break;
+ }
+found:
+ if ((syncnum != newsyncnum) || (syncsrc != newsyncsrc) || (newsyncspan != syncspan)) {
+ if (debug) printk("New syncnum: %d (was %d), syncsrc: %d (was %d), syncspan: %d (was %d)\n", newsyncnum, syncnum, newsyncsrc, syncsrc, newsyncspan, syncspan);
+ syncnum = newsyncnum;
+ syncsrc = newsyncsrc;
+ syncspan = newsyncspan;
+ for (x=0;cards[x];x++) {
+ __t4_update_timing(cards[x]);
+ }
+ }
+ } else
+ cards[0]->checktiming = 1;
+#endif
+ spin_unlock_irqrestore(&synclock, flags);
+ return 0;
+}
+
static void __t4_set_timing_source_auto(struct t4 *wc)
{
int x;
+ printk("timing source auto card %d!\n", wc->num);
wc->checktiming = 0;
- for (x=0;x<wc->numspans;x++) {
- if (wc->tspans[x]->sync) {
- if ((wc->tspans[wc->tspans[x]->psync - 1]->span.flags & ZT_FLAG_RUNNING) &&
[... 521 lines stripped ...]
More information about the svn-commits
mailing list