From 4d3a60c560ca9d3a5671204990090b71484027e7 Mon Sep 17 00:00:00 2001 From: kpfleming Date: Thu, 22 Dec 2005 22:49:53 +0000 Subject: 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 --- wctdm24xxp.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'wctdm24xxp.c') 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)); -- cgit v1.2.3