diff options
author | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2009-12-14 20:50:59 +0000 |
---|---|---|
committer | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2009-12-14 20:50:59 +0000 |
commit | f64d30da503e3d0269d7ba2c8d2ab975a02ff0e5 (patch) | |
tree | bce6089981a5f09ce6f2abbc94edcbb30c85e3b0 /include | |
parent | e692731061c6137d46b3b08c4289379745409daf (diff) |
DAHDI_AUDIO_NOTIFY: Also pass DAHDI_AUDIOMODE to channel driver
Adds a new compile-time option DAHDI_AUDIO_NOTIFY. With it there's a new
span hook, audio_notify, that gets called (if not NULL) whenever the
ioctl DAHDI_AUDIOMODE is called for a channel.
This can be useful to tell (in most cases) if an ISDN channel is active
or not and thus allow the low-level driver to optimize traffic when
channels are not active.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@7691 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'include')
-rw-r--r-- | include/dahdi/dahdi_config.h | 4 | ||||
-rw-r--r-- | include/dahdi/kernel.h | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/include/dahdi/dahdi_config.h b/include/dahdi/dahdi_config.h index 68547f1..98f0b51 100644 --- a/include/dahdi/dahdi_config.h +++ b/include/dahdi/dahdi_config.h @@ -174,5 +174,9 @@ /* #define OPTIMIZE_CHANMUTE */ +/* + * Pass DAHDI_AUDIOMODE to channel driver as well + */ +#define DAHDI_AUDIO_NOTIFY #endif diff --git a/include/dahdi/kernel.h b/include/dahdi/kernel.h index 731961e..129e9b4 100644 --- a/include/dahdi/kernel.h +++ b/include/dahdi/kernel.h @@ -839,6 +839,11 @@ struct dahdi_span { /*! Opt: Used to tell an onboard HDLC controller that there is data ready to transmit */ void (*hdlc_hard_xmit)(struct dahdi_chan *chan); +#ifdef DAHDI_AUDIO_NOTIFY + /*! Opt: audio is used, don't optimize out */ + int (*audio_notify)(struct dahdi_chan *chan, int yes); +#endif + /* Used by DAHDI only -- no user servicable parts inside */ int spanno; /*!< Span number for DAHDI */ int offset; /*!< Offset within a given card */ |