Index: dahdi-base.c =================================================================== --- dahdi-base.c (revision 4971) +++ dahdi-base.c (working copy) @@ -7390,6 +7414,8 @@ static inline void __dahdi_real_transmit(struct dahdi_chan *chan) { + short txlins[DAHDI_CHUNKSIZE]; + int x; /* Called with chan->lock held */ #ifdef OPTIMIZE_CHANMUTE if(likely(chan->chanmute)) @@ -7401,6 +7427,19 @@ } else { __dahdi_transmit_chunk(chan, chan->writechunk); } + + if (!chan->ec_current) return; + if (!chan->ec_current->echo_can_array_hpf_tx) return; + + /* hook to allow HPF filtering of audio leaving tx (D/A) port, this + inproves performance when using soft phones */ + for (x = 0; x < DAHDI_CHUNKSIZE; x++) + txlins[x] = DAHDI_XLAW(chan->writechunk[x], chan); + + chan->ec_current->echo_can_array_hpf_tx(chan->ec_state, txlins); + + for (x = 0; x < DAHDI_CHUNKSIZE; x++) + chan->writechunk[x] = DAHDI_LIN2X((int) txlins[x], chan); } static void __dahdi_getempty(struct dahdi_chan *ms, unsigned char *buf)