[svn-commits] sruffell: branch linux/sruffell/vpmadt032-37 r6588 - in /linux/team/sruffell/...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon May 11 11:31:49 CDT 2009


Author: sruffell
Date: Mon May 11 11:31:45 2009
New Revision: 6588

URL: http://svn.asterisk.org/svn-view/dahdi?view=rev&rev=6588
Log:
Testing

Modified:
    linux/team/sruffell/vpmadt032-37/drivers/dahdi/voicebus/GpakApi.h
    linux/team/sruffell/vpmadt032-37/drivers/dahdi/voicebus/GpakCust.c
    linux/team/sruffell/vpmadt032-37/drivers/dahdi/voicebus/GpakCust.h
    linux/team/sruffell/vpmadt032-37/drivers/dahdi/wctdm24xxp/base.c
    linux/team/sruffell/vpmadt032-37/drivers/dahdi/wcte12xp/base.c

Modified: linux/team/sruffell/vpmadt032-37/drivers/dahdi/voicebus/GpakApi.h
URL: http://svn.asterisk.org/svn-view/dahdi/linux/team/sruffell/vpmadt032-37/drivers/dahdi/voicebus/GpakApi.h?view=diff&rev=6588&r1=6587&r2=6588
==============================================================================
--- linux/team/sruffell/vpmadt032-37/drivers/dahdi/voicebus/GpakApi.h (original)
+++ linux/team/sruffell/vpmadt032-37/drivers/dahdi/voicebus/GpakApi.h Mon May 11 11:31:45 2009
@@ -43,7 +43,7 @@
 } GpakAsyncEventData_t;
 
 /* Definition of an Echo Canceller Parameters information structure. */
-typedef struct
+typedef struct GpakEcanParms
 {
     short int EcanTapLength;       // Echo Can Num Taps (tail length) 
     short int EcanNlpType;         // Echo Can NLP Type 

Modified: linux/team/sruffell/vpmadt032-37/drivers/dahdi/voicebus/GpakCust.c
URL: http://svn.asterisk.org/svn-view/dahdi/linux/team/sruffell/vpmadt032-37/drivers/dahdi/voicebus/GpakCust.c?view=diff&rev=6588&r1=6587&r2=6588
==============================================================================
--- linux/team/sruffell/vpmadt032-37/drivers/dahdi/voicebus/GpakCust.c (original)
+++ linux/team/sruffell/vpmadt032-37/drivers/dahdi/voicebus/GpakCust.c Mon May 11 11:31:45 2009
@@ -545,6 +545,30 @@
 }
 EXPORT_SYMBOL(vpmadt032_init);
 
