summaryrefslogtreecommitdiff
path: root/drivers/dahdi/voicebus
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/dahdi/voicebus')
-rw-r--r--drivers/dahdi/voicebus/GpakApi.h2
-rw-r--r--drivers/dahdi/voicebus/GpakCust.c27
-rw-r--r--drivers/dahdi/voicebus/GpakCust.h10
3 files changed, 34 insertions, 5 deletions
diff --git a/drivers/dahdi/voicebus/GpakApi.h b/drivers/dahdi/voicebus/GpakApi.h
index 91aade0..ef16d63 100644
--- a/drivers/dahdi/voicebus/GpakApi.h
+++ b/drivers/dahdi/voicebus/GpakApi.h
@@ -43,7 +43,7 @@ typedef union
} 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
diff --git a/drivers/dahdi/voicebus/GpakCust.c b/drivers/dahdi/voicebus/GpakCust.c
index d5bbadd..72319c8 100644
--- a/drivers/dahdi/voicebus/GpakCust.c
+++ b/drivers/dahdi/voicebus/GpakCust.c
@@ -395,9 +395,8 @@ vpmadt032_alloc(struct vpmadt032_options *options, const char *board_name)
/* Add a little extra to store the wq_name. */
vpm = kzalloc(sizeof(*vpm) + length, GFP_KERNEL);
- if (!vpm) {
+ if (!vpm)
return NULL;
- }
strcpy(vpm->wq_name, board_name);
strcat(vpm->wq_name, suffix);
@@ -545,6 +544,30 @@ failed_exit:
}
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)
{
diff --git a/drivers/dahdi/voicebus/GpakCust.h b/drivers/dahdi/voicebus/GpakCust.h
index bdb9cfb..9b4f6a8 100644
--- a/drivers/dahdi/voicebus/GpakCust.h
+++ b/drivers/dahdi/voicebus/GpakCust.h
@@ -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 @@ int vpmadt032_echocan_create(struct vpmadt032 *vpm, int channo,
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)
{