diff options
author | Kinsey Moore <kmoore@digium.com> | 2011-04-15 16:16:19 +0000 |
---|---|---|
committer | Kinsey Moore <kmoore@digium.com> | 2011-04-15 16:16:19 +0000 |
commit | 5fea0311b60ae0954a46412f06deaafd34a12caf (patch) | |
tree | e3bd0ebb343d23b917e04a90b4ce942eda43ee82 /include/dahdi/kernel.h | |
parent | 77230b19eb6a0eb176af3796ce817fbe1028ff10 (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/kernel.h')
-rw-r--r-- | include/dahdi/kernel.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/dahdi/kernel.h b/include/dahdi/kernel.h index 6b5f4a4..d3beabe 100644 --- a/include/dahdi/kernel.h +++ b/include/dahdi/kernel.h @@ -719,6 +719,9 @@ enum { DAHDI_FLAGBIT_LOOPED = 18, /*!< Loopback the receive data from the channel to the transmit */ DAHDI_FLAGBIT_MTP2 = 19, /*!< Repeats last message in buffer and also discards repeating messages sent to us */ DAHDI_FLAGBIT_HDLC56 = 20, /*!< Sets the given channel (if in HDLC mode) to use 56K HDLC instead of 64K */ + DAHDI_FLAGBIT_BUFEVENTS = 21, /*!< Report buffer events */ + DAHDI_FLAGBIT_TXUNDERRUN = 22, /*!< Transmit underrun condition */ + DAHDI_FLAGBIT_RXOVERRUN = 23, /*!< Receive overrun condition */ DAHDI_FLAGBIT_DEVFILE = 25, /*!< Channel has a sysfs dev file */ }; @@ -783,6 +786,9 @@ struct dahdi_count { #define DAHDI_FLAG_LOOPED DAHDI_FLAG(LOOPED) #define DAHDI_FLAG_MTP2 DAHDI_FLAG(MTP2) #define DAHDI_FLAG_HDLC56 DAHDI_FLAG(HDLC56) +#define DAHDI_FLAG_BUFEVENTS DAHDI_FLAG(BUFEVENTS) +#define DAHDI_FLAG_TXUNDERRUN DAHDI_FLAG(TXUNDERRUN) +#define DAHDI_FLAG_RXOVERRUN DAHDI_FLAG(RXOVERRUN) struct dahdi_span_ops { struct module *owner; /*!< Which module is exporting this span. */ |