diff options
author | Shaun Ruffell <sruffell@digium.com> | 2009-11-12 19:22:06 +0000 |
---|---|---|
committer | Shaun Ruffell <sruffell@digium.com> | 2009-11-12 19:22:06 +0000 |
commit | 2758d0d1ee49b9d2fd78c6b3f96bdbcf98503fb4 (patch) | |
tree | 125aa22fc4630dfda4835e2ef969b1db5ce370f1 /drivers/dahdi/wctdm24xxp | |
parent | 6dbcb501a17b0b8b84a44a1a76de90d2a2c5936a (diff) |
voicebus: Fix race when enabling/disabling hardware echocan.
This closes a race condition where it was possible for the driver to
believe it has enabled the VPMADT032 when in fact, it really has not.
This fixes a regression introduced in dahdi-linux 2.2.0.
(issue #15724)
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7565 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/wctdm24xxp')
-rw-r--r-- | drivers/dahdi/wctdm24xxp/base.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/dahdi/wctdm24xxp/base.c b/drivers/dahdi/wctdm24xxp/base.c index 0c555f6..bbfaefc 100644 --- a/drivers/dahdi/wctdm24xxp/base.c +++ b/drivers/dahdi/wctdm24xxp/base.c @@ -312,7 +312,8 @@ void setchanconfig_from_state(struct vpmadt032 *vpm, int channel, GpakChannelCon chanconfig->MuteToneB = Disabled; chanconfig->FaxCngDetB = Disabled; - chanconfig->SoftwareCompand = (vpm->desiredecstate[channel].companding == ADT_COMP_ALAW) ? cmpPCMA : cmpPCMU; + chanconfig->SoftwareCompand = (ADT_COMP_ALAW == vpm->companding) ? + cmpPCMA : cmpPCMU; chanconfig->FrameRate = rate2ms; p = &chanconfig->EcanParametersA; @@ -422,7 +423,6 @@ static int config_vpmadt032(struct vpmadt032 *vpm, struct wctdm *wc) vpm->curecstate[i].nlp_threshold = vpm->options.vpmnlpthresh; vpm->curecstate[i].nlp_max_suppress = vpm->options.vpmnlpmaxsupp; vpm->curecstate[i].companding = (wc->span.deflaw == DAHDI_LAW_MULAW) ? ADT_COMP_ULAW : ADT_COMP_ALAW; - memcpy(&vpm->desiredecstate[i], &vpm->curecstate[i], sizeof(vpm->curecstate[i])); /* set_vpmadt032_chanconfig_from_state(&vpm->curecstate[i], &vpm->options, i, &chanconfig); !!! */ vpm->setchanconfig_from_state(vpm, i, &chanconfig); |