summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKinsey Moore <kmoore@digium.com>2010-12-09 20:19:26 +0000
committerKinsey Moore <kmoore@digium.com>2010-12-09 20:19:26 +0000
commit0a0862817efc1c7a420c155a98c15ac5740513cb (patch)
tree0fbcdd9ff5ed0efbeb663981bb6ff32e6d163159 /include
parentbee3474ea340a48c48323cb97334bbf8b43f78b3 (diff)
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@digium.com> Acked-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9524 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'include')
-rw-r--r--include/dahdi/kernel.h7
1 files changed, 5 insertions, 2 deletions
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 {