summaryrefslogtreecommitdiff
path: root/wctdm24xxp
diff options
context:
space:
mode:
authormattf <mattf@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2008-03-14 16:32:55 +0000
committermattf <mattf@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2008-03-14 16:32:55 +0000
commitb0ab92ce27b6eb70b546f7bb8446974c7a77dade (patch)
tree4fa80ac13aad83d4e8009638744337243c98b717 /wctdm24xxp
parent36fa7db5c5ef27ec0b0554c40740d26703a9a0a9 (diff)
Update wctdm24xxp's VPMADT032 firmware to version 1.16
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.2@3988 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'wctdm24xxp')
-rw-r--r--wctdm24xxp/GpakApi.c46
-rw-r--r--wctdm24xxp/GpakApi.h3
-rw-r--r--wctdm24xxp/VPMADT032.binbin60980 -> 61370 bytes
-rw-r--r--wctdm24xxp/base.c10
-rw-r--r--wctdm24xxp/gpakErrs.h3
5 files changed, 27 insertions, 35 deletions
diff --git a/wctdm24xxp/GpakApi.c b/wctdm24xxp/GpakApi.c
index abdb09f..8f03c7f 100644
--- a/wctdm24xxp/GpakApi.c
+++ b/wctdm24xxp/GpakApi.c
@@ -32,10 +32,9 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-
+
#include <linux/version.h>
#include <asm/semaphore.h>
-
#include "zaptel.h"
#include "GpakHpi.h"
@@ -129,12 +128,10 @@ static int CheckDspReset(
DSP_ADDRESS IfBlockPntr; /* Interface Block pointer */
DSP_WORD DspStatus; /* DSP Status */
DSP_WORD DspChannels; /* number of DSP channels */
- DSP_WORD Temp[2];
-#if 0
DSP_WORD DspConfs; /* number of DSP conferences */
DSP_ADDRESS PktBufrMem; /* address of Packet Buffer */
+ DSP_WORD Temp[2];
unsigned short int i; /* loop index / counter */
-#endif
/* Read the pointer to the Interface Block. */
gpakReadDspMemory(DspId, DSP_IFBLK_ADDRESS, 2, Temp);
@@ -563,7 +560,7 @@ gpakConfigPortStatus_t gpakConfigurePorts(
((pPortConfig->RxFrameSyncPolarity2 << 4) & 0x0010) |
((pPortConfig->TxFrameSyncPolarity2 << 3) & 0x0008) |
((pPortConfig->CompandingMode2 << 1) & 0x0006) |
- (pPortConfig->SerialWordSize1 & 0x0001));
+ (pPortConfig->SerialWordSize2 & 0x0001));
MsgBuffer[12] = (DSP_WORD)
(((pPortConfig->DxDelay3 << 11) & 0x0800) |
@@ -735,8 +732,16 @@ gpakConfigChanStatus_t gpakConfigureChannel(
pChanConfig->EcanParametersB.EcanNumFirSegments;
MsgBuffer[34] = (DSP_WORD)
pChanConfig->EcanParametersB.EcanFirSegmentLen;
-
- MsgLength = 70; // byte number == 35*2
+ MsgBuffer[35] = (DSP_WORD)
+ pChanConfig->EcanParametersA.EcanTandemOperationEnable;
+ MsgBuffer[36] = (DSP_WORD)
+ pChanConfig->EcanParametersA.EcanMixedFourWireMode;
+ MsgBuffer[37] = (DSP_WORD)
+ pChanConfig->EcanParametersB.EcanTandemOperationEnable;
+ MsgBuffer[38] = (DSP_WORD)
+ pChanConfig->EcanParametersB.EcanMixedFourWireMode;
+
+ MsgLength = 78; // byte number == 39*2
break;
@@ -892,32 +897,21 @@ gpakReadEventFIFOMessageStat_t gpakReadEventFIFOMessage(
DSP_WORD TakeIndex; /* event fifo take index */
DSP_WORD WordsReady; /* number words ready for read out of event fifo */
DSP_WORD EventError; /* flag indicating error with event fifo msg */
-#if 0
DSP_WORD *pDebugData; /* debug data buffer pointer in event data struct */
-#endif
/* Make sure the DSP Id is valid. */
- if (DspId >= MAX_DSP_CORES) {
-#if 0
- printk("Invalid DSP\n");
-#endif
+ if (DspId >= MAX_DSP_CORES)
return (RefInvalidDsp);
- }
/* Lock access to the DSP. */
gpakLockAccess(DspId);
-#if 1
/* Check if the DSP was reset and is ready. */
if (CheckDspReset(DspId) == -1)
{
gpakUnlockAccess(DspId);
-#if 0
- printk("CheckDspReset failed (DspId %d)\n", DspId);
-#endif
return (RefDspCommFailure);
}
-#endif
/* Check if an event message is ready in the DSP. */
EventInfoAddress = pEventFifoAddress[DspId];
@@ -958,9 +952,6 @@ gpakReadEventFIFOMessageStat_t gpakReadEventFIFOMessage(
if (EventDataLength > WORD_BUFFER_SIZE)
{
gpakUnlockAccess(DspId);
-#if 0
- printk("EventDataLength > WORD_BUFFER_SIZE (%d)\n", EventDataLength);
-#endif
return (RefInvalidEvent);
}
ReadCircBuffer(DspId, BufrBaseAddress, BufrLastAddress, &TakeAddress,
@@ -973,18 +964,11 @@ gpakReadEventFIFOMessageStat_t gpakReadEventFIFOMessage(
TakeIndex += EventDataLength;
if (TakeIndex >= BufrSize)
TakeIndex -= BufrSize;
- if (EventDataLength != 4) {
-#if 0
- printk("EventDataLength != 4 it's %d\n", EventDataLength);
-#endif
+ if (EventDataLength != 4)
EventError = 1;
- }
break;
default:
-#if 0
- printk("Event Code not in switch\n");
-#endif
EventError = 1;
break;
};
diff --git a/wctdm24xxp/GpakApi.h b/wctdm24xxp/GpakApi.h
index df57c09..a435db3 100644
--- a/wctdm24xxp/GpakApi.h
+++ b/wctdm24xxp/GpakApi.h
@@ -77,6 +77,9 @@ typedef struct
short int EcanCrossCorrLimit; // Echo Can Cross Correlation limit
short int EcanNumFirSegments; // Echo Can Num FIR Segments
short int EcanFirSegmentLen; // Echo Can FIR Segment Length
+ short int EcanTandemOperationEnable; //Enable tandem operation
+ short int EcanMixedFourWireMode; // Handle possible 4-wire (echo-free) lines
+
} GpakEcanParms_t;
/* Definition of a Channel Configuration information structure. */
diff --git a/wctdm24xxp/VPMADT032.bin b/wctdm24xxp/VPMADT032.bin
index e882060..e578521 100644
--- a/wctdm24xxp/VPMADT032.bin
+++ b/wctdm24xxp/VPMADT032.bin
Binary files differ
diff --git a/wctdm24xxp/base.c b/wctdm24xxp/base.c
index 7358cfa..8e06d80 100644
--- a/wctdm24xxp/base.c
+++ b/wctdm24xxp/base.c
@@ -269,7 +269,7 @@ static int vpmsupport = 1;
static int vpmdtmfsupport = 0;
#define VPM_DEFAULT_DTMFTHRESHOLD 1250
static int dtmfthreshold = VPM_DEFAULT_DTMFTHRESHOLD;
-static int vpmnlptype = 1;
+static int vpmnlptype = 3;
static int vpmnlpthresh = 24;
static int vpmnlpmaxsupp = 0;
#endif
@@ -2881,13 +2881,15 @@ static int vpm150m_config_hw(struct wctdm *wc)
chanconfig.EcanParametersA.EcanDblTalkThresh = 6;
chanconfig.EcanParametersA.EcanNlpThreshold = vpmnlpthresh;
chanconfig.EcanParametersA.EcanNlpConv = 0;
- chanconfig.EcanParametersA.EcanNlpUnConv = 0;
+ chanconfig.EcanParametersA.EcanNlpUnConv = 12;
chanconfig.EcanParametersA.EcanNlpMaxSuppress = vpmnlpmaxsupp;
chanconfig.EcanParametersA.EcanCngThreshold = 43;
chanconfig.EcanParametersA.EcanAdaptLimit = 50;
chanconfig.EcanParametersA.EcanCrossCorrLimit = 15;
chanconfig.EcanParametersA.EcanNumFirSegments = 3;
chanconfig.EcanParametersA.EcanFirSegmentLen = 64;
+ chanconfig.EcanParametersA.EcanTandemOperationEnable = 1;
+ chanconfig.EcanParametersA.EcanMixedFourWireMode = 1;
chanconfig.EcanParametersB.EcanTapLength = 1024;
chanconfig.EcanParametersB.EcanNlpType = vpmnlptype;
@@ -2896,13 +2898,15 @@ static int vpm150m_config_hw(struct wctdm *wc)
chanconfig.EcanParametersB.EcanDblTalkThresh = 6;
chanconfig.EcanParametersB.EcanNlpThreshold = vpmnlpthresh;
chanconfig.EcanParametersB.EcanNlpConv = 0;
- chanconfig.EcanParametersB.EcanNlpUnConv = 0;
+ chanconfig.EcanParametersB.EcanNlpUnConv = 12;
chanconfig.EcanParametersB.EcanNlpMaxSuppress = vpmnlpmaxsupp;
chanconfig.EcanParametersB.EcanCngThreshold = 43;
chanconfig.EcanParametersB.EcanAdaptLimit = 50;
chanconfig.EcanParametersB.EcanCrossCorrLimit = 15;
chanconfig.EcanParametersB.EcanNumFirSegments = 3;
chanconfig.EcanParametersB.EcanFirSegmentLen = 64;
+ chanconfig.EcanParametersB.EcanTandemOperationEnable = 1;
+ chanconfig.EcanParametersB.EcanMixedFourWireMode = 1;
if ((res = gpakConfigureChannel(vpm150m->dspid, i, tdmToTdm, &chanconfig, &cstatus))) {
printk("Unable to configure channel (%d)\n", res);
diff --git a/wctdm24xxp/gpakErrs.h b/wctdm24xxp/gpakErrs.h
index 3413f97..3f0c8ae 100644
--- a/wctdm24xxp/gpakErrs.h
+++ b/wctdm24xxp/gpakErrs.h
@@ -99,7 +99,8 @@ typedef enum
Cc_InvalidMuteToneA = 51, /* invalid MuteToneA set, no detector */
Cc_InvalidMuteToneB = 52, /* invalid MuteToneB set, no detector */
- Cc_InsuffFaxCngDetResources = 53 /* insufficient tdm block resources avail. */
+ Cc_InsuffFaxCngDetResources = 53, /* insufficient tdm block resources avail. */
+ Cc_PortDmaNotStarted = 54, /* SerialPort not ready */
} GPAK_ChannelConfigStat_t;