summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShaun Ruffell <sruffell@digium.com>2012-01-10 22:05:47 +0000
committerShaun Ruffell <sruffell@digium.com>2012-01-10 22:05:47 +0000
commitc5850b26e848ac1ea8f25b6e848753348ca20dbb (patch)
treeb4c2592fb32e2b9bf7fffeedc18c7b548d4df93f
parent834ec21c57bc044f282bd00d4d38218fbaaee81c (diff)
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@digium.com> Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com> Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10414 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.6@10416 a0bf4364-ded3-4de4-8d8a-66a801d63aff
-rw-r--r--drivers/dahdi/wct4xxp/vpm450m.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/dahdi/wct4xxp/vpm450m.c b/drivers/dahdi/wct4xxp/vpm450m.c
index 64e55a7..867ea1c 100644
--- a/drivers/dahdi/wct4xxp/vpm450m.c
+++ b/drivers/dahdi/wct4xxp/vpm450m.c
@@ -422,6 +422,7 @@ struct vpm450m *init_vpm450m(void *wc, int *isalaw, int numspans, const struct f
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 @@ struct vpm450m *init_vpm450m(void *wc, int *isalaw, int numspans, const struct f
* 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;