mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
mISDN >= 1.2 provides a dsp pipeline for i.e. echo cancellation modules, make chan_misdn use it.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@59199 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -573,13 +573,16 @@ void empty_bc(struct misdn_bchannel *bc)
|
||||
bc->active = 0;
|
||||
|
||||
bc->early_bconnect = 1;
|
||||
|
||||
|
||||
#ifdef MISDN_1_2
|
||||
*bc->pipeline = 0;
|
||||
#else
|
||||
bc->ec_enable = 0;
|
||||
bc->ec_deftaps = 128;
|
||||
bc->ec_whenbridged = 0;
|
||||
|
||||
#ifdef EC_TRAIN
|
||||
bc->ec_training = 1;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
bc->orig=0;
|
||||
@@ -4240,16 +4243,21 @@ void misdn_lib_send_tone(struct misdn_bchannel *bc, enum tone_e tone)
|
||||
|
||||
void manager_ec_enable(struct misdn_bchannel *bc)
|
||||
{
|
||||
int ec_arr[2];
|
||||
|
||||
struct misdn_stack *stack=get_stack_by_bc(bc);
|
||||
|
||||
cb_log(4, stack?stack->port:0,"ec_enable\n");
|
||||
|
||||
if (!misdn_cap_is_speech(bc->capability)) {
|
||||
cb_log(1, stack?stack->port:0, " --> no speech? cannot enable EC\n");
|
||||
return;
|
||||
} else {
|
||||
|
||||
#ifdef MISDN_1_2
|
||||
if (*bc->pipeline) {
|
||||
cb_log(3, stack?stack->port:0,"Sending Control PIPELINE_CFG %s\n",bc->pipeline);
|
||||
manager_ph_control_block(bc, PIPELINE_CFG, bc->pipeline, strlen(bc->pipeline) + 1);
|
||||
}
|
||||
#else
|
||||
int ec_arr[2];
|
||||
|
||||
if (bc->ec_enable) {
|
||||
cb_log(3, stack?stack->port:0,"Sending Control ECHOCAN_ON taps:%d training:%d\n",bc->ec_deftaps, bc->ec_training);
|
||||
@@ -4276,6 +4284,8 @@ void manager_ec_enable(struct misdn_bchannel *bc)
|
||||
|
||||
manager_ph_control_block(bc, ECHOCAN_ON, ec_arr, sizeof(ec_arr));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4291,10 +4301,14 @@ void manager_ec_disable(struct misdn_bchannel *bc)
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef MISDN_1_2
|
||||
manager_ph_control_block(bc, PIPELINE_CFG, "", 0);
|
||||
#else
|
||||
if ( ! bc->ec_enable) {
|
||||
cb_log(3, stack?stack->port:0, "Sending Control ECHOCAN_OFF\n");
|
||||
manager_ph_control(bc, ECHOCAN_OFF, 0);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
struct misdn_stack* get_misdn_stack() {
|
||||
|
Reference in New Issue
Block a user