summaryrefslogtreecommitdiff
path: root/include/dahdi/user.h
diff options
context:
space:
mode:
authorKinsey Moore <kmoore@digium.com>2011-04-15 16:16:19 +0000
committerKinsey Moore <kmoore@digium.com>2011-04-15 16:16:19 +0000
commit5fea0311b60ae0954a46412f06deaafd34a12caf (patch)
treee3bd0ebb343d23b917e04a90b4ce942eda43ee82 /include/dahdi/user.h
parent77230b19eb6a0eb176af3796ce817fbe1028ff10 (diff)
dahdi: Add capability to generate events on buffer underruns and overruns
Add BUFFEVENTS and individual buffer event channel flags so that DAHDI can notify userspace processes when it is dropping data. This can be useful when trouble shooting fax problems since DAHDI currently silently discards data becasuse of scheduling latency. With this change, Asterisk could log an event as opposed to just leaving it up to the tone detectors to figure out there was some unexpected phase shift. Acked-by: Shaun Ruffell <sruffell@digium.com> (original patch by Matt Fredrickson) git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9905 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'include/dahdi/user.h')
-rw-r--r--include/dahdi/user.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/dahdi/user.h b/include/dahdi/user.h
index 1159fbf..6b666b9 100644
--- a/include/dahdi/user.h
+++ b/include/dahdi/user.h
@@ -448,6 +448,12 @@ enum dahdi_maint_mode {
/* The echo canceler's NLP (only) was enabled */
#define DAHDI_EVENT_EC_NLP_ENABLED 28
+/* The channel's read buffer encountered an overrun condition */
+#define DAHDI_EVENT_READ_OVERRUN 29
+
+/* The channel's write buffer encountered an underrun condition */
+#define DAHDI_EVENT_WRITE_UNDERRUN 30
+
#define DAHDI_EVENT_PULSEDIGIT (1 << 16) /* This is OR'd with the digit received */
#define DAHDI_EVENT_DTMFDOWN (1 << 17) /* Ditto for DTMF key down event */
#define DAHDI_EVENT_DTMFUP (1 << 18) /* Ditto for DTMF key up event */
@@ -1085,6 +1091,13 @@ struct dahdi_vmwi_info {
#define DAHDI_TXMIRROR _IOW(DAHDI_CODE, 104, int)
#endif /* CONFIG_DAHDI_MIRROR */
+/*
+ Set the desired state for channel buffer event generation which is disabled
+ by default to allow for backwards compatibility for dumb users of channels
+ such as pattern utilities.
+ */
+#define DAHDI_BUFFER_EVENTS _IOW(DAHDI_CODE, 105, int)
+
/* Get current status IOCTL */
/* Defines for Radio Status (dahdi_radio_stat.radstat) bits */