summaryrefslogtreecommitdiff
path: root/xpp/card_fxo.c
diff options
context:
space:
mode:
authortzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-04-29 22:44:32 +0000
committertzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-04-29 22:44:32 +0000
commit21263d58b5659eb42d200a38b17da18fce49a881 (patch)
tree205cbb81e5906362c4be4eb11800f028694c620f /xpp/card_fxo.c
parent2c5d383ce7ad82476fe1687b9d29aad87a80e6ee (diff)
xpp rev. 3814:
* Protocol no. 2.6: syncing improvements. * Support for 8-port Astribank BRI. * Firmware unloading now works: rmmod xpp_usb; /etc/hotplug/usb/xpp_fxloader reset * Defaults of kernel parameters are now part of parameter description. * World-readable kernel parameters. * No need for extra patch beyond bristuff for Astribank BRI. * Default poll intervals changed: 500 in BRI and FXO. * Allow changing FXS polls interval at run time. * BRI initalization fixed on SUSE (path to logger). * When using the SUSE zaptel rpm package, set modules_var=ZAPTEL_MODULES in /etc/sysconfig/zaptel . * zt_registration not verbose by default. * xpp_sync warns if FXO is sync slave. * Fixed genzaptelconf -z (zapscan output emulation). * PCM fixes. * Solves "multiple ticks" bug. No need for pcm_tasklets workaround. git-svn-id: http://svn.digium.com/svn/zaptel/trunk@2478 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'xpp/card_fxo.c')
-rw-r--r--xpp/card_fxo.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/xpp/card_fxo.c b/xpp/card_fxo.c
index ff87120..ad8e438 100644
--- a/xpp/card_fxo.c
+++ b/xpp/card_fxo.c
@@ -33,9 +33,9 @@
static const char rcsid[] = "$Id$";
-DEF_PARM(int, print_dbg, 0, 0600, "Print DBG statements");
-DEF_PARM(uint, poll_battery_interval, 100, 0600, "Poll battery interval in milliseconds (0 - disable)");
-DEF_PARM(int, ring_debounce, 50, 0600, "Number of ticks to debounce a false RING indication");
+DEF_PARM(int, print_dbg, 0, 0644, "Print DBG statements");
+DEF_PARM(uint, poll_battery_interval, 500, 0644, "Poll battery interval in milliseconds (0 - disable)");
+DEF_PARM(int, ring_debounce, 50, 0644, "Number of ticks to debounce a false RING indication");
/* Signaling is opposite (fxs signalling for fxo card) */
#if 1
@@ -684,6 +684,7 @@ static void update_battery_status(xpd_t *xpd, byte data_low, lineno_t chipsel)
BIT_CLR(priv->polarity, chipsel);
priv->polarity_counter[chipsel] = 0;
/* Inform Zaptel */
+ DBG("%s/%s/%d: Send ZT_EVENT_POLARITY\n", xpd->xbus->busname, xpd->xpdname, chipsel);
zt_qevent_lock(&xpd->chans[chipsel], ZT_EVENT_POLARITY);
#if 0
/*
@@ -710,6 +711,7 @@ static void update_power_denial(xpd_t *xpd, byte data_low, lineno_t chipsel)
if (IS_SET(xpd->offhook, chipsel) && data_low < 3) {
priv->current_counter[chipsel]++;
if (priv->current_counter[chipsel] >= 10) {
+ DBG("%s/%s/%d: Power Denial Hangup\n", xpd->xbus->busname, xpd->xpdname, chipsel);
priv->current_counter[chipsel] = 0;
do_sethook(xpd, chipsel, 0);
update_line_status(xpd, chipsel, 0);
@@ -833,6 +835,10 @@ static int proc_fxo_info_read(char *page, char **start, off_t off, int count, in
for_each_line(xpd, i) {
len += sprintf(page + len, "%2d ", IS_SET(priv->battery, i));
}
+ len += sprintf(page + len, "\n\t%-17s: ", "polarity");
+ for_each_line(xpd, i) {
+ len += sprintf(page + len, "%2d ", IS_SET(priv->polarity, i));
+ }
len += sprintf(page + len, "\n");
spin_unlock_irqrestore(&xpd->lock, flags);
if (len <= off+count)