diff options
author | markster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2004-05-25 18:06:57 +0000 |
---|---|---|
committer | markster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2004-05-25 18:06:57 +0000 |
commit | 528f9a5aa0de1d53e0a367655a08882661923413 (patch) | |
tree | 80b98abffcca8cbfbfd7aa182d9f0fd764b18cd8 /wcfxs.c | |
parent | 13e607262480c596ffaddbe713219a9a2f6f351e (diff) |
On broken hook register, try to restore it
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@401 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'wcfxs.c')
-rwxr-xr-x | wcfxs.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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); |