diff options
author | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2011-07-04 14:04:33 +0000 |
---|---|---|
committer | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2011-07-04 14:04:33 +0000 |
commit | 0400a2e6a773a5f30e271e218f124080f2f355ae (patch) | |
tree | ee3a35d0520d26ca9934a85c90a6e9366d192e8b /drivers/dahdi/xpp/xpp_dahdi.c | |
parent | e721c230bee364d3b716ee6b758b16610e041ed7 (diff) |
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
Diffstat (limited to 'drivers/dahdi/xpp/xpp_dahdi.c')
-rw-r--r-- | drivers/dahdi/xpp/xpp_dahdi.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/dahdi/xpp/xpp_dahdi.c b/drivers/dahdi/xpp/xpp_dahdi.c index 3bad387..3c25392 100644 --- a/drivers/dahdi/xpp/xpp_dahdi.c +++ b/drivers/dahdi/xpp/xpp_dahdi.c @@ -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); |