+void vpmadt032_get_default_parameters(struct GpakEcanParms *p)
+{
+	memset(p, 0, sizeof(*p));
+
+	p->EcanTapLength = 1024;
+	p->EcanNlpType = DEFAULT_NLPTYPE;
+	p->EcanAdaptEnable = 1;
+	p->EcanG165DetEnable = 1;
+	p->EcanDblTalkThresh = 6;
+	p->EcanMaxDoubleTalkThres = 40;
+	p->EcanNlpThreshold = DEFAULT_NLPTHRESH;
+	p->EcanNlpConv = 0;
+	p->EcanNlpUnConv = 12;
+	p->EcanNlpMaxSuppress = DEFAULT_NLPMAXSUPP;
+	p->EcanCngThreshold = 43;
+	p->EcanAdaptLimit = 50;
+	p->EcanCrossCorrLimit = 15;
+	p->EcanNumFirSegments = 3;
+	p->EcanFirSegmentLen = 48;
+	p->EcanReconvergenceCheckEnable = 2;
+	p->EcanTandemOperationEnable = 0;
+	p->EcanMixedFourWireMode = 0;
+}
+EXPORT_SYMBOL(vpmadt032_get_default_parameters);
 
 void vpmadt032_free(struct vpmadt032 *vpm)
 {

Modified: linux/team/sruffell/vpmadt032-37/drivers/dahdi/voicebus/GpakCust.h
URL: http://svn.asterisk.org/svn-view/dahdi/linux/team/sruffell/vpmadt032-37/drivers/dahdi/voicebus/GpakCust.h?view=diff&rev=6588&r1=6587&r2=6588
==============================================================================
--- linux/team/sruffell/vpmadt032-37/drivers/dahdi/voicebus/GpakCust.h (original)
+++ linux/team/sruffell/vpmadt032-37/drivers/dahdi/voicebus/GpakCust.h Mon May 11 11:31:45 2009
@@ -77,10 +77,13 @@
 #define NLPTYPE_RANDOM_NOISE 	2
 #define HOTH_NOISE_NLPTYPE 	3
 #define NLPTYPE_SUPPRESS	4
-#define DEFAULT_NLPTYPE 	NLPTYPE_SUPPRESS
+#define NLPTYPE_RESERVED	5
+#define NLPTYPE_AUTOSUPPRESS	6
+#define DEFAULT_NLPTYPE 	NLPTYPE_AUTOSUPPRESS
 
 /* This is the threshold (in dB) for enabling and disabling of the NLP */
-#define DEFAULT_NLPTHRESH		24
+#define DEFAULT_NLPTHRESH		22
+#define DEFAULT_NLPMAXSUPP		10
 
 struct vpmadt032_cmd {
 	struct list_head node;
@@ -145,6 +148,9 @@
 void vpmadt032_echocan_free(struct vpmadt032 *vpm, struct dahdi_chan *chan,
 	struct dahdi_echocan_state *ec);
 
+struct GpakEcanParms;
+void vpmadt032_get_default_parameters(struct GpakEcanParms *p);
+
 /* If there is a command ready to go to the VPMADT032, return it, otherwise NULL */
 static inline struct vpmadt032_cmd *vpmadt032_get_ready_cmd(struct vpmadt032 *vpm)
 {

Modified: linux/team/sruffell/vpmadt032-37/drivers/dahdi/wctdm24xxp/base.c
URL: http://svn.asterisk.org/svn-view/dahdi/linux/team/sruffell/vpmadt032-37/drivers/dahdi/wctdm24xxp/base.c?view=diff&rev=6588&r1=6587&r2=6588
==============================================================================
--- linux/team/sruffell/vpmadt032-37/drivers/dahdi/wctdm24xxp/base.c (original)
+++ linux/team/sruffell/vpmadt032-37/drivers/dahdi/wctdm24xxp/base.c Mon May 11 11:31:45 2009
@@ -215,7 +215,7 @@
 
 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 @@
 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 @@
 	}
 		
 	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,

Modified: linux/team/sruffell/vpmadt032-37/drivers/dahdi/wcte12xp/base.c
URL: http://svn.asterisk.org/svn-view/dahdi/linux/team/sruffell/vpmadt032-37/drivers/dahdi/wcte12xp/base.c?view=diff&rev=6588&r1=6587&r2=6588
==============================================================================
--- linux/team/sruffell/vpmadt032-37/drivers/dahdi/wcte12xp/base.c (original)
+++ linux/team/sruffell/vpmadt032-37/drivers/dahdi/wcte12xp/base.c Mon May 11 11:31:45 2009
@@ -1291,6 +1291,7 @@
 static void setchanconfig_from_state(struct vpmadt032 *vpm, int channel, GpakChannelConfig_t *chanconfig)
 {
 	const struct vpmadt032_options *options;
+	GpakEcanParms_t *p;
 
 	BUG_ON(!vpm);
 
@@ -1316,25 +1317,14 @@
 	chanconfig->SoftwareCompand = cmpPCMU;
 
 	chanconfig->FrameRate = rate10ms;
-	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.EcanMaxDoubleTalkThres = 40;
-	chanconfig->EcanParametersA.EcanNlpThreshold = vpm->curecstate[channel].nlp_threshold;
-	chanconfig->EcanParametersA.EcanNlpConv = 0;
-	chanconfig->EcanParametersA.EcanNlpUnConv = 12;
-	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;
-	chanconfig->EcanParametersA.EcanReconvergenceCheckEnable = 1;
-	chanconfig->EcanParametersA.EcanTandemOperationEnable = 1;
-	chanconfig->EcanParametersA.EcanMixedFourWireMode = 1;
-
+
+	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,




More information about the svn-commits mailing list