[svn-commits] tzafrir: linux/trunk r10022 - /linux/trunk/drivers/dahdi/xpp/card_fxs.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Jul 4 09:05:46 CDT 2011


Author: tzafrir
Date: Mon Jul  4 09:05:43 2011
New Revision: 10022

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=10022
Log:
xpp: xpd_fxs: ring_trapez parameter

This adds module parameter 'ring_trapez'. When set, the wave form of
the ring tone is set to be a trapezoid, rather than sine. Thus making
the ring stronger.

This is a boolean parameter of the module xpd_fxs. Takes effect at the
beginning of the next ring.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>

Modified:
    linux/trunk/drivers/dahdi/xpp/card_fxs.c

Modified: linux/trunk/drivers/dahdi/xpp/card_fxs.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/card_fxs.c?view=diff&rev=10022&r1=10021&r2=10022
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/card_fxs.c (original)
+++ linux/trunk/drivers/dahdi/xpp/card_fxs.c Mon Jul  4 09:05:43 2011
@@ -41,6 +41,7 @@
 #endif
 
 static DEF_PARM_BOOL(vmwi_ioctl, 1, 0644, "Asterisk support VMWI notification via ioctl");
+static DEF_PARM_BOOL(ring_trapez, 0, 0664, "Use trapezoid ring type");
 
 /* Signaling is opposite (fxo signalling for fxs card) */
 #if 1
@@ -576,6 +577,28 @@
 		ret += SLIC_DIRECT_REQUEST(xbus, xpd, pos, SLIC_WRITE, 0x32, 0xF0);
 		ret += SLIC_DIRECT_REQUEST(xbus, xpd, pos, SLIC_WRITE, 0x33, 0x05);
 		ret += SLIC_INDIRECT_REQUEST(xbus, xpd, pos, SLIC_WRITE, 0x1D, 0x00, 0x46);
+	} else if (ring_trapez) {
+		LINE_DBG(SIGNAL, xpd, pos, "RINGER: Trapez ring\n");
+		ret += SLIC_INDIRECT_REQUEST(xbus, xpd, pos,
+				SLIC_WRITE, 0x16, 0xC8, 0x00);
+		ret += SLIC_INDIRECT_REQUEST(xbus, xpd, pos,
+				SLIC_WRITE, 0x15, 0xAB, 0x5E);
+		ret += SLIC_INDIRECT_REQUEST(xbus, xpd, pos,
+				SLIC_WRITE, 0x14, 0x8C, 0x01);
+		ret += SLIC_DIRECT_REQUEST(xbus, xpd, pos,
+				SLIC_WRITE, 0x22, 0x01);
+		ret += SLIC_DIRECT_REQUEST(xbus, xpd, pos,
+				SLIC_WRITE, 0x4A, 0x34);
+		ret += SLIC_DIRECT_REQUEST(xbus, xpd, pos,
+				SLIC_WRITE, 0x30, 0x00);
+		ret += SLIC_DIRECT_REQUEST(xbus, xpd, pos,
+				SLIC_WRITE, 0x31, 0x00);
+		ret += SLIC_DIRECT_REQUEST(xbus, xpd, pos,
+				SLIC_WRITE, 0x32, 0x00);
+		ret += SLIC_DIRECT_REQUEST(xbus, xpd, pos,
+				SLIC_WRITE, 0x33, 0x00);
+		ret += SLIC_INDIRECT_REQUEST(xbus, xpd, pos,
+				SLIC_WRITE, 0x1D, 0x00, 0x36);
 	} else {
 		/* A write to register 0x40 will now turn on/off the ringer */
 		LINE_DBG(SIGNAL, xpd, pos, "RINGER\n");
@@ -589,6 +612,8 @@
 		ret += SLIC_DIRECT_REQUEST(xbus, xpd, pos, SLIC_WRITE, 0x31, 0x00);
 		ret += SLIC_DIRECT_REQUEST(xbus, xpd, pos, SLIC_WRITE, 0x32, 0x00);
 		ret += SLIC_DIRECT_REQUEST(xbus, xpd, pos, SLIC_WRITE, 0x33, 0x00);
+		ret += SLIC_DIRECT_REQUEST(xbus, xpd, pos, SLIC_WRITE,
+				0x4A, 0x34);/* High Vbat~ -82V[Dc] */
 		ret += SLIC_INDIRECT_REQUEST(xbus, xpd, pos, SLIC_WRITE, 0x1D, 0x00, 0x36);
 	}
 	return (ret ? -EPROTO : 0);




More information about the svn-commits mailing list