[asterisk-commits] crichter: trunk r39864 - in /trunk/channels: ./ misdn/

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue Aug 15 12:41:15 MST 2006


Author: crichter
Date: Tue Aug 15 14:41:14 2006
New Revision: 39864

URL: http://svn.digium.com/view/asterisk?rev=39864&view=rev
Log:
removed libbnec dependencies.

Modified:
    trunk/channels/Makefile
    trunk/channels/chan_misdn.c
    trunk/channels/misdn/Makefile
    trunk/channels/misdn/isdn_lib.c

Modified: trunk/channels/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/channels/Makefile?rev=39864&r1=39863&r2=39864&view=diff
==============================================================================
--- trunk/channels/Makefile (original)
+++ trunk/channels/Makefile Tue Aug 15 14:41:14 2006
@@ -47,11 +47,6 @@
   C_MODS:=$(filter-out chan_misdn,$(C_MODS))
 endif
 
-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/lib/libbnec.so),)
-  EC_CFLAGS=-DWITH_BEROEC
-  EC_LIBS=-lbnec
-endif
-
 ifndef OPENH323DIR
   OPENH323DIR=$(HOME)/openh323
 endif
@@ -99,9 +94,9 @@
 misdn/chan_misdn_lib.a:
 	make -C misdn
 
-chan_misdn.o: CFLAGS+=-Imisdn -DCHAN_MISDN_VERSION=\"0.3.0\" $(EC_CFLAGS)
+chan_misdn.o: CFLAGS+=-Imisdn -DCHAN_MISDN_VERSION=\"0.3.0\" 
 
-misdn_config.o: CFLAGS+=-Imisdn -DCHAN_MISDN_VERSION=\"0.3.0\" $(EC_CFLAGS)
+misdn_config.o: CFLAGS+=-Imisdn -DCHAN_MISDN_VERSION=\"0.3.0\" 
 
 chan_misdn.so: chan_misdn.o misdn_config.o misdn/chan_misdn_lib.a
-chan_misdn.so: LIBS+=-lisdnnet -lmISDN -lsuppserv $(EC_LIBS)
+chan_misdn.so: LIBS+=-lisdnnet -lmISDN -lsuppserv 

Modified: trunk/channels/chan_misdn.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_misdn.c?rev=39864&r1=39863&r2=39864&view=diff
==============================================================================
--- trunk/channels/chan_misdn.c (original)
+++ trunk/channels/chan_misdn.c Tue Aug 15 14:41:14 2006
@@ -957,13 +957,6 @@
 			"  --> state: %s\n"
 			"  --> capability: %s\n"
 			"  --> echo_cancel: %d\n"
-#ifdef WITH_BEROEC
-			"  --> bnec_tail: %d\n"
-			"  --> bnec_nlp: %d\n"
-			"  --> bnec_ah: %d\n"
-			"  --> bnec_td: %d\n"
-			"  --> bnec_zerocoeff: %d\n"
-#endif
 			"  --> notone : rx %d tx:%d\n"
 			"  --> bc_hold: %d holded_bc :%d\n",
 			help->ast->name,
@@ -978,13 +971,6 @@
 			bearer2str(bc->capability),
 			bc->ec_enable,
 
-#ifdef WITH_BEROEC
-			bc->bnec_tail,
-			bc->bnec_nlp,
-			bc->bnec_ah,
-			bc->bnec_td,
-			bc->bnec_zero,
-#endif
 			help->norxtone,help->notxtone,
 			bc->holded, help->holded_bc?1:0
 			);
@@ -1663,19 +1649,6 @@
 	}
 #endif
 
-#ifdef WITH_BEROEC
-	misdn_cfg_get(port, MISDN_CFG_BNECHOCANCEL,&bc->bnec_tail, sizeof(int));
-	misdn_cfg_get(port, MISDN_CFG_BNEC_ANTIHOWL, &bc->bnec_ah, sizeof(int));
-	misdn_cfg_get(port, MISDN_CFG_BNEC_NLP, &bc->bnec_nlp, sizeof(int));
-	misdn_cfg_get(port, MISDN_CFG_BNEC_TD, &bc->bnec_td, sizeof(int));
-	misdn_cfg_get(port, MISDN_CFG_BNEC_ADAPT, &bc->bnec_adapt, sizeof(int));
-	misdn_cfg_get(port, MISDN_CFG_BNEC_ZEROCOEFF, &bc->bnec_zero, sizeof(int));
-
-	if (bc->bnec_tail && bc->ec_enable) {
-		ast_log(LOG_WARNING,"Are you sure you wan't to mix BNEC with Zapec ? This might cause bad audio quality!\n");
-		bc->ec_enable=0;
-	}
-#endif
 	return 0;
 }
 
@@ -4914,10 +4887,6 @@
 			if (neglect) {
 				chan_misdn_log(1, ch->bc->port, " --> disabled\n");
 				ch->bc->ec_enable=0;
-
-#ifdef WITH_BEROEC
-				ch->bc->bnec_tail=0;
-#endif
 			} else {
 				ch->bc->ec_enable=1;
 				ch->bc->orig=ch->orginator;

Modified: trunk/channels/misdn/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/channels/misdn/Makefile?rev=39864&r1=39863&r2=39864&view=diff
==============================================================================
--- trunk/channels/misdn/Makefile (original)
+++ trunk/channels/misdn/Makefile Tue Aug 15 14:41:14 2006
@@ -12,11 +12,6 @@
 SOURCES		= isdn_lib.c isdn_msg_parser.c 
 OBJDIR		= .
 OBJS		= isdn_lib.o isdn_msg_parser.o
-
-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/lib/libbnec.so),)
-CFLAGS+=-DBEROEC_VERSION=1
-CFLAGS+=-DWITH_BEROEC
-endif
 
 all: chan_misdn_lib.a 
 

Modified: trunk/channels/misdn/isdn_lib.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/misdn/isdn_lib.c?rev=39864&r1=39863&r2=39864&view=diff
==============================================================================
--- trunk/channels/misdn/isdn_lib.c (original)
+++ trunk/channels/misdn/isdn_lib.c Tue Aug 15 14:41:14 2006
@@ -24,10 +24,6 @@
 int misdn_lib_get_l2_up(struct misdn_stack *stack);
 
 struct misdn_stack* get_misdn_stack( void );
-
-#ifdef WITH_BEROEC
-static int bec_initialized=0;
-#endif
 
 int misdn_lib_port_is_pri(int port)
 {
@@ -2196,14 +2192,6 @@
 		
 		if (jlen < len) {
 			cb_log(7,bc->port,"Jitterbuffer Underrun.\n");
-		} else {
-#ifdef WITH_BEROEC
-			if (bc->ec) {
-				flip_buf_bits(data,len);
-				beroec_cancel_alaw_chunk(bc->ec, data, bc->bframe, len);
-				flip_buf_bits(data,len);
-			}
-#endif
 		}
 		
 		txfrm->prim = DL_DATA|REQUEST;
@@ -3036,10 +3024,6 @@
 
 	if (++mypid>5000) mypid=1;
 	bc->pid=mypid;
-
-#ifdef WITH_BEROEC
-	bc->ec=NULL;
-#endif
 
 #if 0
 	bc->addr=0;
@@ -3750,17 +3734,6 @@
 	midev=te_lib_init();
 	mgr->midev=midev;
 
-#ifdef WITH_BEROEC
-	int bec_ver=beroec_version();
-	if (bec_ver>=BEROEC_VERSION) {
-		beroec_init();
-		bec_initialized=1;
-	} else {
-		cb_log(0,0,"!! Please update the BEROEC binary\n");
-		bec_initialized=0;
-	}
-#endif
-
 	port_count=mISDN_get_stack_count(midev);
   
 	msg_queue_init(&mgr->activatequeue);
@@ -4194,22 +4167,6 @@
 		cb_log(1, stack?stack->port:0, " --> no speech? cannot enable EC\n");
 		return;
 	}
-
-#ifdef WITH_BEROEC
-	if (bc->ec) {
-		cb_log(1, stack?stack->port:0, " --> EC already loaded\n");
-		return;
-	}
-
-	if (!bec_initialized) bc->bnec_tail=0;
-
-	if (bc->bnec_tail) {
-		bc->ec=beroec_new(bc->bnec_tail, BEROEC_SUBBAND,
-		bc->bnec_ah,
-		bc->bnec_td, bc->bnec_zero, bc->bnec_adapt, bc->bnec_nlp);
-	}	
-	return ;
-#endif
 
 	if (bc->ec_enable) {
 		cb_log(1, stack?stack->port:0,"Sending Control ECHOCAN_ON taps:%d training:%d\n",bc->ec_deftaps, bc->ec_training);
@@ -4254,13 +4211,6 @@
 		cb_log(1, stack?stack->port:0, " --> no speech? cannot disable EC\n");
 		return;
 	}
-
-#ifdef WITH_BEROEC
-	if (bc->ec)
-		beroec_destroy(bc->ec);
-	bc->ec=NULL;
-	return;
-#endif
 
 	if ( bc->ec_enable) {
 		cb_log(1, stack?stack->port:0, "Sending Control ECHOCAN_OFF\n");



More information about the asterisk-commits mailing list