From a5e23e7e1ac45b4dfaa741afdf1a4faacf072a25 Mon Sep 17 00:00:00 2001 From: markster Date: Wed, 15 Sep 2004 19:40:16 +0000 Subject: When using fxshonormode=1 and opermode=TBR21 set ring to 25 Hz (bug #724) git-svn-id: http://svn.digium.com/svn/zaptel/trunk@458 5390a7c7-147a-4af0-8ec9-7488f05a26cb --- wcfxs.c | 9 ++++++++- wctdm.c | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/wcfxs.c b/wcfxs.c index 0620371..9528ae9 100755 --- a/wcfxs.c +++ b/wcfxs.c @@ -117,10 +117,13 @@ static struct fxo_mode { int dcv; int mini; int acim; + int ring_osc; + int ring_x; } fxo_modes[] = { { "FCC", 0, 0, 0, 0, 0, 0x3, 0, 0 }, /* US, Canada */ - { "TBR21", 0, 0, 0, 0, 1, 0x3, 0, 0x2 },/* Austria, Belgium, Denmark, Finland, France, Germany, + { "TBR21", 0, 0, 0, 0, 1, 0x3, 0, 0x2, 0x7e6c, 0x023a }, + /* Austria, Belgium, Denmark, Finland, France, Germany, Greece, Iceland, Ireland, Italy, Luxembourg, Netherlands, Norway, Portugal, Spain, Sweden, Switzerland, and UK */ { "ARGENTINA", 0, 0, 0, 0, 0, 0x3, 0, 0 }, @@ -1318,6 +1321,10 @@ static int wcfxs_init_proslic(struct wcfxs *wc, int card, int fast, int manual, if (fxshonormode) { fxsmode = acim2tiss[fxo_modes[_opermode].acim]; wcfxs_setreg(wc, card, 10, 0x08 | fxsmode); + if (fxo_modes[_opermode].ring_osc) + wcfxs_proslic_setreg_indirect(wc, card, 20, fxo_modes[_opermode].ring_osc); + if (fxo_modes[_opermode].ring_x) + wcfxs_proslic_setreg_indirect(wc, card, 21, fxo_modes[_opermode].ring_x); } if (lowpower) wcfxs_setreg(wc, card, 72, 0x10); diff --git a/wctdm.c b/wctdm.c index 0620371..9528ae9 100755 --- a/wctdm.c +++ b/wctdm.c @@ -117,10 +117,13 @@ static struct fxo_mode { int dcv; int mini; int acim; + int ring_osc; + int ring_x; } fxo_modes[] = { { "FCC", 0, 0, 0, 0, 0, 0x3, 0, 0 }, /* US, Canada */ - { "TBR21", 0, 0, 0, 0, 1, 0x3, 0, 0x2 },/* Austria, Belgium, Denmark, Finland, France, Germany, + { "TBR21", 0, 0, 0, 0, 1, 0x3, 0, 0x2, 0x7e6c, 0x023a }, + /* Austria, Belgium, Denmark, Finland, France, Germany, Greece, Iceland, Ireland, Italy, Luxembourg, Netherlands, Norway, Portugal, Spain, Sweden, Switzerland, and UK */ { "ARGENTINA", 0, 0, 0, 0, 0, 0x3, 0, 0 }, @@ -1318,6 +1321,10 @@ static int wcfxs_init_proslic(struct wcfxs *wc, int card, int fast, int manual, if (fxshonormode) { fxsmode = acim2tiss[fxo_modes[_opermode].acim]; wcfxs_setreg(wc, card, 10, 0x08 | fxsmode); + if (fxo_modes[_opermode].ring_osc) + wcfxs_proslic_setreg_indirect(wc, card, 20, fxo_modes[_opermode].ring_osc); + if (fxo_modes[_opermode].ring_x) + wcfxs_proslic_setreg_indirect(wc, card, 21, fxo_modes[_opermode].ring_x); } if (lowpower) wcfxs_setreg(wc, card, 72, 0x10); -- cgit v1.2.3