From 328cd0fbc6b35cdbb069cd0f309e45bd7320ca1c Mon Sep 17 00:00:00 2001 From: Shaun Ruffell Date: Sat, 27 Feb 2010 01:16:23 +0000 Subject: dahdi: Add option to disable the EC disable tone detection algorithm. Define CONFIG_DAHDI_NO_ECHOCAN_DISABLE in include/dahdi/dahdi_config.h in order to prevent the tone detector from disabling software echocan. I slightly modified the noechodisable.patch. (closes issue #16805) Reported by: sles Patches: noechodisable.patch uploaded by sles (license 991) git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8162 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- drivers/dahdi/dahdi-base.c | 4 ++++ include/dahdi/dahdi_config.h | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/drivers/dahdi/dahdi-base.c b/drivers/dahdi/dahdi-base.c index 34eddd5..673b84e 100644 --- a/drivers/dahdi/dahdi-base.c +++ b/drivers/dahdi/dahdi-base.c @@ -6181,6 +6181,7 @@ static inline void __dahdi_process_getaudio_chunk(struct dahdi_chan *ss, unsigne for (x=0;xec_state && (ms->ec_state->status.mode == ECHO_MODE_ACTIVE) && !ms->ec_state->features.CED_tx_detect) { for (x = 0; x < DAHDI_CHUNKSIZE; x++) { if (echo_can_disable_detector_update(&ms->ec_state->txecdis, getlin[x])) { @@ -6190,6 +6191,7 @@ static inline void __dahdi_process_getaudio_chunk(struct dahdi_chan *ss, unsigne } } } +#endif if ((!ms->confmute && !ms->dialing) || (ms->flags & DAHDI_FLAG_PSEUDO)) { /* Handle conferencing on non-clear channel and non-HDLC channels */ @@ -7213,6 +7215,7 @@ static inline void __dahdi_process_putaudio_chunk(struct dahdi_chan *ss, unsigne putlin[x] = DAHDI_XLAW(rxb[x], ms); } +#ifndef CONFIG_DAHDI_NO_ECHOCAN_DISABLE if (ms->ec_state && (ms->ec_state->status.mode == ECHO_MODE_ACTIVE) && !ms->ec_state->features.CED_rx_detect) { for (x = 0; x < DAHDI_CHUNKSIZE; x++) { if (echo_can_disable_detector_update(&ms->ec_state->rxecdis, putlin[x])) { @@ -7222,6 +7225,7 @@ static inline void __dahdi_process_putaudio_chunk(struct dahdi_chan *ss, unsigne } } } +#endif /* if doing rx tone decoding */ if (ms->rxp1 && ms->rxp2 && ms->rxp3) diff --git a/include/dahdi/dahdi_config.h b/include/dahdi/dahdi_config.h index a487e4f..befe845 100644 --- a/include/dahdi/dahdi_config.h +++ b/include/dahdi/dahdi_config.h @@ -119,6 +119,13 @@ */ #define CONFIG_DAHDI_CORE_TIMER +/* + * Define CONFIG_DAHDI_NO_ECHOCAN_DISABLE to prevent the 2100Hz tone detector + * from disabling any installed software echocan. + * + */ +/* #define CONFIG_DAHDI_NO_ECHOCAN_DISABLE */ + /* * Uncomment if you happen have an early TDM400P Rev H which * sometimes forgets its PCI ID to have wcfxs match essentially all -- cgit v1.2.3