diff options
Diffstat (limited to 'wcfxs.c')
-rwxr-xr-x | wcfxs.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -133,6 +133,7 @@ static alpha indirect_regs[] = #define RING_DEBOUNCE 64 /* Ringer Debounce (in ms) */ #define BATT_DEBOUNCE 8 /* 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 */ @@ -1226,7 +1227,7 @@ static inline void wcfxs_voicedaa_check_hook(struct wcfxs *wc, int card) } } #endif - if (abs(b) < 2) { + if (abs(b) < BATT_THRESH) { wc->mod.fxo.nobatttimer[card]++; #if 0 if (wc->mod.fxo.battery[card]) @@ -1251,7 +1252,7 @@ static inline void wcfxs_voicedaa_check_hook(struct wcfxs *wc, int card) wc->mod.fxo.battdebounce[card] = BATT_DEBOUNCE; } else if (!wc->mod.fxo.battery[card]) wc->mod.fxo.battdebounce[card] = BATT_DEBOUNCE; - } else if (abs(b) > 1) { + } else if (abs(b) > BATT_THRESH) { if (!wc->mod.fxo.battery[card] && !wc->mod.fxo.battdebounce[card]) { if (debug) printk("BATTERY!\n"); |