[svn-commits] trunk - r845 in /trunk: wctdm.c wctdm24xxp.c
svn-commits at lists.digium.com
svn-commits at lists.digium.com
Fri Dec 2 18:47:44 CST 2005
Author: markster
Date: Fri Dec 2 18:47:43 2005
New Revision: 845
URL: http://svn.digium.com/view/zaptel?rev=845&view=rev
Log:
Support fast (25Hz) Ringer
Modified:
trunk/wctdm.c
trunk/wctdm24xxp.c
Modified: trunk/wctdm.c
URL: http://svn.digium.com/view/zaptel/trunk/wctdm.c?rev=845&r1=844&r2=845&view=diff
==============================================================================
--- trunk/wctdm.c (original)
+++ trunk/wctdm.c Fri Dec 2 18:47:43 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,32 @@
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) {
+ 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) {
+ 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;
@@ -2310,7 +2328,7 @@
static struct pci_device_id wctdm_pci_tbl[] = {
{ 0xe159, 0x0001, 0xa159, PCI_ANY_ID, 0, 0, (unsigned long) &wctdm },
{ 0xe159, 0x0001, 0xe159, PCI_ANY_ID, 0, 0, (unsigned long) &wctdm },
- { 0xe159, 0x0001, 0xb100, PCI_ANY_ID, 0, 0, (unsigned long) &wctdme },
+ { 0xe159, 0x0001, 0xb100, PCI_ANY_ID, 0, 0, (unsigned long) &wctdmi },
{ 0xe159, 0x0001, 0xb1d9, PCI_ANY_ID, 0, 0, (unsigned long) &wctdmi },
{ 0xe159, 0x0001, 0xb119, PCI_ANY_ID, 0, 0, (unsigned long) &wctdmi },
{ 0xe159, 0x0001, 0xa9fd, PCI_ANY_ID, 0, 0, (unsigned long) &wctdmh },
@@ -2379,6 +2397,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 +2412,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: trunk/wctdm24xxp.c
URL: http://svn.digium.com/view/zaptel/trunk/wctdm24xxp.c?rev=845&r1=844&r2=845&view=diff
==============================================================================
--- trunk/wctdm24xxp.c (original)
+++ trunk/wctdm24xxp.c Fri Dec 2 18:47:43 2005
@@ -401,6 +401,7 @@
static int timingonly = 0;
static int lowpower = 0;
static int boostringer = 1;
+static int fastringer = 0;
static int _opermode = 0;
static char *opermode = "FCC";
static int fxshonormode = 0;
@@ -1992,15 +1993,32 @@
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) {
+ 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) {
+ 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 +2868,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 +2888,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 svn-commits
mailing list