[zaptel-commits] branch 1.2 - r848 in /branches/1.2: wctdm.c
wctdm24xxp.c
zaptel-commits at lists.digium.com
zaptel-commits at lists.digium.com
Sun Dec 4 12:19:42 CST 2005
Author: kpfleming
Date: Sun Dec 4 12:19:40 2005
New Revision: 848
URL: http://svn.digium.com/view/zaptel?rev=848&view=rev
Log:
merge ringer changes from revs 845:847 in trunk
Modified:
branches/1.2/wctdm.c
branches/1.2/wctdm24xxp.c
Modified: branches/1.2/wctdm.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/wctdm.c?rev=848&r1=847&r2=848&view=diff
==============================================================================
--- branches/1.2/wctdm.c (original)
+++ branches/1.2/wctdm.c Sun Dec 4 12:19:40 2005
@@ -373,6 +373,7 @@
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 @@
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(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(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");
Modified: branches/1.2/wctdm24xxp.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/wctdm24xxp.c?rev=848&r1=847&r2=848&view=diff
==============================================================================
--- branches/1.2/wctdm24xxp.c (original)
+++ branches/1.2/wctdm24xxp.c Sun Dec 4 12:19:40 2005
@@ -400,7 +400,8 @@
static int robust = 0;
static int timingonly = 0;
static int lowpower = 0;
-static int boostringer = 1;
+static int boostringer = 0;
+static int fastringer = 0;
static int _opermode = 0;
static char *opermode = "FCC";
static int fxshonormode = 0;
@@ -910,7 +911,7 @@
static int wait_access(struct wctdm *wc, int card)
{
- unsigned char data;
+ unsigned char data=0;
long origjiffies;
int count = 0;
@@ -1992,15 +1993,34 @@
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 ring power 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);
wc->mods[card].fxs.lasttxhook = 1;
@@ -2850,6 +2870,7 @@
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);
@@ -2869,6 +2890,7 @@
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");
More information about the zaptel-commits
mailing list