summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarkster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2004-09-15 19:40:16 +0000
committermarkster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2004-09-15 19:40:16 +0000
commita5e23e7e1ac45b4dfaa741afdf1a4faacf072a25 (patch)
tree34260921b6fbc85bf52d9923e4e87dc35f9c6881
parentf06574ef3bfd9f51cef6a61d000ff4249993b4fa (diff)
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
-rwxr-xr-xwcfxs.c9
-rwxr-xr-xwctdm.c9
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);