From d06583abaa40a5183296e97b1d0e25d06684f765 Mon Sep 17 00:00:00 2001 From: Shaun Ruffell Date: Fri, 26 Feb 2010 16:40:43 +0000 Subject: wctdm24xxp, wcte12xp: Updating the interface for the VPMADT032. This description needs to be filled in more. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8121 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- drivers/dahdi/wctdm24xxp/base.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'drivers/dahdi/wctdm24xxp') diff --git a/drivers/dahdi/wctdm24xxp/base.c b/drivers/dahdi/wctdm24xxp/base.c index 3b6078a..ce6799e 100644 --- a/drivers/dahdi/wctdm24xxp/base.c +++ b/drivers/dahdi/wctdm24xxp/base.c @@ -326,8 +326,10 @@ setchanconfig_from_state(struct vpmadt032 *vpm, int channel, chanconfig->MuteToneB = Disabled; chanconfig->FaxCngDetB = Disabled; - chanconfig->SoftwareCompand = (ADT_COMP_ALAW == vpm->companding) ? - cmpPCMA : cmpPCMU; + /* The software companding will be overridden on a channel by channel + * basis when the channel is enabled. */ + chanconfig->SoftwareCompand = cmpPCMU; + chanconfig->FrameRate = rate2ms; p = &chanconfig->EcanParametersA; @@ -431,9 +433,6 @@ static int config_vpmadt032(struct vpmadt032 *vpm, struct wctdm *wc) return -1; } - vpm->companding = (wc->span.deflaw == DAHDI_LAW_MULAW) ? - ADT_COMP_ULAW : ADT_COMP_ALAW; - for (i = 0; i < vpm->options.channels; ++i) { vpm->curecstate[i].tap_length = 0; vpm->curecstate[i].nlp_type = vpm->options.vpmnlptype; @@ -1830,8 +1829,13 @@ static int echocan_create(struct dahdi_chan *chan, struct dahdi_echocanparams *e wctdm_vpm_out(wc, unit, channel, 0x3e); return 0; } else if (wc->vpmadt032) { + enum adt_companding comp; + + comp = (DAHDI_LAW_ALAW == chan->span->deflaw) ? + ADT_COMP_ALAW : ADT_COMP_ULAW; + return vpmadt032_echocan_create(wc->vpmadt032, - chan->chanpos-1, ecp, p); + chan->chanpos-1, comp, ecp, p); } else { return -ENODEV; } -- cgit v1.2.3