summaryrefslogtreecommitdiff
path: root/kernel/xpp
diff options
context:
space:
mode:
authortzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2008-03-19 01:19:01 +0000
committertzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2008-03-19 01:19:01 +0000
commit469b3b66a5bfe416ef5140e4476e9a812bf4d809 (patch)
treec6a470bcd78b04cfb30398516a53c8fb0914660e /kernel/xpp
parenta23b66e49f5aca25aaf248c3ebe5fbc699955a50 (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. Merged revisions 4012 via svnmerge from http://svn.digium.com/svn/zaptel/branches/1.2 git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.4@4013 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'kernel/xpp')
-rw-r--r--kernel/xpp/card_fxs.c2
-rw-r--r--kernel/xpp/xbus-pcm.c7
2 files changed, 7 insertions, 2 deletions
diff --git a/kernel/xpp/card_fxs.c b/kernel/xpp/card_fxs.c
index 8e61629..c6168c6 100644
--- a/kernel/xpp/card_fxs.c
+++ b/kernel/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/kernel/xpp/xbus-pcm.c b/kernel/xpp/xbus-pcm.c
index 09d50f6..b2dad35 100644
--- a/kernel/xpp/xbus-pcm.c
+++ b/kernel/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;