From 372f53e6237933e5493cc8b87959fa1e5bcd304a Mon Sep 17 00:00:00 2001 From: tzafrir Date: Tue, 18 Mar 2008 23:51:15 +0000 Subject: * We need to silence the echo-canceller buffers as well. * But no need to cancel echo on channels without PCM. * Switch to FXS hardware DTMF detection again. git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.2@4012 5390a7c7-147a-4af0-8ec9-7488f05a26cb --- xpp/xbus-pcm.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'xpp/xbus-pcm.c') diff --git a/xpp/xbus-pcm.c b/xpp/xbus-pcm.c index 09d50f6..b2dad35 100644 --- a/xpp/xbus-pcm.c +++ b/xpp/xbus-pcm.c @@ -675,6 +675,8 @@ static void do_ec(xpd_t *xpd) for (i = 0;i < xpd->span.channels; i++) { if(unlikely(IS_SET(xpd->digital_signalling, i))) /* Don't echo cancel BRI D-chans */ continue; + if(!IS_SET(xpd->wanted_pcm_mask, i)) /* No ec for unwanted PCM */ + continue; #ifdef XPP_EC_CHUNK /* even if defined, parameterr xpp_ec can override at run-time */ if (xpp_ec) @@ -860,8 +862,11 @@ void generic_card_pcm_tospan(xbus_t *xbus, xpd_t *xpd, xpacket_t *pack) volatile u_char *r = xpd->span.chans[i].readchunk; if(!IS_SET(xpd->wanted_pcm_mask, i)) { - if(IS_SET(xpd->silence_pcm, i)) + if(IS_SET(xpd->silence_pcm, i)) { memset((u_char *)r, 0x7F, ZT_CHUNKSIZE); // SILENCE + memset(xpd->ec_chunk2[i], 0x7F, ZT_CHUNKSIZE); + memset(xpd->ec_chunk1[i], 0x7F, ZT_CHUNKSIZE); + } continue; } pcm_mask &= ~xpd->mute_dtmf; -- cgit v1.2.3