From 46c56582645dd5fff080df9a28fdf191af0be3b0 Mon Sep 17 00:00:00 2001 From: Shaun Ruffell Date: Thu, 12 Nov 2009 23:45:46 +0000 Subject: Merged revisions 7582 via svnmerge from https://origsvn.digium.com/svn/dahdi/linux/trunk ........ r7582 | sruffell | 2009-11-12 17:19:13 -0600 (Thu, 12 Nov 2009) | 1 line wcte12xp, voicebus: Set the companding mode correctly on E1. ........ git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.2@7584 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- drivers/dahdi/voicebus/GpakCust.c | 1 + drivers/dahdi/wcte12xp/base.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/dahdi/voicebus/GpakCust.c b/drivers/dahdi/voicebus/GpakCust.c index ec23336..b9964cf 100644 --- a/drivers/dahdi/voicebus/GpakCust.c +++ b/drivers/dahdi/voicebus/GpakCust.c @@ -442,6 +442,7 @@ int vpmadt032_echocan_create(struct vpmadt032 *vpm, int channo, * module. Instead, it uses tap_length to enable or disable the echo * cancellation. */ order->params.tap_length = (ecp->tap_length) ? 1 : 0; + order->params.companding = vpm->companding; order->channel = channo; vpmadt032_check_and_schedule_update(vpm, order); diff --git a/drivers/dahdi/wcte12xp/base.c b/drivers/dahdi/wcte12xp/base.c index ae9c975..c0164db 100644 --- a/drivers/dahdi/wcte12xp/base.c +++ b/drivers/dahdi/wcte12xp/base.c @@ -349,12 +349,14 @@ static int config_vpmadt032(struct vpmadt032 *vpm, struct t1 *wc) return -1; } + vpm->companding = (TYPE_T1 == wc->spantype) ? + ADT_COMP_ULAW : ADT_COMP_ALAW; for (channel = 0; channel < ARRAY_SIZE(vpm->curecstate); ++channel) { vpm->curecstate[channel].tap_length = 0; vpm->curecstate[channel].nlp_type = vpm->options.vpmnlptype; vpm->curecstate[channel].nlp_threshold = vpm->options.vpmnlpthresh; vpm->curecstate[channel].nlp_max_suppress = vpm->options.vpmnlpmaxsupp; - vpm->curecstate[channel].companding = (wc->spantype == TYPE_T1) ? ADT_COMP_ULAW : ADT_COMP_ALAW; + vpm->curecstate[channel].companding = vpm->companding; vpm->setchanconfig_from_state(vpm, channel, &chanconfig); if ((res = gpakConfigureChannel(vpm->dspid, channel, tdmToTdm, &chanconfig, &cstatus))) { -- cgit v1.2.3