diff options
author | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2011-07-04 14:05:43 +0000 |
---|---|---|
committer | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2011-07-04 14:05:43 +0000 |
commit | c2a95f7acdd157c41ff317a40115ae03d8092020 (patch) | |
tree | 120e6bb4b7ba14844e49e9a4f294602665a00550 /drivers | |
parent | 8744526c56a08e20aeeea848a5873c048f2644c0 (diff) |
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@xorcom.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10022 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/dahdi/xpp/card_fxs.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/dahdi/xpp/card_fxs.c b/drivers/dahdi/xpp/card_fxs.c index 01d4ab7..1865991 100644 --- a/drivers/dahdi/xpp/card_fxs.c +++ b/drivers/dahdi/xpp/card_fxs.c @@ -41,6 +41,7 @@ static DEF_PARM(uint, poll_digital_inputs, 1000, 0644, "Poll Digital Inputs"); #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 @@ static int set_vm_led_mode(xbus_t *xbus, xpd_t *xpd, int pos, 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 @@ static int set_vm_led_mode(xbus_t *xbus, xpd_t *xpd, int pos, 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); |