[zaptel-commits] tzafrir: branch 1.2 r1718 - in /branches/1.2/xpp: ./ utils/

zaptel-commits at lists.digium.com zaptel-commits at lists.digium.com
Fri Dec 15 06:49:24 MST 2006


Author: tzafrir
Date: Fri Dec 15 07:49:24 2006
New Revision: 1718

URL: http://svn.digium.com/view/zaptel?view=rev&rev=1718
Log:
Sync to xpp RELEASE-1.2.0 2933.
 
 r2847 at boole:  diego | 2006-12-03 10:33:00 +0200
 added documentation which explains which packages are needed to build 
 the drivers on different distributions.
 
 r2862 at boole:  tzafrir | 2006-12-05 08:43:50 +0200
 README.Astribank: A typo in the sample config (changeset:2861).
 
 r2891 at boole:  tzafrir | 2006-12-08 01:11:45 +0200
 Re-accept changeset:2832 after all.
 
 r2892 at boole:  tzafrir | 2006-12-08 02:46:07 +0200
 Merge genzaptelconf changeset:2866 from trunk:
  * Zapata comment on unidentified channel goes to $zapata_file
  * Correct pattern for Sangoma A200 card's channels.
 
 r2893 at boole:  tzafrir | 2006-12-08 03:11:37 +0200
 genzaptelconf:
  * Add options xpp_fxo_rxgain: add a custom rxgain for every XPP FXO channel.
  * Do print the original line for every channel.
 
 r2909 at boole:  tzafrir | 2006-12-10 20:03:59 +0200
 Add some sleeps in older kernels in the firmware loading script.
 
 r2932 at boole:  tzafrir | 2006-12-14 17:30:12 +0200
 Make the warning about a call to off-hook FXO debug. At least if we 
 cannot suppress it at module load time.
 
 r2933 at boole:  tzafrir | 2006-12-14 17:32:00 +0200
 Don't redefine 'bool' on newer kerenls to fix building with kernel 
 2.6.19. Taken from Digium tree.
 (from changeset:2930)
 

Modified:
    branches/1.2/xpp/   (props changed)
    branches/1.2/xpp/README.Astribank
    branches/1.2/xpp/card_fxo.c
    branches/1.2/xpp/utils/genzaptelconf
    branches/1.2/xpp/utils/xpp_fxloader
    branches/1.2/xpp/xdefs.h
    branches/1.2/xpp/xpp_zap.c

Propchange: branches/1.2/xpp/
------------------------------------------------------------------------------
--- svk:merge (original)
+++ svk:merge Fri Dec 15 07:49:24 2006
@@ -1,7 +1,5 @@
-283159da-0705-0410-b60c-f2062b4bb6ad:/components/xpp-zaptel/branches/RELEASE-1.2.0/xpp:2832
+283159da-0705-0410-b60c-f2062b4bb6ad:/components/xpp-zaptel/branches/RELEASE-1.2.0/xpp:2933
 283159da-0705-0410-b60c-f2062b4bb6ad:/components/xpp-zaptel/trunk/xpp:2830
-
 f558416c-6c06-0410-9f27-dde2687782d0:/branches/1.4/xpp:1623
 f558416c-6c06-0410-9f27-dde2687782d0:/team/tzafrir/xpp_1.2/xpp:1554
-
 f558416c-6c06-0410-9f27-dde2687782d0:/trunk/xpp:1453

Modified: branches/1.2/xpp/README.Astribank
URL: http://svn.digium.com/view/zaptel/branches/1.2/xpp/README.Astribank?view=diff&rev=1718&r1=1717&r2=1718
==============================================================================
--- branches/1.2/xpp/README.Astribank (original)
+++ branches/1.2/xpp/README.Astribank Fri Dec 15 07:49:24 2006
@@ -21,6 +21,10 @@
 firmware and initialization files for the Astribank:
 
   make -C xpp/utils
