xpp: add FXO HWEC quirks handling
In some cases the hardware echo canceller cannot be used. Mostly related to an FXO module. * FXO module if the first module is BRI or PRI * FXS module if the Astribank has another FXO, no PRI/BRI, and is a sync slave. Signed-off-by: Oron Peled <oron.peled@xorcom.com> Acked-By: Tzafrir Cohen <tzafrir.cohen@xorcom.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10019 a0bf4364-ded3-4de4-8d8a-66a801d63aff
This commit is contained in:
committed by
Tzafrir Cohen
parent
bfbfdbab33
commit
d7e723ae8a
@@ -664,6 +664,10 @@ static int new_card(xbus_t *xbus,
|
||||
subunits,
|
||||
port_dir
|
||||
);
|
||||
if (type == XPD_TYPE_PRI || type == XPD_TYPE_BRI)
|
||||
xbus->quirks.has_digital_span = 1;
|
||||
if (type == XPD_TYPE_FXO)
|
||||
xbus->quirks.has_fxo = 1;
|
||||
xbus->worker.num_units += subunits - 1;
|
||||
for(i = 0; i < subunits; i++) {
|
||||
int subunit_ports = proto_table->ports_per_subunit;
|
||||
|
||||
@@ -207,6 +207,10 @@ struct xbus {
|
||||
int cpu_rcv_intr[NR_CPUS];
|
||||
int cpu_rcv_tasklet[NR_CPUS];
|
||||
|
||||
struct quirks {
|
||||
int has_fxo:1;
|
||||
int has_digital_span:1;
|
||||
} quirks;
|
||||
bool self_ticking;
|
||||
enum sync_mode sync_mode;
|
||||
/* Managed by low-level drivers: */
|
||||
|
||||
@@ -940,6 +940,26 @@ const char *xpp_echocan_name(const struct dahdi_chan *chan)
|
||||
LINE_DBG(GENERAL, xpd, pos, "%s:\n", __func__);
|
||||
if (!ECHOOPS(xbus))
|
||||
return NULL;
|
||||
/*
|
||||
* quirks and limitations
|
||||
*/
|
||||
if (xbus->quirks.has_fxo) {
|
||||
if (
|
||||
xbus->quirks.has_digital_span &&
|
||||
xpd->type == XPD_TYPE_FXO) {
|
||||
LINE_NOTICE(xpd, pos,
|
||||
"quirk: give up HWEC on FXO: "
|
||||
"AB has digital span\n");
|
||||
return NULL;
|
||||
} else if (
|
||||
xbus->sync_mode != SYNC_MODE_AB &&
|
||||
xpd->type == XPD_TYPE_FXS) {
|
||||
LINE_NOTICE(xpd, pos,
|
||||
"quirk: give up HWEC on FXS: "
|
||||
"AB has FXO and is sync slave\n");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
return "XPP";
|
||||
}
|
||||
EXPORT_SYMBOL(xpp_echocan_name);
|
||||
|
||||
Reference in New Issue
Block a user