summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormattf <mattf@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-08-16 17:09:22 +0000
committermattf <mattf@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-08-16 17:09:22 +0000
commitad6f2c36e5622f85198f7f867f7889278b7eb34b (patch)
tree4d8fee4b5c139395d66125d77d8aea4e98bf90b5
parentaf47bf96224417154ac9d0a1b57c456eb91176d9 (diff)
Merged revisions 2853 via svnmerge from
https://origsvn.digium.com/svn/zaptel/branches/1.4 ................ r2853 | mattf | 2007-08-16 12:05:26 -0500 (Thu, 16 Aug 2007) | 9 lines Merged revisions 2852 via svnmerge from https://origsvn.digium.com/svn/zaptel/branches/1.2 ........ r2852 | mattf | 2007-08-16 12:01:18 -0500 (Thu, 16 Aug 2007) | 1 line Make sure the gain adjustment is only done if the VPM100M is present ........ ................ git-svn-id: http://svn.digium.com/svn/zaptel/trunk@2854 5390a7c7-147a-4af0-8ec9-7488f05a26cb
-rw-r--r--wctdm24xxp/base.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/wctdm24xxp/base.c b/wctdm24xxp/base.c
index a36fea8..086ebaa 100644
--- a/wctdm24xxp/base.c
+++ b/wctdm24xxp/base.c
@@ -2035,15 +2035,6 @@ static int wctdm_init_voicedaa(struct wctdm *wc, int card, int fast, int manual,
/* 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 */
-
-
/* Take values for fxotxgain and fxorxgain and apply them to module */
if (fxotxgain) {
if (fxotxgain >= -150 && fxotxgain < 0) {
@@ -3773,6 +3764,20 @@ static void wctdm_vpm_init(struct wctdm *wc)
wc->vpm = 2;
else
wc->vpm = 1;
+
+ printk("Enabling VPM100 gain adjustments on any FXO ports found\n");
+ for (i = 0; i < wc->type; i++) {
+ if (wc->modtype[i] == MOD_TYPE_FXO) {
+ /* Apply negative Tx gain of 4.5db to DAA */
+ wctdm_setreg(wc, i, 38, 0x14); /* 4db */
+ wctdm_setreg(wc, i, 40, 0x15); /* 0.5db */
+
+ /* Apply negative Rx gain of 4.5db to DAA */
+ wctdm_setreg(wc, i, 39, 0x14); /* 4db */
+ wctdm_setreg(wc, i, 41, 0x15); /* 0.5db */
+ }
+ }
+
}
#endif