[svn-commits] kmoore: linux/trunk r9524 - in /linux/trunk: drivers/dahdi/ drivers/dahdi/wcb...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Dec 9 14:19:33 CST 2010


Author: kmoore
Date: Thu Dec  9 14:19:26 2010
New Revision: 9524

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9524
Log:
dahdi-base, dahdi_echocan_*, wcb4xxp, wct4xxp, wctdm24xxp, wcte12xp, kernel: Allow name of EC factory to vary based on channel

Changed the echocan factory name to a function (get_name) called to get the
name.  This allows a factory to return a different name when being called in
reference to a channel such as in the case of hardware echo cancellers.  To
further accommodate this change for HWEC, a new echocan_name function was
added to the span ops struct and is used in hwec_factory in dahdi-base for
all cards that support hardware echo cancellation.

Signed-off-by: Kinsey Moore <kmoore at digium.com>
Acked-by: Shaun Ruffell <sruffell at digium.com>

Modified:
    linux/trunk/drivers/dahdi/dahdi-base.c
    linux/trunk/drivers/dahdi/dahdi_echocan_jpah.c
    linux/trunk/drivers/dahdi/dahdi_echocan_kb1.c
    linux/trunk/drivers/dahdi/dahdi_echocan_mg2.c
    linux/trunk/drivers/dahdi/dahdi_echocan_oslec.c
    linux/trunk/drivers/dahdi/dahdi_echocan_sec.c
    linux/trunk/drivers/dahdi/dahdi_echocan_sec2.c
    linux/trunk/drivers/dahdi/wcb4xxp/base.c
    linux/trunk/drivers/dahdi/wct4xxp/base.c
    linux/trunk/drivers/dahdi/wctdm24xxp/base.c
    linux/trunk/drivers/dahdi/wcte12xp/base.c
    linux/trunk/include/dahdi/kernel.h

Modified: linux/trunk/drivers/dahdi/dahdi-base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/dahdi-base.c?view=diff&rev=9524&r1=9523&r2=9524
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi-base.c (original)
+++ linux/trunk/drivers/dahdi/dahdi-base.c Thu Dec  9 14:19:26 2010
@@ -799,7 +799,7 @@
 
 		if (chan->ec_factory)
 			len += snprintf(page+len, count-len, "(EC: %s - %s) ",
-					chan->ec_factory->name,
+					chan->ec_factory->get_name(chan),
 					chan->ec_state ? "ACTIVE" : "INACTIVE");
 
 		len += snprintf(page+len, count-len, "\n");
