From c88eaa22e13bd4c092b367a28e57064659660466 Mon Sep 17 00:00:00 2001 From: tzafrir Date: Thu, 2 Aug 2007 12:21:11 +0000 Subject: Merge xpp r4372: * Update to zaptel-1.2.18 and zaptel-1.4.3 (r4308 onward) * Fix a critical race with zaptel synchronization (r4362) * Added a /proc/xpp/cmds for statistics about command timing (r4360) * Fix a digit mapping bug with hardware dtmf detection (r4357) * In xpp/utils/Makefile add perl syntax checks to our scripts (r4337) * Better USB data error checking (r4336) * udev rules (xpp.rules) avoid false calls from wrong nodes (r4331) * Improve hardware detection and reporting in lszaptel, zaptel_hardware. zapconf is basically functional. * Leds are blinked synchronously on all Astribanks now (r4262) * Fix a BRI bug if OPTIMIZE_CHANMUTE was compiled into zaptel (r4258) (This feature was not yet accepted into official zaptel) * Removed compile warning about HZ != 1000 (r4218) * Firmware updates. * fpga_load now supports USB pathes without zeros (r4211) * XPD numbers have changed to '' (r4196) * Proper support for ZT_VMWI ioctl, if used in zaptel (r4092) * Fix FXO power denial detection (r4054) * FXO could accidentally go off-hook with some compilers (r4048) (From branches/1.2 r2732, r2735 - branches/1.4 2736) git-svn-id: http://svn.digium.com/svn/zaptel/trunk@2813 5390a7c7-147a-4af0-8ec9-7488f05a26cb --- xpp/xpd.h | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) (limited to 'xpp/xpd.h') 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; -- cgit v1.2.3