From 528f9a5aa0de1d53e0a367655a08882661923413 Mon Sep 17 00:00:00 2001 From: markster Date: Tue, 25 May 2004 18:06:57 +0000 Subject: On broken hook register, try to restore it git-svn-id: http://svn.digium.com/svn/zaptel/trunk@401 5390a7c7-147a-4af0-8ec9-7488f05a26cb --- wcfxs.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'wcfxs.c') diff --git a/wcfxs.c b/wcfxs.c index f297469..e0cbfaf 100755 --- a/wcfxs.c +++ b/wcfxs.c @@ -1216,15 +1216,16 @@ static inline void wcfxs_voicedaa_check_hook(struct wcfxs *wc, int card) unsigned char res; #endif signed char b; + int poopy = 0; /* 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 */ if (debug) printk("Poopy (%02x) on card %d!\n", b, card + 1); - return; + poopy++; } - b &= 0x9; + b &= 0x9b; if (wc->mod.fxo.offhook[card]) { if (b != 0x9) wcfxs_setreg(wc, card, 5, 0x9); @@ -1232,6 +1233,8 @@ static inline void wcfxs_voicedaa_check_hook(struct wcfxs *wc, int card) if (b != 0x8) wcfxs_setreg(wc, card, 5, 0x8); } + if (poopy) + return; #ifndef AUDIO_RINGCHECK if (!wc->mod.fxo.offhook[card]) { res = wcfxs_getreg(wc, card, 5); -- cgit v1.2.3