diff options
author | Andreas Eversberg <andreas@eversberg.eu> | 2009-05-22 07:04:58 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-05-25 03:55:47 -0400 |
commit | b0579d7459aaa979b96016f3cac5e59fd3cb72b5 (patch) | |
tree | 7e1b7ccaba16c96dfc2bf3100920d6b182172697 /drivers/isdn | |
parent | 8c90e11e3543d7de612194a042a148caeaab5f1d (diff) |
mISDN: Fix DTMF detection enable/disable
DTMF detection was enabled when it was not supposed to.
Signed-off-by: Andreas Eversberg <andreas@eversberg.eu>
Signed-off-by: Karsten Keil <keil@b1-systems.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn')
-rw-r--r-- | drivers/isdn/mISDN/dsp.h | 1 | ||||
-rw-r--r-- | drivers/isdn/mISDN/dsp_core.c | 2 | ||||
-rw-r--r-- | drivers/isdn/mISDN/dsp_dtmf.c | 3 |
3 files changed, 6 insertions, 0 deletions
diff --git a/drivers/isdn/mISDN/dsp.h b/drivers/isdn/mISDN/dsp.h index 564ea3efd5e3..18af86879c05 100644 --- a/drivers/isdn/mISDN/dsp.h +++ b/drivers/isdn/mISDN/dsp.h | |||
@@ -116,6 +116,7 @@ struct dsp_conf { | |||
116 | #define ECHOCAN_BUFF_MASK 0x3ff /* -1 */ | 116 | #define ECHOCAN_BUFF_MASK 0x3ff /* -1 */ |
117 | 117 | ||
118 | struct dsp_dtmf { | 118 | struct dsp_dtmf { |
119 | int enable; /* dtmf is enabled */ | ||
119 | int treshold; /* above this is dtmf (square of) */ | 120 | int treshold; /* above this is dtmf (square of) */ |
120 | int software; /* dtmf uses software decoding */ | 121 | int software; /* dtmf uses software decoding */ |
121 | int hardware; /* dtmf uses hardware decoding */ | 122 | int hardware; /* dtmf uses hardware decoding */ |
diff --git a/drivers/isdn/mISDN/dsp_core.c b/drivers/isdn/mISDN/dsp_core.c index c35750647c66..c12cd2f94254 100644 --- a/drivers/isdn/mISDN/dsp_core.c +++ b/drivers/isdn/mISDN/dsp_core.c | |||
@@ -306,6 +306,7 @@ dsp_control_req(struct dsp *dsp, struct mISDNhead *hh, struct sk_buff *skb) | |||
306 | "to %d\n", *((int *)data)); | 306 | "to %d\n", *((int *)data)); |
307 | dsp->dtmf.treshold = (*(int *)data) * 10000; | 307 | dsp->dtmf.treshold = (*(int *)data) * 10000; |
308 | } | 308 | } |
309 | dsp->dtmf.enable = 1; | ||
309 | /* init goertzel */ | 310 | /* init goertzel */ |
310 | dsp_dtmf_goertzel_init(dsp); | 311 | dsp_dtmf_goertzel_init(dsp); |
311 | 312 | ||
@@ -316,6 +317,7 @@ dsp_control_req(struct dsp *dsp, struct mISDNhead *hh, struct sk_buff *skb) | |||
316 | case DTMF_TONE_STOP: /* turn off DTMF */ | 317 | case DTMF_TONE_STOP: /* turn off DTMF */ |
317 | if (dsp_debug & DEBUG_DSP_CORE) | 318 | if (dsp_debug & DEBUG_DSP_CORE) |
318 | printk(KERN_DEBUG "%s: stop dtmf\n", __func__); | 319 | printk(KERN_DEBUG "%s: stop dtmf\n", __func__); |
320 | dsp->dtmf.enable = 0; | ||
319 | dsp->dtmf.hardware = 0; | 321 | dsp->dtmf.hardware = 0; |
320 | dsp->dtmf.software = 0; | 322 | dsp->dtmf.software = 0; |
321 | break; | 323 | break; |
diff --git a/drivers/isdn/mISDN/dsp_dtmf.c b/drivers/isdn/mISDN/dsp_dtmf.c index efc371c1f0dc..9ae2d33b06f7 100644 --- a/drivers/isdn/mISDN/dsp_dtmf.c +++ b/drivers/isdn/mISDN/dsp_dtmf.c | |||
@@ -51,6 +51,9 @@ void dsp_dtmf_hardware(struct dsp *dsp) | |||
51 | { | 51 | { |
52 | int hardware = 1; | 52 | int hardware = 1; |
53 | 53 | ||
54 | if (!dsp->dtmf.enable) | ||
55 | return; | ||
56 | |||
54 | if (!dsp->features.hfc_dtmf) | 57 | if (!dsp->features.hfc_dtmf) |
55 | hardware = 0; | 58 | hardware = 0; |
56 | 59 | ||