aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/i4l/isdn_audio.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/isdn/i4l/isdn_audio.h')
-rw-r--r--drivers/isdn/i4l/isdn_audio.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/drivers/isdn/i4l/isdn_audio.h b/drivers/isdn/i4l/isdn_audio.h
new file mode 100644
index 000000000000..5a977b21dcfa
--- /dev/null
+++ b/drivers/isdn/i4l/isdn_audio.h
@@ -0,0 +1,45 @@
1/* $Id: isdn_audio.h,v 1.1.2.2 2004/01/12 22:37:18 keil Exp $
2 *
3 * Linux ISDN subsystem, audio conversion and compression (linklevel).
4 *
5 * Copyright 1994-1999 by Fritz Elfert (fritz@isdn4linux.de)
6 *
7 * This software may be used and distributed according to the terms
8 * of the GNU General Public License, incorporated herein by reference.
9 *
10 */
11
12#define DTMF_NPOINTS 205 /* Number of samples for DTMF recognition */
13typedef struct adpcm_state {
14 int a;
15 int d;
16 int word;
17 int nleft;
18 int nbits;
19} adpcm_state;
20
21typedef struct dtmf_state {
22 char last;
23 char llast;
24 int idx;
25 int buf[DTMF_NPOINTS];
26} dtmf_state;
27
28typedef struct silence_state {
29 int state;
30 unsigned int idx;
31} silence_state;
32
33extern void isdn_audio_ulaw2alaw(unsigned char *, unsigned long);
34extern void isdn_audio_alaw2ulaw(unsigned char *, unsigned long);
35extern adpcm_state *isdn_audio_adpcm_init(adpcm_state *, int);
36extern int isdn_audio_adpcm2xlaw(adpcm_state *, int, unsigned char *, unsigned char *, int);
37extern int isdn_audio_xlaw2adpcm(adpcm_state *, int, unsigned char *, unsigned char *, int);
38extern int isdn_audio_2adpcm_flush(adpcm_state * s, unsigned char *out);
39extern void isdn_audio_calc_dtmf(modem_info *, unsigned char *, int, int);
40extern void isdn_audio_eval_dtmf(modem_info *);
41dtmf_state *isdn_audio_dtmf_init(dtmf_state *);
42extern void isdn_audio_calc_silence(modem_info *, unsigned char *, int, int);
43extern void isdn_audio_eval_silence(modem_info *);
44silence_state *isdn_audio_silence_init(silence_state *);
45extern void isdn_audio_put_dle_code(modem_info *, u_char);