List Info

Thread: sruffell: branch sruffell/voicebus r3811 - in /team/sruffell/voicebus: ./ wct...




sruffell: branch sruffell/voicebus r3811 - in /team/sruffell/voicebus: ./ wct...
user name
2008-02-06 16:24:57
Author: sruffell
Date: Wed Feb  6 16:24:57 2008
New Revision: 3811

URL: http://svn.digium.com/view/zaptel?view=rev&rev=3811
Log:
- Hopefully made the message about when the buffer is
growing less confusing
  to a potential user.
- Client drivers share a default latency value from the
voicebus header.


Modified:
    team/sruffell/voicebus/voicebus.c
    team/sruffell/voicebus/voicebus.h
    team/sruffell/voicebus/wctdm24xxp/base.c
    team/sruffell/voicebus/wcte12xp/base.c

Modified: team/sruffell/voicebus/voicebus.c
URL: http://svn.digium.com/view/zaptel/team/sruffell/voicebus/v
oicebus.c?view=diff&rev=3811&r1=3810&r2=3811

============================================================
==================
--- team/sruffell/voicebus/voicebus.c (original)
+++ team/sruffell/voicebus/voicebus.c Wed Feb  6 16:24:57
2008
 -66,7
+66,6 
 /*! The number of descriptors in both the tx and rx
descriptor ring. */
 #define DRING_SIZE (1 << 5)  /* Must be a power of 2
*/
 #define DRING_MASK	(DRING_SIZE-1) 
-#define MIN_DESCRIPTORS		3
 
 /* Interrupt status' reported in SR_CSR5 */
 #define TX_COMPLETE_INTERRUPT 		0x00000001
 -344,8
+343,8 
 	if ( DRING_SIZE <= ms ) {
 		VB_PRINTK(vb, WARNING, MESSAGE, ms, DRING_SIZE);
 		return -EINVAL;
-	} else if (MIN_DESCRIPTORS > ms ) {
-		VB_PRINTK(vb, WARNING, MESSAGE, ms, MIN_DESCRIPTORS);
+	} else if (VOICEBUS_DEFAULT_LATENCY > ms ) {
+		VB_PRINTK(vb, WARNING, MESSAGE, ms,
VOICEBUS_DEFAULT_LATENCY);
 		return -EINVAL;
 	}
 	VBLOCK(vb);
 -1171,7
+1170,8 
 			 * are always two buffers in the TX FIFO.
 			 */
 			VB_PRINTK(vb,ERR,
-				"ERROR: Unable to service card within %d
ms.n",
+				"ERROR: Unable to service card within %d ms
"
+				"and unable to further increase latency. ",
 				DRING_SIZE-2);
 			__warn_once = 0;
 		}
 -1184,9
+1184,9 
 		 * set, then the hardware will set the TX descriptor not
 		 * available interrupt.
 		 */
-		VB_PRINTK(vb, INFO, "Unable to service card within
%d ms. " 
-			"Increasing latency to %d ms.n",
-			latency-2, latency+1);
+		VB_PRINTK(vb, INFO, "Missed interrupt. " 
+			"Increasing latency to %d ms in order to
compenstate.n",
+			latency+1);
 		/* Set the minimum latency in case we're restarted...we
don't
 		 * want to wait for the buffer to grow to this depth
again in
 		 * that case. 
 -1381,7
+1381,7 
 	set_bit(STOP, &vb->flags);
 	clear_bit(IN_DEFERRED_PROCESSING, &vb->flags);
 	vb->framesize = framesize;
-	vb->min_tx_buffer_count = MIN_DESCRIPTORS;
+	vb->min_tx_buffer_count = VOICEBUS_DEFAULT_LATENCY;
 
 #if VOICEBUS_DEFERRED == WORKQUEUE
 	/* NOTE: This workqueue must be single threaded because
locking is not

Modified: team/sruffell/voicebus/voicebus.h
URL: http://svn.digium.com/view/zaptel/team/sruffell/voicebus/v
oicebus.h?view=diff&rev=3811&r1=3810&r2=3811

============================================================
==================
--- team/sruffell/voicebus/voicebus.h (original)
+++ team/sruffell/voicebus/voicebus.h Wed Feb  6 16:24:57
2008
 -30,6
+30,8 
 
 struct voicebus;
 
+#define VOICEBUS_DEFAULT_LATENCY 3
+
 void voicebus_setdebuglevel(struct voicebus *vb, u32
level);
 int voicebus_getdebuglevel(struct voicebus *vb);
 struct pci_dev * voicebus_get_pci_dev(struct voicebus
*vb);

Modified: team/sruffell/voicebus/wctdm24xxp/base.c
URL: http://svn.digium.com/view/zaptel/team/sruffell/voi
cebus/wctdm24xxp/base.c?view=diff&rev=3811&r1=3810&a
mp;r2=3811
============================================================
==================
--- team/sruffell/voicebus/wctdm24xxp/base.c (original)
+++ team/sruffell/voicebus/wctdm24xxp/base.c Wed Feb  6
16:24:57 2008
 -281,7
+281,7 
 static int nativebridge = 0;
 static int ringdebounce = DEFAULT_RING_DEBOUNCE;
 static int fwringdetect = 0;
-static int latency=3;
+static int latency = VOICEBUS_DEFAULT_LATENCY;
 #ifdef VPM_SUPPORT
 static int vpmsupport = 1;
 static int vpmdtmfsupport = 0;
 -3837,7
+3837,7 
 	}
 	BUG_ON(!wc->vb);
 
-	if (latency) {
+	if (VOICEBUS_DEFAULT_LATENCY != latency) {
 		voicebus_set_minlatency(wc->vb, latency);
 	}
 

Modified: team/sruffell/voicebus/wcte12xp/base.c
URL: http://svn.digium.com/view/zaptel/team/sruffell/voice
bus/wcte12xp/base.c?view=diff&rev=3811&r1=3810&r
2=3811
============================================================
==================
--- team/sruffell/voicebus/wcte12xp/base.c (original)
+++ team/sruffell/voicebus/wcte12xp/base.c Wed Feb  6
16:24:57 2008
 -90,7
+90,7 
 static int loopback = 0;
 static int t1e1override = -1;
 static int unchannelized = 0;
-static int latency = 0;
+static int latency = VOICEBUS_DEFAULT_LATENCY;
 #ifdef VPM_SUPPORT
 int vpmsupport = 1;
 int vpmdtmfsupport = 0;
 -1621,7
+1621,7 
 	
 	/* Keep track of which device we are */
 	pci_set_drvdata(pdev, wc);
-	if (latency) {
+	if (VOICEBUS_DEFAULT_LATENCY != latency) {
 		voicebus_set_minlatency(wc->vb, latency);
 	}
 	voicebus_start(wc->vb);


_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.c
om--

zaptel-commits mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/zaptel-commits

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )