[svn-commits] kpfleming: branch linux/kpfleming/echocan_work r6485 - /linux/team/kpfleming/...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sat Apr 25 10:31:07 CDT 2009


Author: kpfleming
Date: Sat Apr 25 10:31:03 2009
New Revision: 6485

URL: http://svn.digium.com/svn-view/dahdi?view=rev&rev=6485
Log:
for echocans that automatically go into and out FAX mode on their own, when an ioctl is issued asking to go into FAX mode (or back out), just mark the mode change without doing anything, as nothing is needed and we don't want to disable the echocan completely


Modified:
    linux/team/kpfleming/echocan_work/drivers/dahdi/dahdi-base.c

Modified: linux/team/kpfleming/echocan_work/drivers/dahdi/dahdi-base.c
URL: http://svn.digium.com/svn-view/dahdi/linux/team/kpfleming/echocan_work/drivers/dahdi/dahdi-base.c?view=diff&rev=6485&r1=6484&r2=6485
==============================================================================
--- linux/team/kpfleming/echocan_work/drivers/dahdi/dahdi-base.c (original)
+++ linux/team/kpfleming/echocan_work/drivers/dahdi/dahdi-base.c Sat Apr 25 10:31:03 2009
@@ -4980,7 +4980,13 @@
 			module_printk(KERN_NOTICE, "Ignoring FAX mode request because of %s for echo canceller already in FAX mode on channel %d\n", reason, channo);
 		else if (chan->ec_state->status.mode != ECHO_MODE_ACTIVE)
 			module_printk(KERN_NOTICE, "Ignoring FAX mode request because of %s for echo canceller not in active mode on channel %d\n", reason, channo);
-		else if (chan->ec_state->features.NLP_toggle) {
+		else if (chan->ec_state->features.NLP_automatic) {
+			/* for echocans that automatically do the right thing, just
+			 * mark it as being in FAX mode without making any
+			 * changes, as none are necessary.
+			*/
+			chan->ec_state->status.mode = ECHO_MODE_FAX;
+		} else if (chan->ec_state->features.NLP_toggle) {
 			module_printk(KERN_NOTICE, "Disabled echo canceller NLP because of %s on channel %d\n", reason, channo);
 			dahdi_qevent_nolock(chan, DAHDI_EVENT_EC_NLP_DISABLED);
 			chan->ec_state->ops->echocan_NLP_toggle(chan->ec_state, 0);
@@ -4997,7 +5003,13 @@
 		else if ((chan->ec_state->status.mode != ECHO_MODE_FAX) &&
 			 (chan->ec_state->status.mode != ECHO_MODE_IDLE))
 			module_printk(KERN_NOTICE, "Ignoring voice mode request because of %s for echo canceller not in FAX or idle mode on channel %d\n", reason, channo);
-		else if (chan->ec_state->features.NLP_toggle) {
+		else if (chan->ec_state->features.NLP_automatic) {
+			/* for echocans that automatically do the right thing, just
+			 * mark it as being in active mode without making any
+			 * changes, as none are necessary.
+			*/
+			chan->ec_state->status.mode = ECHO_MODE_ACTIVE;
+		} else if (chan->ec_state->features.NLP_toggle) {
 			module_printk(KERN_NOTICE, "Enabled echo canceller NLP because of %s on channel %d\n", reason, channo);
 			dahdi_qevent_nolock(chan, DAHDI_EVENT_EC_NLP_ENABLED);
 			chan->ec_state->ops->echocan_NLP_toggle(chan->ec_state, 1);




More information about the svn-commits mailing list