From: Karsten Keil <keil@b1-systems.de>
To: linux-kernel@vger.kernel.org
Cc: netdev@vger.kernel.org, David Miller <davem@davemloft.net>,
i4ldeveloper@listserv.isdn4linux.de
Subject: [mISDN PATCH v2 19/19] Fix DTMF detection enable/disable
Date: Fri, 22 May 2009 23:04:58 +0200 [thread overview]
Message-ID: <4df523cf314b1890e64eceb29def2bce41cbdffc.1243024967.git.kkeil@pingi.linux-pingi.de> (raw)
In-Reply-To: <cover.1243024967.git.kkeil@pingi.linux-pingi.de>
From: Andreas Eversberg <andreas@eversberg.eu>
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>
---
drivers/isdn/mISDN/dsp.h | 1 +
drivers/isdn/mISDN/dsp_core.c | 2 ++
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 564ea3e..18af868 100644
--- a/drivers/isdn/mISDN/dsp.h
+++ b/drivers/isdn/mISDN/dsp.h
@@ -116,6 +116,7 @@ struct dsp_conf {
#define ECHOCAN_BUFF_MASK 0x3ff /* -1 */
struct dsp_dtmf {
+ int enable; /* dtmf is enabled */
int treshold; /* above this is dtmf (square of) */
int software; /* dtmf uses software decoding */
int hardware; /* dtmf uses hardware decoding */
diff --git a/drivers/isdn/mISDN/dsp_core.c b/drivers/isdn/mISDN/dsp_core.c
index c357506..c12cd2f 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)
"to %d\n", *((int *)data));
dsp->dtmf.treshold = (*(int *)data) * 10000;
}
+ dsp->dtmf.enable = 1;
/* init goertzel */
dsp_dtmf_goertzel_init(dsp);
@@ -316,6 +317,7 @@ dsp_control_req(struct dsp *dsp, struct mISDNhead *hh, struct sk_buff *skb)
case DTMF_TONE_STOP: /* turn off DTMF */
if (dsp_debug & DEBUG_DSP_CORE)
printk(KERN_DEBUG "%s: stop dtmf\n", __func__);
+ dsp->dtmf.enable = 0;
dsp->dtmf.hardware = 0;
dsp->dtmf.software = 0;
break;
diff --git a/drivers/isdn/mISDN/dsp_dtmf.c b/drivers/isdn/mISDN/dsp_dtmf.c
index efc371c..9ae2d33 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)
{
int hardware = 1;
+ if (!dsp->dtmf.enable)
+ return;
+
if (!dsp->features.hfc_dtmf)
hardware = 0;
--
1.6.0.2
next prev parent reply other threads:[~2009-05-22 21:09 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-22 20:42 [mISDN PATCH v2 00/19] mISDN patchset for next Karsten Keil
2009-05-22 21:04 ` [mISDN PATCH v2 01/19] Add watchdog functionality to hfcmulti driver Karsten Keil
2009-05-22 21:04 ` [mISDN PATCH v2 02/19] DSP now uses ring buffer for echo canceler Karsten Keil
2009-05-22 21:04 ` [mISDN PATCH v2 03/19] Echo canceler now gets delay information from hardware Karsten Keil
2009-05-22 21:04 ` [mISDN PATCH v2 05/19] Reduce stack size in dsp_cmx_send() Karsten Keil
2009-05-22 21:04 ` [mISDN PATCH v2 04/19] Fixed missing spin lock on pipeline process Karsten Keil
2009-05-22 21:04 ` [mISDN PATCH v2 07/19] Fix DTMF locking bug issue Karsten Keil
2009-05-22 21:04 ` [mISDN PATCH v2 06/19] Added layer-1-hold feature Karsten Keil
2009-05-22 21:04 ` [mISDN PATCH v2 08/19] Hardware acceleration is now possible in conjunction with audio recording Karsten Keil
2009-05-22 21:04 ` [mISDN PATCH v2 09/19] Fix TEI and SAPI handling Karsten Keil
2009-05-22 21:53 ` Sam Ravnborg
2009-05-23 13:00 ` Karsten Keil
2009-05-23 23:10 ` Sam Ravnborg
2009-05-24 15:39 ` Karsten Keil
2009-05-22 21:04 ` [mISDN PATCH v2 11/19] Add allocation of recvbuf[1500] at run time to reduce stack size Karsten Keil
2009-05-22 21:04 ` [mISDN PATCH v2 10/19] Add "sapi" information to debug messages Karsten Keil
2009-05-22 21:04 ` [mISDN PATCH v2 12/19] Fix skb leak in error cases Karsten Keil
2009-05-22 21:04 ` [mISDN PATCH v2 13/19] isdn: get_free_devid() failure ignored Karsten Keil
2009-05-22 21:04 ` [mISDN PATCH v2 14/19] Add XHFC support for embedded Speech-Design board to hfcmulti Karsten Keil
2009-05-22 21:04 ` [mISDN PATCH v2 16/19] Added PCI ID for new Junghanns.net Single E1 cards Karsten Keil
2009-05-22 21:04 ` [mISDN PATCH v2 15/19] Add PCI ID for Junghanns 8S card Karsten Keil
2009-05-22 21:04 ` [mISDN PATCH v2 17/19] Cleanup debug messages Karsten Keil
2009-05-22 21:04 ` [mISDN PATCH v2 18/19] Use kernel_{send,recv}msg instead of open coding Karsten Keil
2009-05-22 21:04 ` Karsten Keil [this message]
2009-05-25 7:53 ` [mISDN PATCH v2 00/19] mISDN patchset for next David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4df523cf314b1890e64eceb29def2bce41cbdffc.1243024967.git.kkeil@pingi.linux-pingi.de \
--to=keil@b1-systems.de \
--cc=davem@davemloft.net \
--cc=i4ldeveloper@listserv.isdn4linux.de \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®