@@ -1197,7 +1197,7 @@
 	read_lock(&ecfactory_list_lock);
 
 	list_for_each_entry(cur, &ecfactory_list, list) {
-		if (!strcmp(name_upper, cur->ec->name)) {
+		if (!strcmp(name_upper, cur->ec->get_name(NULL))) {
 			if (try_module_get(cur->ec->owner)) {
 				read_unlock(&ecfactory_list_lock);
 				kfree(name_upper);
@@ -4603,8 +4603,9 @@
 		dahdi_copy_string(vi.version, DAHDI_VERSION, sizeof(vi.version));
 		read_lock(&ecfactory_list_lock);
 		list_for_each_entry(cur, &ecfactory_list, list) {
-			strncat(vi.echo_canceller + strlen(vi.echo_canceller), cur->ec->name, space);
-			space -= strlen(cur->ec->name);
+			strncat(vi.echo_canceller + strlen(vi.echo_canceller),
+				cur->ec->get_name(NULL), space);
+			space -= strlen(cur->ec->get_name(NULL));
 			if (space < 1) {
 				break;
 			}
@@ -5478,7 +5479,9 @@
 		/* try to get another reference to the module providing
 		   this channel's echo canceler */
 		if (!try_module_get(chan->ec_factory->owner)) {
-			module_printk(KERN_ERR, "Cannot get a reference to the '%s' echo canceler\n", chan->ec_factory->name);
+			module_printk(KERN_ERR, "Cannot get a reference to the"
+				      " '%s' echo canceler\n",
+				      chan->ec_factory->get_name(chan));
 			goto exit_with_free;
 		}
 
@@ -5495,7 +5498,7 @@
 		if (!ec) {
 			module_printk(KERN_ERR, "%s failed to allocate an " \
 				      "dahdi_echocan_state instance.\n",
-				      ec_current->name);
+				      ec_current->get_name(chan));
 			ret = -EFAULT;
 			goto exit_with_free;
 		}
@@ -8899,6 +8902,15 @@
 	return 0;
 }
 
+static const char *hwec_def_name = "HWEC";
+static const char *hwec_get_name(const struct dahdi_chan *chan)
+{
+	if (chan && chan->span && chan->span->ops->echocan_name)
+		return chan->span->ops->echocan_name(chan);
+	else
+		return hwec_def_name;
+}
+
 static int hwec_echocan_create(struct dahdi_chan *chan,
 	struct dahdi_echocanparams *ecp, struct dahdi_echocanparam *p,
 	struct dahdi_echocan_state **ec)
@@ -8910,7 +8922,7 @@
 }
 
 static const struct dahdi_echocan_factory hwec_factory = {
-	.name = "HWEC",
+	.get_name = hwec_get_name,
 	.owner = THIS_MODULE,
 	.echocan_create = hwec_echocan_create,
 };

Modified: linux/trunk/drivers/dahdi/dahdi_echocan_jpah.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/dahdi_echocan_jpah.c?view=diff&rev=9524&r1=9523&r2=9524
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi_echocan_jpah.c (original)
+++ linux/trunk/drivers/dahdi/dahdi_echocan_jpah.c Thu Dec  9 14:19:26 2010
@@ -46,9 +46,11 @@
 static void echo_can_free(struct dahdi_chan *chan, struct dahdi_echocan_state *ec);
 static void echo_can_process(struct dahdi_echocan_state *ec, short *isig, const short *iref, u32 size);
 static int echo_can_traintap(struct dahdi_echocan_state *ec, int pos, short val);
+static const char *name = "JPAH";
+static const char *ec_name(const struct dahdi_chan *chan) { return name; }
 
 static const struct dahdi_echocan_factory my_factory = {
-	.name = "JPAH",
+	.get_name = ec_name,
 	.owner = THIS_MODULE,
 	.echocan_create = echo_can_create,
 };
@@ -124,7 +126,8 @@
 		return -EPERM;
 	}
 
-	module_printk(KERN_NOTICE, "Registered echo canceler '%s'\n", my_factory.name);
+	module_printk(KERN_NOTICE, "Registered echo canceler '%s'\n",
+		      my_factory.get_name(NULL));
 
 	return 0;
 }

Modified: linux/trunk/drivers/dahdi/dahdi_echocan_kb1.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/dahdi_echocan_kb1.c?view=diff&rev=9524&r1=9523&r2=9524
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi_echocan_kb1.c (original)
+++ linux/trunk/drivers/dahdi/dahdi_echocan_kb1.c Thu Dec  9 14:19:26 2010
@@ -148,9 +148,11 @@
 static void echo_can_process(struct dahdi_echocan_state *ec, short *isig, const short *iref, u32 size);
 static int echo_can_traintap(struct dahdi_echocan_state *ec, int pos, short val);
 static void echocan_NLP_toggle(struct dahdi_echocan_state *ec, unsigned int enable);
+static const char *name = "KB1";
+static const char *ec_name(const struct dahdi_chan *chan) { return name; }
 
 static const struct dahdi_echocan_factory my_factory = {
-	.name = "KB1",
+	.get_name = ec_name,
 	.owner = THIS_MODULE,
 	.echocan_create = echo_can_create,
 };
@@ -722,7 +724,8 @@
 		return -EPERM;
 	}
 
-	module_printk(KERN_NOTICE, "Registered echo canceler '%s'\n", my_factory.name);
+	module_printk(KERN_NOTICE, "Registered echo canceler '%s'\n",
+		      my_factory.get_name(NULL));
 
 	return 0;
 }

