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