summaryrefslogtreecommitdiff
path: root/drivers/dahdi/voicebus
AgeCommit message (Collapse)Author
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
2010-03-25wctdm24xxp: Add an 'hx8' mode for buffer processing.Shaun Ruffell
The Hx8 series cards do not need any idle buffers and idle_buffers complicate processing when using the timing_cable. This change adds another mode of operation for the voicebus layer for the Hx8 cards that operates without the idle buffers. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8431 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-03-22wctdm24xxp, wcte12xp: Fix several problems with buffer processing.Shaun Ruffell
* If the receive packet isn't the correct size, we can't just drop it, we have to resubmit it to the receive queue immediately so it will get cleaned up properly. * It isn't safe to leave the buffers on any lists while calling the function to resubmit it to the descriptor ring, since it may be freed which potentially results in a corrupted list. * If the card is held up in a state where it is waiting for receive data, there is a chance that when the transmit process is started up again it could DMA data into a buffer that has already been freed. By using our own freelist, there isn't a chance that the board will DMA data into memory that has been recycled for another purpose. * Disable the tasklet when processing hard underruns in order to not corrupt the descriptor rings. * Make sure voicebus_stop and voicebus_release aren't running at the same time as the hard underrun handler. This too can result in corrupted descriptor lists. DAHDI-560. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8379 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-03-22wctdm24xxp, wcte12xp: Remove the completion on shutdown.Shaun Ruffell
Oddities in the receive processor state make this completion not so useful anymore. It is more straightforward to simply poll the state on shutdown. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8378 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-03-22wctdm24xxp, wcte12xp: Remove locking macros.Shaun Ruffell
Since the locking will always take place in a bottom half now (either a timer or tasklet), we do not need the special locking macros anymore. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8377 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-03-01voicebus: Include dahdi/kernel.h in voicebus_net.cShaun Ruffell
Brings in any backward compatibility definitions. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8204 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-03-01wctdm24xxp, wcte12xp: Add optional module parameter to set the maximum latency.Shaun Ruffell
Setting the maximum latency can be useful if you have a system event that normally causes a latency increase, but you would rather have a break in the audio or frame slip, then let the latency grow to the current default maximum which is 25ms. DAHDI-278. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8198 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-03-01wctdm24xx, wcte12xp: Fix compiler warning about unused local variable.Shaun Ruffell
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8189 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-03-01wctdm24xxp, wcte12xp: Change list_for_each_entry to list_for_each_entry_safe.Shaun Ruffell
Since we're calling list_move_tail, we need to use the safe version. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8183 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-03-01wcte12xp, wctdm24xxp: Use memory mapped IO instead of port IO.Shaun Ruffell
Some systems do not like the port I/O and this change allows it to work. DAHDI-515. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8176 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-02-26voicebus: Turn off CONFIG_VOICEBUS_SYSFS by default.Shaun Ruffell
Needs work to make backward compatible with the range of supported kernels. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8141 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-02-26wctdm24xxp: Add support for Hx8 series cards.Shaun Ruffell
The Hx8 series cards support BRI modules in addition to analog modules. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8123 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-26voicebus: Only use the slab debug facilities if CONFIG_SLAB_DEBUG is defined.Shaun Ruffell
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8119 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-02-26voicebus: Add optional network debugging interface.Shaun Ruffell
This interface is only used to facilitate debugging. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8118 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-02-25voicebus: Only use request_module_nowait on kernels >= 2.6.30.Shaun Ruffell
Request_module_nowait is only useful when asynchronous initialization is used (committed to trunk in r8094), and that can only happen in kernel version after 2.6.30. Some earlier kernels do not have the request_module_nowait interface. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8111 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-25wctdm24xxp: Provide option to initialize boards in parallel on kernels > 2.6.30Shaun Ruffell
The 2.6.30 kernel provides support for asynchronous initialization. If running on a kernel that supports this feature, let's add an option to use it in order to speed up driver load times. Keep it off by default. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8094 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-02-24wctdm24xxp, wcte12xp: Abort attach if interface fails to come out of reset.Shaun Ruffell
If the reset bit never clears, then just assume we cannot talk to the board and error on the attach. DAHDI-515. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8080 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-02-10voicebus: Improve hard underrun handling.Shaun Ruffell
When there is a hard underrun, or in other words interrupts are held off for so long that the board completely runs out of transmit descriptors, it was too easy for the driver to be in a 'confused' state about the descriptors. This change has the driver cleanup and reset the descriptor ring in this case so that we're not racing against the interface while we resume normal operation. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8026 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-08voicebus: Reset own bits when a soft underrun is detected.Shaun Ruffell
If a combination of softunderun results in descriptors that aren't owned being skipped in the vb_recover_tx_descriptor_list, it's possible for processing to stop on a descriptor that isn't owned. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8010 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