From a5321ae535ea720597e83c23eea34f46c0dc8b26 Mon Sep 17 00:00:00 2001 From: Shaun Ruffell Date: Thu, 2 Jun 2011 20:01:40 +0000 Subject: 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 Acked-by: Tzafrir Cohen git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9941 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- include/dahdi/kernel.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'include/dahdi/kernel.h') 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) -- cgit v1.2.3