more changes on original files
[linux-2.4.git] / include / linux / soundmodem.h
1 /*
2  * The Linux soundcard driver for 1200 baud and 9600 baud packet radio
3  * (C) 1996-1998 by Thomas Sailer, HB9JNX/AE4WA
4  */
5
6 #ifndef _SOUNDMODEM_H
7 #define _SOUNDMODEM_H
8
9 /* -------------------------------------------------------------------- */
10 /*
11  * structs for the IOCTL commands
12  */
13
14 struct sm_debug_data {
15         unsigned int int_rate;
16         unsigned int mod_cycles;
17         unsigned int demod_cycles;
18         unsigned int dma_residue;
19 };
20
21 struct sm_diag_data {
22         unsigned int mode;
23         unsigned int flags;
24         unsigned int samplesperbit;
25         unsigned int datalen;
26         short *data;
27 };
28
29 struct sm_mixer_data {
30         unsigned int mixer_type;
31         unsigned int sample_rate;
32         unsigned int bit_rate;
33         unsigned int reg;
34         unsigned int data;
35 };
36
37 struct sm_config {
38         int hardware;
39         int mode;
40 };
41
42 struct sm_ioctl {
43         int cmd;
44         union {
45                 struct sm_config cfg;
46                 struct sm_diag_data diag;       
47                 struct sm_mixer_data mix;
48                 struct sm_debug_data dbg;
49         } data;
50 };
51
52 /* -------------------------------------------------------------------- */
53
54 /*
55  * diagnose modes
56  */
57 #define SM_DIAGMODE_OFF            0
58 #define SM_DIAGMODE_INPUT          1
59 #define SM_DIAGMODE_DEMOD          2
60 #define SM_DIAGMODE_CONSTELLATION  3
61
62 /*
63  * diagnose flags
64  */
65 #define SM_DIAGFLAG_DCDGATE    (1<<0)
66 #define SM_DIAGFLAG_VALID      (1<<1)
67
68 /*
69  * mixer types
70  */
71 #define SM_MIXER_INVALID       0
72 #define SM_MIXER_AD1848        0x10
73 #define SM_MIXER_CRYSTAL       0x11
74 #define SM_MIXER_CT1335        0x20
75 #define SM_MIXER_CT1345        0x21
76 #define SM_MIXER_CT1745        0x22
77
78 /*
79  * ioctl values
80  */
81 #define SMCTL_DIAGNOSE         0x82
82 #define SMCTL_GETMIXER         0x83
83 #define SMCTL_SETMIXER         0x84
84 #define SMCTL_GETDEBUG         0x85
85
86 /* -------------------------------------------------------------------- */
87
88 #endif /* _SOUNDMODEM_H */
89
90 /* --------------------------------------------------------------------- */