[dahdi-commits] sruffell: branch linux/sruffell/dahdi-linux-13562 r9149 - /linux/team/sruffel...
SVN commits to the DAHDI project
dahdi-commits at lists.digium.com
Tue Aug 17 15:32:20 CDT 2010
Author: sruffell
Date: Tue Aug 17 15:32:12 2010
New Revision: 9149
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9149
Log:
wctdm24xxp: Run tx audio through a high-pass when using the VPMADT032.
DAHDI-649
Modified:
linux/team/sruffell/dahdi-linux-13562/drivers/dahdi/wctdm24xxp/base.c
linux/team/sruffell/dahdi-linux-13562/drivers/dahdi/wctdm24xxp/wctdm24xxp.h
Modified: linux/team/sruffell/dahdi-linux-13562/drivers/dahdi/wctdm24xxp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/team/sruffell/dahdi-linux-13562/drivers/dahdi/wctdm24xxp/base.c?view=diff&rev=9149&r1=9148&r2=9149
==============================================================================
--- linux/team/sruffell/dahdi-linux-13562/drivers/dahdi/wctdm24xxp/base.c (original)
+++ linux/team/sruffell/dahdi-linux-13562/drivers/dahdi/wctdm24xxp/base.c Tue Aug 17 15:32:12 2010
@@ -271,9 +271,40 @@
.echocan_free = echocan_free,
};
+/**
+ * echocan_process_tx() - This is an adaptation of oslec_hpf_tx from Linux
+ *
+ */
+static void echocan_process_tx(struct dahdi_echocan_state *ec, short *tx, u32 size)
+{
+ struct wctdm24xxp_ec_state *pvt;
+ u32 samplenum;
+ pvt = container_of(ec, struct wctdm24xxp_ec_state, dahdi);
+
+ for (samplenum = 0; samplenum < size; samplenum++, tx++) {
+ enum { DC_LOG2BETA = 3 };
+ int tmp, tmp1;
+
+ tmp = *tx << 15;
+ tmp -= ((*tx << 15) >> 4);
+
+ pvt->tx_1 += -(pvt->tx_1 >> DC_LOG2BETA) + tmp - pvt->tx_2;
+ tmp1 = pvt->tx_1 >> 15;
+ if (tmp1 > 32767)
+ tmp1 = 32767;
+ if (tmp1 < -32767)
+ tmp1 = -32767;
+ *tx = tmp1;
+ pvt->tx_2 = tmp;
+
+ }
+}
+
+
static const struct dahdi_echocan_ops vpm150m_ec_ops = {
.name = "VPM150M",
.echocan_free = echocan_free,
+ .echocan_process_tx = echocan_process_tx,
};
static int wctdm_init_proslic(struct wctdm *wc, int card, int fast , int manual, int sane);
@@ -2005,7 +2036,7 @@
return -EINVAL;
}
- *ec = &wchan->ec;
+ *ec = &wchan->ec.dahdi;
(*ec)->ops = ops;
(*ec)->features = *features;
Modified: linux/team/sruffell/dahdi-linux-13562/drivers/dahdi/wctdm24xxp/wctdm24xxp.h
URL: http://svnview.digium.com/svn/dahdi/linux/team/sruffell/dahdi-linux-13562/drivers/dahdi/wctdm24xxp/wctdm24xxp.h?view=diff&rev=9149&r1=9148&r2=9149
==============================================================================
--- linux/team/sruffell/dahdi-linux-13562/drivers/dahdi/wctdm24xxp/wctdm24xxp.h (original)
+++ linux/team/sruffell/dahdi-linux-13562/drivers/dahdi/wctdm24xxp/wctdm24xxp.h Tue Aug 17 15:32:12 2010
@@ -159,9 +159,14 @@
struct b400m_span *bspan;
};
+struct wctdm24xxp_ec_state {
+ int tx_1, tx_2;
+ struct dahdi_echocan_state dahdi;
+};
+
struct wctdm_chan {
struct dahdi_chan chan;
- struct dahdi_echocan_state ec;
+ struct wctdm24xxp_ec_state ec;
int timeslot;
};
More information about the dahdi-commits
mailing list