summaryrefslogtreecommitdiff
path: root/wctdm24xxp.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2005-12-22 22:49:53 +0000
committerkpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2005-12-22 22:49:53 +0000
commit4d3a60c560ca9d3a5671204990090b71484027e7 (patch)
treea1e78c8f1d6b1e14f719dce6427e77e2199106fd /wctdm24xxp.c
parent7035b963402a64116a509df9e90d94740ed4fccd (diff)
adjust input/output signals from FXO modules that were too high
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@873 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'wctdm24xxp.c')
-rw-r--r--wctdm24xxp.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/wctdm24xxp.c b/wctdm24xxp.c
index 7eb5abd..464a3b4 100644
--- a/wctdm24xxp.c
+++ b/wctdm24xxp.c
@@ -33,7 +33,7 @@
#include "proslic.h"
#include "wctdm.h"
-/* Uncomment to enable VPM support */
+/* Comment to disable VPM support */
#define VPM_SUPPORT
#ifdef VPM_SUPPORT
@@ -1816,6 +1816,15 @@ static int wctdm_init_voicedaa(struct wctdm *wc, int card, int fast, int manual,
(wctdm_getreg(wc, card, 13) >> 2) & 0xf);
/* Enable on-hook line monitor */
wctdm_setreg(wc, card, 5, 0x08);
+
+ /* Apply negative Tx gain of 4.5db to DAA */
+ wctdm_setreg(wc, card, 38, 0x14); /* 4db */
+ wctdm_setreg(wc, card, 40, 0x15); /* 0.5db */
+
+ /* Apply negative Rx gain of 4.5db to DAA */
+ wctdm_setreg(wc, card, 39, 0x14); /* 4db */
+ wctdm_setreg(wc, card, 41, 0x15); /* 0.5db */
+
return 0;
}
@@ -2031,7 +2040,7 @@ static int wctdm_ioctl(struct zt_chan *chan, unsigned int cmd, unsigned long dat
struct wctdm_echo_coefs echoregs;
struct wctdm *wc = chan->pvt;
int x;
- int j;
+
#if 0
/* XXX */
printk("RxInts: %d, TxInts: %d\n", wc->rxints, wc->txints);
@@ -2145,17 +2154,17 @@ static int wctdm_ioctl(struct zt_chan *chan, unsigned int cmd, unsigned long dat
break;
#ifdef VPM_SUPPORT
case ZT_TONEDETECT:
- if (get_user(j, (int *)data))
+ if (get_user(x, (int *) data))
return -EFAULT;
if (!wc->vpm)
return -ENOSYS;
- if (j && !vpmdtmfsupport)
+ if (x && !vpmdtmfsupport)
return -ENOSYS;
- if (j & ZT_TONEDETECT_ON)
+ if (x & ZT_TONEDETECT_ON)
wc->dtmfmask |= (1 << (chan->chanpos - 1));
else
wc->dtmfmask &= ~(1 << (chan->chanpos - 1));
- if (j & ZT_TONEDETECT_MUTE)
+ if (x & ZT_TONEDETECT_MUTE)
wc->dtmfmutemask |= (1 << (chan->chanpos - 1));
else
wc->dtmfmutemask &= ~(1 << (chan->chanpos - 1));