[svn-commits] sruffell: branch linux/sruffell/dahdi-linux-chainedvb r7332 - /linux/team/sru...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Oct 2 18:41:52 CDT 2009


Author: sruffell
Date: Fri Oct  2 18:41:42 2009
New Revision: 7332

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=7332
Log:
wip: Do not let the latency go above the max..

Modified:
    linux/team/sruffell/dahdi-linux-chainedvb/drivers/dahdi/voicebus/voicebus.c

Modified: linux/team/sruffell/dahdi-linux-chainedvb/drivers/dahdi/voicebus/voicebus.c
URL: http://svnview.digium.com/svn/dahdi/linux/team/sruffell/dahdi-linux-chainedvb/drivers/dahdi/voicebus/voicebus.c?view=diff&rev=7332&r1=7331&r2=7332
==============================================================================
--- linux/team/sruffell/dahdi-linux-chainedvb/drivers/dahdi/voicebus/voicebus.c (original)
+++ linux/team/sruffell/dahdi-linux-chainedvb/drivers/dahdi/voicebus/voicebus.c Fri Oct  2 18:41:42 2009
@@ -1288,6 +1288,8 @@
 			__warn_once = 0;
 		}
 	} else {
+		latency = (latency + increase > MAX_LATENCY) ?
+				MAX_LATENCY : latency+increase;
 		/* Because there are 2 buffers in the transmit FIFO on the
 		 * hardware, setting 3 ms of latency means that the host needs
 		 * to be able to service the cards within 1ms.  This is because
@@ -1298,12 +1300,12 @@
 		 */
 		dev_info(&vb->pdev->dev, "Missed interrupt. " \
 			"Increasing latency to %d ms in order to compensate.\n",
-			latency + increase);
+			latency);
 		/* 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.
 		 */
-		voicebus_set_minlatency(vb, latency + increase);
+		increase = latency - vb->min_tx_buffer_count;
 		while (increase--) {
 			vbb = voicebus_alloc(vb);
 
@@ -1312,7 +1314,7 @@
 			else
 				vb->handle_transmit(vbb, vb->context);
 		}
-
+		voicebus_set_minlatency(vb, latency);
 	}
 }
 




More information about the svn-commits mailing list