summaryrefslogtreecommitdiff
path: root/xpp/card_fxo.c
AgeCommit message (Collapse)Author
2007-08-16xpp rev. 4515:tzafrir
* BRI improvement: an 'nt_keepalive' parameter to xpd_bri forces a BRI_NT to retry a connection indefinitely (this is our default). When false it revert to the behaviour in changeset:4415 ("Bezeq like") * Improvement in DBG macros. The print_dbg parameter is now set of flags to debug. They are defined in zap_debug.h * Don't use Astribanks connected to USB1 interfaces Unless the user set the option usb1=1 for xpp_usb (r4504). * And some more documentation... * Include some of our variables in the default zaptel sample file. Merged revisions 2860 via svnmerge from https://origsvn.digium.com/svn/zaptel/branches/1.2 Merged revisions 2866 via svnmerge from https://origsvn.digium.com/svn/zaptel/branches/1.4 git-svn-id: http://svn.digium.com/svn/zaptel/trunk@2867 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2007-08-03xpp.r4415: (from 1.2 r2811)tzafrir
* Show Astribank 6+2 as 6/2 channels and not 8/8 channels. - Added as a "subtype" to the device type (r4391). * Fixed a panic in BRI span shutdown method (r4393). * Changes to debug macros. * Add proper sysfs support (r4406) - A bus on whuch all of the Astribanks reside. - Replaces useless sysfs code that existed in the module. - Currently used to set the sync source automatically at device adition / removal. * BRI: We do need the T1 timer in NT. If it gets into G2 state (r4407). Merged revisions 2812 via svnmerge from https://origsvn.digium.com/svn/zaptel/branches/1.4 ........ * Ignore generated files on the new wctdm24xxp dir. (from 1.2 r2796) * Ignore two extra man pages on xpp/utils . Merged revisions 2797 via svnmerge from https://origsvn.digium.com/svn/zaptel/branches/1.4 ........ * Generate list of Zaptel Modules directories automatically. * Evaluate PERLLIBDIR only once. Closes: #10223 (Xorcom changeset:4379, from 1.2 r2758) Merged revisions 2759 via svnmerge from https://origsvn.digium.com/svn/zaptel/branches/1.4 git-svn-id: http://svn.digium.com/svn/zaptel/trunk@2814 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2007-08-02Merge xpp r4372:tzafrir
* 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 '<Unit><Subunit>' (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
2007-06-07Some XPP bugfixes:tzafrir
* Fix FXO power denial detection (changeset:4054) * Incorrect data type could cause FXO module to go off-hook (changeset:4048) * xpp_fxloader: fix the error message when you want to disable automatic firmware loading... (changeset:4060) Merged from: branches/1.2 r2589 git-svn-id: http://svn.digium.com/svn/zaptel/trunk@2592 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2007-04-29xpp rev. 3814:tzafrir
* Protocol no. 2.6: syncing improvements. * Support for 8-port Astribank BRI. * Firmware unloading now works: rmmod xpp_usb; /etc/hotplug/usb/xpp_fxloader reset * Defaults of kernel parameters are now part of parameter description. * World-readable kernel parameters. * No need for extra patch beyond bristuff for Astribank BRI. * Default poll intervals changed: 500 in BRI and FXO. * Allow changing FXS polls interval at run time. * BRI initalization fixed on SUSE (path to logger). * When using the SUSE zaptel rpm package, set modules_var=ZAPTEL_MODULES in /etc/sysconfig/zaptel . * zt_registration not verbose by default. * xpp_sync warns if FXO is sync slave. * Fixed genzaptelconf -z (zapscan output emulation). * PCM fixes. * Solves "multiple ticks" bug. No need for pcm_tasklets workaround. git-svn-id: http://svn.digium.com/svn/zaptel/trunk@2478 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2007-02-28Merge xpp rev. 3495:tzafrir
------------------------------------------------------------------------ r2243 | tzafrir | 2007-02-28 02:05:59 +0200 (Wed, 28 Feb 2007) | 4 lines * xpp rev. 3495: fix a race in the FXO driver of recent weeks. * Add the Astribank BRI driver (though still needs bristuffed zaptel to build and thus will not build by default) ------------------------------------------------------------------------ r2239 | tzafrir | 2007-02-27 08:14:18 +0200 (Tue, 27 Feb 2007) | 18 lines Xorcom rev. 3491: * Version of xpp modules is set from xpp/.version, rather than "unknown". * Astribank devices are now initialized in parallel: faster startup when there are multiple Astribanks. * Re-added support for the old format of /proc/xpp/sync write: (echo N 0 > /proc/xpp/sync ) . The new format (SYNC=NN) is preffered. * Firmware update to fix a PCM issue. * Fixed a build issue with kernel 2.6.8 . * Fixed missing initialization in Zaptel::Xpp::Xbus . * genzaptelconf will now set FXS ports as LS by default. To set them as KS, use fxs_default_start=ks in /etc/default/zaptel / /etc/sysconfig/zaptel (Also a workaround for #7755 ). * Groundwork for sync from zaptel master span: if zaptel is built with ZAPTEL_SYNC_TIC (see zaptel/team/tzafrir/sync ), xpp will report its drift from the zaptel sync master. * USB firmware update: had bad lines checksums (and fxload did not report). * fpga_load can now better report bad hex file checksum ;-) . ------------------------------------------------------------------------ r2223 | tzafrir | 2007-02-24 03:05:05 +0200 (Sat, 24 Feb 2007) | 3 lines Add the Zaptel and Zaptel::Xpp perl modules, and some simple utilities that use them. disabled by default for now. ------------------------------------------------------------------------ r2222 | tzafrir | 2007-02-24 02:55:05 +0200 (Sat, 24 Feb 2007) | 2 lines Make the xpp/utils/Makefile in 1.2 closer to the one in 1.4 . git-svn-id: http://svn.digium.com/svn/zaptel/trunk@2247 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2007-02-09Merged revisions 2123-2124 via svnmerge from tzafrir
https://origsvn.digium.com/svn/zaptel/branches/1.4 ........ r2123 | tzafrir | 2007-02-08 02:05:17 +0200 (Thu, 08 Feb 2007) | 27 lines Branch 1.4 is back in sync (currently: xorcom rev. 3332): * Performance improvements for multi-XPD (span) devices. * Astribank BRI driver (in next commit). * Changes under /proc: - XBUS and XPD numbers have two digits. - Every script wildcard should be replaced from XBUS-? to XBUS-[0-9]* - Added /proc/xpp/XBUS-*/XPD-*/blink: echo 1 to start and 0 to stop. * Several countries (South Africa, UAE, anybody else) require a shorter ring delay. Adjust FXO reg 0x17 (23)'s bits 0:2 to 011. * Use tasklets to move most of the interrupt PCM copying out of the interrupt. * Debugfs-based code to dump data to userspace (used to debug BRI D channel). * Pretend every 2.6.9 actually has later RHEL's typedefs. * fpga_load supports /dev/bus/usb . * Fixed physical order sorting in genzaptelconf. * Reverse polarity and power denial detection. * A short led flash at registration time. * Add a real version of the xpp modules to them (independent of the Zaptel version). * Update our line status even when not registered. * Fixed a false SIG_CHANGED when inserting or removing cable to FXO. * Fixed compilation fixes for 2.6.20 (Bug #8982) * A cleaner fix for the bool changes of 2.6.19 . * Automatically detect echo_can_state_t at debug time. * Automaitcally set XPP_DEBUGFS (depending on debugfs) at compile time. * Bug-fixes to zaptel-helper. Moved to xpp/utils . * Xbus protocol version: 2.4 (Zaptel 1.2.12/1.4.0 had 2.3). XPS Init scripts renamed accordingly. ........ r2124 | tzafrir | 2007-02-08 02:30:56 +0200 (Thu, 08 Feb 2007) | 1 line Now 'chans' is used after all. ........ git-svn-id: http://svn.digium.com/svn/zaptel/trunk@2144 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2006-12-27Merged revisions 1767 via svnmerge from kpfleming
https://origsvn.digium.com/svn/zaptel/branches/1.4 ................ r1767 | kpfleming | 2006-12-27 16:49:37 -0600 (Wed, 27 Dec 2006) | 10 lines Merged revisions 1766 via svnmerge from https://origsvn.digium.com/svn/zaptel/branches/1.2 ........ r1766 | kpfleming | 2006-12-27 16:47:19 -0600 (Wed, 27 Dec 2006) | 2 lines remove pointless duplication of ZAPTEL_VERSION that causes these modules to be rebuilt every time a commit is made to any part of Zaptel ........ ................ git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1768 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2006-12-15r1719@boole: tzafrir | 2006-12-15 15:50:57 +0200tzafrir
Sync to xpp RELEASE-1.2.0 2933. r2847@boole: diego | 2006-12-03 10:33:00 +0200 added documentation which explains which packages are needed to build the drivers on different distributions. r2862@boole: tzafrir | 2006-12-05 08:43:50 +0200 README.Astribank: A typo in the sample config (changeset:2861). r2891@boole: tzafrir | 2006-12-08 01:11:45 +0200 Re-accept changeset:2832 after all. r2892@boole: tzafrir | 2006-12-08 02:46:07 +0200 Merge genzaptelconf changeset:2866 from trunk: * Zapata comment on unidentified channel goes to $zapata_file * Correct pattern for Sangoma A200 card's channels. r2893@boole: tzafrir | 2006-12-08 03:11:37 +0200 genzaptelconf: * Add options xpp_fxo_rxgain: add a custom rxgain for every XPP FXO channel. * Do print the original line for every channel. r2909@boole: tzafrir | 2006-12-10 20:03:59 +0200 Add some sleeps in older kernels in the firmware loading script. r2932@boole: tzafrir | 2006-12-14 17:30:12 +0200 Make the warning about a call to off-hook FXO debug. At least if we cannot suppress it at module load time. r2933@boole: tzafrir | 2006-12-14 17:32:00 +0200 Don't redefine 'bool' on newer kerenls to fix building with kernel 2.6.19. Taken from Digium tree. (from changeset:2930) git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1720 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2006-12-01 r1678@boole: tzafrir | 2006-12-01 02:13:47 +0200tzafrir
r1671@boole: tzafrir | 2006-12-01 01:30:24 +0200 r2806@boole: oron | 2006-11-27 16:54:06 +0200 Fixed panic in ticket:147 merged code from changeset:2802 changeset:2804 git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1684 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2006-12-01 r1677@boole: tzafrir | 2006-12-01 02:13:00 +0200tzafrir
r1670@boole: tzafrir | 2006-12-01 01:29:57 +0200 r2794@boole: oron | 2006-11-26 14:24:15 +0200 Remove all SOFT_RING code (unused for a long time). git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1683 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2006-12-01Merging from 1.2:tzafrir
* Removing -DSOFT_RING: unused, useless code. * Register init scripts are not as noisy by default. * Register init scripts read configuration from a standard location. * Fixed a FXO spinlock race. (Log was lost on previos merge) git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1680 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2006-11-06 r1557@boole: tzafrir | 2006-11-06 20:12:16 +0200tzafrir
Merging xpp driver release 1.2 (rev. 2569), originally team/tzafrir/xpp_1.2 * Should build well. Almost final. * genzaptelconf: Also work when zap_autoreg=0 * README.Astribank updated for rev. 1.2. * xpp/utils/Makefile: Use $< with cc -c * Get xpp/utils configuration from autoconf (without changesin top dir) git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1563 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2006-09-06Fix problems reported by sparsetzafrir
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1423 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2006-09-06Cleanup the unused non-RBS code:tzafrir
* remove all non WITH_RBS code. No need for the define. * unused recv_errors and seq_errors. * CID_START_TICKS, CID_STOP_TICKS cid_timer from trunk/ git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1411 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2006-09-06Begin merging a small set of clean-ups:tzafrir
* __do_sethook() was gone and merged into do_sethook(). * Use DAA_RING_REGISTER constant instead of a number. git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1408 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2006-09-04FXO caller-id now works.tzafrir
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1393 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2006-09-04Workaround spurious rings described in ticket:102 .tzafrir
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1392 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2006-09-04Rename the bitmask xpd->hookstate into xpd->offhook (for readability).tzafrir
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1391 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2006-09-04Finally not using SOFT_RING.tzafrir
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1389 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2006-09-04Send ring signalling to zaptel directly from card_fxo.c:tzafrir
no need to xpp_ring_generate() git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1388 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2006-09-04Fix FXO polling (separate poll_counter for each unit)tzafrir
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1387 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2006-09-04Minor code cleanup: No more SETHOOK method. It's only used in FXO, sotzafrir
now it's an internal function: __do_sethook() git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1383 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2006-09-04Experimenting with SOFT_RING again:tzafrir
* Poll R5 every 2 milliseconds; thresholds adjusted accordingly. * experimenting a reduced noring_threshhold (20ms) * Unset ring_sig[] for the FXO channel that is no longer being ringed. * Added ring_sig[] to the fxo struct: set when we need to check for reg 5 (instead of abusing the value of ring_thresh[]) * Don't increment ring_thresh/noring_thresh once they reached their threshold. git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1382 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2006-09-02Fix problems with battery voltage fluctuations:tzafrir
- Use a higher voltage. - Add a software debounce counter. git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1381 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2006-09-02Show in /proc/xpp/XBUS-?/XPD-?/fxo_info also the noring_thresh[]tzafrir
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1379 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2006-08-10Show SOFT_RING compile status when xpd_fxo module is loaded.tzafrir
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1292 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2006-08-10Fix ring detection logic in FXO:tzafrir
Detect ring stop only when register 0x05 shows no ring voltage for enough samples. This is done via noring_thresh[]. git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1291 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2006-08-10card_fxo.c: Fix a potential bug: battery voltage is a 2's complement value.tzafrir
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1288 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2006-08-10* New SOFT_RING detection in FXO:tzafrir
- Poll register 0x05 on each DAA - When enough energy (value of 0x20|0x40 occurs enough times), raise the ringing[] flag. - When the value show no energy, lower the ringing[] flag. - When we get SIG_CHANGED of stop ringing -- stop polling. * More debugging messages for proc files git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1285 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2006-08-10Better LED handling for fxo (copied from fxs):tzafrir
- Fix both branches/RELEASE-1.1.0 and trunk/ - Use a ledcontrol bitmask to mark led on/off - Actuall led commands are send only from handle_fxo_leds() git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1280 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2006-08-10- In SIG_CHANGED only sig_toggles bits are interesting (was good in FXS,tzafrir
now fixed in FXO). - Better DBG messages for SIG_CHANGED (FXS and FXO). - Start work on new RING logic (for FXO caller id). git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1279 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2006-07-16Merged revisions 1235 via svnmerge from kpfleming
https://origsvn.digium.com/svn/zaptel/branches/1.2 ........ r1235 | kpfleming | 2006-07-15 19:12:55 -0500 (Sat, 15 Jul 2006) | 2 lines eliminate compiler warning ........ git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1238 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2006-07-14NULLify pointers to /proc files after removing them (so anyone who tries to tzafrir
access them afterwards causes iimmediate Oops instead of unknown behaviour). git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1225 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2006-07-06Tons of updates to the Astribank (xpp) driver:tzafrir
* xpd_fxo.ko (FXO span) is now operational * Remove obsolete .inc initialization files (we use user-space init) * Added an install target to the utils dir. * Updated README.Astribank accordingly. * Using RBS signalling, as caller ID did not work well otherwise. * Better handling of USB protocol errors. * Fixed some procfs-related races. * per-card-module ioctls. * fxotune support. * opermode support (set through /etc/default/zaptel for now) * Userspace initialization script can also read registers. * Power calibration works (and implemented in perl) * some fine-tuning to the regster initialization parameters. * Leds turn on before registration and turn off after it. git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1204 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2006-06-17* Echo canceller not disablerdtzafrir
* card_fxo.c: Fixed an unreleased spinlock * utils/Makefile: No more C++ flags * utils/Makefile: An install target * fpga_load: usb1 support * genzaptelconf: Support for more cards (Any Sangoma A20x testers?) * xpp_fxloder: The new USB ID, even for manual loads... * xpp_zap.c: Print module fetures in a better format at load time. git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1114 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2006-05-22* Now possible to load FPGA (second stage) firmware with USB1tzafrir
* fixed locking of xpd-lock * slightly newer FPGA firmware: slight improvements. git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1078 5390a7c7-147a-4af0-8ec9-7488f05a26cb
2006-05-03xpp driver release 1.1.0 (first part of commit)tzafrir
* FPGA firmware now loaded from PC (for newer models) * Driver for the FXO module * Moved most userspace files to the subdirectory utils (see also next commit) * Explicit license for firmware files * Optionally avoid auto-registration * Initializations parameters to chips given from userspace * And did I mention bugfixes? git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1021 5390a7c7-147a-4af0-8ec9-7488f05a26cb