summaryrefslogtreecommitdiff
path: root/wctdm.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2005-12-04 18:19:40 +0000
committerkpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2005-12-04 18:19:40 +0000
commitfb240fe06010f2b3631c2270ee289de010e5dd09 (patch)
tree2f6d2f2da201339287031c1197a06d342e0e4e2e /wctdm.c
parentf57191ee5c2237a66cebfee93df7f28077e56c11 (diff)
merge ringer changes from revs 845:847 in trunk
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.2@848 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'wctdm.c')
-rw-r--r--wctdm.c40
1 files changed, 31 insertions, 9 deletions
diff --git a/wctdm.c b/wctdm.c
index b12fd20..0fd50b6 100644
--- a/wctdm.c
+++ b/wctdm.c
@@ -373,6 +373,7 @@ static int robust = 0;
static int timingonly = 0;
static int lowpower = 0;
static int boostringer = 0;
+static int fastringer = 0;
static int _opermode = 0;
static char *opermode = "FCC";
static int fxshonormode = 0;
@@ -1682,15 +1683,34 @@ static int wctdm_init_proslic(struct wctdm *wc, int card, int fast, int manual,
wctdm_setreg(wc, card, 1, 0x08);
#endif
- /* Beef up Ringing voltage to 89V */
- if (boostringer) {
- if (wctdm_proslic_setreg_indirect(wc, card, 21, 0x1d1))
- return -1;
- printk("Boosting ringinger on slot %d (89V peak)\n", card + 1);
- } else if (lowpower) {
- if (wctdm_proslic_setreg_indirect(wc, card, 21, 0x108))
- return -1;
- printk("Reducing ring power on slot %d (50V peak)\n", card + 1);
+ if (fastringer) {
+ /* Speed up Ringer */
+ wctdm_proslic_setreg_indirect(wc, card, 20, 0x7e6d);
+ wctdm_proslic_setreg_indirect(wc, card, 21, 0x01b9);
+ /* Beef up Ringing voltage to 89V */
+ if (boostringer) {
+ wctdm_setreg(wc, card, 74, 0x3f);
+ if (wctdm_proslic_setreg_indirect(wc, card, 21, 0x247))
+ return -1;
+ printk("Boosting fast ringer on slot %d (89V peak)\n", card + 1);
+ } else if (lowpower) {
+ if (wctdm_proslic_setreg_indirect(wc, card, 21, 0x14b))
+ return -1;
+ printk("Reducing fast ring power on slot %d (50V peak)\n", card + 1);
+ } else
+ printk("Speeding up ringer on slot %d (25Hz)\n", card + 1);
+ } else {
+ /* Beef up Ringing voltage to 89V */
+ if (boostringer) {
+ wctdm_setreg(wc, card, 74, 0x3f);
+ if (wctdm_proslic_setreg_indirect(wc, card, 21, 0x1d1))
+ return -1;
+ printk("Boosting ringer on slot %d (89V peak)\n", card + 1);
+ } else if (lowpower) {
+ if (wctdm_proslic_setreg_indirect(wc, card, 21, 0x108))
+ return -1;
+ printk("Reducing ring power on slot %d (50V peak)\n", card + 1);
+ }
}
wctdm_setreg(wc, card, 64, 0x01);
return 0;
@@ -2379,6 +2399,7 @@ module_param(opermode, charp, 0600);
module_param(timingonly, int, 0600);
module_param(lowpower, int, 0600);
module_param(boostringer, int, 0600);
+module_param(fastringer, int, 0600);
module_param(fxshonormode, int, 0600);
module_param(battdebounce, int, 0600);
module_param(battthresh, int, 0600);
@@ -2393,6 +2414,7 @@ MODULE_PARM(opermode, "s");
MODULE_PARM(timingonly, "i");
MODULE_PARM(lowpower, "i");
MODULE_PARM(boostringer, "i");
+MODULE_PARM(fastringer, "i");
MODULE_PARM(fxshonormode, "i");
MODULE_PARM(battdebounce, "i");
MODULE_PARM(battthresh, "i");