[svn-commits] sruffell: branch linux/sruffell/staging r6505 - /linux/team/sruffell/staging/...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Apr 27 12:52:35 CDT 2009


Author: sruffell
Date: Mon Apr 27 12:52:32 2009
New Revision: 6505

URL: http://svn.digium.com/svn-view/dahdi?view=rev&rev=6505
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/sruffell/staging/drivers/dahdi/dahdi-base.c

Modified: linux/team/sruffell/staging/drivers/dahdi/dahdi-base.c
URL: http://svn.digium.com/svn-view/dahdi/linux/team/sruffell/staging/drivers/dahdi/dahdi-base.c?view=diff&rev=6505&r1=6504&r2=6505
==============================================================================
--- linux/team/sruffell/staging/drivers/dahdi/dahdi-base.c (original)
+++ linux/team/sruffell/staging/drivers/dahdi/dahdi-base.c Mon Apr 27 12:52:32 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