summaryrefslogtreecommitdiff
path: root/xpp/xpd.h
diff options
context:
space:
mode:
Diffstat (limited to 'xpp/xpd.h')
-rw-r--r--xpp/xpd.h25
1 files changed, 19 insertions, 6 deletions
diff --git a/xpp/xpd.h b/xpp/xpd.h
index 559af39..eaf570b 100644
--- a/xpp/xpd.h
+++ b/xpp/xpd.h
@@ -119,10 +119,13 @@ enum {
XBUS_N_DESC_REQ,
XBUS_N_DEV_DESC_FULL,
XBUS_N_DEV_DESC_EMPTY,
- XBUS_N_SEND_PCM,
- XBUS_N_PCM_READ,
+ XBUS_N_TX_XFRAME_PCM,
+ XBUS_N_RX_XFRAME_PCM,
+ XBUS_N_TX_PACK_PCM,
+ XBUS_N_RX_PACK_PCM,
XBUS_N_TX_BYTES,
XBUS_N_RX_BYTES,
+ XBUS_N_TX_PCM_FRAG,
};
#define XBUS_COUNTER(xbus, counter) ((xbus)->counters[XBUS_N_ ## counter])
@@ -136,10 +139,13 @@ static struct xbus_counters {
C_(DESC_REQ),
C_(DEV_DESC_FULL),
C_(DEV_DESC_EMPTY),
- C_(SEND_PCM),
- C_(PCM_READ),
+ C_(TX_XFRAME_PCM),
+ C_(RX_XFRAME_PCM),
+ C_(TX_PACK_PCM),
+ C_(RX_PACK_PCM),
C_(TX_BYTES),
C_(RX_BYTES),
+ C_(TX_PCM_FRAG),
};
#undef C_
@@ -202,6 +208,7 @@ struct xbus {
xbus_type_t bus_type;
spinlock_t lock;
+ atomic_t pcm_nesting;
bool hardware_exists; /* Hardware is functional */
int open_counter; /* Number of open channels */
@@ -222,6 +229,7 @@ struct xbus {
* Sync adjustment
*/
int sync_adjustment;
+ int sync_adjustment_offset;
long pll_updated_at;
struct rw_semaphore in_use;
@@ -289,6 +297,7 @@ struct xpd {
struct zt_chan *chans;
int channels;
xpd_type_t type;
+ const char *type_name;
byte revision; /* Card revision */
xpd_direction_t direction; /* TO_PHONE, TO_PSTN */
xpp_line_t no_pcm; /* Temporary: disable PCM (for USB-1) */
@@ -296,7 +305,11 @@ struct xpd {
xpp_line_t cid_on;
xpp_line_t digital_outputs; /* 0 - no, 1 - yes */
xpp_line_t digital_inputs; /* 0 - no, 1 - yes */
- xpp_line_t digital_signalling; /* PRI/BRI signalling channels */
+ xpp_line_t digital_signalling; /* BRI signalling channels */
+
+ /* maintained by card drivers */
+ uint pcm_len; /* allocation length of PCM packet (dynamic) */
+ xpp_line_t wanted_pcm_mask;
bool ringing[CHANNELS_PERXPD];
@@ -327,7 +340,7 @@ struct xpd {
reg_cmd_t last_reply;
unsigned long last_response; /* in jiffies */
- unsigned id;
+ unsigned xbus_idx; /* index in xbus->xpds[] */
xpd_addr_t addr;
struct list_head xpd_list;
unsigned int timer_count;