summaryrefslogtreecommitdiff
path: root/drivers/dahdi/wctdm24xxp/base.c
diff options
context:
space:
mode:
authorShaun Ruffell <sruffell@digium.com>2009-05-11 17:48:43 +0000
committerShaun Ruffell <sruffell@digium.com>2009-05-11 17:48:43 +0000
commit12f22f8b8926614982e9031ab366016f49d43869 (patch)
tree135c26c3677ed4eadf8996d32d6d104b68cd76db /drivers/dahdi/wctdm24xxp/base.c
parenta6ebb39e2f623929944d953bb80ae77862732b1c (diff)
voicebus: Update the default vpmadt032 parameters.
Move the echo can channel parameters into a common location for both the wcte12xp and wctdm24xxp drivers that use the voicebus module. This is intended to make it clearer which differences are required between the clients. Additionally, update the default parameters to the new recommended values. VPMADT032-37 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6589 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/wctdm24xxp/base.c')
-rw-r--r--drivers/dahdi/wctdm24xxp/base.c24
1 files changed, 9 insertions, 15 deletions
diff --git a/drivers/dahdi/wctdm24xxp/base.c b/drivers/dahdi/wctdm24xxp/base.c
index abe800c..c4d6b12 100644
--- a/drivers/dahdi/wctdm24xxp/base.c
+++ b/drivers/dahdi/wctdm24xxp/base.c
@@ -215,7 +215,7 @@ static int vpmsupport = 1;
static int vpmnlptype = DEFAULT_NLPTYPE;
static int vpmnlpthresh = DEFAULT_NLPTHRESH;
-static int vpmnlpmaxsupp = DEFAULT_NLPTHRESH;
+static int vpmnlpmaxsupp = DEFAULT_NLPMAXSUPP;
static int echocan_create(struct dahdi_chan *chan, struct dahdi_echocanparams *ecp,
struct dahdi_echocanparam *p, struct dahdi_echocan_state **ec);
@@ -288,6 +288,7 @@ static inline int empty_slot(struct wctdm *wc, int card)
void setchanconfig_from_state(struct vpmadt032 *vpm, int channel, GpakChannelConfig_t *chanconfig)
{
const struct vpmadt032_options *options;
+ GpakEcanParms_t *p;
BUG_ON(!vpm);
@@ -323,20 +324,13 @@ void setchanconfig_from_state(struct vpmadt032 *vpm, int channel, GpakChannelCon
}
chanconfig->FrameRate = rate2ms;
- chanconfig->EcanParametersA.EcanTapLength = 1024;
- chanconfig->EcanParametersA.EcanNlpType = vpm->curecstate[channel].nlp_type;
- chanconfig->EcanParametersA.EcanAdaptEnable = 1;
- chanconfig->EcanParametersA.EcanG165DetEnable = 1;
- chanconfig->EcanParametersA.EcanDblTalkThresh = 6;
- chanconfig->EcanParametersA.EcanNlpThreshold = vpm->curecstate[channel].nlp_threshold;
- chanconfig->EcanParametersA.EcanNlpConv = 0;
- chanconfig->EcanParametersA.EcanNlpUnConv = 0;
- chanconfig->EcanParametersA.EcanNlpMaxSuppress = vpm->curecstate[channel].nlp_max_suppress;
- chanconfig->EcanParametersA.EcanCngThreshold = 43;
- chanconfig->EcanParametersA.EcanAdaptLimit = 50;
- chanconfig->EcanParametersA.EcanCrossCorrLimit = 15;
- chanconfig->EcanParametersA.EcanNumFirSegments = 3;
- chanconfig->EcanParametersA.EcanFirSegmentLen = 48;
+ p = &chanconfig->EcanParametersA;
+
+ vpmadt032_get_default_parameters(p);
+
+ p->EcanNlpType = vpm->curecstate[channel].nlp_type;
+ p->EcanNlpThreshold = vpm->curecstate[channel].nlp_threshold;
+ p->EcanNlpMaxSuppress = vpm->curecstate[channel].nlp_max_suppress;
memcpy(&chanconfig->EcanParametersB,
&chanconfig->EcanParametersA,