summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShaun Ruffell <sruffell@digium.com>2010-08-13 18:36:12 +0000
committerShaun Ruffell <sruffell@digium.com>2010-08-13 18:36:12 +0000
commite8413f9f3646c5b6708e1e5107cc5c8e41362626 (patch)
tree8dd2caf60f993816e1552fea2566513deded18c1
parent737c134c3795da4656a227c9bedb4151ea57d114 (diff)
dahdi: Make it clear that 'linecompat' can be used to identify analog spans.
The linecompat member can be used by a span to identify the global-to-the-span signalling types supported. Analog spans do not support any span-global signalling and therefore linecompat should always be 0. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9130 a0bf4364-ded3-4de4-8d8a-66a801d63aff
-rw-r--r--include/dahdi/kernel.h8
-rw-r--r--include/dahdi/user.h3
2 files changed, 9 insertions, 2 deletions
diff --git a/include/dahdi/kernel.h b/include/dahdi/kernel.h
index 89f0a39..82adb91 100644
--- a/include/dahdi/kernel.h
+++ b/include/dahdi/kernel.h
@@ -843,7 +843,8 @@ struct dahdi_span {
int irq; /*!< IRQ for this span's hardware */
int lbo; /*!< Span Line-Buildout */
int lineconfig; /*!< Span line configuration */
- int linecompat; /*!< Span line compatibility */
+ int linecompat; /*!< Span line compatibility (0 for
+ analog spans)*/
int channels; /*!< Number of channels in span */
int txlevel; /*!< Tx level */
int rxlevel; /*!< Rx level */
@@ -872,6 +873,11 @@ struct dahdi_span {
#endif
};
+static inline bool dahdi_is_digital_span(const struct dahdi_span *s)
+{
+ return (s->linecompat > 0);
+}
+
struct dahdi_transcoder_channel {
void *pvt;
struct dahdi_transcoder *parent;
diff --git a/include/dahdi/user.h b/include/dahdi/user.h
index 4cdabc4..420b75f 100644
--- a/include/dahdi/user.h
+++ b/include/dahdi/user.h
@@ -571,7 +571,8 @@ struct dahdi_spaninfo {
char manufacturer[40]; /* manufacturer of span's device */
char devicetype[40]; /* span's device type */
int irq; /* span's device IRQ */
- int linecompat; /* signaling modes possible on this span */
+ int linecompat; /* span global signaling or 0 for
+ analog spans.*/
char spantype[6]; /* type of span in text form */
} __attribute__((packed));