[dahdi-commits] sruffell: linux/trunk r10414 - /linux/trunk/drivers/dahdi/wct4xxp/vpm450m.c

SVN commits to the DAHDI project dahdi-commits at lists.digium.com
Tue Jan 10 14:45:38 CST 2012


Author: sruffell
Date: Tue Jan 10 14:45:35 2012
New Revision: 10414

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=10414
Log:
wct4xxp: VPM module creates noise on alternate channels on E1 spans.

The VPMOCT128 module was using the VPMOCT256 timeslots assigments which would
mean that channels that should be marked alaw were being set in ulaw. This
only affected E1 spans since by default all spans are configured for ulaw by
default.

This fixes a regression introduced in r10290 [1] "wct4xxp: Add support for
TE820 and VPMOCT256", first released in 2.6.0, that only affects E1 spans on a
quad and dual-span card when used with the hardware echocanceler.

[1] http://svnview.digium.com/svn/dahdi?view=revision&revision=10290

Internal-Issue-ID: DAHDI-945, DAHLIN-275
Signed-off-by: Shaun Ruffell <sruffell at digium.com>
Acked-by: Russ Meyerriecks <rmeyerriecks at digium.com>

Modified:
    linux/trunk/drivers/dahdi/wct4xxp/vpm450m.c

Modified: linux/trunk/drivers/dahdi/wct4xxp/vpm450m.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/wct4xxp/vpm450m.c?view=diff&rev=10414&r1=10413&r2=10414
==============================================================================
--- linux/trunk/drivers/dahdi/wct4xxp/vpm450m.c (original)
+++ linux/trunk/drivers/dahdi/wct4xxp/vpm450m.c Tue Jan 10 14:45:35 2012
@@ -422,6 +422,7 @@
 	tOCT6100_GET_INSTANCE_SIZE InstanceSize;
 	tOCT6100_CHANNEL_OPEN *ChannelOpen;
 	UINT32 ulResult;
+	const unsigned int mask = (8 == numspans) ? 0x7 : 0x3;
 	unsigned int sout_stream, rout_stream;
 	struct vpm450m *vpm450m;
 	int x,y,law;
@@ -527,7 +528,7 @@
 		 	*  therefore, the lower 2 bits tell us which span this 
 			*  timeslot/channel
 		 	*/
-			if (isalaw[x & 0x07])
+			if (isalaw[x & mask])
 				law = cOCT6100_PCM_A_LAW;
 			else
 				law = cOCT6100_PCM_U_LAW;




More information about the dahdi-commits mailing list