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

SVN commits to the DAHDI project dahdi-commits at lists.digium.com
Thu Sep 3 16:15:21 CDT 2009


Author: sruffell
Date: Thu Sep  3 16:15:18 2009
New Revision: 7093

URL: http://svn.asterisk.org/svn-view/dahdi?view=rev&rev=7093
Log:
wip: Chained descriptors now work at least as well as the ring descriptors.

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://svn.asterisk.org/svn-view/dahdi/linux/team/sruffell/dahdi-linux-chainedvb/drivers/dahdi/voicebus/voicebus.c?view=diff&rev=7093&r1=7092&r2=7093
==============================================================================
--- linux/team/sruffell/dahdi-linux-chainedvb/drivers/dahdi/voicebus/voicebus.c (original)
+++ linux/team/sruffell/dahdi-linux-chainedvb/drivers/dahdi/voicebus/voicebus.c Thu Sep  3 16:15:18 2009
@@ -72,14 +72,15 @@
  * latency (in ms) on the host system.
  */
 #define DLIST_SIZE 	128
-
+#define MAX_LATENCY DLIST_SIZE
 #else
 
 /*! 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)
-
-#endif
+#define MAX_LATENCY DRING_SIZE
+#endif
+
 
 /* Interrupt status' reported in SR_CSR5 */
 #define TX_COMPLETE_INTERRUPT 		0x00000001
@@ -534,14 +535,6 @@
 /*! \brief  Use to set the minimum number of buffers queued to the hardware
  * before enabling interrupts.
  */
-#if defined(USE_CHAINED_DESCRIPTORS)
-int
-voicebus_set_minlatency(struct voicebus *vb, unsigned int ms)
-{
-	dev_err(&vb->pdev->dev, "%s is not implemented.\n", __func__);
-	return -EFAULT;
-}
-#else
 int
 voicebus_set_minlatency(struct voicebus *vb, unsigned int ms)
 {
@@ -553,8 +546,8 @@
 	 *
 	 */
 #define MESSAGE "%d ms is an invalid value for minumum latency.  Setting to %d ms.\n"
-	if (DRING_SIZE < ms) {
-		VB_PRINTK(vb, WARNING, MESSAGE, ms, DRING_SIZE);
+	if (MAX_LATENCY < ms) {
+		VB_PRINTK(vb, WARNING, MESSAGE, ms, MAX_LATENCY);
 		return -EINVAL;
 	} else if (VOICEBUS_DEFAULT_LATENCY > ms) {
 		VB_PRINTK(vb, WARNING, MESSAGE, ms, VOICEBUS_DEFAULT_LATENCY);
@@ -565,7 +558,6 @@
 	VBUNLOCK(vb);
 	return 0;
 }
-#endif
 EXPORT_SYMBOL(voicebus_set_minlatency);
 
 void
@@ -1327,11 +1319,6 @@
 	static int __warn_once = 1;
 	void *vbb;
 	int latency;
-#if defined(USE_CHAINED_DESCRIPTORS)
-	const int MAX_LATENCY = DLIST_SIZE;
-#else
-	const int MAX_LATENCY = DRING_SIZE;
-#endif
 
 	assert_in_vb_deferred(vb);
 




More information about the dahdi-commits mailing list