diff options
author | tzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2008-03-18 23:51:15 +0000 |
---|---|---|
committer | tzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2008-03-18 23:51:15 +0000 |
commit | 372f53e6237933e5493cc8b87959fa1e5bcd304a (patch) | |
tree | c564a87aa185935066500d4df8f59b1f891609a2 | |
parent | b0ab92ce27b6eb70b546f7bb8446974c7a77dade (diff) |
* 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
-rw-r--r-- | xpp/card_fxs.c | 2 | ||||
-rw-r--r-- | xpp/xbus-pcm.c | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/xpp/card_fxs.c b/xpp/card_fxs.c index 8e61629..c6168c6 100644 --- a/xpp/card_fxs.c +++ b/xpp/card_fxs.c @@ -36,7 +36,7 @@ static const char rcsid[] = "$Id$"; DEF_PARM(int, print_dbg, 0, 0644, "Print DBG statements"); /* must be before zap_debug.h */ DEF_PARM_BOOL(reversepolarity, 0, 0644, "Reverse Line Polarity"); DEF_PARM_BOOL(vmwineon, 0, 0644, "Indicate voicemail to a neon lamp"); -DEF_PARM_BOOL(dtmf_detection, 0, 0644, "Do DTMF detection in hardware"); +DEF_PARM_BOOL(dtmf_detection, 1, 0644, "Do DTMF detection in hardware"); #ifdef POLL_DIGITAL_INPUTS DEF_PARM(uint, poll_digital_inputs, 1000, 0644, "Poll Digital Inputs"); #endif 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; |