summaryrefslogtreecommitdiff
path: root/drivers/dahdi/voicebus/GpakCust.c
AgeCommit message (Collapse)Author
2010-05-14Merged revisions 8560,8575-8576 via svnmerge from Shaun Ruffell
https://origsvn.digium.com/svn/dahdi/linux/trunk ........ r8560 | sruffell | 2010-04-22 16:36:16 -0500 (Thu, 22 Apr 2010) | 11 lines wcte12xp, wctdm24xxp: Ensure writes to I/O registers are flushed. 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. ........ r8575 | sruffell | 2010-04-26 18:29:16 -0500 (Mon, 26 Apr 2010) | 4 lines wcte12xp, wctdm24xxp: Do not allow interruptible sleep on VPM lock. If the sleep is ever interrupted, 'up' will still be called in the GpakApi, essentially making the lock useless after that point. ........ r8576 | sruffell | 2010-04-26 18:29:17 -0500 (Mon, 26 Apr 2010) | 9 lines wcte12xp, wctdm24xxp: Retry if the VPMADT032 reports not ready. 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/branches/2.3@8621 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-03-22wcte12xp, wctdm24xxp: Do not keep individual free lists for VPM commands.Shaun Ruffell
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8375 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-02-26wctdm24xxp, wcte12xp: Updating the interface for the VPMADT032.Shaun Ruffell
This description needs to be filled in more. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8121 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-02-25wctdm24xxp, wcte12xp: Buffer handling improvements.Shaun Ruffell
This patch moves the majority of the buffer processing for the voicebus based cards out of the interrupt handler and into a tasklet. When multiple cards are running on the same CPU, and there was a latency condition that would cause them to get behind, this now allows the tasklet to limit how many buffers are processed on each card before giving the other card a chance to start working on it's backlog. Additionally, when the card detects a hard under run, instead of trying to fix it up in the handling routine, it will now reschedule a work item that will completely reset the descriptor rings. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8095 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-02-10vpmadt032: show the location of the device printing to the kernel logShaun Ruffell
Another commit that has formatting problems (mainly lines over 80 characters) that I will fix in a later commit. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8025 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-02-08dahdi: Update the Digium copyright on files changed since 2010-01-01.Shaun Ruffell
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8008 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-02-08vpmadt032,wcte12xp: Use a timeout on the read/write commands and during load.Shaun Ruffell
It is possible for poorly behaving hardware (and driver bugs) to lockup the modprobe process by having it wait indefinitely for a command to complete that never will. DAHDI-451. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8003 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-02-08voicebus: Remove unused 'voicebus_get_pci_dev'.Shaun Ruffell
Function is no longer needed since the 'struct voicebus' is now embedded in the client contexts. This commit also contains a few trivial formatting changes for sparse's sake. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8002 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-01-08voicebus: Make 'struct voicebus' embeddable by the client driver strutures.Shaun Ruffell
In addition to making 'struct voicebus' embeddable, also add an 'voicebus_operations' structure. This was done so that a) remove the "context" pointer from struct voicebus, and also to show that handle_recieve/transmit are to be managed together. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7778 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-11-12wcte12xp, voicebus: Set the companding mode correctly on E1.Shaun Ruffell
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7582 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-11-12voicebus: Use dev_xxx macro when printing vpm messages.Shaun Ruffell
We also do not need the unused context member of the vpmadt032 structure. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7569 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-11-12voicebus: Remove redundant MAX_CHANNELS_FROM_SPANShaun Ruffell
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7568 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-11-12voicebus: Fix race when enabling/disabling hardware echocan.Shaun Ruffell
This closes a race condition where it was possible for the driver to believe it has enabled the VPMADT032 when in fact, it really has not. This fixes a regression introduced in dahdi-linux 2.2.0. (issue #15724) git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7565 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-11-07voicebus, wctdm24xxp, wcte12xp: Move a print out of the interrupt handler.Shaun Ruffell
This can be handled just as well in process context and printing to a serial console from the interrupt handler has the potential to cause long latencies. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7521 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-11-04voicebus: Increase the NLP converged threshold to 18.Shaun Ruffell
Brings in the change from r7065 that was on the team/sruffell/dahdi-linux-vpm119 branch. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7480 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-10-02Implement API update to do per-channel companding selection for VPMADT032Matthew Fredrickson
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7309 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-09-30Update echocan API so it only uses channel offset in free routineMatthew Fredrickson
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7284 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-06-26voicebus: Limit the string length of the vpm workqueue name.Shaun Ruffell
On older kernels, it is possible to cause a kernel panic if the lenght of the workqueue name is greater than 10. DAHDI-276. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6776 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-05-15voicebus: Use '&' not '|' when checking for a bit.Shaun Ruffell
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6628 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-05-15voicebus: Make the enable/disable echocan messages debug again.Shaun Ruffell
I accidentally changed to print everytime. They should only be printed if DEBUG_ECHOCAN is specified in the debug module parameter. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6625 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-05-11voicebus: Update the default vpmadt032 parameters.Shaun Ruffell
Move the echo can channel parameters into a common location for both the wcte12xp and wctdm24xxp drivers that use the voicebus module. This is intended to make it clearer which differences are required between the clients. Additionally, update the default parameters to the new recommended values. VPMADT032-37 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6589 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-05-07voicebus: Create workqueue for each vpmadt032 instance.Shaun Ruffell
Depending on the system latency, the deferred work for the vpmadt032 can take up to 200ms. This change allows each vpmadt032 to use its own workqueue, and not the global system workqueue. This prevents vpm operations from blocking the main system workqueue for extended periods. This restores the behavior to the way it was before the common vpmadt032 code was moved out of the wctdm24xxp and wcte12xp drivers. DAHDI-260 voicebus-squash: Adding the wq name. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6572 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-05-05voicebus: Use the companding type on the span when enabling echocan.Shaun Ruffell
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6564 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-05-04Insure that vpmnlptype, vpmnlpmaxsupp, and vpmnlpthresh are set back to moduleDoug Bailey
level defaults when echo can is freed. (Previously they were zero'd out) DAHDI-257 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6562 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-04-29echocan: Improve interface for echo cancelers.Shaun Ruffell
Echo cancelers are now able to report if they are able to automatically disable their NLP portions in the presence of tones in the audio stream. Also, the interface is changed to allow user space to just disable the NLP portion of the echo canceler. These changes improve fax and modem handling in DAHDI. This commit merges in the changes on http://svn.digium.com/svn/dahdi/linux/team/kpfleming/echocan_work Patch by: kpfleming Also contains improvements to CED tone detection. (closes issue #13286) Reported by: viniciusfontes git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6529 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-04-29voicebus: Move common vpmadt032 interface into voicebus module.Shaun Ruffell
The voicebus library was previously linked into both the wcte12xp and wctdm24xxp drivers. It is now broken out into it's own module and the common parts of the vpmadt032 interface are now located in that module to reduce duplication between the wcte12xp and wctdm24xxp drivers. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6527 a0bf4364-ded3-4de4-8d8a-66a801d63aff