summaryrefslogtreecommitdiff
path: root/drivers/dahdi/wctdm24xxp/wctdm24xxp.h
AgeCommit message (Collapse)Author
2011-08-18wctdm24xxp: Use our own free list for IRQ commands.Shaun Ruffell
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> Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10144 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10146 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: Calculate the SPI offsets ahead of time.Shaun Ruffell
Updates the CMD_BYTE macro to use precalculated offsets. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9970 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-02wctdm24xxp: reglock can be used to protect the txhookstate.Shaun Ruffell
Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9967 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-02wctdm24xxp: Use lists for SPI commands to the modules.Shaun Ruffell
Saves time in the interrupt handler by eliminating the need to scan through all of the slots in the cmd arrays. Also allows the reads from ISR context to automatically grow as the latency grows. This ensures that battery and hook state is actually checked every frame like originally intended. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9966 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-02wctdm24xxp: Remove 'pos' member from 'struct wctdm'.Shaun Ruffell
The card position is only used during startup so we don't need to carry it around in the strucuture. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9964 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-02wctdm24xxp: Drop 'flags' from 'struct wctdm_module'.Shaun Ruffell
The voicebus cards only support the S110M FXS modules which are based on the 3215. The module flags member was only used to hold whether we were dealing with a 3210 or 3215 SLIC, so we can drop it since we always know we'll have a 3215 based SLIC. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9963 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-02wctdm24xxp: Pass the pointer to struct wctdm_module directly instead of index.Shaun Ruffell
This change gets all the easy places and saves on array dereferences when we already have the address of the module that we are interested in. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9961 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-02wctdm24xxp: Use enumeration for module types.Shaun Ruffell
This change is to primarily to clarify that the types are always mutually exclusive. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9958 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-02wctdm24xxp: Group the QRV members together.Shaun Ruffell
This also allows us to add them to the union with the other module types so they do not add to the memory usage if there aren't any QRV modules installed. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9957 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-02wctdm24xxp: Group the per-module information togetherShaun Ruffell
Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9956 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-02wctdm24xxp: Dynamically allocate the board_name.Shaun Ruffell
Move the data backing the mostly unused string away from the active members of 'struct wctdm'. The location where some of the other members of 'struct wctdm' are initialized were moved so that wctdm_back_out_gracefully always has a fully formed structure to work on. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9955 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-02wctdm24xxp: Remove modmap member from 'struct wctdm'.Shaun Ruffell
We can already use the module type to determine presence of a module to check. This also moves the background polling of the modules until after the board is completely initialized because the module type may change while the different types are being probed. This also means that we need to preset the shadow registers for the FXS because otherwise the shadow register will not have been read before the first time it's checked for a power alarm. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9954 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-06-02wctdm24xxp: Block chanconfig and spanconfig until board is ready.Shaun Ruffell
Currently the board will always be ready if the module initialization function is complete but this change will facilitate allowing some of the more time consuming configuration steps to happen in parallel on system start. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9944 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-03-15wctdm24xxp: Fix regression with LEDS on TDM410.Shaun Ruffell
r9720 disabled the LEDs on the front panel of the TDM410. This commit restores the behavior and clarify which part of the TDM410 eframes control the LED operation. (closes issue #18939) Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9827 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-01-31wctdm24xxp: Remove code for unsupported modules.Shaun Ruffell
The VPM100 and S100M modules are no longer supported. Analog cards supported by the wctdm24xxp are still compatible with the S110 and VPMADT032 modules. DAHDI-302 Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9720 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-11-04wctdm24xxp: 'wait_just_a_bit()' -> 'msleep()'Shaun Ruffell
If we're waiting for tens or hundreds of milliseconds we will just go to sleep instead of spinning. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9471 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-11-04wctdm24xxp: Remove unused 'usecount' member.Shaun Ruffell
'usecount' was removed in revision 6926 but parts were accidentally merged back in revision 8123 as part of the Hx8 merge. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9470 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-11-04wctdm24xxp: Replace 'schluffen()' with 'interruptible_sleep_on()'Shaun Ruffell
'schluffen()' essentially duplicates the functionality of the standard Linux 'interruptible_sleep_on()' function. There may still be some race conditions that can be closed here, but most of the command queue processing is sloted for conversion to something more like in the single span driver in order to reduce the time in interrupt context spent scanning for commands to the modules. Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9469 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-08-06wctdm24xxp: Added "auto" companding optionRuss Meyerriecks
Added the "auto" option for the module parameter "companding". In auto mode its left up to each card to decide what companding mode it should be in. If a BRI module is installed, it set everything to alaw; ulaw is selected if no BRI module is installed. Also fixed a bug where forcing companding one way or the other wasn't affecting the BRI modules. dahdi-673 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9101 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-08-04wctdm24xxp: 'struct dahdi_span' is already embedded in the 'struct wctdm_span'.Shaun Ruffell
We cannot also embed it in struct b400m_span structure and expect container_of to work. This fixes a regression introduced in r8984. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9087 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-29SLIC_LF_OPPENDING confict between wctdm_proslic_recheck_sanity() and ↵Alec L Davis
set_lasttxhook_interruptible() Problem: 'wctdm_proslic_recheck_sanity()' is executed (4 times??) every ~256ms which monitors and clears the SLIC_LF_OPPENDING on fxs->lasttxhook when the LF state has been reached. 'set_lasttxhook_interruptible()' times out after 100ms waiting from the previous write to the SLIC_LF register, by waiting for SLIC_LF_OPPENDING to be cleared, thus the write will fail. Solution: adds wctdm_proslic_check_oppending which does the monitoring and clearing of SLIC_LF_OPPENDING, which is execute every 1ms. It also if the correct state is not reached within 100ms, resends the lasttxhook state. (closes issue #17724) Reported by: alecdavis Patches: wctdm24xxp_fxs_answer.diff4.txt uploaded by alecdavis (license 585) Tested by: alecdavis, sruffell git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9063 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2010-07-26dahdi: Remove the 'pvt' member from dahdi_span.Shaun Ruffell
The vast majority of board drivers already keep the dahdi_span structure in a driver specific structure. The others were easily converted. This way board drivers can use the container_of macro to find what was previously pointed to by the "pvt" member of the span. One less thing to think about in the span structure. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8984 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-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-03wctdm24xxp: Remove unused ERING_SIZEShaun Ruffell
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7980 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-09-14Race condition in handling writes to proslic LINEFEED register (64)Doug Bailey
The wctdm24xxp driver has a problem where a VMWI IOCTL call followed immediately by a ONHOOKTRANSFER IOCTL call will cause the ONHOOK transfer request to be dropped. This occurs if the write to the proslic's LINEFEED register for the VMWI ICTL call is not completed when the ONHOOK transfer request IOCTL is processed. I also cleaned out some magic numbers used in setting the linefeed register. (closes issue #15875) Reported by: dbailey Patches: 15875-wctdm24xxp.diff uploaded by dbailey (license 819) Tested by: dbailey git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7117 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-08-11wctdm24xxp: Remove unused members related to hardware DTMF detection.Shaun Ruffell
Not used anymore, so they are gone. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6952 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-08-04wctdm24xxp: txints and rxints duplicate intcount. Remove them.Shaun Ruffell
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6932 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-08-04wctdm24xxp: Eliminate 'variety' and 'type' members from 'struct wctdm'.Shaun Ruffell
struct wctdm can hold a pointer to struct wctdm_desc directly, and eliminate the need to copy members of wctdm_desc into wctdm. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6929 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-08-04wctdm24xxp: Remove some unused members from struct wctdm.Shaun Ruffell
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6927 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-08-04wctdm24xxp: We no longer need to keep our own reference count.Shaun Ruffell
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6926 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
2009-01-27Break VMWI ioctl calls into two separate calls to maintain old revision ↵Doug Bailey
compatibility (issue #14104) Reported by: alecdavis Tested by: dbailey git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5826 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-01-21Change the DAHDI_VMWI ioctl call to pass data via structure. Doug Bailey
Changed wctdm and wctdm24xxp to handle these calls. (issue #14104) Reported by: alecdavis Patches: mwiioctl_structure_dahdi.diff2.txt uploaded by dbailey (license ) Tested by: alecdavis, dbailey git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5785 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2009-01-19Add line reversal MWI to wctdm and wctdm24xxp drivers Doug Bailey
Add global and per channel polarity control to the wctdm24xxp driver Add per channel polarity control to the wctdm driver Reported by: alecdavis Patches: dahdidriver-14104.diff2.txt uploaded by dbailey (license ) Tested by: alecdavis git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5720 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2008-08-20improve compatibility with 2.6.26 and 2.6.27 kernelsKevin P. Fleming
(closes issue #13253) Reported by: raiden Patches: zap-dev.patch uploaded by smurfix on issue #13277 (license 547) zap-sema.patch uploaded by smurfix on issue #13277 (license 547) git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4801 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2008-08-13import the neon mwi detectionDoug Bailey
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4770 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2008-08-06more license header updatesKevin P. Fleming
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4712 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2008-07-29make an initial split of dahdi/kernel.h into userspace- and ↵Kevin P. Fleming
kernelspace-specific parts git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4628 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2008-07-07Default ring debounce timer should be higher to properly catch calleridMatthew Fredrickson
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4555 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2008-07-02fix remaining drivers broken by pointer type change in 'struct ↵Kevin P. Fleming
dahdi_span'... wctdm24xxp still broken, will fix in a couple of hours (related to issue #12657) git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4514 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2008-05-22fix up all remaining references to zaptel/zapata (except for the ones in ↵Kevin P. Fleming
credits that need to be left alone) git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4324 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2008-05-21replace ZT_ with DAHDI_, zt_ with dahdi_Kevin P. Fleming
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4320 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2008-05-21modules build nowKevin P. Fleming
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4318 a0bf4364-ded3-4de4-8d8a-66a801d63aff