summaryrefslogtreecommitdiff
path: root/drivers/dahdi/voicebus/voicebus.h
diff options
context:
space:
mode:
authorShaun Ruffell <sruffell@digium.com>2009-11-07 00:35:40 +0000
committerShaun Ruffell <sruffell@digium.com>2009-11-07 00:35:40 +0000
commit9138db7368bd8f37ed7aa822a3fb41c31d6f41d9 (patch)
treef8b7194242a067cd14f835a525968d697bb1bde7 /drivers/dahdi/voicebus/voicebus.h
parentfc1eb309be9aa9c450f6e704a75c95d3af5ae997 (diff)
voicebus: Send 'idle' buffers when the transmit descriptor underruns.
Previously, when the host system fails to service the interrupt in a timely fashion, the transmit descriptor ring for the voicebus card would "go empty" since the interface wouldn't have another descriptor to read in. The driver only knows that it went empty, not how far behind it actually was. Therefore, the driver could just increase the latency by a millisecond and keep going waiting for another bump. Additionally, when the transmit descriptor actually goes empty, there are some cases where an in process SPI transaction to one of the modules is interrupted, which may result in corrupted module register writes on rare occassions. This now makes it possible for the voicebus drivers to coexist with some devices that periodically lock interrupts for longer than 25ms. Before this patch, the latency would constantly increase until either the modules received a corrupted frame. This patch preconfigures all the receive descriptors to send an "idle" packet that will be transmitted to the onboard modules when the host doesn't service the interrupt within (latency - 2)ms. There are now two kinds of underruns, softunderuns where the driver can detect that these idlebuffers have made it to the TX FIFO, and the normal hard underrun where the part signals a transmit descriptor unavailable interrupt. DAHDI-278. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7517 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/voicebus/voicebus.h')
-rw-r--r--drivers/dahdi/voicebus/voicebus.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/dahdi/voicebus/voicebus.h b/drivers/dahdi/voicebus/voicebus.h
index eaa51e6..8c26149 100644
--- a/drivers/dahdi/voicebus/voicebus.h
+++ b/drivers/dahdi/voicebus/voicebus.h
@@ -32,6 +32,8 @@
struct voicebus;
#define VOICEBUS_DEFAULT_LATENCY 3
+#define VOICEBUS_DEFAULT_MAXLATENCY 25
+#define VOICEBUS_MAXLATENCY_BUMP 6
void voicebus_setdebuglevel(struct voicebus *vb, u32 level);
int voicebus_getdebuglevel(struct voicebus *vb);