+  
+In order to build the user space utilities, you will need the libusb-dev 
+package on Debian (and derivatives like ubuntu) or libusb-devel on RedHat 
+(and derivatives like Centox/Trixbox).
 
 INSTALLATION:
 """"""""""""
@@ -222,7 +226,7 @@
   Astribank 16: 8FXS/8FXO
 
     fxoks=1-14
-    fksks=15-22
+    fxsks=15-22
 
 /etc/asterisk/zapata.conf
 

Modified: branches/1.2/xpp/card_fxo.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/xpp/card_fxo.c?view=diff&rev=1718&r1=1717&r2=1718
==============================================================================
--- branches/1.2/xpp/card_fxo.c (original)
+++ branches/1.2/xpp/card_fxo.c Fri Dec 15 07:49:24 2006
@@ -209,7 +209,7 @@
 	priv = xpd->priv;
 	BUG_ON(!priv);
 	if(!IS_SET(priv->battery, pos)) {
-		NOTICE("%s/%s/%d: WARNING: called while battery is off\n", xbus->busname, xpd->xpdname, pos);
+		DBG("%s/%s/%d: WARNING: called while battery is off\n", xbus->busname, xpd->xpdname, pos);
 	}
 	spin_lock_irqsave(&xpd->lock, flags);
 	mark_ring(xpd, pos, 0, 0);				// No more rings

Modified: branches/1.2/xpp/utils/genzaptelconf
URL: http://svn.digium.com/view/zaptel/branches/1.2/xpp/utils/genzaptelconf?view=diff&rev=1718&r1=1717&r2=1718
==============================================================================
--- branches/1.2/xpp/utils/genzaptelconf (original)
+++ branches/1.2/xpp/utils/genzaptelconf Fri Dec 15 07:49:24 2006
@@ -295,6 +295,9 @@
 		# sadly, both input ports and output ports go into the same span as 
 		# the FXS ports. Thus we need to separate between them. See also 
 		# the zapata.conf section:
+		
+		echo ";;; line=\"$line\""                      >> $zapata_file
+		
 		if [ "$astbank_type" != '' ]; 
 			then echo "# astbanktype: $astbank_type" >>$zaptel_file; 
 		fi
@@ -369,7 +372,14 @@
 			  esac
 				reset_values="$reset_values cidsignalling cidstart"
 			fi
-			echo ";;; line=\"$line\""                      >> $zapata_file
+			case "$line" in
+			*XPP_FXO*) 
+				if [ "$xpp_fxo_rxgain" != '' ]; then
+					echo "rxgain=$xpp_fxo_rxgain"             >> $zapata_file
+					reset_values="$reset_values rxgain"
+				fi
+				;;
+			esac
 			# if kewlstart is not used, busydetect has to be employed:
 			if [ "$method" = 'ls' ]
 			then
@@ -576,13 +586,11 @@
 	for arg in "$@"; do
 		case "$arg" in
 		busydetect)      echo "busydetect=no"   >>$conf_file;;
-		callerid)        echo "callerid="       >>$conf_file;;
-		cidstart)        echo "cidstart="       >>$conf_file;;
-		cidsignalling)   echo "cidsignalling="  >>$conf_file;;
 		context)         echo "context=default" >>$conf_file;;
-		group)           echo "group="          >>$conf_file;;
 		immediate)       echo "immediate=no"    >>$conf_file;;
-		mailbox)         echo "mailbox="        >>$conf_file;;
+		rxgain)          echo "rxgain=0"        >>$conf_file;;
+		txgain)          echo "txgain=0"        >>$conf_file;;
+		*)               echo "$arg="           >>$conf_file;;
 		esac
 	done
 }
@@ -692,7 +700,7 @@
 			# in case this is a real channel. 
 			chan_num=`echo $line |awk '{print $1}'`
 			case "$line" in
