diff options
Diffstat (limited to 'kernel/xpp/xpd.h')
-rw-r--r-- | kernel/xpp/xpd.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/kernel/xpp/xpd.h b/kernel/xpp/xpd.h index 35688d6..c0bfcc0 100644 --- a/kernel/xpp/xpd.h +++ b/kernel/xpp/xpd.h @@ -29,13 +29,8 @@ #ifdef __KERNEL__ #include <linux/kernel.h> #include <linux/device.h> -#include <linux/version.h> #include <asm/atomic.h> -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26) -#include <linux/semaphore.h> -#else #include <asm/semaphore.h> -#endif #include <linux/moduleparam.h> #ifdef XPP_DEBUGFS #ifndef CONFIG_DEBUG_FS @@ -146,6 +141,8 @@ struct xpd { char xpdname[XPD_NAMELEN]; struct zt_span span; struct zt_chan *chans; +#define XPD_CHAN(xpd,chan) (&((xpd)->chans[(chan)])) + int channels; xpd_type_t type; const char *type_name; @@ -153,14 +150,16 @@ struct xpd { xpd_direction_t direction; /* TO_PHONE, TO_PSTN */ int subunits; /* all siblings */ xpp_line_t no_pcm; /* Temporary: disable PCM (for USB-1) */ - xpp_line_t offhook; /* Actual chip state: 0 - ONHOOK, 1 - OFHOOK */ - xpp_line_t cid_on; + xpp_line_t offhook_state; /* Actual chip state: 0 - ONHOOK, 1 - OFHOOK */ + xpp_line_t oht_pcm_pass; /* Transfer on-hook PCM */ xpp_line_t msg_waiting; /* Voice Mail Waiting Indication */ xpp_line_t digital_outputs; /* 0 - no, 1 - yes */ xpp_line_t digital_inputs; /* 0 - no, 1 - yes */ xpp_line_t digital_signalling; /* BRI signalling channels */ uint timing_priority; /* from 'span' directives in zapata.conf */ + /* Assure atomicity of changes to pcm_len and wanted_pcm_mask */ + spinlock_t lock_recompute_pcm; /* maintained by card drivers */ uint pcm_len; /* allocation length of PCM packet (dynamic) */ xpp_line_t wanted_pcm_mask; |