Modified: linux/trunk/drivers/dahdi/dahdi_echocan_mg2.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/dahdi_echocan_mg2.c?view=diff&rev=9524&r1=9523&r2=9524
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi_echocan_mg2.c (original)
+++ linux/trunk/drivers/dahdi/dahdi_echocan_mg2.c Thu Dec  9 14:19:26 2010
@@ -180,9 +180,11 @@
 static void echo_can_process(struct dahdi_echocan_state *ec, short *isig, const short *iref, u32 size);
 static int echo_can_traintap(struct dahdi_echocan_state *ec, int pos, short val);
 static void echocan_NLP_toggle(struct dahdi_echocan_state *ec, unsigned int enable);
+static const char *name = "MG2";
+static const char *ec_name(const struct dahdi_chan *chan) { return name; }
 
 static const struct dahdi_echocan_factory my_factory = {
-	.name = "MG2",
+	.get_name = ec_name,
 	.owner = THIS_MODULE,
 	.echocan_create = echo_can_create,
 };
@@ -869,7 +871,8 @@
 		return -EPERM;
 	}
 
-	module_printk(KERN_NOTICE, "Registered echo canceler '%s'\n", my_factory.name);
+	module_printk(KERN_NOTICE, "Registered echo canceler '%s'\n",
+		      my_factory.get_name(NULL));
 
 	return 0;
 }

Modified: linux/trunk/drivers/dahdi/dahdi_echocan_oslec.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/dahdi_echocan_oslec.c?view=diff&rev=9524&r1=9523&r2=9524
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi_echocan_oslec.c (original)
+++ linux/trunk/drivers/dahdi/dahdi_echocan_oslec.c Thu Dec  9 14:19:26 2010
@@ -47,9 +47,11 @@
 static void echo_can_hpf_tx(struct dahdi_echocan_state *ec,
 			    short *tx, u32 size);
 #endif
+static const char *name = "OSLEC";
+static const char *ec_name(const struct dahdi_chan *chan) { return name; }
 
 static const struct dahdi_echocan_factory my_factory = {
-	.name = "OSLEC",
+	.get_name = ec_name,
 	.owner = THIS_MODULE,
 	.echocan_create = echo_can_create,
 };
@@ -147,7 +149,8 @@
 		return -EPERM;
 	}
 
-	module_printk(KERN_INFO, "Registered echo canceler '%s'\n", my_factory.name);
+	module_printk(KERN_INFO, "Registered echo canceler '%s'\n",
+		my_factory.get_name(NULL));
 
 	return 0;
 }

Modified: linux/trunk/drivers/dahdi/dahdi_echocan_sec.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/dahdi_echocan_sec.c?view=diff&rev=9524&r1=9523&r2=9524
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi_echocan_sec.c (original)
+++ linux/trunk/drivers/dahdi/dahdi_echocan_sec.c Thu Dec  9 14:19:26 2010
@@ -86,9 +86,11 @@
 static void echo_can_process(struct dahdi_echocan_state *ec, short *isig, const short *iref, u32 size);
 static int echo_can_traintap(struct dahdi_echocan_state *ec, int pos, short val);
 static void echocan_NLP_toggle(struct dahdi_echocan_state *ec, unsigned int enable);
+static const char *name = "SEC";
+static const char *ec_name(const struct dahdi_chan *chan) { return name; }
 
 static const struct dahdi_echocan_factory my_factory = {
-	.name = "SEC",
+	.get_name = ec_name,
 	.owner = THIS_MODULE,
 	.echocan_create = echo_can_create,
 };
@@ -335,7 +337,8 @@
 		return -EPERM;
 	}
 
-	module_printk(KERN_NOTICE, "Registered echo canceler '%s'\n", my_factory.name);
+	module_printk(KERN_NOTICE, "Registered echo canceler '%s'\n",
+		my_factory.get_name(NULL));
 
 	return 0;
 }

Modified: linux/trunk/drivers/dahdi/dahdi_echocan_sec2.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/dahdi_echocan_sec2.c?view=diff&rev=9524&r1=9523&r2=9524
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi_echocan_sec2.c (original)
+++ linux/trunk/drivers/dahdi/dahdi_echocan_sec2.c Thu Dec  9 14:19:26 2010
@@ -81,9 +81,11 @@
 static void echo_can_free(struct dahdi_chan *chan, struct dahdi_echocan_state *ec);
 static void echo_can_process(struct dahdi_echocan_state *ec, short *isig, const short *iref, u32 size);
 static int echo_can_traintap(struct dahdi_echocan_state *ec, int pos, short val);
