diff options
author | Shaun Ruffell <sruffell@digium.com> | 2011-06-02 20:01:40 +0000 |
---|---|---|
committer | Shaun Ruffell <sruffell@digium.com> | 2011-06-02 20:01:40 +0000 |
commit | a5321ae535ea720597e83c23eea34f46c0dc8b26 (patch) | |
tree | 4cd9a31c2f08aacc6cc94820e5bbc63169540440 /include | |
parent | cd419f86a583306c63a461b7e79a52e96c1e20bc (diff) |
dahdi: Update the dahdi_ec_chunk interface to support preec streams.
dahdi_ec_chunk is the function that saves the received audio and places
a signed linear copy of it in the pre echocanceled buffer on the
channel. By splitting the input and output of this function into two
parameters, a driver that can provide separate pre and post ec streams
can pass them independently to DAHDI, without worrying about DAHDI
overwriting a stream that may have already been echocanceled by the
hardware.
Previously, the dahdi_ec_chunk interface took a received audio buffer
and overwrote it after canceling the echo. Now the input and output
from the function are broken up in order to support hardware echocans
that have a different preechocan stream.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9941 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'include')
-rw-r--r-- | include/dahdi/kernel.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/dahdi/kernel.h b/include/dahdi/kernel.h index 56a75cf..41196e4 100644 --- a/include/dahdi/kernel.h +++ b/include/dahdi/kernel.h @@ -1158,8 +1158,14 @@ struct dahdi_tone *dahdi_mf_tone(const struct dahdi_chan *chan, char digit, int as possible. ECHO CANCELLATION IS NO LONGER AUTOMATICALLY DONE AT THE DAHDI LEVEL. dahdi_ec_chunk will not echo cancel if it should not be doing so. rxchunk is modified in-place */ -void _dahdi_ec_chunk(struct dahdi_chan *chan, unsigned char *rxchunk, - const unsigned char *txchunk); +void __dahdi_ec_chunk(struct dahdi_chan *ss, u8 *rxchunk, + const u8 *preecchunk, const u8 *txchunk); + +static inline void _dahdi_ec_chunk(struct dahdi_chan *chan, + u8 *rxchunk, const u8 *txchunk) +{ + __dahdi_ec_chunk(chan, rxchunk, rxchunk, txchunk); +} static inline void dahdi_ec_chunk(struct dahdi_chan *ss, unsigned char *rxchunk, const unsigned char *txchunk) |