summaryrefslogtreecommitdiff
path: root/drivers/dahdi/voicebus
AgeCommit message (Collapse)Author
2011-12-02dahdi: #include <linux/module.h> in dahdi/kernel.h and GpakCust.hShaun Ruffell
Commit de47725, first released in 3.2-rc1 removed module.h from some kernel headers. Include it explicitly now. Resolves compilation errors like: error: implicit declaration of function 'try_module_get' error: 'THIS_MODULE' undeclared (first use in this function) error: implicit declaration of function 'module_put' Signed-off-by: Shaun Ruffell <sruffell@digium.com> Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10361 Conflicts: include/dahdi/kernel.h git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10363 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-12wcte12xp, wctdm24xxp: Force local interrupts off in the interrupt handler.Shaun Ruffell
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> Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10118 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10119 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-11wctc4xxp, wcte12xp, wctdm24xxp: Remove check for HAVE_NETDEV_PRIVShaun Ruffell
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> Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10096 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10115 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-07-21wctdm24xxp, wcte12xp: Run the ISR with interrupts disabled.Shaun Ruffell
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-06-28wcte12xp, wctdm24xxp: Load VPMOCT032 firmware in background.Russ Meyerriecks
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-28wcte12xp, wctdm24xxp: Add support for the VPMOCT032 hardware echocanceler.Russ Meyerriecks
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-02wctdm24xxp: Hold the reglock longer in the interrupt handler.Shaun Ruffell
Cuts down on the overhead of constantly saving and restoring the interrupt registers. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9962 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-02wcte12xp, wctdm24xxp: Separate test for VPMADT032 and initialization.Shaun Ruffell
Part of increasing system startup speed. Splitting these two operations facilitate checking if there is a module present synchronously on driver load from the actual load of the firmware and configuration of the channels. This will allow the presence of the VPM module to be flagged on the span before registration, but load and configuration can happen in the background. When the modules are eventually loaded via udev, there will be enough time from the time the drivers are loaded to when dahdi_cfg will run to complete the firmware load, eliminating the need to block the driver here. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9951 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-02wcte12xp, wctdm24xxp: Use a constant string for the VPM workqueue name.Shaun Ruffell
In my opinion naming the VPM workqueues for each board is not worth the extra complexity. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9950 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-04-04wcte12xp, wctdm24xxp: decriptor_list.count does not need to be atomic.Shaun Ruffell
It is only ever accessed in interrupt context anyway. Saves several hundred nanoseconds from hard interrupt context. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Michael Spiceland <mspiceland@digium.com> Acked-by: Kinsey Moore <kmoore@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9888 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-04-04wcte12xp, wctdm24xxp: Remove a PCI read from hardirq context.Shaun Ruffell
No need for the CPU to wait there for that write to flush when all the writes will be flushed when the interrupt is acknoledged later. Saves nearly a 1 us from the interrupt handler on a 3Ghz Xeon test system. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Michael Spiceland <mspiceland@digium.com> Acked-by: Kinsey Moore <kmoore@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9887 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-04-04wctdm24xxp, wcte12xp: Always call handle_transmit/receive in hardirq context.Shaun Ruffell
Allows the board drivers to use the regular locks instead of the irqsave/irqrestore variants. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Michael Spiceland <mspiceland@digium.com> Acked-by: Kinsey Moore <kmoore@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9885 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-04-04wctdm24xxp, wcte12xp: Add voicebus_quiesce function.Shaun Ruffell
voicebus_quiesce is like voicebus_stop, except that it doesn't wait for any information to come back from the card. This prevents kexec from blocking waiting for information from a potentially dead card. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Michael Spiceland <mspiceland@digium.com> Acked-by: Kinsey Moore <kmoore@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9880 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-04-04voicebus: Update the network debug device to use dma_pools.Shaun Ruffell
r9402 switched to dma_pool for the SFRAMES. This updates the network debug device to use the dma_pools for SFRAME allocation. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Michael Spiceland <mspiceland@digium.com> Acked-by: Kinsey Moore <kmoore@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9877 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-02-28wcte12xp, wctdm24xxp: Remove unused support for booting VPMADT032 from SPI.Shaun Ruffell
Since there never was a VPMADT032 module shipped with non-volatile memory no need to check that bit contantly in interrupt context. Also remove the unused VPM150M_DTMFDETECT bit. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9781 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-02-28wcte12xp, wctdm24xxp: Minor fixes for big endian host architectures.Shaun Ruffell
Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9779 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-12-15wcte12xp, wctdm24xxp: Use more descriptive symbols for the bus setup.Shaun Ruffell
This is a cleanup patch to make it a little easier to see what the bits mean. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Kinsey Moore <kmoore@digium.com> Acked-By: Russ Meyerriecks <rmeyerriecks@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9543 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-12-15wctdm24xxp, wcte12xp: Disable PCI read-line multiple command.Shaun Ruffell
There are some platforms where the read-line multiple transaction causes packets to be dropped in the voicebus pipeline. The only observable behavior is that packets just go "missing" in the pipeline. This also only appears to affect PCI cards. A typical 'symptom' of this problem is you may see IRQ misses increasing without any corresponding "bumps" in latency in the kernel message log. Normally, IRQ misses are correlated to latency bumps since that is an indication that the host was not able to service the card interrupt in a timely fashion. DAHDI-510 DAHDI-774 Signed-off-by: Shaun Ruffell <sruffell@digium.com> Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com> Acked-by: Kinsey Moore <kmoore@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9542 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-12-15vpmadt032: Convert ifacelock from rwlock to plain spinlock.Shaun Ruffell
rwlock is slower than normal spinlocks and this lock is rarely contended for. Also noticed that the vpmadt032_module_init function is now (was already) redundant since all the elements initialized in it were already initialized. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Kinsey Moore <kmoore@digium.com> Acked-By: Russ Meyerriecks <rmeyerriecks@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9538 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-12-15wctdm24xxp, wcte12xp: Lock interrupts when recovering from an underrun.Shaun Ruffell
This reduces the chance that another interrupt will interfere with the recovery process. Otherwise it is possible that the hardware advances past the position that we think it is currently at. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Kinsey Moore <kmoore@digium.com> Acked-By: Russ Meyerriecks <rmeyerriecks@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9535 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-12-15wctdm24xxp, wcte12xp: Add more descriptive message on a failed reset.Shaun Ruffell
Reading 0xffffffff from the registers is a different error than just not coming out of reset. Add a little extra debugging information. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Kinsey Moore <kmoore@digium.com> Acked-By: Russ Meyerriecks <rmeyerriecks@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9534 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-12-02wctdm24xxp, wcte12xp: Close a few potential resource assignment leaks.Shaun Ruffell
There were some routes through the failure paths in __voicebus_init() where a registered memory region was not subsequently released. This change closes those paths. The result would be on subsequent loads of the driver after hitting the failure condition you would see "IO Registers are in use by another module." in dmesg. request_mem_region/release_mem_region should most likely be converted to devm_request_region and devm_release_region introduced in 2.6.20 (commit 9ac7849e35f705830f7b016ff272b0ff1f7ff759) which was introduced for reasons just such as this. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9503 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-11-04Remove mutex emulationShaun Ruffell
Using semaphores as mutexes was removed from the kernel in 4882720b267b. Just use straight semaphores now. 'DECLARE_MUTEX()' -> 'DEFINE_SEMAPHORE()' and 'init_MUTEX()' -> 'sema_init()'. Signed-off-by: Shaun Ruffell <sruffell@digium.com> LKML-Reference: <20100907125057.562399240@linutronix.de> Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9464 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-10-20vpmadt032: Honor the CONFIG_DAHDI_NO_ECHOCAN_DISABLE flag.Shaun Ruffell
Setting this configuration option would not have had any impact when a hardware echo canceler was in use. Signed-off-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Kinsey Moore <kmoore@digium.com> Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9432 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-23wcte12xp, wctdm24xxp: Convert vbb cache from kmem_cache to dma_pool.Shaun Ruffell
The voicebus interface constantly uses the same buffers for moving data to/from the card. A fixed pool has less overhead in this case than constantly mapping/unmapping the kmem_cache_alloced buffers. Saves about ~2.608 us for each run of vb_isr on a 2.40 GHz Xeon test machine. 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@9402 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-23wcte12xp, wctdm24xxp: Remove comment about converting from IO space.Shaun Ruffell
This change was made in revision 8176. 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@9401 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-21wcte12xp, wctdm24xxp: Do not rely on polling main memory.Shaun Ruffell
The voicebus library by default configures the PCI interface to poll the descriptor ring for available buffers. There are some platforms like the Intel SG3420P motherboard where this does not appear to be sufficient. Writing to the transmit demand poll register resolves this problem on these troublesome platforms. DAHDI-700 DAHDI-702. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9397 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-16vpmadt032: Remove potential endless waits when resetting.Shaun Ruffell
It is possible to softlock if the board stops delivering interrupts in the middle of a reset. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9332 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-14wcte12xp, wctdm24xxp: '0x0c' -> PCI_CACHE_LINE_SIZE.Shaun Ruffell
Magic number removal. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9327 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-14wcte12xp, wctdm24xxp: Add call to 'pci_set_mwi' on initialization.Shaun Ruffell
I have yet to personally come across a system where this actually changes the observable behavior, but it certainly seems like the sane thing to do and I would rather not let this float around as a patch when I can just merge it in. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9326 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-14wcte12xp, wctdm24xxp: Remove redundant vb_enable_io_access.Shaun Ruffell
These three bits are already set by 'pci_enable_device' and 'pci_set_master' calls. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9325 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-09-11wctdm24xxp, wcte12xp: Fix comment. RELAXED is no longer a mode name.Shaun Ruffell
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9319 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-08-17wcte12xp, wctdm24xxp: Add compile time option CONFIG_VOICEBUS_ECREFERENCE.Shaun Ruffell
Add compile time option to improve the reference signal provided to software echo cancelers. The intent here is for this functionality to become the default behavior but more testing and work on the edge cases is needed. It's being brought in now as a compile time option since there have been reports that it helps in some environments. Instead of using two buffers, which means that at best we're two milliseconds behind, use a circular buffer where audio data is written on the transmit side and read on the receive path. In this way high latency values will not interfere with the operation of software echo cancelers. DAHDI-291. DAHDI-387. This work was originally on: http://svn.asterisk.org/svn/dahdi/linux/team/sruffell/improved_ecreference@9143 and includes a generic kfifo replacement by Matt Fredrickson. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9144 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-28wcte12xp, wctdm24xxp: Minor cleanup 0 -> NULLShaun Ruffell
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9046 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-26wcte12xp, wctdm24xxp: Updating VPMADT032 firmware to version to 1.25Shaun Ruffell
The echo canceler will now monitor if the receive signal goes over a certain threshold, and if so, freezes its adaptation to prevent loss of convergence. I.e. Fixes conditions where blowing into your handset could result in echo. Additionally, 1.25 includes improvements for handling when line conditions change from echo free to containing echo. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8983 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-26wcte12xp, wctdm24xxp: Return buffer processing to interrupt handler.Shaun Ruffell
In revision 8095, I had moved most of the buffer processing out of the interrupt handler and into a tasklet. The intended result was to enable multiple cards to interleave with one another. But once again I was bitten by the fact that there are some systems that for one reason or another do not process their tasklets in a timely enough manner for the real-time nature of TDM processing. This commit moves this processing back into the interrupt handler by default. It also limits the number of frames that the interrupt handler will process at any given time which appears to achieve the same intended result. (closes issue #17289) Tested by: alecdavis git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8982 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-26wcte12xp, wctdm24xxp: spin_lock_bh -> spin_lock_irqsaveShaun Ruffell
Will add an option to allow calling the deferred processing callback directly in the interrupt handler. It appears there are some systems which still are unable to process their tasklets in a timely fashion, especially if they get pushed out to the ksoftirqd daemon. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8981 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-26wcte12xp, wctdm24xxp: Add shutdown handlers.Shaun Ruffell
Make the drivers a little more kexec friendly. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8979 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-06-29wctdm24xxp, wcte12xp: Fix "operation on may be undefined" warning.Shaun Ruffell
gcc 4.5.0 generates a warning on the changed lines and http://gcc.gnu.org/ml/gcc/2004-10/msg00032.html explains why. Essentially, the only thing guaranteed with the preincrement operator is that the value will be incremented before the assignment. It's undefined where in the sequence the mask will be applied. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8832 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-06-08include semaphore.h explicitly for newer kernelsTzafrir Cohen
With kernel version >= 2.6.35-rc1, building failed with: drivers/dahdi/voicebus/GpakCust.h:114: error: field ‘sem’ has incomplete type (closes issue #17382) Reported by: Chainsaw Patches: 07-semaphore-include-not-optional.diff uploaded by Chainsaw (license 723) git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8758 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-04-26wcte12xp, wctdm24xxp: Retry if the VPMADT032 reports not ready.Shaun Ruffell
CheckDspReset can return -1 if the DSP is not ready to process any new commands. In this case we should retry a few times to give the DSP a chance to become ready. While I'm not ready to say this definitely fixes recently reported cases when the wcte12xp driver constantly resets, it eliminated communication failures to the DSP module when under stress (via the vpm_firmware_version sysfs attribute). However, I haven't let it run long enough to say that the issue is resolved. DAHDI-603. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8576 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-04-26wcte12xp, wctdm24xxp: Do not allow interruptible sleep on VPM lock.Shaun Ruffell
If the sleep is ever interrupted, 'up' will still be called in the GpakApi, essentially making the lock useless after that point. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8575 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-04-22wcte12xp, wctdm24xxp: Ensure writes to I/O registers are flushed.Shaun Ruffell
In revision 8176 I changed register access from I/O space to memory mapped registers. Unfortunately, when I made that change, I didn't account for posted writes. This change makes sure all the registers are read back to ensure that they are posted through any intermediate bridges. The most readily observable symptom were cards that were taking 2000 interrupts/second. The card reported that it handled an interrupt but the write to silence the card wasn't flushed through until the second time the interrupt handler run. DAHDI-602. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8560 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-04-06voicebus: Change WARN_ON_ONCE to BUG_ON.Shaun Ruffell
WARN_ON_ONCE is not defined in 2.6.9, and this condition would be catastrophic anyway if it were to occur. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8494 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-04-05wcte12xp: Try to reconfigure the VPM if we fail to configure the channels.Shaun Ruffell
Also, fall back to any software echocan configured for this channel for new calls while we're in the middle of a recovery. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8473 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-04-04wcte12xp: Poll the VPM and reset it if necessary.Shaun Ruffell
When the transmit descriptor runs out completely, there (appears to be) a chance for a random command to be sent that results in the VPMADT032 to no longer respond, typically resulting in one way audio. This change introduces a poll of the VPM. If it fails the poll, it will be bypassed temporarily while the driver resets and reprograms it. Also, the VPM is initially programmed in the spanconfig callback instead of at driver load. This moves the potential for underruns until later in the boot process. DAHDI-573. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8468 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-04-04wcte12xp, wctdm24xxp: If we're only one packet behind, just exit.Shaun Ruffell
This will make us two behind, which is fine, and eliminates a busy loop in atomic context. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8467 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-04-03wcte12xp, wtdm24xxp: Make sure the writes are retried.Shaun Ruffell
r8454 and r8460 introduced a change where writes are not retried when other module/framer commands are retried. This was an error and wasn't what was actually under test. This commit restores the behavior in wctdm24xxp and makes sure the vpm writes are retried in the wcte12xp. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8461 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-04-03wcte12xp, wctdm24xxp: Close a memory leak when processing VPM commands.Shaun Ruffell
Closes a memory leak when processing the VPM write commands introduced in r8454. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8460 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-04-03wcte12xp: Resend both framer and VPM commands when reads may have been lost.Shaun Ruffell
Latency conditions could cause the driver to misconfigure the VPM which would result in one way audio. DAHDI-572. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8454 a0bf4364-ded3-4de4-8d8a-66a801d63aff