summaryrefslogtreecommitdiff
path: root/drivers/dahdi/voicebus
AgeCommit message (Collapse)Author
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
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-02-03wctdm24xxp, voicebus: Move sysfs handling from voicebus to wctdm24xxp.Shaun Ruffell
The drv_data attached to the pci_dev is no longer the 'struct voicebus' pointer, but is instead the 'struct wctdm' (or 'struct t1'), so the clients need to manage the sysfs files themselves. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7983 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-01-08voicebus: Remove framesize, buffer_cache, and cache_line members from struct.Shaun Ruffell
Framesize is the same on all the clients, so it can be removed from the 'struct voicebus' (and changed back again if needed). Since the framesize is the same, each board doesn't need it's own buffer_cache, and cache_line is only used during startup and can be read directly from pci configuration space, so we don't need to keep it around in our context. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7779 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-12-22voicebus, wcte12xp: Only define SLAB_STORE_USER when CONFIG_SLUB is defined.Shaun Ruffell
On 2.6.22, there is was a bug in the SLUB allocator that required defining SLAB_STORE_USER, however this setting is only valid when CONFIG_SLUB is defined and not when using the previous slab allocator. DAHDI-424. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7722 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: Remove unused curtone from 'struct vpmadt032'Shaun Ruffell
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7567 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: Be just a little more graceful if we cannot grab our interrupt line.Shaun Ruffell
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7524 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-11-07voicebus: Remove 'assert' macros and use BUG_ON/WARN_ON directly.Shaun Ruffell
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7523 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-11-07voicebus: Add optional sysfs entry for reading a boards current latency.Shaun Ruffell
This is off by default since it hasn't been tested on a full range of kernels, but can be useful for quickly seeing differences for latencies on different cards installed in the system. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7522 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-07voicebus: Add function to lock the latency.Shaun Ruffell
Now that increases in the latency produce less undefined behavior on the SPI busses, provide an interface for client drivers to inform the voicebus library to not increase the latency if underruns are detected. This can speed up loads of the driver since latency bumps do not trigger a restart of the driver initialization. DAHDI-278. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7518 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-11-07voicebus: Send 'idle' buffers when the transmit descriptor underruns.Shaun Ruffell
Previously, when the host system fails to service the interrupt in a timely fashion, the transmit descriptor ring for the voicebus card would "go empty" since the interface wouldn't have another descriptor to read in. The driver only knows that it went empty, not how far behind it actually was. Therefore, the driver could just increase the latency by a millisecond and keep going waiting for another bump. Additionally, when the transmit descriptor actually goes empty, there are some cases where an in process SPI transaction to one of the modules is interrupted, which may result in corrupted module register writes on rare occassions. This now makes it possible for the voicebus drivers to coexist with some devices that periodically lock interrupts for longer than 25ms. Before this patch, the latency would constantly increase until either the modules received a corrupted frame. This patch preconfigures all the receive descriptors to send an "idle" packet that will be transmitted to the onboard modules when the host doesn't service the interrupt within (latency - 2)ms. There are now two kinds of underruns, softunderuns where the driver can detect that these idlebuffers have made it to the TX FIFO, and the normal hard underrun where the part signals a transmit descriptor unavailable interrupt. DAHDI-278. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7517 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-11-07voicebus: Use DAHDI_IRQ_SHARED instead of defining our own.Shaun Ruffell
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7516 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-11-07voicebus: Set the DMA_BIT_MASKShaun Ruffell
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7515 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-11-07voicebus: Remove sdi member from 'struct voicebus'Shaun Ruffell
This is only used during startup so we don't need to carry it around in the structure at all times. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7514 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-11-07voicebus: Remove the VB_PRINTK macro.Shaun Ruffell
Unnecessarily duplicates the dev_xxx macros. Also removes the need for the board_name member from struct voicebus. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7513 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