1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 #ifndef _UAPI__SOUND_SB16_CSP_H
24 #define _UAPI__SOUND_SB16_CSP_H
25
26
27
28 #define SNDRV_SB_CSP_MODE_NONE 0x00
29 #define SNDRV_SB_CSP_MODE_DSP_READ 0x01
30 #define SNDRV_SB_CSP_MODE_DSP_WRITE 0x02
31 #define SNDRV_SB_CSP_MODE_QSOUND 0x04
32
33
34 #define SNDRV_SB_CSP_LOAD_FROMUSER 0x01
35 #define SNDRV_SB_CSP_LOAD_INITBLOCK 0x02
36
37
38 #define SNDRV_SB_CSP_SAMPLE_8BIT 0x01
39 #define SNDRV_SB_CSP_SAMPLE_16BIT 0x02
40
41
42 #define SNDRV_SB_CSP_MONO 0x01
43 #define SNDRV_SB_CSP_STEREO 0x02
44
45
46 #define SNDRV_SB_CSP_RATE_8000 0x01
47 #define SNDRV_SB_CSP_RATE_11025 0x02
48 #define SNDRV_SB_CSP_RATE_22050 0x04
49 #define SNDRV_SB_CSP_RATE_44100 0x08
50 #define SNDRV_SB_CSP_RATE_ALL 0x0f
51
52
53 #define SNDRV_SB_CSP_ST_IDLE 0x00
54 #define SNDRV_SB_CSP_ST_LOADED 0x01
55 #define SNDRV_SB_CSP_ST_RUNNING 0x02
56 #define SNDRV_SB_CSP_ST_PAUSED 0x04
57 #define SNDRV_SB_CSP_ST_AUTO 0x08
58 #define SNDRV_SB_CSP_ST_QSOUND 0x10
59
60
61 #define SNDRV_SB_CSP_QSOUND_MAX_RIGHT 0x20
62
63
64 #define SNDRV_SB_CSP_MAX_MICROCODE_FILE_SIZE 0x3000
65
66
67 struct snd_sb_csp_mc_header {
68 char codec_name[16];
69 unsigned short func_req;
70 };
71
72
73 struct snd_sb_csp_microcode {
74 struct snd_sb_csp_mc_header info;
75 unsigned char data[SNDRV_SB_CSP_MAX_MICROCODE_FILE_SIZE];
76 };
77
78
79 struct snd_sb_csp_start {
80 int sample_width;
81 int channels;
82 };
83
84
85 struct snd_sb_csp_info {
86 char codec_name[16];
87 unsigned short func_nr;
88 unsigned int acc_format;
89 unsigned short acc_channels;
90 unsigned short acc_width;
91 unsigned short acc_rates;
92 unsigned short csp_mode;
93 unsigned short run_channels;
94 unsigned short run_width;
95 unsigned short version;
96 unsigned short state;
97 };
98
99
100
101 #define SNDRV_SB_CSP_IOCTL_INFO _IOR('H', 0x10, struct snd_sb_csp_info)
102
103
104
105
106
107
108
109 #define SNDRV_SB_CSP_IOCTL_LOAD_CODE \
110 _IOC(_IOC_WRITE, 'H', 0x11, sizeof(struct snd_sb_csp_microcode))
111
112 #define SNDRV_SB_CSP_IOCTL_UNLOAD_CODE _IO('H', 0x12)
113
114 #define SNDRV_SB_CSP_IOCTL_START _IOW('H', 0x13, struct snd_sb_csp_start)
115
116 #define SNDRV_SB_CSP_IOCTL_STOP _IO('H', 0x14)
117
118 #define SNDRV_SB_CSP_IOCTL_PAUSE _IO('H', 0x15)
119
120 #define SNDRV_SB_CSP_IOCTL_RESTART _IO('H', 0x16)
121
122
123 #endif