Commit Graph

378 Commits

Author SHA1 Message Date
Shaun Ruffell
fd3eb2da05 wctdm24xxp: Use fact that handle_transmit/receive are called in hard-irq
We can spend less time in interrupt context by not saving and restoring the
local interrupt state. This is a particularly noticeable improvement on debug
kernels with lockdep.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10163 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-30 16:38:10 +00:00
Shaun Ruffell
25cb4126c8 wctdm24xxp: Protect creation / destruction of VPM instance.
Closes a small window of opportunity where one CPU might free a VPM
instance that the interrupt handler may currently be using.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10162 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-30 16:38:06 +00:00
Shaun Ruffell
3d8629e864 wctdm24xxp: Reset the polarity debounce setting when battery is lost.
Wait until we have de-bounced the presence of battery before moving on the
check for changes in polarity. This removes the sometimes random
polarity messages generated on an FXO port when the far side drops
battery from a supervisor disconnect.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10161 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-30 16:38:01 +00:00
Shaun Ruffell
1d03f6f8a8 wctdm24xxp: Probe for and configure modules in parallel.
Use the newly create bg_create and bg_join to actually probe / configure
groups of 4 modules in parallel. This currently has to be done in groups
of four due to the way 4-port modules are identified relative to single
port modules.

This provides a dramatic improvement in driver load time. When loading a
single TDM2400 with 24 FXS ports before this change:

    # time modprobe wctdm24xxp vpmsupport=0

    real    0m46.674s
    user    0m0.000s
    sys     0m0.520s

And after this change:

    # time modprobe wctdm24xxp vpmsupport=0

    real    0m7.900s
    user    0m0.000s
    sys     0m0.070s

Note that the boards themselves are still configured serially. Board
configuration can be parallelized once the assignment of board position
is moved out of the function that is run in parallel. Otherwise it could
be possible for board numbers to switch on repeated loads.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10160 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-30 16:37:57 +00:00
Shaun Ruffell
cfafd3a7b7 wctdm24xxp: Introduce bg_create/bg_join.
Create a generic facility to spawn tasks to run in parallel. There are
interfaces already in the kernel for doing this, but they are not
supported on the full range of kernels that DAHDI must support.

This will be used to identify and configure FXS/FXO/B400M/VPM modules in
parallel.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10159 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-30 16:37:52 +00:00
Tzafrir Cohen
a3fd58979d xpp: FXS: new 2+6 module has no digital I/O ports
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-08-28 09:46:12 +00:00
Shaun Ruffell
77ec2dce9f wcte12xp: Abort driver bind if read/write test fails.
When the driver begins to initialize a device it conducts a read/write
test on one of the framer registers. The driver ignores the result of
that test and results in much output spammed to the kernel logs for a
failed card since the driver doesn't then try to unbind from the device.

What was getting spammed:
     wcte12xp 0000:03:01.0: Timeout in t1_getreg
     wcte12xp 0000:03:01.0: Wrote '0' but read 'fffffffb'

Now abort the bind if the read / write test fails.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10155 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-25 18:28:53 +00:00
Tzafrir Cohen
cdeaafb910 xpp: fix bashism in xpp_debug
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10152 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-24 08:11:38 +00:00
Shaun Ruffell
f74112b551 wctdm24xxp: Set 'fastoffhook' counter to 8ms and turn off calibration delay.
r10006 "wctdm24xxp: Add 'fastpick' module parameter." copied the
fast-off hook module parameter from the wctdm.c driver, but the setting
in that driver does not match the data sheet. The previous commit did
not actually change any of the significant bits in that register. Also,
that commit changed the timer, but did not disable the callibration
delay which is necessary for Type-II callerid.

The fastpickup option in the wctdm24xxp driver should now match the
fastpickup option in the wctdm driver.

DAHDI-224.

Reported-By: Kinnith Wallace <kwallace@digium.com>
Signed-off-by: Shaun Ruffell <sruffell@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10148 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-19 22:40:41 +00:00
Shaun Ruffell
0bc7ff0816 wctdm: Set 'fastpickup' counter to 8ms
This fixes what looks like a typo in r1055 [1].

