[svn-commits] sruffell: branch linux/sruffell/staging r6510 - in /linux/team/sruffell/stagi...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Mon Apr 27 14:32:18 CDT 2009
Author: sruffell
Date: Mon Apr 27 14:32:13 2009
New Revision: 6510
URL: http://svn.digium.com/svn-view/dahdi?view=rev&rev=6510
Log:
echocan-squash: Revert "improve new echocan API a bit to add some parameters that hw echocans need for andling their state structures"
This reverts commit 997d7da4011388366ffb60dc8d372a960cbf1bc1.
Modified:
linux/team/sruffell/staging/drivers/dahdi/voicebus/GpakCust.c
linux/team/sruffell/staging/drivers/dahdi/voicebus/GpakCust.h
linux/team/sruffell/staging/drivers/dahdi/wctdm24xxp/base.c
linux/team/sruffell/staging/drivers/dahdi/wctdm24xxp/wctdm24xxp.h
Modified: linux/team/sruffell/staging/drivers/dahdi/voicebus/GpakCust.c
URL: http://svn.digium.com/svn-view/dahdi/linux/team/sruffell/staging/drivers/dahdi/voicebus/GpakCust.c?view=diff&rev=6510&r1=6509&r2=6510
==============================================================================
--- linux/team/sruffell/staging/drivers/dahdi/voicebus/GpakCust.c (original)
+++ linux/team/sruffell/staging/drivers/dahdi/voicebus/GpakCust.c Mon Apr 27 14:32:13 2009
@@ -331,13 +331,6 @@
}
EXPORT_SYMBOL(vpmadt032_echocan_with_params);
-void vpmadt032_echocan_free(struct vpmadt032 *vpm, int channo, struct dahdi_echocan_state *ec)
-{
- return; /* !!! fill in */
-}
-EXPORT_SYMBOL(vpmadt032_echocan_free);
-
-
struct vpmadt032 *vpmadt032_alloc(struct vpmadt032_options *options)
{
struct vpmadt032 *vpm;
Modified: linux/team/sruffell/staging/drivers/dahdi/voicebus/GpakCust.h
URL: http://svn.digium.com/svn-view/dahdi/linux/team/sruffell/staging/drivers/dahdi/voicebus/GpakCust.h?view=diff&rev=6510&r1=6509&r2=6510
==============================================================================
--- linux/team/sruffell/staging/drivers/dahdi/voicebus/GpakCust.h (original)
+++ linux/team/sruffell/staging/drivers/dahdi/voicebus/GpakCust.h Mon Apr 27 14:32:13 2009
@@ -123,7 +123,6 @@
struct voicebus;
struct dahdi_echocanparams;
struct dahdi_echocanparam;
-struct dahdi_echocan_state;
char vpmadt032tone_to_zaptone(GpakToneCodes_t tone);
int vpmadt032_init(struct vpmadt032 *vpm, struct voicebus *vb);
@@ -131,7 +130,6 @@
void vpmadt032_free(struct vpmadt032 *vpm);
int vpmadt032_echocan_with_params(struct vpmadt032 *vpm, int channo,
struct dahdi_echocanparams *ecp, struct dahdi_echocanparam *p);
-void vpmadt032_echocan_free(struct vpmadt032 *vpm, int channo, struct dahdi_echocan_state *ec);
/* If there is a command ready to go to the VPMADT032, return it, otherwise NULL */
static inline struct vpmadt032_cmd *vpmadt032_get_ready_cmd(struct vpmadt032 *vpm)
Modified: linux/team/sruffell/staging/drivers/dahdi/wctdm24xxp/base.c
URL: http://svn.digium.com/svn-view/dahdi/linux/team/sruffell/staging/drivers/dahdi/wctdm24xxp/base.c?view=diff&rev=6510&r1=6509&r2=6510
==============================================================================
--- linux/team/sruffell/staging/drivers/dahdi/wctdm24xxp/base.c (original)
+++ linux/team/sruffell/staging/drivers/dahdi/wctdm24xxp/base.c Mon Apr 27 14:32:13 2009
@@ -227,32 +227,6 @@
static int vpmnlpthresh = 24;
/* See vpmnlptype = 4 for more info */
static int vpmnlpmaxsupp = 0;
-
-static int echocan_create(struct dahdi_chan *chan, struct dahdi_echocanparams *ecp,
- struct dahdi_echocanparam *p, struct dahdi_echocan_state **ec);
-static void echocan_free(struct dahdi_chan *chan, struct dahdi_echocan_state *ec);
-
-static const struct dahdi_echocan_features vpm100m_ec_features = {
- .NLP_automatic = 1,
- .CED_tx_detect = 1,
- .CED_rx_detect = 1,
-};
-
-static const struct dahdi_echocan_features vpm150m_ec_features = {
- .NLP_automatic = 1,
- .CED_tx_detect = 1,
- .CED_rx_detect = 1,
-};
-
-static const struct dahdi_echocan_ops vpm100m_ec_ops = {
- .name = "VPM100M",
- .echocan_free = echocan_free,
-};
-
-static const struct dahdi_echocan_ops vpm150m_ec_ops = {
- .name = "VPM150M",
- .echocan_free = echocan_free,
-};
static int wctdm_init_proslic(struct wctdm *wc, int card, int fast , int manual, int sane);
@@ -1654,33 +1628,10 @@
}
}
-static int echocan_create(struct dahdi_chan *chan, struct dahdi_echocanparams *ecp,
- struct dahdi_echocanparam *p, struct dahdi_echocan_state **ec)
-{
- int res;
+static int wctdm_echocan_with_params(struct dahdi_chan *chan,
+ struct dahdi_echocanparams *ecp, struct dahdi_echocanparam *p)
+{
struct wctdm *wc = chan->pvt;
- const struct dahdi_echocan_ops *ops;
- const struct dahdi_echocan_features *features;
-
- if (!wc->vpm100 && !wc->vpmadt032)
- return -ENODEV;
-
- if (wc->vpmadt032) {
- ops = &vpm150m_ec_ops;
- features = &vpm150m_ec_features;
- } else {
- ops = &vpm100m_ec_ops;
- features = &vpm100m_ec_features;
- }
-
- if (ecp->param_count > 0) {
- printk(KERN_WARNING "%s echo canceller does not support parameters; failing request\n", ops->name);
- return -EINVAL;
- }
-
- *ec = wc->ec[chan->chanpos - 1];
- (*ec)->ops = ops;
- (*ec)->features = *features;
if (wc->vpm100) {
int channel;
@@ -1691,40 +1642,20 @@
if (wc->vpm100 < 2)
channel >>= 2;
- if (debug & DEBUG_ECHOCAN)
+ if(debug & DEBUG_ECHOCAN)
printk(KERN_DEBUG "echocan: Unit is %d, Channel is %d length %d\n",
- unit, channel, ecp->tap_length);
- wctdm_vpm_out(wc, unit, channel, 0x3e);
- res = 0;
+ unit, channel, ecp->tap_length);
+ if (ecp->tap_length)
+ wctdm_vpm_out(wc,unit,channel,0x3e);
+ else
+ wctdm_vpm_out(wc,unit,channel,0x01);
+
+ return 0;
} else if (wc->vpmadt032) {
- res = vpmadt032_echocan_with_params(wc->vpmadt032,
+ return vpmadt032_echocan_with_params(wc->vpmadt032,
chan->chanpos-1, ecp, p);
} else {
- res = -ENODEV;
- }
- return res;
-}
-
-static void echocan_free(struct dahdi_chan *chan, struct dahdi_echocan_state *ec)
-{
- struct wctdm *wc = chan->pvt;
-
- memset(ec, 0, sizeof(*ec));
- if (wc->vpm100) {
- int channel;
- int unit;
-
- channel = (chan->chanpos - 1);
- unit = (chan->chanpos - 1) & 0x3;
- if (wc->vpm100 < 2)
- channel >>= 2;
-
- if (debug & DEBUG_ECHOCAN)
- printk(KERN_DEBUG "echocan: Unit is %d, Channel is %d length 0\n",
- unit, channel);
- wctdm_vpm_out(wc, unit, channel, 0x01);
- } else if (wc->vpmadt032) {
- vpmadt032_echocan_free(wc->vpmadt032, chan->chanpos-1, ec);
+ return -ENODEV;
}
}
@@ -3256,7 +3187,7 @@
wc->span.watchdog = wctdm_watchdog;
wc->span.dacs= wctdm_dacs;
#ifdef VPM_SUPPORT
- wc->span.echocan_create = echocan_create;
+ wc->span.echocan_with_params = wctdm_echocan_with_params;
#endif
init_waitqueue_head(&wc->span.maintq);
@@ -3656,8 +3587,6 @@
if (wc->chans[x]) {
kfree(wc->chans[x]);
}
- if (wc->ec[x])
- kfree(wc->ec[x]);
}
kfree(wc);
}
@@ -3722,11 +3651,6 @@
return -ENOMEM;
}
memset(wc->chans[i], 0, sizeof(*wc->chans[i]));
- if (!(wc->ec[i] = kmalloc(sizeof(*wc->ec[i]), GFP_KERNEL))) {
- free_wc(wc);
- return -ENOMEM;
- }
- memset(wc->ec[i], 0, sizeof(*wc->ec[i]));
}
Modified: linux/team/sruffell/staging/drivers/dahdi/wctdm24xxp/wctdm24xxp.h
URL: http://svn.digium.com/svn-view/dahdi/linux/team/sruffell/staging/drivers/dahdi/wctdm24xxp/wctdm24xxp.h?view=diff&rev=6510&r1=6509&r2=6510
==============================================================================
--- linux/team/sruffell/staging/drivers/dahdi/wctdm24xxp/wctdm24xxp.h (original)
+++ linux/team/sruffell/staging/drivers/dahdi/wctdm24xxp/wctdm24xxp.h Mon Apr 27 14:32:13 2009
@@ -235,7 +235,6 @@
#endif
struct voicebus *vb;
struct dahdi_chan *chans[NUM_CARDS];
- struct dahdi_echocan_state *ec[NUM_CARDS];
int initialized;
};
More information about the svn-commits
mailing list