diff options
author | Shaun Ruffell <sruffell@digium.com> | 2010-02-26 16:40:43 +0000 |
---|---|---|
committer | Shaun Ruffell <sruffell@digium.com> | 2010-02-26 16:40:43 +0000 |
commit | d06583abaa40a5183296e97b1d0e25d06684f765 (patch) | |
tree | 75bcefa96649ccd8f6eb0ac83bea243edcc46995 /drivers/dahdi/wcte12xp/base.c | |
parent | 19399c505226dcae9cfaec0ab53889481f3ab819 (diff) |
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
Diffstat (limited to 'drivers/dahdi/wcte12xp/base.c')
-rw-r--r-- | drivers/dahdi/wcte12xp/base.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/dahdi/wcte12xp/base.c b/drivers/dahdi/wcte12xp/base.c index 7d0a8c7..38efdfa 100644 --- a/drivers/dahdi/wcte12xp/base.c +++ b/drivers/dahdi/wcte12xp/base.c @@ -344,7 +344,7 @@ static int config_vpmadt032(struct vpmadt032 *vpm, struct t1 *wc) configportstatus); return -1; } else { - if (vpm->options.debug & DEBUG_ECHOCAN) + if (vpm->options.debug & DEBUG_VPMADT032_ECHOCAN) t1_info(wc, "Configured McBSP ports successfully\n"); } @@ -353,14 +353,11 @@ 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 = vpm->companding; vpm->setchanconfig_from_state(vpm, channel, &chanconfig); if ((res = gpakConfigureChannel(vpm->dspid, channel, tdmToTdm, &chanconfig, &cstatus))) { @@ -1198,6 +1195,8 @@ static int echocan_create(struct dahdi_chan *chan, struct dahdi_echocanparams *e struct dahdi_echocanparam *p, struct dahdi_echocan_state **ec) { struct t1 *wc = chan->pvt; + enum adt_companding comp; + if (!wc->vpmadt032) { return -ENODEV; } @@ -1206,8 +1205,11 @@ static int echocan_create(struct dahdi_chan *chan, struct dahdi_echocanparams *e (*ec)->ops = &vpm150m_ec_ops; (*ec)->features = vpm150m_ec_features; + comp = (DAHDI_LAW_ALAW == chan->span->deflaw) ? + ADT_COMP_ALAW : ADT_COMP_ULAW; + return vpmadt032_echocan_create(wc->vpmadt032, chan->chanpos - 1, - ecp, p); + comp, ecp, p); } static void echocan_free(struct dahdi_chan *chan, struct dahdi_echocan_state *ec) |