summaryrefslogtreecommitdiff
path: root/wcfxs.c
diff options
context:
space:
mode:
authormarkster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2004-05-19 01:18:03 +0000
committermarkster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2004-05-19 01:18:03 +0000
commit5088ba4cc6cc1a20e97b047bdd8074ffe02f0edf (patch)
tree53bca4337f12bb6fc4d694855a79c8549c9b8985 /wcfxs.c
parentc6f8c6c35719b1ae010b01f6aa5beec113d3b4c2 (diff)
Work around issues with slot 1 FXO's
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@395 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'wcfxs.c')
-rwxr-xr-xwcfxs.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/wcfxs.c b/wcfxs.c
index 80ff08a..60237ca 100755
--- a/wcfxs.c
+++ b/wcfxs.c
@@ -132,7 +132,7 @@ static alpha indirect_regs[] =
#define FLAG_READ 2
#define RING_DEBOUNCE 64 /* Ringer Debounce (in ms) */
-#define BATT_DEBOUNCE 8 /* Battery debounce (in ms) */
+#define BATT_DEBOUNCE 64 /* Battery debounce (in ms) */
#define BATT_THRESH 3 /* Anything under this is "no battery" */
#define OHT_TIMER 6000 /* How long after RING to retain OHT */
@@ -1234,6 +1234,20 @@ static inline void wcfxs_voicedaa_check_hook(struct wcfxs *wc, int card)
}
}
#endif
+ /* Try to track issues that plague slot one FXO's */
+ b = wcfxs_getreg(wc, card, 5);
+ if ((b & 0x2) || !(b & 0x8)) {
+ /* Not good -- don't look at anything else */
+ return;
+ }
+ b &= 0x9;
+ if (wc->mod.fxo.offhook[card]) {
+ if (b != 0x9)
+ wcfxs_setreg(wc, card, 5, 0x9);
+ } else {
+ if (b != 0x8)
+ wcfxs_setreg(wc, card, 5, 0x8);
+ }
b = wcfxs_getreg(wc, card, 29);
#if 0
{