From 0a0862817efc1c7a420c155a98c15ac5740513cb Mon Sep 17 00:00:00 2001 From: Kinsey Moore Date: Thu, 9 Dec 2010 20:19:26 +0000 Subject: 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 Acked-by: Shaun Ruffell git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9524 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- include/dahdi/kernel.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/dahdi/kernel.h b/include/dahdi/kernel.h index d7f69f2..e7dff97 100644 --- a/include/dahdi/kernel.h +++ b/include/dahdi/kernel.h @@ -268,8 +268,8 @@ struct dahdi_echocan_ops { /*! 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_span_ops { 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 { -- cgit v1.2.3