[svn-commits] tzafrir: linux/trunk r10019 - /linux/trunk/drivers/dahdi/xpp/
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Mon Jul 4 09:04:37 CDT 2011
Author: tzafrir
Date: Mon Jul 4 09:04:33 2011
New Revision: 10019
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=10019
Log:
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 at xorcom.com>
Acked-By: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
Modified:
linux/trunk/drivers/dahdi/xpp/xbus-core.c
linux/trunk/drivers/dahdi/xpp/xbus-core.h
linux/trunk/drivers/dahdi/xpp/xpp_dahdi.c
Modified: linux/trunk/drivers/dahdi/xpp/xbus-core.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/xbus-core.c?view=diff&rev=10019&r1=10018&r2=10019
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/xbus-core.c (original)
+++ linux/trunk/drivers/dahdi/xpp/xbus-core.c Mon Jul 4 09:04:33 2011
@@ -664,6 +664,10 @@
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;
Modified: linux/trunk/drivers/dahdi/xpp/xbus-core.h
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/xbus-core.h?view=diff&rev=10019&r1=10018&r2=10019
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/xbus-core.h (original)
+++ linux/trunk/drivers/dahdi/xpp/xbus-core.h Mon Jul 4 09:04:33 2011
@@ -207,6 +207,10 @@
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: */
Modified: linux/trunk/drivers/dahdi/xpp/xpp_dahdi.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/xpp_dahdi.c?view=diff&rev=10019&r1=10018&r2=10019
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/xpp_dahdi.c (original)
+++ linux/trunk/drivers/dahdi/xpp/xpp_dahdi.c Mon Jul 4 09:04:33 2011
@@ -940,6 +940,26 @@
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);
More information about the svn-commits
mailing list