[svn-commits] sruffell: linux/trunk r9642 - /linux/trunk/drivers/dahdi/dahdi-base.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Tue Jan 18 14:25:30 CST 2011
Author: sruffell
Date: Tue Jan 18 14:25:26 2011
New Revision: 9642
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9642
Log:
dahdi: Fix recent regression with native bridging.
This fixes a regression introduced in r9603. That commit removed
DAHDI_CONF_DIGITALMON handling (which is used to natively bridge two
channels that cannot be crossed in the board driver / hardware) since I
mistakenly thought that it was only part of the DACS handling. The
symptom of the regression is muted audio when Asterisk tries to natively
bridge two channels.
Signed-off-by: Shaun Ruffell <sruffell at digium.com>
Modified:
linux/trunk/drivers/dahdi/dahdi-base.c
Modified: linux/trunk/drivers/dahdi/dahdi-base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/dahdi-base.c?view=diff&rev=9642&r1=9641&r2=9642
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi-base.c (original)
+++ linux/trunk/drivers/dahdi/dahdi-base.c Tue Jan 18 14:25:26 2011
@@ -1444,6 +1444,8 @@
oldconf = chan->confna;
/* initialize conference variables */
chan->_confn = 0;
+ chan->confna = 0;
+ chan->confmode = 0;
if ((chan->sig & __DAHDI_SIG_DACS) != __DAHDI_SIG_DACS)
chan->dacs_chan = NULL;
@@ -2084,7 +2086,8 @@
if (((pos->confna == chan->channo) &&
is_monitor_mode(pos->confmode)) ||
- (pos->dacs_chan == chan)) {
+ (pos->dacs_chan == chan) ||
+ (pos->conf_chan == chan)) {
/* Take them out of conference with us */
/* release conference resource if any */
if (pos->confna)
@@ -6974,6 +6977,30 @@
for (x=0;x<DAHDI_CHUNKSIZE;x++)
txb[x] = DAHDI_LIN2X(getlin[x], ms);
break;
+ case DAHDI_CONF_DIGITALMON:
+ /* Real digital monitoring, but still echo cancel if
+ * desired */
+ if (!conf_chan)
+ break;
+ if (is_pseudo_chan(conf_chan)) {
+ if (ms->ec_state) {
+ for (x = 0; x < DAHDI_CHUNKSIZE; x++)
+ txb[x] = DAHDI_LIN2X(conf_chan->getlin[x], ms);
+ } else {
+ memcpy(txb, conf_chan->getraw, DAHDI_CHUNKSIZE);
+ }
+ } else {
+ if (ms->ec_state) {
+ for (x = 0; x < DAHDI_CHUNKSIZE; x++)
+ txb[x] = DAHDI_LIN2X(conf_chan->putlin[x], ms);
+ } else {
+ memcpy(txb, conf_chan->putraw,
+ DAHDI_CHUNKSIZE);
+ }
+ }
+ for (x = 0; x < DAHDI_CHUNKSIZE; x++)
+ getlin[x] = DAHDI_XLAW(txb[x], ms);
+ break;
}
}
if (ms->confmute || (ms->ec_state && (ms->ec_state->status.mode) & __ECHO_MODE_MUTE)) {
@@ -8049,6 +8076,16 @@
for (x=0;x<DAHDI_CHUNKSIZE;x++)
rxb[x] = DAHDI_LIN2X((int)conf_sums_prev[ms->_confn][x], ms);
break;
+ case DAHDI_CONF_DIGITALMON:
+ /* if not a pseudo-channel, ignore */
+ if (!is_pseudo_chan(ms))
+ break;
+ /* Add monitored channel */
+ if (is_pseudo_chan(conf_chan))
+ memcpy(rxb, conf_chan->getraw, DAHDI_CHUNKSIZE);
+ else
+ memcpy(rxb, conf_chan->putraw, DAHDI_CHUNKSIZE);
+ break;
}
}
}
More information about the svn-commits
mailing list