summaryrefslogtreecommitdiff
path: root/xpp/xpp_zap.c
diff options
context:
space:
mode:
authortzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2006-08-10 03:12:25 +0000
committertzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2006-08-10 03:12:25 +0000
commit7d33e1eca2cc193bd0127816c7d487e3ef73e5bb (patch)
tree69d148d2587518cd5e04f173a593eb7a0c497203 /xpp/xpp_zap.c
parent4ab762499c932cb80394ec1ec6b93879004a5214 (diff)
* New SOFT_RING detection in FXO:
- Poll register 0x05 on each DAA - When enough energy (value of 0x20|0x40 occurs enough times), raise the ringing[] flag. - When the value show no energy, lower the ringing[] flag. - When we get SIG_CHANGED of stop ringing -- stop polling. * More debugging messages for proc files git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1285 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'xpp/xpp_zap.c')
-rw-r--r--xpp/xpp_zap.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/xpp/xpp_zap.c b/xpp/xpp_zap.c
index e1d15ed..e992144 100644
--- a/xpp/xpp_zap.c
+++ b/xpp/xpp_zap.c
@@ -634,6 +634,8 @@ void update_line_status(xpd_t *xpd, int pos, bool good)
zt_hooksig(chan, ZT_RXSIG_ONHOOK);
}
+#define RING_TIME 15 /* in ticks */
+
static void xpp_ring_generate(xpd_t *xpd)
{
int i;
@@ -658,7 +660,7 @@ static void xpp_ring_generate(xpd_t *xpd)
for_each_line(xpd, i) {
if(xpd->ringing[i] || xpd->ringer_on[i]) {
// ring state is only changed once per second:
- if((xpd->timer_count % 1000) == 0) {
+ if((xpd->timer_count % RING_TIME) == 0) {
DBG("pos=%d ringing=%d ringer_on=%d\n", i, xpd->ringing[i], xpd->ringer_on[i]);
if(xpd->ringer_on[i]) {
zt_hooksig(&xpd->chans[i], ZT_RXSIG_OFFHOOK);
@@ -1488,8 +1490,10 @@ static void do_cleanup(void)
unregister_chrdev(XPP_CTL_MAJOR, THIS_MODULE->name);
#endif
#ifdef CONFIG_PROC_FS
+ DBG("Removing '%s' from proc\n", PROC_SYNC);
remove_proc_entry(PROC_SYNC, xpp_proc_toplevel);
if(xpp_proc_toplevel) {
+ DBG("Removing '%s' from proc\n", PROC_DIR);
remove_proc_entry(PROC_DIR, NULL);
xpp_proc_toplevel = NULL;
}