summaryrefslogtreecommitdiff
path: root/xpp/xbus-pcm.c
diff options
context:
space:
mode:
authortzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2008-03-18 23:51:15 +0000
committertzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2008-03-18 23:51:15 +0000
commit372f53e6237933e5493cc8b87959fa1e5bcd304a (patch)
treec564a87aa185935066500d4df8f59b1f891609a2 /xpp/xbus-pcm.c
parentb0ab92ce27b6eb70b546f7bb8446974c7a77dade (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
Diffstat (limited to 'xpp/xbus-pcm.c')
-rw-r--r--xpp/xbus-pcm.c7
1 files changed, 6 insertions, 1 deletions
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;