+static const char *name = "SEC2";
+static const char *ec_name(const struct dahdi_chan *chan) { return name; }
 
 static const struct dahdi_echocan_factory my_factory = {
-	.name = "SEC2",
+	.get_name = ec_name,
 	.owner = THIS_MODULE,
 	.echocan_create = echo_can_create,
 };
@@ -330,7 +332,8 @@
 		return -EPERM;
 	}
 
-	module_printk(KERN_NOTICE, "Registered echo canceler '%s'\n", my_factory.name);
+	module_printk(KERN_NOTICE, "Registered echo canceler '%s'\n",
+		      my_factory.get_name(NULL));
 
 	return 0;
 }

Modified: linux/trunk/drivers/dahdi/wcb4xxp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/wcb4xxp/base.c?view=diff&rev=9524&r1=9523&r2=9524
==============================================================================
--- linux/trunk/drivers/dahdi/wcb4xxp/base.c (original)
+++ linux/trunk/drivers/dahdi/wcb4xxp/base.c Thu Dec  9 14:19:26 2010
@@ -102,6 +102,10 @@
 
 #define MAX_B4_CARDS 64
 static struct b4xxp *cards[MAX_B4_CARDS];
+
+/* names of HWEC modules */
+static const char *lasvegas2_name = "LASVEGAS2";
+static const char *noec_name = "NONE";
 
 static int led_fader_table[] = {
 	 0,  0,  0,  1,  2,  3,  4,  6,  8,  9, 11, 13, 16, 18, 20, 22, 24,
@@ -2129,6 +2133,15 @@
 	}
 }
 
+static const char *b4xxp_echocan_name(const struct dahdi_chan *chan)
+{
+	struct b4xxp_span *bspan = container_of(chan->span, struct b4xxp_span,
+						span);
+	if (bspan->parent->card_type == B410P)
+		return lasvegas2_name;
+	return noec_name;
+}
+
 static int b4xxp_echocan_create(struct dahdi_chan *chan,
 				struct dahdi_echocanparams *ecp,
 				struct dahdi_echocanparam *p,
@@ -2370,6 +2383,7 @@
 	.ioctl = b4xxp_ioctl,
 	.hdlc_hard_xmit = b4xxp_hdlc_hard_xmit,
 	.echocan_create = b4xxp_echocan_create,
+	.echocan_name = b4xxp_echocan_name,
 };
 
 /* initialize the span/chan structures. Doesn't touch hardware, although the callbacks might. */

Modified: linux/trunk/drivers/dahdi/wct4xxp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/wct4xxp/base.c?view=diff&rev=9524&r1=9523&r2=9524
==============================================================================
--- linux/trunk/drivers/dahdi/wct4xxp/base.c (original)
+++ linux/trunk/drivers/dahdi/wct4xxp/base.c Thu Dec  9 14:19:26 2010
@@ -236,6 +236,11 @@
 
 #define CANARY 0xc0de
 
+/* names of available HWEC modules */
+static const char *vpm400_name = "VPM400M";
+static const char *vpmoct064_name = "VPMOCT064";
+static const char *vpmoct128_name = "VPMOCT128";
+static const char *noec_name = "NONE";
 
 #define PORTS_PER_FRAMER 4
 
@@ -393,23 +398,13 @@
 
 static void echocan_free(struct dahdi_chan *chan, struct dahdi_echocan_state *ec);
 
