OpenCores
URL https://opencores.org/ocsvn/or1k_old/or1k_old/trunk

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [rc203soc/] [sw/] [uClinux/] [include/] [linux/] [soundmodem.h] - Blame information for rev 1782

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.