-			*WCTDM/*|*/WRTDM/*|*OPVXA1200/*) 
+			*WCTDM/*|*\ WRTDM/*|*OPVXA1200/*) 
 				# TDM400P/2400P and similar cards (Sangoma A200, OpenVox A1200)
 				# this can be either FXS or FXO
 				maybe_fxs=0
@@ -812,7 +820,7 @@
 				list) echo "# ??: $line";;
 				files)
 					echo "# ??: $line" >>$zaptel_file
-					echo "; ??: $line" >>$zaptel_file
+					echo "; ??: $line" >>$zapata_file
 				esac
 				;;
 			esac

Modified: branches/1.2/xpp/utils/xpp_fxloader
URL: http://svn.digium.com/view/zaptel/branches/1.2/xpp/utils/xpp_fxloader?view=diff&rev=1718&r1=1717&r2=1718
==============================================================================
--- branches/1.2/xpp/utils/xpp_fxloader (original)
+++ branches/1.2/xpp/utils/xpp_fxloader Fri Dec 15 07:49:24 2006
@@ -75,6 +75,17 @@
 
 FPGA_LOAD="/usr/sbin/fpga_load"
 
+# With Kernels older that 2.6.10 it seems to be possible
+# to trigger a race condition by running fxload or fpga_load 
+# immediately after the detection of the device.
+KERNEL_HAS_USB_RACE=0
+case "`uname -r`" in 2.6.[89]*) KERNEL_HAS_USB_RACE=1;; esac
+sleep_if_race() {
+  if [ "$KERNEL_HAS_USB_RACE" = '1' ]; then
+    sleep 2
+  fi
+}
+
 find_dev() {
   v_id=$1
   p_id=$2
@@ -83,6 +94,7 @@
 }
 
 do_fxload() {
+  sleep_if_race
   ( fxload -t fx2 $* 2>&1 1>/dev/null || exit 1 ) | $LOGGER
 }
 
@@ -120,6 +132,7 @@
 	firm_ver=`hexfile_version $FIRMWARE_DIR/$fw`
 
 	$LOGGER "FPGA Firmware $FIRMWARE_DIR/$fw into $dev"
+	sleep_if_race
 	$FPGA_LOAD -D "$dev" -I "$FIRMWARE_DIR/$fw" 2>&1 >/dev/null | $LOGGER
 	status=$PIPESTATUS
 	if [ $status != 0 ]; then
@@ -193,6 +206,7 @@
 		else
 			FIRM_FPGA="$FIRMWARE_DIR/FPGA_$prod_id.hex"
 		fi
+		sleep_if_race
 		$FPGA_LOAD -D "$DEVICE" -I "$FIRM_FPGA" 2>&1 >/dev/null | $LOGGER
 		;;
 	esac	

Modified: branches/1.2/xpp/xdefs.h
URL: http://svn.digium.com/view/zaptel/branches/1.2/xpp/xdefs.h?view=diff&rev=1718&r1=1717&r2=1718
==============================================================================
    (empty)

Modified: branches/1.2/xpp/xpp_zap.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/xpp/xpp_zap.c?view=diff&rev=1718&r1=1717&r2=1718
==============================================================================
--- branches/1.2/xpp/xpp_zap.c (original)
+++ branches/1.2/xpp/xpp_zap.c Fri Dec 15 07:49:24 2006
@@ -67,7 +67,7 @@
 DEF_PARM(bool, zap_autoreg, 1, "Register spans automatically (1) or not (0)");
 DEF_PARM(bool, prefmaster, 1, "Do we want to be zaptel preferred sync master");
 #ifdef	XPP_EC_CHUNK
-DEF_PARM_RO(bool, xpp_ec, 1, "Do we use our own (1) or Zaptel's (0) echo canceller");
+DEF_PARM_RO(bool, xpp_ec, 0, "Do we use our own (1) or Zaptel's (0) echo canceller");
 #else
 static int xpp_ec = 0;
 #endif



More information about the zaptel-commits mailing list