-static const struct dahdi_echocan_features vpm400m_ec_features = {
+static const struct dahdi_echocan_features vpm_ec_features = {
 	.NLP_automatic = 1,
 	.CED_tx_detect = 1,
 	.CED_rx_detect = 1,
 };
 
-static const struct dahdi_echocan_features vpm450m_ec_features = {
-	.NLP_automatic = 1,
-	.CED_tx_detect = 1,
-	.CED_rx_detect = 1,
-};
-
-static const struct dahdi_echocan_ops vpm400m_ec_ops = {
-	.echocan_free = echocan_free,
-};
-
-static const struct dahdi_echocan_ops vpm450m_ec_ops = {
+static const struct dahdi_echocan_ops vpm_ec_ops = {
 	.echocan_free = echocan_free,
 };
 #endif
@@ -1279,6 +1274,21 @@
 	return unit;
 }
 
+static const char *t4_echocan_name(const struct dahdi_chan *chan)
+{
+	struct t4 *wc = chan->pvt;
+	if (wc->vpm == T4_VPM_PRESENT) {
+		if (!wc->vpm450m)
+			return vpm400_name;
+		else
+			if (wc->numspans == 2)
+				return vpmoct064_name;
+			else if (wc->numspans == 4)
+				return vpmoct128_name;
+	}
+	return noec_name;
+}
+
 static int t4_echocan_create(struct dahdi_chan *chan,
 			     struct dahdi_echocanparams *ecp,
 			     struct dahdi_echocanparam *p,
@@ -1296,18 +1306,13 @@
 	if (chan->span->offset >= vpmspans)
 		return -ENODEV;
 
-	if (wc->vpm450m) {
-		ops = &vpm450m_ec_ops;
-		features = &vpm450m_ec_features;
-	} else {
-		ops = &vpm400m_ec_ops;
-		features = &vpm400m_ec_features;
-	}
+	ops = &vpm_ec_ops;
+	features = &vpm_ec_features;
 
 	if (ecp->param_count > 0) {
 		dev_warn(&wc->dev->dev, "%s echo canceller does not support "
 			 "parameters; failing request\n",
-			 chan->ec_factory->name);
+			 chan->ec_factory->get_name(chan));
 		return -EINVAL;
 	}
 
@@ -2082,6 +2087,7 @@
 	.dacs = t4_dacs,
 #ifdef VPM_SUPPORT
 	.echocan_create = t4_echocan_create,
+	.echocan_name = t4_echocan_name,
 #endif
 };
 

Modified: linux/trunk/drivers/dahdi/wctdm24xxp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/wctdm24xxp/base.c?view=diff&rev=9524&r1=9523&r2=9524
==============================================================================
--- linux/trunk/drivers/dahdi/wctdm24xxp/base.c (original)
+++ linux/trunk/drivers/dahdi/wctdm24xxp/base.c Thu Dec  9 14:19:26 2010
@@ -174,6 +174,11 @@
 #define EC_SIZE_Q (sizeof(ectab) / 4)
 #endif
 
+/* names of HWEC modules */
+static const char *vpm100m_name = "VPM100M";
+static const char *vpmadt032_name = "VPMADT032";
+static const char *noec_name = "NONE";
+
 /* Undefine to enable Power alarm / Transistor debug -- note: do not
    enable for normal operation! */
 /* #define PAQ_DEBUG */
@@ -255,23 +260,13 @@
 
 static void echocan_free(struct dahdi_chan *chan, struct dahdi_echocan_state *ec);
 
-static const struct dahdi_echocan_features vpm100m_ec_features = {
+static const struct dahdi_echocan_features vpm_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 = {
-	.echocan_free = echocan_free,
-};
-
-static const struct dahdi_echocan_ops vpm150m_ec_ops = {
+static const struct dahdi_echocan_ops vpm_ec_ops = {
 	.echocan_free = echocan_free,
 };
 
@@ -1963,6 +1958,16 @@
 	}
 }
 
+static const char *wctdm_echocan_name(const struct dahdi_chan *chan)
+{
+	struct wctdm *wc = chan->pvt;
+	if (wc->vpm100)
+		return vpm100m_name;
+	else if (wc->vpmadt032)
+		return vpmadt032_name;
+	return noec_name;
+}
+
 static int wctdm_echocan_create(struct dahdi_chan *chan,
 				struct dahdi_echocanparams *ecp,
 				struct dahdi_echocanparam *p,
@@ -1980,18 +1985,13 @@
 	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;
-	}
+	ops = &vpm_ec_ops;
+	features = &vpm_ec_features;
 
 	if (wc->vpm100 && (ecp->param_count > 0)) {
 		dev_warn(&wc->vb.pdev->dev, "%s echo canceller does not "
 			 "support parameters; failing request\n",
-			 chan->ec_factory->name);
+			 chan->ec_factory->get_name(chan));
 		return -EINVAL;
 	}
 
