aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-03-19 21:56:15 +0000
committerqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-03-19 21:56:15 +0000
commit2c4aac03992077a08b75c4c43f0041778075f951 (patch)
tree5227899b4ed3ce67d9744f7db3832898ad4817d3
parent76248bd9e7d83fe921adbb37582920eda100b5b5 (diff)
Rename very poorly named function to reflect what it actually does. This was causing quite a bit of confusion for me...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@110132 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--channels/chan_mgcp.c2
-rw-r--r--channels/chan_sip.c2
-rw-r--r--channels/chan_usbradio.c2
-rw-r--r--channels/chan_vpb.cc4
-rw-r--r--channels/chan_zap.c24
-rw-r--r--include/asterisk/dsp.h2
-rw-r--r--main/dsp.c2
7 files changed, 19 insertions, 19 deletions
diff --git a/channels/chan_mgcp.c b/channels/chan_mgcp.c
index 9f334298e..70cf0c4f2 100644
--- a/channels/chan_mgcp.c
+++ b/channels/chan_mgcp.c
@@ -1513,7 +1513,7 @@ static struct ast_channel *mgcp_new(struct mgcp_subchannel *sub, int state)
i->dsp = ast_dsp_new();
ast_dsp_set_features(i->dsp,DSP_FEATURE_DTMF_DETECT);
/* this is to prevent clipping of dtmf tones during dsp processing */
- ast_dsp_digitmode(i->dsp, DSP_DIGITMODE_NOQUELCH);
+ ast_dsp_set_digitmode(i->dsp, DSP_DIGITMODE_NOQUELCH);
} else {
i->dsp = NULL;
}
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 012f4020f..55e3362b1 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -5319,7 +5319,7 @@ static struct ast_channel *sip_new(struct sip_pvt *i, int state, const char *tit
i->vad = ast_dsp_new();
ast_dsp_set_features(i->vad, DSP_FEATURE_DTMF_DETECT);
if (global_relaxdtmf)
- ast_dsp_digitmode(i->vad, DSP_DIGITMODE_DTMF | DSP_DIGITMODE_RELAXDTMF);
+ ast_dsp_set_digitmode(i->vad, DSP_DIGITMODE_DTMF | DSP_DIGITMODE_RELAXDTMF);
}
/* Set file descriptors for audio, video, realtime text and UDPTL as needed */
diff --git a/channels/chan_usbradio.c b/channels/chan_usbradio.c
index 06f97939d..11c06e957 100644
--- a/channels/chan_usbradio.c
+++ b/channels/chan_usbradio.c
@@ -2285,7 +2285,7 @@ static struct chan_usbradio_pvt *store_config(struct ast_config *cfg, char *ctg)
o->dsp = ast_dsp_new();
if (o->dsp) {
ast_dsp_set_features(o->dsp, DSP_FEATURE_DTMF_DETECT);
- ast_dsp_digitmode(o->dsp, DSP_DIGITMODE_DTMF | DSP_DIGITMODE_MUTECONF | DSP_DIGITMODE_RELAXDTMF);
+ ast_dsp_set_digitmode(o->dsp, DSP_DIGITMODE_DTMF | DSP_DIGITMODE_MUTECONF | DSP_DIGITMODE_RELAXDTMF);
}
if (o->rxctcssfreq != 0 && o->rxdemod == RX_AUDIO_SPEAKER)
diff --git a/channels/chan_vpb.cc b/channels/chan_vpb.cc
index df7dfc2aa..3e8657286 100644
--- a/channels/chan_vpb.cc
+++ b/channels/chan_vpb.cc
@@ -1634,9 +1634,9 @@ static struct vpb_pvt *mkif(int board, int channel, int mode, int gains, float t
if (use_ast_dtmfdet) {
tmp->vad = ast_dsp_new();
ast_dsp_set_features(tmp->vad, DSP_FEATURE_DTMF_DETECT);
- ast_dsp_digitmode(tmp->vad, DSP_DIGITMODE_DTMF);
+ ast_dsp_set_digitmode(tmp->vad, DSP_DIGITMODE_DTMF);
if (relaxdtmf)
- ast_dsp_digitmode(tmp->vad, DSP_DIGITMODE_DTMF|DSP_DIGITMODE_RELAXDTMF);
+ ast_dsp_set_digitmode(tmp->vad, DSP_DIGITMODE_DTMF|DSP_DIGITMODE_RELAXDTMF);
} else {
tmp->vad = NULL;
}
diff --git a/channels/chan_zap.c b/channels/chan_zap.c
index 8cbde4b4a..88983415d 100644
--- a/channels/chan_zap.c
+++ b/channels/chan_zap.c
@@ -3000,7 +3000,7 @@ static int zt_hangup(struct ast_channel *ast)
p->origcid_name = NULL;
}
if (p->dsp)
- ast_dsp_digitmode(p->dsp,DSP_DIGITMODE_DTMF | p->dtmfrelax);
+ ast_dsp_set_digitmode(p->dsp, DSP_DIGITMODE_DTMF | p->dtmfrelax);
if (p->exten)
p->exten[0] = '\0';
@@ -3452,15 +3452,15 @@ static int zt_setoption(struct ast_channel *chan, int option, void *data, int da
switch (*cp) {
case 1:
ast_debug(1, "Set option TONE VERIFY, mode: MUTECONF(1) on %s\n",chan->name);
- ast_dsp_digitmode(p->dsp,DSP_DIGITMODE_MUTECONF | p->dtmfrelax); /* set mute mode if desired */
+ ast_dsp_set_digitmode(p->dsp, DSP_DIGITMODE_MUTECONF | p->dtmfrelax); /* set mute mode if desired */
break;
case 2:
ast_debug(1, "Set option TONE VERIFY, mode: MUTECONF/MAX(2) on %s\n",chan->name);
- ast_dsp_digitmode(p->dsp,DSP_DIGITMODE_MUTECONF | DSP_DIGITMODE_MUTEMAX | p->dtmfrelax); /* set mute mode if desired */
+ ast_dsp_set_digitmode(p->dsp, DSP_DIGITMODE_MUTECONF | DSP_DIGITMODE_MUTEMAX | p->dtmfrelax); /* set mute mode if desired */
break;
default:
ast_debug(1, "Set option TONE VERIFY, mode: OFF(0) on %s\n",chan->name);
- ast_dsp_digitmode(p->dsp,DSP_DIGITMODE_DTMF | p->dtmfrelax); /* set mute mode if desired */
+ ast_dsp_set_digitmode(p->dsp, DSP_DIGITMODE_DTMF | p->dtmfrelax); /* set mute mode if desired */
break;
}
break;
@@ -3543,7 +3543,7 @@ static int zt_setoption(struct ast_channel *chan, int option, void *data, int da
cp = (char *) data;
ast_debug(1, "Set option RELAX DTMF, value: %s(%d) on %s\n",
*cp ? "ON" : "OFF", (int) *cp, chan->name);
- ast_dsp_digitmode(p->dsp, ((*cp) ? DSP_DIGITMODE_RELAXDTMF : DSP_DIGITMODE_DTMF) | p->dtmfrelax);
+ ast_dsp_set_digitmode(p->dsp, ((*cp) ? DSP_DIGITMODE_RELAXDTMF : DSP_DIGITMODE_DTMF) | p->dtmfrelax);
break;
case AST_OPTION_AUDIO_MODE: /* Set AUDIO mode (or not) */
cp = (char *) data;
@@ -5930,7 +5930,7 @@ static struct ast_channel *zt_new(struct zt_pvt *i, int state, int startpbx, int
}
#endif
ast_dsp_set_features(i->dsp, features);
- ast_dsp_digitmode(i->dsp, DSP_DIGITMODE_DTMF | i->dtmfrelax);
+ ast_dsp_set_digitmode(i->dsp, DSP_DIGITMODE_DTMF | i->dtmfrelax);
if (!ast_strlen_zero(progzone))
ast_dsp_set_call_progress_zone(i->dsp, progzone);
if (i->busydetect && CANBUSYDETECT(i)) {
@@ -6203,9 +6203,9 @@ static void *ss_thread(void *data)
/* set digit mode appropriately */
if (p->dsp) {
if (NEED_MFDETECT(p))
- ast_dsp_digitmode(p->dsp,DSP_DIGITMODE_MF | p->dtmfrelax);
+ ast_dsp_set_digitmode(p->dsp, DSP_DIGITMODE_MF | p->dtmfrelax);
else
- ast_dsp_digitmode(p->dsp,DSP_DIGITMODE_DTMF | p->dtmfrelax);
+ ast_dsp_set_digitmode(p->dsp, DSP_DIGITMODE_DTMF | p->dtmfrelax);
}
memset(dtmfbuf, 0, sizeof(dtmfbuf));
/* Wait for the first digit only if immediate=no */
@@ -6319,14 +6319,14 @@ static void *ss_thread(void *data)
return NULL;
}
zt_set_hook(p->subs[SUB_REAL].zfd, ZT_OFFHOOK);
- ast_dsp_digitmode(p->dsp,DSP_DIGITMODE_MF | p->dtmfrelax);
+ ast_dsp_set_digitmode(p->dsp, DSP_DIGITMODE_MF | p->dtmfrelax);
res = my_getsigstr(chan, anibuf, "#", 10000);
if ((res > 0) && (strlen(anibuf) > 2)) {
if (anibuf[strlen(anibuf) - 1] == '#')
anibuf[strlen(anibuf) - 1] = 0;
ast_set_callerid(chan, anibuf + 2, NULL, anibuf + 2);
}
- ast_dsp_digitmode(p->dsp,DSP_DIGITMODE_DTMF | p->dtmfrelax);
+ ast_dsp_set_digitmode(p->dsp, DSP_DIGITMODE_DTMF | p->dtmfrelax);
}
ast_copy_string(exten, dtmfbuf, sizeof(exten));
@@ -6411,7 +6411,7 @@ static void *ss_thread(void *data)
if (NEED_MFDETECT(p)) {
if (p->dsp) {
if (!p->hardwaredtmf)
- ast_dsp_digitmode(p->dsp,DSP_DIGITMODE_DTMF | p->dtmfrelax);
+ ast_dsp_set_digitmode(p->dsp, DSP_DIGITMODE_DTMF | p->dtmfrelax);
else {
ast_dsp_free(p->dsp);
p->dsp = NULL;
@@ -8512,7 +8512,7 @@ static struct zt_pvt *mkintf(int channel, struct zt_chan_conf conf, struct zt_pr
if (tmp->subs[SUB_REAL].zfd > -1) {
set_actual_gain(tmp->subs[SUB_REAL].zfd, 0, tmp->rxgain, tmp->txgain, tmp->law);
if (tmp->dsp)
- ast_dsp_digitmode(tmp->dsp, DSP_DIGITMODE_DTMF | tmp->dtmfrelax);
+ ast_dsp_set_digitmode(tmp->dsp, DSP_DIGITMODE_DTMF | tmp->dtmfrelax);
update_conf(tmp);
if (!here) {
if ((conf.chan.sig != SIG_BRI) && (conf.chan.sig != SIG_BRI_PTMP) && (conf.chan.sig != SIG_PRI) && (conf.chan.sig != SIG_SS7))
diff --git a/include/asterisk/dsp.h b/include/asterisk/dsp.h
index 1235c3ae0..c1a367045 100644
--- a/include/asterisk/dsp.h
+++ b/include/asterisk/dsp.h
@@ -115,7 +115,7 @@ void ast_dsp_set_features(struct ast_dsp *dsp, int features);
int ast_dsp_getdigits(struct ast_dsp *dsp, char *buf, int max);
/*! \brief Set digit mode */
-int ast_dsp_digitmode(struct ast_dsp *dsp, int digitmode);
+int ast_dsp_set_digitmode(struct ast_dsp *dsp, int digitmode);
/*! \brief Set fax mode */
int ast_dsp_set_faxmode(struct ast_dsp *dsp, int faxmode);
diff --git a/main/dsp.c b/main/dsp.c
index e2de31af4..92d9a5725 100644
--- a/main/dsp.c
+++ b/main/dsp.c
@@ -1495,7 +1495,7 @@ void ast_dsp_reset(struct ast_dsp *dsp)
dsp->ringtimeout= 0;
}
-int ast_dsp_digitmode(struct ast_dsp *dsp, int digitmode)
+int ast_dsp_set_digitmode(struct ast_dsp *dsp, int digitmode)
{
int new;
int old;