[1] http://svnview.digium.com/svn/dahdi?view=revision&revision=1055

Reported-by: Kinnith Wallace <kwallace@digium.com>
Signed-off-by: Shaun Ruffell <sruffell@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10147 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-19 22:40:36 +00:00
Shaun Ruffell
ad4489c7f4 wctdm24xxp: Use our own free list for IRQ commands.
Really only *necessary* when SLAB debugging is enabled, but in that
case, can reduce the chance of latency bumps when first loading the
driver. Otherwise the constant slab poisoning / checking in interrupt
context from the kmalloc / kfrees is too much.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10144 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-18 19:21:44 +00:00
Russ Meyerriecks
1862d8040c wcte12xp, wctdm24xxp: Remove frowny face from vpmoct032 error message
:O(

Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10141 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-15 21:57:53 +00:00
Russ Meyerriecks
3b20fe39af wct4xxp: Bug in timing cable with different span density cards
The logic loops through the static cards[] array to determine timing,
    but the subloop was based off the current card's numspans member.
    This could cause a null dereference in the case where two cards of
    different span densities were connected via timing cables.

Reported-by: Doug Bailey <dbailey@digium.com>
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10140 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-15 21:57:49 +00:00
Shaun Ruffell
eda8ceea1c wctc4xxp: Fix lock imbalance in wctc4xxp_watchdog.
r10082 "wctc4xxp: Cleanup in-flight commands when halting due to
hardware error." introduced a lock imblance on the error path where the
cmd_list_lock would be unlocked twice when the board is halted due to a
hardware error. Thanks sparse.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10138 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-15 21:49:36 +00:00
Shaun Ruffell
e25a65b692 wcte12xp, wctdm24xxp: Force local interrupts off in the interrupt handler.
r10066 "wctdm24xxp, wcte12xp: Run the ISR with interrupts disabled."
requested that the interrupt handler be run in "fast" mode (disabled)
but this isn't necessarily guaranteed.

This patch makes the interrupt handler itself disable all the interrupts.
Linux commit 470c66239ef0336429b35345f3f615d47341e13b [1] contains a comment
about why this is necessary.

[1] http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=470c66239ef03364

(closes issue DAHLIN-248)
Reported-and-Tested-by: Vladimir Mikhelson <vlad@mikhelson.com>
Signed-off-by: Shaun Ruffell <sruffell@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10118 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-12 15:58:27 +00:00
Wagner Gegler
4f8b2dded1 dahdi_dynamic: Call dahdi_receive in rx packet handler.
Currently dahdi_receive is called on all channels in the context of the
master dynamic span. If one span (not the master) receive two packets
before the master span received a packet, the older packet on the
dynamic span would end up lost because the "readchunk" for the
channels would be overwritten by the new packet. DAHLIN-245

Signed-off-by: Wagner Gegler <wagner@aligera.com.br> (License #6268)
Changed dahdi_ec_chunk to dahdi_ec_span.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10110 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-10 19:22:01 +00:00
Tzafrir Cohen
c793b1b173 FPGA_1161 rev 9605: EC related bug fixes
Astribank II FPGA firmware rev 9605. Includes two bug fixes:

* Error in checking EC licenses when the license was for exactly 64 or 128
  channels.
* Proper handling of a slave FXO Astribank (in line with the quirks
  handling from r10019).

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10099 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-09 12:20:08 +00:00
Shaun Ruffell
d401ad4233 wctc4xxp, wcte12xp, wctdm24xxp: Remove check for HAVE_NETDEV_PRIV
DAHDI currently supports kernels >= 2.6.9. netdev_priv() has been in the
mainline kernel since versions 2.6.6 so it's available in all the
supported kernels. This change is needed to compile against the 3.1 kernel.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10096 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-08 06:38:25 +00:00
Shaun Ruffell
9fd43e0139 wctc4xxp: Cleanup in-flight commands when halting due to hardware error.
On one system I was seeing the board reset in the middle of a
transaction. Any commands that were on the response list when this would
happen would never be completed and the process would then be stuck in
an uninterruptible sleep. This change also prevents the driver from
sleeping in timer context, which would result in a kernel panic.

This change at least lets an error message propogate back to the user.

DAHDI-880

Signed-off-by: Shaun Ruffell <sruffell@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10082 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-07-26 20:19:30 +00:00
Russ Meyerriecks
1813c9ad09 wcb4xxp: Prevent null pointer dereference on spanconfig
In the rare case where spanconfig is called while there is pending data
on the hdlc channel, the hdlc_getbuf interrupt could try to read from
the hdlc buffer before the channel was fully setup. This could
potentially result in a null pointer dereference. This condition has
existed since the creation of the wcb4xxp driver.

Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
Signed-off-by: Shaun Ruffell <sruffell@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10079 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-07-22 17:56:07 +00:00
Shaun Ruffell
00764f705c dahdi: Drivers that do not support hwec should not report hwec is available.
When attaching software echocans to a channel, if there is a hardware
echocan available always give preference to them.

Revision 9995 "dahdi: Always attach hwec to a channel if available" had
an error where if a driver did not even support an option of hardware
echocan, dahdi-base would take that to mean there always was a hardware
echocan available on the channel.

DAHLIN-246

Reported-by: Michael L. Young
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@10070 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-07-21 16:26:31 +00:00
Shaun Ruffell
071cfdc983 wctdm24xxp, wcte12xp: Run the ISR with interrupts disabled.
Revision 9886, "wcte12xp: Use the in-hardirq versions of
dahdi_receive/dahdi_transmit", changed the call into dahdi_receive and
dahdi_transmit to use versions that assume local interrupts are already
disabled.  Not all versions of the kernel run interrupt service routines with
all interrupts disabled and therefore it was possible to lock up a CPU with a
recursive grab of the chan_lock.

When LOCKDEP was enabled (on debug kernels) interrupt handlers were run
atomically so this problem would only occur on pre 2.6.35 kernels that did not
have lockdep enabled.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10066 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-07-21 03:11:20 +00:00
Russ Meyerriecks
abafafcdfe wcte12xp: Fix bug when not recognizing loopup codes
The wcte12xp wasn't recognizing loopup/loopdown signals. The debounce was so
long that it was preventing the loopup/loopdown signals from being registered
properly. Removed the debounce entirely as it was unnecessary to the operation.

Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
Acked-by: Shaun Ruffell <sruffell@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10064 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-07-20 21:32:13 +00:00
Russ Meyerriecks
0fa8ec572b wct4xxp: Fixed a bug where it sent loopdown signals forever
The wct4xxp driver was resetting it's maint state to NONE prematurely.

Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
Acked-by: Shaun Ruffell <sruffell@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10063 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-07-20 21:32:09 +00:00
Shaun Ruffell
91da279443 wct4xxp: Fix compilation when VPM_SUPPORT is not defined.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10061 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-07-20 17:24:31 +00:00
Doug Bailey
64b150eb96 oct612x: Increase the size of some of the instance variables.
Revision 9750 "wct4xxp: Reduce the memory footprint of the hardware
echocanceler" reduced the number of bits used to store some structure
members. Some of the new field lengths were unable to store all the
possible values the API as used assigned to the fields, resulting in
channels never entering power down mode when they were disabled like
they were previously.

The change for byEchoOperationMode was found in testing the operation of
the VPMOCT032 which currently uses the same code. The others were done
via a review of the API doc.

This change represents negligable risk and contains no logic changes.
It only increases the memory footprint of the API instance in the
kernel.

Signed-off-by: Doug Bailey <dbailey@digium.com>
Acked-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@10060 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-07-20 17:24:27 +00:00
Tzafrir Cohen
b2f71aa2b8 get registration_mutex at free_pseudo
Make sure that the call to dahdi_chan_unreg() in free_pseudo() is
protected by the registration_mutex, like the other calls to that
function.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Acked-By: Oron Peled <oron.peled@xorcom.com>
Acked-by: Shaun Ruffell <sruffell@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10056 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-07-20 16:50:14 +00:00
Tzafrir Cohen
47823b3a74 xpp: increase command queue lenge to 1000
Required by CAS in latest (2.5) DAHDI versions.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10055 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-07-20 16:49:53 +00:00
Tzafrir Cohen
6c2233c894 xpp: make quirk bit flags unsigned
This avoids a nag about a meaningless single-bit signed int.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10054 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-07-20 16:49:31 +00:00
Tzafrir Cohen
0ab741b32d xpp: PRI_timing_priority can be static.
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10053 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-07-20 16:49:07 +00:00
Tzafrir Cohen
6308ee5f7a xpp: rate limit queue overflow messages
If the CPU becomes overly busy, merely printing the "Overflow in the
recieve_queue" messages becomes CPU-intensive on its own right.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10052 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-07-20 16:48:46 +00:00
Shaun Ruffell
643b60ffb0 wcte12xp: Close a potential race on driver unload.
The shutdown logic requires that all CPUs see that the INITIALIZED bit
has been cleared. Otherwise it may be possible for the workqueue to run
after the hardware resources have been released.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10047 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-07-18 23:32:21 +00:00
Tzafrir Cohen
74ce1b7f9a xpp: install Octasic frmware if it's there
If the OCT6104E-256D.ima Octasic firmware was downloaded to the build
directory, install it over with the rest of the firmware files.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10038 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-07-12 18:15:03 +00:00
Tzafrir Cohen
03ee387133 xpp: Demote notices for HWEC create/free to debug
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10037 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-07-12 18:08:42 +00:00
Shaun Ruffell
80e9aa8098 dahdi: Add dynamic dahdi parameter hwec_overrides_swec.
If set to true (default) a HWEC, if available on the channel, takes
priority over any software echocan configured in /etc/dahdi/system.conf.
This has historically been the default behavior in all released versions
of DAHDI that support module echocans.

Otherwise, hwec_overrides_swec is set to false, HWEC is chosen only via
the "echocanceller=hwec" directive.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Signed-off-By: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Acked-By: Oron Peled <oron.peled@xorcom.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10036 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-07-12 18:08:14 +00:00
Shaun Ruffell
08d6076e38 oct612x: Eliminate some compiler warnings.
Eliminate "large integer implicitly truncated to unsigned type" warnings
from r10010.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Doug Bailey <dbailey@digium.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10024 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-07-05 17:23:41 +00:00
Tzafrir Cohen
45e5b324d0 xpp: xpd_fxs: ring_trapez parameter
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-07-04 14:05:43 +00:00
Tzafrir Cohen
451de80d2a A number of cases of testing for unsigned int < 0
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10021 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-07-04 14:05:19 +00:00
Shaun Ruffell
7f4bd56121 xpp: Eliminate "set but unused" compiler warnings.
gcc 4.6 complains about variables that are assigned values but then
never used.

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@10020 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-07-04 14:04:56 +00:00
Oron Peled
d7e723ae8a xpp: add FXO HWEC quirks handling
In some cases the hardware echo canceller cannot be used. Mostly related to
an FXO module.
* FXO module if the first module is BRI or PRI
* FXS module if the Astribank has another FXO, no PRI/BRI, and is a sync
  slave.

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@10019 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-07-04 14:04:33 +00:00
Shaun Ruffell
bfbfdbab33 wcb4xxp: Return NULL if there is not a hardware EC on installed.
r9943 enabled the presence of hardware EC to be probed on a card. That
change did not account for wcb4xxp based cards that did not have a
hardware echocan on board.

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@10017 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-07-01 15:45:19 +00:00
Shaun Ruffell
bee7c5e579 wct4xxp: Add module parameter to ignore rotary switch settings.
The dual and quad span cards have a rotary switch onboard which controls
the order that cards serviced by this driver are registered with the
core of DAHDI. This commit adds a module parameter 'ignore_rotary'
which, when set to 1, causes the driver to ignore the position of the
rotary switch and only consider the physical slot when registering with
DAHDI.

Ignoring the rotary switch settings also permits the PCI device to be
bound and unbound from the driver at runtime since registration with
DAHDI no longer only happens when the module is first initialized.

By default, the rotary switch will still be used to determine
registration order. This commit does not change the default behavior.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10016 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-07-01 15:45:14 +00:00
Tzafrir Cohen
3e64fbfc26 xpp: FPGA_1161 rev 9252, USB_FW rev 8826: HWEC
New Astribank II FPGA firmware and USB firmwares that add support for the
hardware echo canceller module.

Note that due to a bug in previous FPGA firmwares, an Astribank with such
older firmware and with a hardware echo canceller module will not have any
functioning audio at all.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10013 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-30 21:53:22 +00:00
Tzafrir Cohen
65361158b5 xpp: also install init (non)script for xpd_echo
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10012 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-30 21:38:47 +00:00
Oron Peled
304e481d47 oct612x: Fixes for Octasic user space compilation:
* Don't assume a pointer diff is 16 bits only.
* cOCT6100_INVALID_VALUE should be used against 32 unsigned values
* Make 3 constants adjustable via '-Dmacro=value':
  - cOCT6100_INTERNAL_SUPER_ARRAY_SIZE
  - cOCT6100_MAX_ECHO_CHANNELS
  - cOCT6100_MAX_MIXER_EVENTS

Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Acked-by: Doug Bailey <dbailey@digium.com>
Acked-by: Shaun Ruffell <sruffell@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10010 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-30 20:09:39 +00:00
Shaun Ruffell
d7fdb06033 wctdm24xxp: Fix typo in previous commit for fastpickup mode.
I failed to compile the commit exactly as it was committed.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10008 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-29 22:15:42 +00:00
Shaun Ruffell
f2c8359d2e wctdm24xxp: Add 'fastpick' module parameter.
When true / 1 the FXO port will use a shorter off-hook calibration
delay. This is sometimes necessary in order to properly decode Type-II
Caller ID information which is sent shortly after an FXO port goes off
hook.

Defaults to 0 unless opermode is "JAPAN" then it will default to 1. This
functionality was ported from the wctdm.c driver.

DAHDI-854.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10006 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-29 19:53:52 +00:00
Shaun Ruffell
59e277ef5a wctdm24xxp: Ensure battery drops on FXS hangups honor the channel otimer.
If an FXS port is configured to use kewl start signalling, when the FXS port
is "hungup" it should drop battery for 500ms so that any attached devices can
detect that the remote side has disconnected.  The wctdm24xxp driver
since version 2.4.0 was only dropping battery for ~5-10 ms because it would
set "open" on the line, but then the next time it read the line feed register
state, it was setting the LINE feed register to the idle state.

This change checks if the line is forced open before setting the FXS port back
"onhook" so as to not turn on battery prematurely.

This fixes a regression introduced in r9070 "wctdm24xxp: Prevent FXS Proslic
staying in "Forward/Reverse OnHookTransfer...". DAHDI-849.

Checking for open on the line feed registered was originally suggested by Alec
Davis.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10002 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-29 16:57:38 +00:00
Russ Meyerriecks
f2c0bcd0f2 wcte12xp, wctdm24xxp: Load VPMOCT032 firmware in background.
The firmware load has been moved into a workqueue to prevent the module load
from blocking for the duration of the firmware upload. This could be up to 40
seconds. Driver prevents configuration until firmware load is finished and
is_initialized() returns true.

Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
Signed-off-by: Shaun Ruffell <sruffell@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9998 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-28 22:29:00 +00:00
Russ Meyerriecks
1714113c17 wcte12xp, wctdm24xxp: Add support for the VPMOCT032 hardware echocanceler.
Support enabled for the vpmoct032 echo cancellation module for the wctdm24xxp
and wcte12xp drivers.

Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>
Signed-off-by: Shaun Ruffell <sruffell@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9997 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-28 22:28:53 +00:00