@@ -3682,6 +3682,7 @@
 	.dacs = wctdm_dacs,
 #ifdef VPM_SUPPORT
 	.echocan_create = wctdm_echocan_create,
+	.echocan_name = wctdm_echocan_name,
 #endif
 };
 
@@ -3697,6 +3698,7 @@
 	.dacs = wctdm_dacs,
 #ifdef VPM_SUPPORT
 	.echocan_create = wctdm_echocan_create,
+	.echocan_name = wctdm_echocan_name,
 #endif
 };
 

Modified: linux/trunk/drivers/dahdi/wcte12xp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/wcte12xp/base.c?view=diff&rev=9524&r1=9523&r2=9524
==============================================================================
--- linux/trunk/drivers/dahdi/wcte12xp/base.c (original)
+++ linux/trunk/drivers/dahdi/wcte12xp/base.c Thu Dec  9 14:19:26 2010
@@ -94,6 +94,10 @@
 static const struct t1_desc te120p = {"Wildcard TE120P"};
 static const struct t1_desc te122 = {"Wildcard TE122"};
 static const struct t1_desc te121 = {"Wildcard TE121"};
+
+/* names of HWEC modules */
+static const char *vpmadt032_name = "VPMADT032";
+static const char *noec_name = "NONE";
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20)
 static kmem_cache_t *cmd_cache;
@@ -945,10 +949,9 @@
 		sizeof(wc->span.devicetype) - 1);
 
 #if defined(VPM_SUPPORT)
-	if (wc->vpmadt032) {
+	if (wc->vpmadt032)
 		strncat(wc->span.devicetype, " (VPMADT032)",
 			sizeof(wc->span.devicetype) - 1);
-	}
 #endif
 }
 
@@ -1308,6 +1311,14 @@
 	return 0;
 }
 
+static const char *t1xxp_echocan_name(const struct dahdi_chan *chan)
+{
+	struct t1 *wc = chan->pvt;
+	if (wc->vpmadt032)
+		return vpmadt032_name;
+	return noec_name;
+}
+
 static int t1xxp_echocan_create(struct dahdi_chan *chan,
 				struct dahdi_echocanparams *ecp,
 				struct dahdi_echocanparam *p,
@@ -1537,6 +1548,7 @@
 	.ioctl = t1xxp_ioctl,
 #ifdef VPM_SUPPORT
 	.echocan_create = t1xxp_echocan_create,
+	.echocan_name = t1xxp_echocan_name,
 #endif
 };
 

Modified: linux/trunk/include/dahdi/kernel.h
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/include/dahdi/kernel.h?view=diff&rev=9524&r1=9523&r2=9524
==============================================================================
--- linux/trunk/include/dahdi/kernel.h (original)
+++ linux/trunk/include/dahdi/kernel.h Thu Dec  9 14:19:26 2010
@@ -268,8 +268,8 @@
 /*! A factory for creating instances of software echo cancelers to be used on DAHDI channels. */
 struct dahdi_echocan_factory {
 
-	/*! The name of the factory. */
-	const char *name;
+	/*! Get the name of the factory. */
+	const char *(*get_name)(const struct dahdi_chan *chan);
 
 	/*! Pointer to the module that owns this factory; the module's reference count will be
 	 * incremented/decremented by the DAHDI core as needed.
@@ -851,6 +851,9 @@
 			      struct dahdi_echocanparams *ecp,
 			      struct dahdi_echocanparam *p,
 			      struct dahdi_echocan_state **ec);
+
+	/*! Opt: Provide the name of the echo canceller on a channel */
+	const char *(*echocan_name)(const struct dahdi_chan *chan);
 };
 
 struct dahdi_span {




More information about the svn-commits mailing list