diff options
author | Shaun Ruffell <sruffell@digium.com> | 2011-01-05 15:52:03 +0000 |
---|---|---|
committer | Shaun Ruffell <sruffell@digium.com> | 2011-01-05 15:52:03 +0000 |
commit | dfc31c15eac3817c233a00336f99ff239e08392a (patch) | |
tree | dad5ca10fa3702f79a2579c3768bb3106d95d70f /include/dahdi/kernel.h | |
parent | 08930ae7db692aceae05f4a17675dcd797bd7542 (diff) |
dahdi: Move the default tone lengths into include/dahdi/dahdi_config.h
The default tone lengths are compile time options and they were in
digits.h to make it easy for users to patch. Most of these settings are
potentially overridden from user space via the DAHDI_SET_DIALPARAMS
ioctl currently regardless of these settings.
In r9597 I moved digits.h directly into dahdi-base.c since I thought it
was broken out for sharing between compilation units as opposed to
ease patching.
I also changed the units of the default options to ms instead of in
samples. This way if the sampling frequency changes the user will not
need to update the defaults.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
asterisk-dev-reference: 4D236FD7.30707@digium.com
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9616 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'include/dahdi/kernel.h')
-rw-r--r-- | include/dahdi/kernel.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/dahdi/kernel.h b/include/dahdi/kernel.h index 6a069b5..bfda765 100644 --- a/include/dahdi/kernel.h +++ b/include/dahdi/kernel.h @@ -100,7 +100,10 @@ #define DAHDI_MAX_CHUNKSIZE DAHDI_CHUNKSIZE #define DAHDI_CB_SIZE 2 -#define DAHDI_MSECS_PER_CHUNK (DAHDI_CHUNKSIZE/8) +/* DAHDI operates at 8Khz by default */ +#define DAHDI_MS_TO_SAMPLES(ms) ((ms) * 8) + +#define DAHDI_MSECS_PER_CHUNK (DAHDI_CHUNKSIZE/DAHDI_MS_TO_SAMPLES(1)) #define RING_DEBOUNCE_TIME 2000 /*!< 2000 ms ring debounce time */ |