summaryrefslogtreecommitdiff
path: root/drivers/dahdi/xpp/card_fxs.c
AgeCommit message (Collapse)Author
2012-03-21xpp: FXS: added a 'lower_ringing_noise' parameterTzafrir Cohen
* Adds a new parameter, 'lower_ringing_noise', to module xpd_fxs. * Makes the "power-down" behaviour that was added in upstream svn r10478, switchable in runtime. * By default (false), makes the vbat_h behave like it did before the power-down change. - I.e: vbat_h is held throughout the ringing period (during both ring-up/ring-down) - So this patch revert part of r10478 * When switched to true, activate the "power-down" behaviour. - I.e: vbat_h follows the ring-up/ring-down. - This behaviour lowers the noise caused by group ringing of FXS channels in the same unit, but causes problems with CallerID. Signed-off-by: Oron Peled <oron.peled@xorcom.com> Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10574 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.6@10576 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-03-21xpp: FXS: atomic vbat_h power handlingTzafrir Cohen
* In do_chan_power() make vbat_h changes atomic. * As a result we can ignore duplicate requests. This will allow cleaner logic in the next commit. * Added proper debug messages. Signed-off-by: Oron Peled <oron.peled@xorcom.com> Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10573 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.6@10575 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-03-15xpp: FXS: better power-down to lower noiseTzafrir Cohen
* Now every linefeed control command which is not RING'ing powers-down the SLIC. This reduce audible noise when several channels are ringing. * Simplify code by removing redundant calls to do_chan_power() before linefeed_control() * Manage vbat_h state so we skip do_chan_power() calls when there isn't a state change * Export vbat_h state to /proc/.../fxs_info Signed-off-by: Oron Peled <oron.peled@xorcom.com> Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10478 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.6@10490 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-12-07xpp: FXS: mwi and search_fsk fixesTzafrir Cohen
* We must not block PCM during from 'search_fsk_pattern' channels. * We must vmwi_search() not only on FXS_LINE_POL_ACTIVE, but also during 'neon_blinking' -- so we notice the message to turn it off. * Also added 'search_fsk_pattern' and neon_blinking to /proc/.../fxs_info Signed-off-by: Oron Peled <oron.peled@xorcom.com> Acked-by: : Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10372 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-11-29xpp: fxs: demote SETPOLARITY message to DBG()Tzafrir Cohen
Signed-off-by: Oron Peled <oron.peled@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10345 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-09-27xpp: fix FXS D DTMF detection (not zero)Tzafrir Cohen
* 'D' DTMF digits were accidentally discarded with the notice message: "Bad DTMF value 0. Ignored". * No need for an odd 1-based translation table anymore - it's 0-based. Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10209 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-09-22xpp: fxs: bugfix for 2fxs+6fxo cardsTzafrir Cohen
* Bug sympthoms: wrong FSK VMWI sent few seconds after offhook. That was caused because the driver kept polling the (physically unconnected) digital inputs. [note: a workaround for drivers without this patch is to zero the 'xpd_fxs.poll_digital_inputs' parameter.] * Also, the digital_inputs/digital_output masks were calculate using a different condition. * Now we determine number of channels, digital inputs and digital outputs in a single place and use this info later to calculate the correct masks. * We poll only if there are digital_inputs * We added a sanity check in process_digital_inputs, so we get a notice if it's called on an xpd without digital inputs (e.g: hypothetic firmware bug). Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10202 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-28xpp: FXS: new 2+6 module has no digital I/O portsTzafrir Cohen
This module is recognized via subtype==4 Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10158 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-07-04xpp: xpd_fxs: ring_trapez parameterTzafrir Cohen
This adds module parameter 'ring_trapez'. When set, the wave form of the ring tone is set to be a trapezoid, rather than sine. Thus making the ring stronger. This is a boolean parameter of the module xpd_fxs. Takes effect at the beginning of the next ring. Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10022 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-28xpd_echo: XPP Octasic echo canceler moduleTzafrir Cohen
* xpd_echo (card_echo.c) - a module to handle an Astribank hardware echo canceller module. * All other XPDs are now of type 'telephony_device'. Only a telephony device XPD provides a span to register. * The EC module will typically show up as XPD-40 and will always show up as Unregistered in 'dahdi_hardware -v' Signed-off-by: Oron Peled <oron.peled@xorcom.com> Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9993 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-02Remove unused variables.Shaun Ruffell
gcc-4.6 now warns about variables that are set but never used. Clean up unused variables everywhere except the oct612x subdirectory. The oct612x should go in a separate patch in case that needs to be pulled out into a separate project again. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9929 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-30xpp: remove unused XPD_STATE() "protocol method"Tzafrir Cohen
Folded XPD_STATE() "protocol method" into the card_state() method. It was only called from these (otherwise empty) methods. Also it is not a "protocol method" for a very very very long time. Signed-off-by: Oron Peled <oron@actcom.co.il> Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9715 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-30xpp: phonedev: Cleanup method macrosTzafrir Cohen
* Caller to CALL_XMETHOD() no longer need to explicitly pass xbus (calculate xpd->xbus) * Create CALL_PHONE_METHOD() similar to CALL_XMETHOD() -- inlining the extra parameters (more readable) * Reverse parameter order in PHONE_METHOD() and CALL_PHONE_METHOD() to be consistent with XMETHOD() and CALL_XMETHOD() * Rename XPD_STATE phonedev method to card_state: - Consistency with other phonedev methods. - These calls now Wrap internal calls to XPD_STATE protocol HOSTCMD in PRI, BRI, FXS, FXO Signed-off-by: Oron Peled <oron@actcom.co.il> Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9706 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-30xpp: prepare for phonedev refactorTzafrir Cohen
* Allow having XPDs that represent a device that is not a span. * Refactor all span related data from 'struct xpd' to 'struct phonedev' * Refactor span related methods into 'phonedev->phoneops' * Refactor phone related initialization into phonedev_init()/phonedev_cleanup() Signed-off-by: Oron Peled <oron@actcom.co.il> Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9704 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-26dahdi: Move the 'owner' field from dahdi_span to dahdi_span_ops.Shaun Ruffell
One more thing that can be moved out of the per-span structure. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8986 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-19FXS - fix VMWI compatibility mode:Tzafrir Cohen
* If we have vmwi_ioctl=N, we should initialize the vmwi_type of all channels. We initialize it to HVAC * Fix a regression, where curly braces around empty if()'s were removed. * Also fix the VMWI_TYPE() macro, so it actually uses the 3'rd parameter. (this didn't cause damage yet, as we only used HVAC so far) git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8943 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-13PRI Astribanks always sync AB (and independent)Tzafrir Cohen
* PRI devices always get SYNC-AB (never PLL, not even for NT) * Fix Timing priority calculation accordingly. * On PRI layer1 changes, elect_syncer() is called, so we have re-election. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8909 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-13Put a space where it belongsTzafrir Cohen
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8888 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-13Basic support for DAHDI_VMWI_CONFIGTzafrir Cohen
* Supports only our current NEON notification. * No more global 'vmwineon' parameter: - We expect asterisk to tell us by channel. - If 'vmwi_ioctl' is not set (it is by default), that we revert to FSK searching (expensive) and call directly our NEON code (as before). git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8887 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-13Fix building without CONFIG_PROC_FS definedTzafrir Cohen
This changeset should have no functional changes. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8877 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-06-29dahdi-base: Enable DAHDI to manage the reference counts for the board drivers.Shaun Ruffell
Adds a struct module 'owner' member to the dahdi_span structure and updates all the board drivers to set this member before registering the span. This allows the core of dahdi to maintain the reference counts on the channels itself. (closes issue #10601) Reported by: Matti git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6794 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-05-27xpp: Fix more 'owner' for 2.6.30 to be happy.Tzafrir Cohen
Finishing the work of r6642. Complitly shut issue #14964. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6659 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-05-19Replaece member bus_id with dev_name() and set_dev_name()Tzafrir Cohen
As of 2.6.26 the macros dev_name() and set_dev_name() are used to read and set (respectively) the bus_id member in sysfs. As of 2.6.30 bus_id is gone. This patch provides comaptiobility macros for older kernel versions and removes direct usage of bus_id. (closes issue #14965) Patches: xpp_2630_dev_name.diff uploaded by tzafrir (license 46) git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6637 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-04-20xpp: Do use information about number of ports the Astribank providesTzafrir Cohen
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6408 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-04-16xpp fxs/fxo: PCM and DTMF fixesTzafrir Cohen
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6393 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-04-16xpp fxs: Notify the user just one about wrong VMWI configTzafrir Cohen
From xpp rev. 6974. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6386 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-04-16xpp fxs: Ignore registers of disabled SLICsTzafrir Cohen
From xpp rev. 6979 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6377 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-01-18xpp.r6616: More sysfs migration, FXO enhancements, BRI fixesTzafrir Cohen
* Fix cases where the command_queue overflowed during initialization. * More migrations to sysfs: - Add a 'transport' attribute to our astribank devices which points to the usb device we use. E.g: /sys/bus/astribanks/devices/xbus-00/transport is symlinked to ../../../../../../devices/pci0000:00/0000:00:10.4/usb5/5-4 - Move /proc/xpp/XBUS-??/XPD-??/span to /sys/bus/xpds/devices/??:?:?/span - Migrate from /proc/xpp/sync to: /sys/bus/astribanks/drivers/xppdrv/sync * PRI: change the "timing" priority to match the convention used by other PRI cards -- I.e: lower numbers (not 0) have higher priority. * FXO: - Power denial: create two module parameters instead of hard-coded constants (power_denial_safezone, power_denial_minlen). For sites that get non-standard power-denial signals from central office on offhook. - Don't hangup on power-denial, just notify Dahdi and wait for - Fix caller-id detection for the case central office sends it before first ring without any indication before. Asterisk's desicion. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5663 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2008-10-27Fix xpp compile problems on kernel < 2.6.16Tzafrir Cohen
Support for kernels that use the older hotplug support rather than the newer uevent. Fixes the xpp issue from #13427. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5130 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2008-10-16xpp: start migration from procfs to sysfs.Tzafrir Cohen
* Sysfs representation for XPDs: /sys/bus/xpds/devices/<bus>:<unit>:<subunit> * Astribanks sysfs directories now include the XPDs as subdirectories: e.g. /sys/bus/astribanks/devices/xbus-00/00:3:0 * procfs control interface deprecated: conditioned by OLD_PROC (defaults to off). Control functionality moved to sysfs: * xbus attributes: cls connector label status timing waitfor_xpds xbus_state * XPDs can have driver-specific attributes. Common attriubtes: blink chipregs span * PRI-specific attributes: pri_clocking pri_dchan pri_cas pri_alarms pri_layer1 pri_localloop pri_protocol * The Astribank attribute "xbus_state" is read/write. Reading it shows the current state of the Astribank. Writing "start" or "stop" allows a software equivalent of connect or disconnect respectively. * When an Astribank is ready it sends an "online" event. Whenever its not ready (e.g. at the time of disconnect) it sends an "offline" event. Use astribank_hook.sample to handle those. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5097 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2008-08-04Firmware update: 5959 (FTMF and BRI ID)Tzafrir Cohen
* Fix some cases of double digits. * Fix some rare cases of a BRI unit providing incorrect directionality. * Extra debugging code in card_fxs.c to trace future DTMF issues. * Properly note Zaptel (as opposed to DAHDI) ioctls. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4695 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2008-08-03Do use printk-s without a priority when continuing previous printk.Tzafrir Cohen
Also remove a small duplication in dahdi-base.c, as I'm too lazy to fix in two separate places. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4688 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2008-08-03Change all instances of printk in DAHDI to include a priorityRussell Bryant
(closes issue #11504) Reported by: tzafrir Patches: 20080717__issue11504_dahdi_printk_without_priority.diff uploaded by bbryant (license 36) git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4685 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2008-08-03Rework the table of signalling bits for signalling types and hook statesRussell Bryant
in dahdi_rbs_sethook() to a much more readable and less error prone format. In passing, get rid of the dahdi_txsig_t typedef, and fix uses of it throughout the tree. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4679 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2008-07-02break up large memory allocations made by digital span drivers into smaller ↵Kevin P. Fleming
ones (one allocation for each dahdi_chan structure, separate from any private structures used by the driver) (closes issue #12657) Reported by: tzafrir git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4513 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2008-07-02Remove unneeded case for #ifdef DAHDI_SPANSTAT_V2 - Tzafrir Cohen
this is always the case for dahdi. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4509 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2008-06-19Yet another zaptel->dahdi rename. XPP file names this time.Tzafrir Cohen
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4418 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2008-06-17Make the xpp drivers build with dahdi.Tzafrir Cohen
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4370 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2008-05-21start copying kernel bitsKevin P. Fleming
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4315 a0bf4364-ded3-4de4-8d8a-66a801d63aff